Commit Graph

726 Commits

Author SHA1 Message Date
Michael Jasper 37ebf6fc69 Add status to assignment
closes RECNVS-82

Test Plan:
- verify that an assignments state (workflow_state) can be accessed
  using the `state` field

Change-Id: I3d25a50b47e11789e6622bf722042f1959e08be7
Reviewed-on: https://gerrit.instructure.com/133992
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
2017-11-28 22:14:58 +00:00
Michael Jasper 86b28490f9 Add course to assignment
closes RECNVS-26

Test plan:
- create a course with an assignment
- verify that you can access an assignment's parent course (context)
  through that assignment

Change-Id: I3ed26e8ee2277742d3c9d79c4b9478544549134b
Reviewed-on: https://gerrit.instructure.com/133510
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
2017-11-27 22:22:20 +00:00
Michael Jasper 422335a2a2 Add submissions to assignment in GraphQL Api
closes RECNVS-29

Test Plan:

- Create an assignment with submissions
- verify that you can view submissions through Assignments using
  the submissionsConnection
- Verify that you cannot access submissions when logged in as a
  user who does not have permission to view them

Change-Id: I5a944fd1dce718d73e8af301a949cadc18db8727
Reviewed-on: https://gerrit.instructure.com/133176
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Jasper <mjasper@instructure.com>
2017-11-20 23:04:28 +00:00
Michael Jasper 1178c4cb2b Add quiz and discussion to GraphQL
Closes RECNVS-28

Test Plan:

- Create a quiz (legacy) and verify that you can access the quiz
  ID through the quiz field on an Assignment through GraphQL
- Create a graded discussion and verify that you can access the
  discussion ID through the discussion field on an Assignment
  through GraphQL

Change-Id: Ifb6d812d0f48d9c5088735b4df656abfe361ffb1
Reviewed-on: https://gerrit.instructure.com/133078
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
2017-11-16 22:32:24 +00:00
Michael Jasper 58b90e6a5c Add assignment group type to GraphQL
closes RECNVS-55

test plan

- verify that courses contain field assignment groups
- verify that assignment groups contain name, rules,
  groupWeight, position, and workflowState

Change-Id: I103fb85d051b9faaf541a69a668eefea505e56cf
Reviewed-on: https://gerrit.instructure.com/129216
QA-Review: Collin Parrish <cparrish@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Jasper <mjasper@instructure.com>
2017-11-16 17:39:32 +00:00
Michael Jasper dce0254975 Expose submission status in GraphQl Api
refactor rest api for submissions to use same logic and param names

closes CNVS-39777

test plan

- verify that `submissionStatus` and `gradingStatus` are
  available on a submission type query in GraphQL
- verify that the fields `submission_status` and
  `grading_status` are available on the REST enpoint for
  submissions by using the params
  `?include[]=submission_status&include[]=grading_status`

Change-Id: I6bcfdacc9e868b824d2c00082fdd52310c4869d0
Reviewed-on: https://gerrit.instructure.com/128714
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
2017-10-09 17:56:16 +00:00
Michael Jasper 955d81cbe8 Add timestamp interface to graphql types
closes CNVS-39439

test plan:
- query the graphql api for assignments, courses, enrollments,
  grading periods, sections, submissions, and users
- ensure that each type contains the fields `createdAt` and `updatedAt`

Change-Id: I9a2016d4a9bf3b4a6ec4e21c82a91fd9e43ddad2
Reviewed-on: https://gerrit.instructure.com/127033
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
2017-09-27 21:21:27 +00:00
Cameron Matheson b05cd64663 graphql: add lastActivityAt to enrollment type
Change-Id: I3e3eeee7b52a87cbd39f5e69e62863c0683cf0c6
Reviewed-on: https://gerrit.instructure.com/123351
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-09-15 22:56:55 +00:00
Cameron Matheson 7e39b20ca9 graphql: add htmlUrl for assignment
Test plan:
  get the url for assignments using the graphql api

Change-Id: Ia195782286b9b3e0f58e7a21667eb6f24112deef
Reviewed-on: https://gerrit.instructure.com/125816
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-09-15 22:46:19 +00:00
Cameron Matheson 2546ea8fc0 fix grade lookups for courses with no grading periods
closes CNVS-39141

Test plan:
  use the graphql api to fetch grades on enrollments in a course that
  doesn't have grading periods

Change-Id: Ia0172670763e628bff72413c910617b4df9cbdc8
Reviewed-on: https://gerrit.instructure.com/125405
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-09-14 22:13:58 +00:00
Cameron Matheson ac81d23003 graphql: hide scores for muted assignments
fixes CNVS-38623

Test plan:
  make sure students cannot access muted grades through graphql

Change-Id: I7456160e3a069cfe266d109bb0d1425fb9407ff3
Reviewed-on: https://gerrit.instructure.com/124922
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-09-06 15:31:57 +00:00
Cameron Matheson c1e10627e4 graphql: student-in-course analytics summary types
refs CNVS-37582, refs CNVS-37583

