Commit Graph

84 Commits

Author SHA1 Message Date
Cameron Matheson 8258f6ee20 graphql: properly process assignment description
Test plan:
  add links to various course files in an assignment's description.  The
  description returned by graphql should return fully qualifed links
  (the description should be the same as the description returned by the
  REST api).

closes GQL-7

Change-Id: I189f45160697860201ec8fe6fe1fa2771e18cc35
Reviewed-on: https://gerrit.instructure.com/171990
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-11-27 19:20:42 +00:00
Adrian Packel 7fa746b077 Add setOverrideScore mutation
closes GRADE-84

Test plan:
Note that you can also test this via the /graphiql endpoint on local
Canvas installation once you've logged in (you can use the query
string from the heredoc below).

- Identify a Score object you want to update and its corresponding
  Enrollment object
- In a Rails console:
  > mutation_str = <<~STR
    mutation {
      setOverrideScore(input: {
        enrollmentId: <the enrollment ID>
        gradingPeriodId: <ID of associated grading period if exists>
        overrideScore: 123.4567 <or whatever>
      }) {
        grades {
          gradingPeriod {
            id
            _id
          }
          overrideScore
        }
        errors {
          attribute
          message
        }
      }
    }
  STR
  > user = User.find(<a user ID with appropriate permissions>)
  > CanvasSchema.execute(mutation_str, context: {current_user: user})

- You should get back a response with no errors and a score-like object
  (technically a Grades type in GraphQL)
- The properties of the returned object should include the override score
  you set and, if you updated a score belonging to a grading period, the
  GraphQL and Rails ID fields for the grading period (in the gradingPeriod
  attribute)
- Check the Score object with the matching enrollment/grading period to
  make sure your call did indeed update it

- Also try the following:
  - Excluding the gradingPeriodId field from the input hash (i.e.,
    update the score associated with an enrollment and not belonging
    to a grading period)
  - Passing "null" (without the quotes) for the overrideScore; this
    should clear an existing value
- The following should return errors and no score data:
  - Passing in malformed values for overrideScore or the ID fields
  - Passing in an ID for a non-existent enrollment/grading period
  - Running the CanvasSchema.execute command with current_user set to a
    user who does not have permissions to modify the score in question
    (e.g., a student, or generally someone who's not a teacher in that
    course)

Change-Id: I2b5c6a80842a6febdb1e398a41aa71ea37cdb064
Reviewed-on: https://gerrit.instructure.com/172472
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2018-11-16 17:26:23 +00:00
Cameron Matheson e93d7ddd43 graphql: fix terrible perf in Assignment.htmlUrl
user       system      total        real
 before:  9.120000   0.020000   9.140000 (  9.121676)
 after:   1.290000   0.000000   1.290000 (  1.284826)

    require 'benchmark'

    UrlHelpers = Rails.application.routes.url_helpers

    Benchmark.bm do |bm|
      bm.report("before:") do
        500.times { Class.new { include Rails.application.routes.url_helpers } }
      end
      bm.report("after: ") do
        500.times { Class.new { include UrlHelpers } }
      end
    end

Test plan: htmlUrl should still work for assignments

closes GQL-14

Change-Id: Icb6efe78b4d807cef046d85d798319047ce25c2a
Reviewed-on: https://gerrit.instructure.com/171989
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-11-14 16:39:28 +00:00
Cameron Matheson c0719109d5 graphql: add term type
closes GQL-1

Test plan:
  * fetch the enrollment term from courses with graphql

Change-Id: Ie4432fa4e1a4c54698c4239032e52b711c1a4536
Reviewed-on: https://gerrit.instructure.com/165580
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-11-14 16:39:07 +00:00
Cameron Matheson 51e624a1ff graphql: add CreateGroupInSet mutation
refs GQL-3

test plan:
  * create a group in a group set using graphql

Change-Id: I81f3e3c02b19961a31cdd9695adf7a4c11c90693
Reviewed-on: https://gerrit.instructure.com/166125
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-11-14 00:49:29 +00:00
Rob Orton eeda02b181 spec: use match_array to not care about order
test plan
 - specs should pass