Test plan:
  querying for a users summaryAnalytics should return null (the real
  implementation is provided by the analytics plugin)

Change-Id: I6fb746ac0ed5b1ca6192e6b814eab0bf112bef9b
Reviewed-on: https://gerrit.instructure.com/123216
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-08-21 20:08:26 +00:00
Cameron Matheson 4d247b274c graphql course permissions
closes CNVS-38594

Test plan:
  query course permissions using the graphql api

Change-Id: I0b13f8e866ad6fd7c023349a6464b0e2385c0e90
Reviewed-on: https://gerrit.instructure.com/122350
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-08-16 18:21:06 +00:00
Cameron Matheson e083044059 graphql: make submission connection student ids non-nullable
Change-Id: I41196db448735c0df515d24bd3328523c96f24cb
Reviewed-on: https://gerrit.instructure.com/122349
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2017-08-10 20:39:48 +00:00
Cameron Matheson 7a821f6f32 graphql: add submission type
closes CNVS-37581

Test plan: list the submissions in a course (make sure to test the
  studentIds and orderBy params)

Change-Id: Ica59cb08981ce37fb7e61e83fe891edda73a0b40
Reviewed-on: https://gerrit.instructure.com/121084
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-08-02 21:25:52 +00:00
Cameron Matheson 890de0ae2e graphql: make grades nullable
(only students have grades)

Change-Id: Ic17d6168f6093bf825a8865c4d9dc6ca05c85617
Reviewed-on: https://gerrit.instructure.com/120543
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2017-07-31 22:36:31 +00:00
Cameron Matheson bedd40a43a graphql: add grades
closes CNVS-37580

Test plan: get grades using the graphql api

Change-Id: Ic878ffb7356cd1e1ec6d3f3c90265900ca8a4e6d
Reviewed-on: https://gerrit.instructure.com/119975
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-21 21:17:33 +00:00
Cameron Matheson a6c01017ed graphql: add grading period type
closes CNVS-37579

Test plan:
  * fetch grading periods for a course with the graphql api

Change-Id: I4c5afa186a31fdb7c303131f92a65d0a2b1ffaeb
Reviewed-on: https://gerrit.instructure.com/119374
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-21 18:48:50 +00:00
Cameron Matheson 77188c25dd graphql: add enrollment type
closes CNVS-37185

Test plan:
  fetch enrollments with the graphql api

Change-Id: I96623a94d561ee63841a7de6db025813a9ddc54b
Reviewed-on: https://gerrit.instructure.com/117048
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-17 22:35:34 +00:00
Cameron Matheson c8e2d62637 use new GraphQL::Batch initialization method
Change-Id: I09b329be926c9dd0031d281399dbff1513e07be5
Reviewed-on: https://gerrit.instructure.com/117047
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-07 22:13:04 +00:00
Cameron Matheson f389c95e1d add graphql inflection
Change-Id: I75c2e3431a93cde1e707510455aca1fc2ac98e2b
Reviewed-on: https://gerrit.instructure.com/117046
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-07 22:12:54 +00:00
Cameron Matheson 7fc13af54e graphql: add user type
closes CNVS-37185

Test plan:
  * use graphql to query for users
  * make sure you can't load users you don't have permission to see

Change-Id: I8d4a98c96cc6e718afc35df7852f28a3b8a1e755
Reviewed-on: https://gerrit.instructure.com/114972
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-07 22:12:45 +00:00
Cameron Matheson aff32e66d6 remove reundant error handling
the graphql gem handles already handles this case

Change-Id: Idcda951f62ce354ddbdd68de49473c2805f51881
Reviewed-on: https://gerrit.instructure.com/116644
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2017-07-07 02:44:03 +00:00
Cameron Matheson 001f6bf25d add graphql section type
closes CNVS-37182

Test plan:
  * use the graphql api to view the sections in a course

Change-Id: I700ca1d401122932cefd62f8d3526be996b12750
Reviewed-on: https://gerrit.instructure.com/114965
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-06 01:02:08 +00:00
Cameron Matheson 041930b3ed graphql: legacy node loader
closes CNVS-37180

Test plan:
  * load a course and/or assignment with the new legacyNode field

    {
      legacyNode(type: Assignment, _id: 1234) {
        ... on Assignment {
          id
          _id
          name
        }
      }
    }

Change-Id: Iced9eaadd178458f0519c54509f60bd2c9b5832c
Reviewed-on: https://gerrit.instructure.com/113543
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-07-06 01:01:47 +00:00
Cameron Matheson 5545a6e121 introduce /api/graphql
DO NOT USE THIS YET.  It is beautiful, but unready.

Test plan:
  1. enable graphql feature flag
  1. go to /graphiql
  2. shed tears of joy

closes CNVS-37001, CNVS-37004

Change-Id: I94ae9c452fe987efcc5e88659ca9c932c280097e
Reviewed-on: https://gerrit.instructure.com/112867
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-05-25 21:38:22 +00:00