Change-Id: Icf80dcb5a6ef865f9078f65832ff00e605982145
Reviewed-on: https://gerrit.instructure.com/171120
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2018-11-05 23:48:10 +00:00
Cameron Matheson 6b0114e9d0 graphql: add some top-level fields
These objects were originally accessible via the node/legacyNode, but
these first-class fields will be a bit more convenient to use.

Test plan:
  * retrieve objects from the top-level
    course/assignment/assignmentGroup fields

Change-Id: I6f64a0841a36dabd753e8e91aa4145689d56fc1b
Reviewed-on: https://gerrit.instructure.com/167469
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-10-12 15:44:11 +00:00
Cameron Matheson 664652edfb graphql: add group sets
closes RECNVS-746, GQL-2

Test plan:
  query for group sets through node, the course, and assignments

Change-Id: Ie362a429172f0096d0852db836fd5a40f7fe2cfe
Reviewed-on: https://gerrit.instructure.com/166124
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-10-09 22:05:04 +00:00
Cameron Matheson 815f776e24 graphql: remove fallback from avatar url
Test plan:
  * enable avatars
  * don't have an avatar for a user
  * the user's avatarUrl should return null in graphql

Change-Id: Ia47942a32eecedc5c99e0bec91f50e58ad3c1025
Reviewed-on: https://gerrit.instructure.com/165602
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-25 17:30:03 +00:00
Jeremy Stanley b39a002e5b spec: fix flaky order-dependent spec
Change-Id: I93080ba369a8b11cb54341e39ac4ede69e1f3b56
Reviewed-on: https://gerrit.instructure.com/165461
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2018-09-24 19:33:28 +00:00
Jeremy Stanley b6a96fbed8 graphql: add use_fallback argument to avatar_url
test plan: go to /graphiql and confirm the useFallback
 argument to avatarUrl functions as expected
 on a user with no defined avatar

i.e.,
{
  legacyNode(_id: 2, type: User) {
    ... on User {
      name
      avatar_url:avatarUrl(useFallback:false)
    }
  }
}
should return null for avatar_url

closes ADMIN-1426

Change-Id: Ic388bd4130fbbb892b37462852be2861d8af5c93
Reviewed-on: https://gerrit.instructure.com/163869
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2018-09-15 04:24:39 +00:00
Cameron Matheson b90e254829 graphql: update user type specs
refs RECNVS-553

Test plan: specs pass

Change-Id: I5115f7c7bf6d23248e11f91e553648d6b18bdc60
Reviewed-on: https://gerrit.instructure.com/163993
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-09-12 22:04:59 +00:00
Cameron Matheson 5a2d9e886e graphql: fix loading users from node
closes RECNVS-610

The existing permission basically only allowed users to load themselves,
or admins to load about anyone, but teachers couldn't even load their
own students.

Test plan:
  - users should be able to load users they have permission to view via
    the top-level node/legacyNode fields

Change-Id: Ib9cfa750d7797253e678b057fc19cc2add4b39e8
Reviewed-on: https://gerrit.instructure.com/163605
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-09-12 22:04:50 +00:00
Cameron Matheson 780812f154 graphql: update lock_info type specs
refs RECNVS-553

Test plan: specs pass

Change-Id: I22a9301a02c744cf3089b96219a09bf3172aea3b
Reviewed-on: https://gerrit.instructure.com/164041
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-12 19:29:09 +00:00
Cameron Matheson bccc76a054 graphql: update query type specs
refs RECNVS-553

Test plan: specs pass

Change-Id: I66b6130f2b726ec241f7b85fe01943ada596ada8
Reviewed-on: https://gerrit.instructure.com/164031
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-12 19:29:04 +00:00
Cameron Matheson 2126b996aa graphql: update submisison type specs
closes RECNVS-553

Test plan: specs pass

Change-Id: I7390b5e004f3c26470701d93efadc0af6a5954e8
Reviewed-on: https://gerrit.instructure.com/164092
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-12 19:28:51 +00:00
Cameron Matheson 69770c3db6 graphql: update section type specs
refs RECNVS-553

Test plan: specs pass

Change-Id: I34b0205ee1889b601822e3cdee7e02f2fc59043a
Reviewed-on: https://gerrit.instructure.com/163603
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-11 17:37:39 +00:00
Cameron Matheson 73f7725ff8 graphql: convert module and page specs
refs RECNVS-553

Test plan: specs pass

Change-Id: I16c9d651bd85d0efc75fd3d1c61fa33768413c04
Reviewed-on: https://gerrit.instructure.com/163237
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-07 20:21:58 +00:00
Cameron Matheson 7f7f9a02c2 graphql: update group type specs
refs RECNVS-553

Test plans: specs pass

Change-Id: I8b890a7325987cc8c2c1fdc4d26ef23b01d86648
Reviewed-on: https://gerrit.instructure.com/163101
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-07 20:20:19 +00:00
Cameron Matheson 863bde3cca graphql: update enrollment type specs
refs RECNVS-553

Test plan:
  * query for grading period on the grades type

Change-Id: I22802e4391fb0e546bbd70182105ff4c4c3b5945
Reviewed-on: https://gerrit.instructure.com/162813
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-07 20:19:42 +00:00
Cameron Matheson fc4a6eb6a7 graphql: update grading period type specs
refs RECNVS-553

Test plan: specs pass

Change-Id: Ic3198115ba0235a09f3bec4926dfe83736cdddff
Reviewed-on: https://gerrit.instructure.com/162998
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-07 20:17:52 +00:00
Cameron Matheson 9ff5a7d50a graphql: update enrollment type to class api
Test plan: specs pass

Change-Id: Icf6e6a24d04b3f4fdd10a9b80a388218a0165a71
Reviewed-on: https://gerrit.instructure.com/162590
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-04 19:52:04 +00:00
Cameron Matheson c48e24bbf5 graphql: update quiz and discussion unit tests
refs RECNVS-553

Test plan: specs pass

Change-Id: I6316cf4fb804588a47fe3fb99857dd1445076690
Reviewed-on: https://gerrit.instructure.com/162272
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-04 19:51:44 +00:00
Cameron Matheson 41d047b7ea graphql: update course permission unit tests
refs RECNVS-553

Test plan: specs pass

Change-Id: I240d310be809753f95665f03b95a6ec9893976d7
Reviewed-on: https://gerrit.instructure.com/162265
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-04 19:51:31 +00:00
Cameron Matheson 6a31ab0f9b graphql: update assignment override unit tests
refs RECNVS-553

Test plan: specs pass

Change-Id: I8388998c8932d5bcfd1636109bb98010713bf73f
Reviewed-on: https://gerrit.instructure.com/162264
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-04 19:51:18 +00:00
Cameron Matheson 1e832b2522 graphql: update assignment type tests
refs RECNVS-553

Test plan: specs pass

Change-Id: I654c8d9e3caed420172de7dc5b23e9852dbb14f8
Reviewed-on: https://gerrit.instructure.com/161891
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-04 18:33:20 +00:00
Cameron Matheson 1ccdfd7c9b graphql: update assignment group unit tests
refs RECNVS-553

Test plan: specs pass

Change-Id: I87d390f53653566b7b3c3310288078f75e31d109
Reviewed-on: https://gerrit.instructure.com/161730
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-04 18:33:07 +00:00
Cameron Matheson 19547c1616 graphql: update course type unit tests
refs RECNVS-553

Test plan: specs pass

Change-Id: Ia06ddf5bfb5eec6ca22bde8e93f3958e1f37ea5f
Reviewed-on: https://gerrit.instructure.com/161729
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-09-04 18:32:12 +00:00
Cameron Matheson 6d1a2741c8 rename graphql_type_tester
refs RECNVS-553

this paves the way for the new type tester

Test plan: specs pass

Change-Id: I0c41ea0b67811f8c00e8130d08451217f9e6d565
Reviewed-on: https://gerrit.instructure.com/161728
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-08-30 19:54:58 +00:00
Cody Cutrer 6d82a64c24 moar preloads
refs CORE-1541

Change-Id: I51967c0eebcd4dc6f9282dd9e8b3934dafb62aca
Reviewed-on: https://gerrit.instructure.com/160315
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-08-10 17:28:38 +00:00
Cameron Matheson 510e76e062 graphql: make assignments_connection_interface
closes RECNVS-410

this ensures the access to assignments between course and assignment_group
behave the same

Test plan:
  * set up a course in a term with grading periods
  * make assignments in all of the grading periods
  * in graphql, an AssignmentGroup's assignmentsConnection should return
    assignments from the curreng grading period
  * you can specify a different grading period with the filter argument
    to retrieve other assignments

Change-Id: I1a9dbc506db4d0f4fffdae90427f0bdd92cdeea8
Reviewed-on: https://gerrit.instructure.com/154587
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-07-06 23:00:22 +00:00
Cameron Matheson 9a41735cf8 graphql: move course type to class-based api
refs RECNVS-478

Test plan: specs pass

Change-Id: I761850ee9863c25cb900fd14d7ede2a82c52b86e
Reviewed-on: https://gerrit.instructure.com/154586
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2018-07-06 21:09:20 +00:00
Cameron Matheson 62d48f37a8 graphql: upgrade some objects to class-based api
closes RECNVS-478

Test plan:
  tests pass

Change-Id: I80ed55ce5b8098a5fb2217e1ee7fc0f3f9fc2147
Reviewed-on: https://gerrit.instructure.com/153495
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-06-13 19:27:07 +00:00
Cameron Matheson 5586d015cb upgrade graphql gem to 1.8.0
closes RECNVS-450
closes RECNVS-463

Test plan:
  tests pass

Change-Id: I952bd83924d1fae53a7fa83f9f4dbc361bfd6b41
Reviewed-on: https://gerrit.instructure.com/151911
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-06-08 17:22:10 +00:00
Cameron Matheson f635915470 graphql: add lock info type
closes RECNVS-409

Test plan:
  * have assignments in a course locked for the following reasons:
    - assignment locked_at
    - assignment unlocked_at
    - locked quiz
    - locked discussion
    - locked wiki page
    - locked module
  * check that the lockInfo object on the assignment accurately reports
    if the assignment is locked and references the proper lockedObject

Change-Id: Ifcfa5bb130b16a2f392f1ca05239e085b961fc9c
Reviewed-on: https://gerrit.instructure.com/150245
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-05-24 21:23:39 +00:00
Cameron Matheson 958925aa15 graphql: add page type
closes RECNVS-457

Test plan:
  * retrieve wiki page(s) using the graphql node or legacyNode field

Change-Id: I43310803cf74139a6527ba10f628d1bc7a8a21c1
Reviewed-on: https://gerrit.instructure.com/150759
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-05-23 21:16:22 +00:00
Cameron Matheson 88dacff001 graphql: add module type
closes RECNVS-456

Test plan:
  Retrieve modules from the graphql api using the node (or legacyNode)
  field

Change-Id: I891b7c0cf5160186db68da0230aed5ffd2a75f13
Reviewed-on: https://gerrit.instructure.com/150530
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-05-23 21:16:13 +00:00
Cameron Matheson 7d24380faa graphql: allow filtering enrollments by workflow_state
refs RECNVS-411

Test plan:
  use the enrollmentStates filter on the Course usersConnection to
  filter the set of users that are returned

Change-Id: Ie2faf4a50efdb97db93c24114a112cf5345b00cc
Reviewed-on: https://gerrit.instructure.com/147888
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2018-05-01 17:18:40 +00:00
Cameron Matheson 12f7e181db graphql: add {lock,unlock}At to assignments
closes RECNVS-407

Test plan:
  * add lock/unlock dates to assignments (some of these should be
    overridden)
  * make sure graphql returns the proper data

Change-Id: I3217e5762c7693b9417cf472b39b2139a40d2771
Reviewed-on: https://gerrit.instructure.com/145968
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-04-20 22:35:59 +00:00
Cameron Matheson 75b43e3f47 graphql: add muted attribute to assignments
closes RECNVS-408

Test plan:
  query assignment muted status with graphql

Change-Id: Ia29d34f4652ddc6a93851a3fa7a1fd88d7af144e
Reviewed-on: https://gerrit.instructure.com/145935
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-04-20 16:15:18 +00:00
Cameron Matheson d78540dbc9 graphql: filter assignments by grading period
closes RECNVS-278

Test plan:
  * set up a course with grading periods
  * the Course assignmentsConnection will only return assigments due in
    the current grading period by default (you can specify alternate
    grading periods with the `filter` argument).

Change-Id: I9a0237bb38ebea0d5ec3405b2ad2769b3bd39ab2
Reviewed-on: https://gerrit.instructure.com/143732
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Tested-by: Jenkins
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-04-19 02:46:53 +00:00
Cameron Matheson b81b8e8be6 graphql: make loaders shard-aware
closes RECNVS-376

Test plan:
  * have accounts/courses on multiple shards
  * make sure you can retrieve objects from multiple shards in one query

Change-Id: I8428345e741ed5198c29d32fb70d57248ec2aca4
Reviewed-on: https://gerrit.instructure.com/145423
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-04-18 20:03:18 +00:00
Stewie (Nicholas Stewart) 5fa6bb57b9 Add copyright message to remaining .rb files
Update: Copyright years now reflect the year that the file was first
committed.

Refs: PLAT-3200

Test Plan: jenkins is still happy and specs pass!!

Change-Id: Ic26463defe41fc52cf4da8020976394c641f51d5
Reviewed-on: https://gerrit.instructure.com/143545
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2018-03-19 13:38:50 +00:00
Cameron Matheson 11a46b8fb3 [ci selinimum capture] Revert "re-add and disable graphql feature flag"
This reverts commit 02cb94cdc1595b9209700a44c6c623b0addfd635.

Change-Id: Ifcb20d6036822f4ef8c562a4036c40b89a2af5bc
Reviewed-on: https://gerrit.instructure.com/142760
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-03-07 20:15:45 +00:00
Cameron Matheson 09badefaae re-add and disable graphql feature flag
[ci no-cached-dist]

need to bring these back until we figure out what's wrong with the build

Change-Id: Iaeb4e639f0c1a11e6d540267bfb593c0e83e2089
Reviewed-on: https://gerrit.instructure.com/142733
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-03-06 20:31:17 +00:00
Cameron Matheson 5866d1ef9c graphql: make assignment override instrumenter work
closes RECNVS-308

Test plan:
  * set up assignments with overrides in a variety of situations
  * assignment dates should be overridden appropriately
  * assignment due dates are *not* overridden when enumerating
    assignmentOverrides

Change-Id: Iefec250bbcf095fb40cfb3b204f3521676e0d9f9
Reviewed-on: https://gerrit.instructure.com/142505
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-03-06 16:54:50 +00:00
Cameron Matheson d84d8d0c6b remove graphql feature flag
closes RECNVS-332

Test plan:
  * context cards should work (they should not use the REST API)
  * graphql should work

Change-Id: I30f273e52a6d5e64dd049c3583211e545605f6e2
Reviewed-on: https://gerrit.instructure.com/141966
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-03-05 23:13:04 +00:00
Cameron Matheson a4743b0ba3 graphql: add late policy fields to submissions
closes RECNVS-275

Test plan:
  * set up a course with a late policy
  * turn submissions in late and grade them
  * the graphql field *deductedPoints* should correspond to how many
    points were subtracted.
  * enteredScore/enteredGrade should reflect the scores before late
    policy application (score/grade should include late policy
    deductions)

Change-Id: I81d89b84c6d847b50373bd47c7f1c70c6f839e07
Reviewed-on: https://gerrit.instructure.com/141119
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-02-21 17:20:41 +00:00
Cameron Matheson 6e2ff4d055 graphql: allow filtering submissions by workflow_state
closes RECNVS-277

Test plan:
  - set up a course with submissions in a variety of states (graded /
    submitted / unsubmitted)
  - filter the list of submissions returned in graphql with the new
    filter: argument on submissionsConnection

Change-Id: I0c0e8afd7a69e7d6a75b56efbde79265582ed695
Reviewed-on: https://gerrit.instructure.com/140695
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-02-15 17:33:15 +00:00
Cameron Matheson f8fdd477d2 graphql: make enrollments work for inactive users
closes RECNVS-270

Test plan:
  * fetch enrollments for users in a variety of workflow_states
  * the courseId argument is now optional (so make sure it works with
    and without)

Change-Id: I0fcb593c78003fba9e7705a869ec3e428482aa16
Reviewed-on: https://gerrit.instructure.com/139647
Tested-by: Jenkins
QA-Review: Collin Parrish <cparrish@instructure.com>
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-02-05 17:25:01 +00:00