lms-graphql-api 1.9.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lms_graphql/mutations/canvas/add_multiple_allowed_domains_to_account.rb +1 -1
  3. data/lib/lms_graphql/mutations/canvas/add_users_to_content_share.rb +1 -1
  4. data/lib/lms_graphql/mutations/canvas/create_content_share.rb +1 -1
  5. data/lib/lms_graphql/mutations/canvas/create_instaccess_token.rb +22 -0
  6. data/lib/lms_graphql/mutations/canvas/create_jwt.rb +5 -3
  7. data/lib/lms_graphql/mutations/canvas/create_user_login.rb +4 -2
  8. data/lib/lms_graphql/mutations/canvas/create_webhook_subscription.rb +1 -1
  9. data/lib/lms_graphql/mutations/canvas/delete_eportfolio.rb +24 -0
  10. data/lib/lms_graphql/mutations/canvas/edit_user.rb +4 -2
  11. data/lib/lms_graphql/mutations/canvas/edit_user_login.rb +6 -2
  12. data/lib/lms_graphql/mutations/canvas/grade_or_comment_on_multiple_submissions_courses_assignments.rb +3 -3
  13. data/lib/lms_graphql/mutations/canvas/grade_or_comment_on_multiple_submissions_courses_submissions.rb +3 -3
  14. data/lib/lms_graphql/mutations/canvas/grade_or_comment_on_multiple_submissions_sections_assignments.rb +3 -3
  15. data/lib/lms_graphql/mutations/canvas/grade_or_comment_on_multiple_submissions_sections_submissions.rb +3 -3
  16. data/lib/lms_graphql/mutations/canvas/grade_or_comment_on_submission_by_anonymous_id_courses.rb +51 -0
  17. data/lib/lms_graphql/mutations/canvas/grade_or_comment_on_submission_by_anonymous_id_sections.rb +51 -0
  18. data/lib/lms_graphql/mutations/canvas/mark_document_annotations_as_read_courses.rb +28 -0
  19. data/lib/lms_graphql/mutations/canvas/mark_document_annotations_as_read_sections.rb +28 -0
  20. data/lib/lms_graphql/mutations/canvas/mark_rubric_comments_as_read_courses.rb +28 -0
  21. data/lib/lms_graphql/mutations/canvas/mark_rubric_comments_as_read_sections.rb +28 -0
  22. data/lib/lms_graphql/mutations/canvas/moderate_all_eportfolios_for_user.rb +27 -0
  23. data/lib/lms_graphql/mutations/canvas/moderate_eportfolio.rb +27 -0
  24. data/lib/lms_graphql/mutations/canvas/mutations.rb +19 -8
  25. data/lib/lms_graphql/mutations/canvas/restore_deleted_eportfolio.rb +24 -0
  26. data/lib/lms_graphql/mutations/canvas/terminate_all_user_sessions.rb +24 -0
  27. data/lib/lms_graphql/mutations/canvas/update_associated_courses.rb +2 -2
  28. data/lib/lms_graphql/mutations/canvas/update_course.rb +8 -2
  29. data/lib/lms_graphql/mutations/canvas/update_course_settings.rb +3 -1
  30. data/lib/lms_graphql/resolvers/canvas/get_all_eportfolios_for_user.rb +25 -0
  31. data/lib/lms_graphql/resolvers/canvas/get_bulk_user_progress.rb +22 -0
  32. data/lib/lms_graphql/resolvers/canvas/get_custom_colors.rb +1 -1
  33. data/lib/lms_graphql/resolvers/canvas/get_department_level_statistics_broken_down_by_subaccount_completed.rb +22 -0
  34. data/lib/lms_graphql/resolvers/canvas/get_department_level_statistics_broken_down_by_subaccount_current.rb +22 -0
  35. data/lib/lms_graphql/resolvers/canvas/get_department_level_statistics_broken_down_by_subaccount_terms.rb +24 -0
  36. data/lib/lms_graphql/resolvers/canvas/get_document_annotations_read_state_courses.rb +26 -0
  37. data/lib/lms_graphql/resolvers/canvas/get_document_annotations_read_state_sections.rb +26 -0
  38. data/lib/lms_graphql/resolvers/canvas/get_eportfolio.rb +22 -0
  39. data/lib/lms_graphql/resolvers/canvas/get_eportfolio_pages.rb +23 -0
  40. data/lib/lms_graphql/resolvers/canvas/get_manually_created_courses_sub_account_for_domain_root_account.rb +22 -0
  41. data/lib/lms_graphql/resolvers/canvas/get_rubric_comments_read_state_courses.rb +26 -0
  42. data/lib/lms_graphql/resolvers/canvas/get_rubric_comments_read_state_sections.rb +26 -0
  43. data/lib/lms_graphql/resolvers/canvas/get_single_submission_by_anonymous_id_courses.rb +28 -0
  44. data/lib/lms_graphql/resolvers/canvas/get_single_submission_by_anonymous_id_sections.rb +28 -0
  45. data/lib/lms_graphql/resolvers/canvas/list_announcements.rb +1 -1
  46. data/lib/lms_graphql/resolvers/canvas/list_missing_submissions.rb +3 -1
  47. data/lib/lms_graphql/resolvers/canvas/list_planner_items_planner.rb +3 -1
  48. data/lib/lms_graphql/resolvers/canvas/list_planner_items_users.rb +3 -1
  49. data/lib/lms_graphql/types/canvas/account_notification_input.rb +2 -2
  50. data/lib/lms_graphql/types/canvas/appointment_group_input.rb +6 -6
  51. data/lib/lms_graphql/types/canvas/assignment.rb +1 -0
  52. data/lib/lms_graphql/types/canvas/assignment_event_input.rb +2 -2
  53. data/lib/lms_graphql/types/canvas/assignment_input.rb +5 -4
  54. data/lib/lms_graphql/types/canvas/authentication_event_input.rb +2 -2
  55. data/lib/lms_graphql/types/canvas/change_record.rb +1 -1
  56. data/lib/lms_graphql/types/canvas/change_record_input.rb +1 -1
  57. data/lib/lms_graphql/types/canvas/collaborator_input.rb +2 -2
  58. data/lib/lms_graphql/types/canvas/comm_message_input.rb +2 -2
  59. data/lib/lms_graphql/types/canvas/communication_channel_input.rb +4 -4
  60. data/lib/lms_graphql/types/canvas/completion_requirement_input.rb +2 -2
  61. data/lib/lms_graphql/types/canvas/content_export_input.rb +4 -4
  62. data/lib/lms_graphql/types/canvas/content_migration_input.rb +2 -2
  63. data/lib/lms_graphql/types/canvas/content_share.rb +1 -1
  64. data/lib/lms_graphql/types/canvas/content_share_input.rb +1 -1
  65. data/lib/lms_graphql/types/canvas/course_input.rb +4 -4
  66. data/lib/lms_graphql/types/canvas/discussion_topic.rb +1 -1
  67. data/lib/lms_graphql/types/canvas/discussion_topic_input.rb +7 -7
  68. data/lib/lms_graphql/types/canvas/e_portfolio.rb +24 -0
  69. data/lib/lms_graphql/types/canvas/e_portfolio_input.rb +24 -0
  70. data/lib/lms_graphql/types/canvas/e_portfolio_page.rb +20 -0
  71. data/lib/lms_graphql/types/canvas/e_portfolio_page_input.rb +20 -0
  72. data/lib/lms_graphql/types/canvas/epub_export_input.rb +2 -2
  73. data/lib/lms_graphql/types/canvas/exception_record.rb +1 -1
  74. data/lib/lms_graphql/types/canvas/exception_record_input.rb +1 -1
  75. data/lib/lms_graphql/types/canvas/external_feed_input.rb +2 -2
  76. data/lib/lms_graphql/types/canvas/favorite_input.rb +2 -2
  77. data/lib/lms_graphql/types/canvas/feature.rb +1 -1
  78. data/lib/lms_graphql/types/canvas/feature_flag_input.rb +4 -4
  79. data/lib/lms_graphql/types/canvas/feature_input.rb +3 -3
  80. data/lib/lms_graphql/types/canvas/group_category_input.rb +4 -4
  81. data/lib/lms_graphql/types/canvas/group_input.rb +4 -4
  82. data/lib/lms_graphql/types/canvas/group_membership_input.rb +2 -2
  83. data/lib/lms_graphql/types/canvas/inst_access_token.rb +14 -0
  84. data/lib/lms_graphql/types/canvas/inst_access_token_input.rb +14 -0
  85. data/lib/lms_graphql/types/canvas/migration_issue_input.rb +4 -4
  86. data/lib/lms_graphql/types/canvas/module_input.rb +4 -4
  87. data/lib/lms_graphql/types/canvas/module_item_input.rb +2 -2
  88. data/lib/lms_graphql/types/canvas/notification_preference_input.rb +2 -2
  89. data/lib/lms_graphql/types/canvas/outcome_import.rb +2 -1
  90. data/lib/lms_graphql/types/canvas/outcome_import_input.rb +4 -3
  91. data/lib/lms_graphql/types/canvas/outcome_input.rb +2 -2
  92. data/lib/lms_graphql/types/canvas/proficiency.rb +1 -1
  93. data/lib/lms_graphql/types/canvas/proficiency_input.rb +1 -1
  94. data/lib/lms_graphql/types/canvas/progress_input.rb +2 -2
  95. data/lib/lms_graphql/types/canvas/query_type.rb +107 -51
  96. data/lib/lms_graphql/types/canvas/quiz_input.rb +6 -6
  97. data/lib/lms_graphql/types/canvas/quiz_report_input.rb +2 -2
  98. data/lib/lms_graphql/types/canvas/report_parameter_input.rb +2 -2
  99. data/lib/lms_graphql/types/canvas/rubric_assessment.rb +1 -1
  100. data/lib/lms_graphql/types/canvas/rubric_assessment_input.rb +1 -1
  101. data/lib/lms_graphql/types/canvas/sis_assignment_input.rb +2 -2
  102. data/lib/lms_graphql/types/canvas/sis_import.rb +3 -3
  103. data/lib/lms_graphql/types/canvas/sis_import_input.rb +5 -5
  104. data/lib/lms_graphql/types/canvas/submission_input.rb +6 -6
  105. data/lib/lms_graphql/types/canvas/user.rb +2 -0
  106. data/lib/lms_graphql/types/canvas/user_input.rb +2 -0
  107. data/lib/lms_graphql/types/canvas_forward_declarations.rb +20 -16
  108. data/lib/lms_graphql/types/date_time_type.rb +4 -0
  109. data/lib/lms_graphql/version.rb +1 -1
  110. metadata +38 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e66a604576bed32b35d5b8b06205dcf9070a2eb3655e16d55fc808f7c77688e
4
- data.tar.gz: 1ce55ee65235bff1a0e5fcc5f4436c3e4112dfb7a44a48e150b06977adba3486
3
+ metadata.gz: d4094b24458e128c03551cfe9bc442304bb316555c58ed484a726614b59c8c8d
4
+ data.tar.gz: 8aa245e8e65381fed877d29873165e9d7084a18b6e622474405bbeda3a5d727f
5
5
  SHA512:
6
- metadata.gz: 5b0603ec53f78ff7a4b9d0bbddc3bab08e31cae84b888ae33f7896872d17daae57f44f7a410d837cea71b180d7d0c0548f190ba110ae50af8bd3017a159f3fb6
7
- data.tar.gz: 1b9d6babc384bbc766537d160f52925e0deff320abd6a9358b85925bc464b4d9fa66ccc54fa08e2e5ede4b1e85950c17064ff08768018f7c5c742869284dfe3f
6
+ metadata.gz: d0d0624029691cecfc8bc6b6f485c0545de82b9c45eb90a948c0010b9867435565e80368a892b67cf2f7d9c6f733ab8e79e534e316ac949dc528ab50347b293a
7
+ data.tar.gz: d4eca3c2a56f485944af09f4df281d9d32d0d4aa1fb28d68204ed73990530561f8199ac418c59a5ecaab60c325adbb9c95b40cecd76db9f0e03abbf6c2768986
@@ -5,7 +5,7 @@ module LMSGraphQL
5
5
  module Canvas
6
6
  class AddMultipleAllowedDomainsToAccount < BaseMutation
7
7
  argument :account_id, ID, required: true
8
- argument :domains, String, required: true
8
+ argument :domains, [String], required: true
9
9
 
10
10
 
11
11
  field :return_value, Boolean, null: false
@@ -6,7 +6,7 @@ module LMSGraphQL
6
6
  class AddUsersToContentShare < BaseMutation
7
7
  argument :user_id, ID, required: true
8
8
  argument :id, ID, required: true
9
- argument :receiver_ids, String, required: false
9
+ argument :receiver_ids, [String], required: false
10
10
 
11
11
 
12
12
  field :content_share, LMSGraphQL::Types::Canvas::CanvasContentShare, null: false
@@ -5,7 +5,7 @@ module LMSGraphQL
5
5
  module Canvas
6
6
  class CreateContentShare < BaseMutation
7
7
  argument :user_id, ID, required: true
8
- argument :receiver_ids, String, required: true
8
+ argument :receiver_ids, [String], required: true
9
9
  argument :content_type, String, required: true
10
10
  argument :content_id, ID, required: true
11
11
 
@@ -0,0 +1,22 @@
1
+ require_relative "../canvas_base_mutation"
2
+ require_relative "../../types/canvas/inst_access_token"
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class CreateInstaccessToken < BaseMutation
7
+
8
+
9
+
10
+ field :inst_access_token, LMSGraphQL::Types::Canvas::CanvasInstAccessToken, null: false
11
+
12
+ def resolve()
13
+ context[:canvas_api].call("CREATE_INSTACCESS_TOKEN").proxy(
14
+ "CREATE_INSTACCESS_TOKEN",
15
+ {},
16
+ {},
17
+ ).parsed_response
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -4,16 +4,18 @@ module LMSGraphQL
4
4
  module Mutations
5
5
  module Canvas
6
6
  class CreateJwt < BaseMutation
7
-
7
+ argument :workflows, [String], required: false
8
8
 
9
9
 
10
10
  field :jwt, LMSGraphQL::Types::Canvas::CanvasJWT, null: false
11
11
 
12
- def resolve()
12
+ def resolve(workflows: nil)
13
13
  context[:canvas_api].call("CREATE_JWT").proxy(
14
14
  "CREATE_JWT",
15
15
  {},
16
- {},
16
+ {
17
+ "workflows": workflows
18
+ },
17
19
  ).parsed_response
18
20
  end
19
21
  end
@@ -11,11 +11,12 @@ module LMSGraphQL
11
11
  argument :login_sis_user_id, String, required: false
12
12
  argument :login_integration_id, String, required: false
13
13
  argument :login_authentication_provider_id, String, required: false
14
+ argument :login_declared_user_type, String, required: false
14
15
 
15
16
 
16
17
  field :return_value, Boolean, null: false
17
18
 
18
- def resolve(account_id:, user_id:, login_unique_id:, login_password: nil, login_sis_user_id: nil, login_integration_id: nil, login_authentication_provider_id: nil)
19
+ def resolve(account_id:, user_id:, login_unique_id:, login_password: nil, login_sis_user_id: nil, login_integration_id: nil, login_authentication_provider_id: nil, login_declared_user_type: nil)
19
20
  context[:canvas_api].call("CREATE_USER_LOGIN").proxy(
20
21
  "CREATE_USER_LOGIN",
21
22
  {
@@ -27,7 +28,8 @@ module LMSGraphQL
27
28
  "login[password]": login_password,
28
29
  "login[sis_user_id]": login_sis_user_id,
29
30
  "login[integration_id]": login_integration_id,
30
- "login[authentication_provider_id]": login_authentication_provider_id
31
+ "login[authentication_provider_id]": login_authentication_provider_id,
32
+ "login[declared_user_type]": login_declared_user_type
31
33
  },
32
34
  ).parsed_response
33
35
  end
@@ -6,7 +6,7 @@ module LMSGraphQL
6
6
  class CreateWebhookSubscription < BaseMutation
7
7
  argument :subscription_ContextId, String, required: true
8
8
  argument :subscription_ContextType, String, required: true
9
- argument :subscription_EventTypes, String, required: true
9
+ argument :subscription_EventTypes, [String], required: true
10
10
  argument :subscription_Format, String, required: true
11
11
  argument :subscription_TransportMetadata, String, required: true
12
12
  argument :subscription_TransportType, String, required: true
@@ -0,0 +1,24 @@
1
+ require_relative "../canvas_base_mutation"
2
+ require_relative "../../types/canvas/e_portfolio"
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class DeleteEportfolio < BaseMutation
7
+ argument :id, ID, required: true
8
+
9
+
10
+ field :e_portfolio, LMSGraphQL::Types::Canvas::CanvasePortfolio, null: false
11
+
12
+ def resolve(id:)
13
+ context[:canvas_api].call("DELETE_EPORTFOLIO").proxy(
14
+ "DELETE_EPORTFOLIO",
15
+ {
16
+ "id": id
17
+ },
18
+ {},
19
+ ).parsed_response
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -16,11 +16,12 @@ module LMSGraphQL
16
16
  argument :user_title, String, required: false
17
17
  argument :user_bio, String, required: false
18
18
  argument :user_pronouns, String, required: false
19
+ argument :user_event, String, required: false
19
20
 
20
21
 
21
22
  field :user, LMSGraphQL::Types::Canvas::CanvasUser, null: false
22
23
 
23
- def resolve(id:, user_name: nil, user_short_name: nil, user_sortable_name: nil, user_time_zone: nil, user_email: nil, user_locale: nil, user_avatar_token: nil, user_avatar_url: nil, user_title: nil, user_bio: nil, user_pronouns: nil)
24
+ def resolve(id:, user_name: nil, user_short_name: nil, user_sortable_name: nil, user_time_zone: nil, user_email: nil, user_locale: nil, user_avatar_token: nil, user_avatar_url: nil, user_title: nil, user_bio: nil, user_pronouns: nil, user_event: nil)
24
25
  context[:canvas_api].call("EDIT_USER").proxy(
25
26
  "EDIT_USER",
26
27
  {
@@ -37,7 +38,8 @@ module LMSGraphQL
37
38
  "user[avatar][url]": user_avatar_url,
38
39
  "user[title]": user_title,
39
40
  "user[bio]": user_bio,
40
- "user[pronouns]": user_pronouns
41
+ "user[pronouns]": user_pronouns,
42
+ "user[event]": user_event
41
43
  },
42
44
  ).parsed_response
43
45
  end
@@ -11,11 +11,13 @@ module LMSGraphQL
11
11
  argument :login_sis_user_id, String, required: false
12
12
  argument :login_integration_id, String, required: false
13
13
  argument :login_authentication_provider_id, String, required: false
14
+ argument :login_workflow_state, String, required: false
15
+ argument :login_declared_user_type, String, required: false
14
16
 
15
17
 
16
18
  field :return_value, Boolean, null: false
17
19
 
18
- def resolve(account_id:, id:, login_unique_id: nil, login_password: nil, login_sis_user_id: nil, login_integration_id: nil, login_authentication_provider_id: nil)
20
+ def resolve(account_id:, id:, login_unique_id: nil, login_password: nil, login_sis_user_id: nil, login_integration_id: nil, login_authentication_provider_id: nil, login_workflow_state: nil, login_declared_user_type: nil)
19
21
  context[:canvas_api].call("EDIT_USER_LOGIN").proxy(
20
22
  "EDIT_USER_LOGIN",
21
23
  {
@@ -27,7 +29,9 @@ module LMSGraphQL
27
29
  "login[password]": login_password,
28
30
  "login[sis_user_id]": login_sis_user_id,
29
31
  "login[integration_id]": login_integration_id,
30
- "login[authentication_provider_id]": login_authentication_provider_id
32
+ "login[authentication_provider_id]": login_authentication_provider_id,
33
+ "login[workflow_state]": login_workflow_state,
34
+ "login[declared_user_type]": login_declared_user_type
31
35
  },
32
36
  ).parsed_response
33
37
  end
@@ -14,12 +14,12 @@ module LMSGraphQL
14
14
  argument :grade_data__student_id__media_comment_id, String, required: false
15
15
  argument :grade_data__student_id__media_comment_type, String, required: false
16
16
  argument :grade_data__student_id__file_ids, [Int], required: false
17
- argument :grade_data__student_id__assignment_id, Int, required: false
17
+ argument :grade_data__assignment_id___student_id_, Int, required: false
18
18
 
19
19
 
20
20
  field :progress, LMSGraphQL::Types::Canvas::CanvasProgress, null: false
21
21
 
22
- def resolve(course_id:, assignment_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__student_id__assignment_id: nil)
22
+ def resolve(course_id:, assignment_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__assignment_id___student_id_: nil)
23
23
  context[:canvas_api].call("GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_ASSIGNMENTS").proxy(
24
24
  "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_ASSIGNMENTS",
25
25
  {
@@ -35,7 +35,7 @@ module LMSGraphQL
35
35
  "grade_data[<student_id>][media_comment_id]": grade_data__student_id__media_comment_id,
36
36
  "grade_data[<student_id>][media_comment_type]": grade_data__student_id__media_comment_type,
37
37
  "grade_data[<student_id>][file_ids]": grade_data__student_id__file_ids,
38
- "grade_data[<student_id>][assignment_id]": grade_data__student_id__assignment_id
38
+ "grade_data[<assignment_id>][<student_id>]": grade_data__assignment_id___student_id_
39
39
  },
40
40
  ).parsed_response
41
41
  end
@@ -13,12 +13,12 @@ module LMSGraphQL
13
13
  argument :grade_data__student_id__media_comment_id, String, required: false
14
14
  argument :grade_data__student_id__media_comment_type, String, required: false
15
15
  argument :grade_data__student_id__file_ids, [Int], required: false
16
- argument :grade_data__student_id__assignment_id, Int, required: false
16
+ argument :grade_data__assignment_id___student_id_, Int, required: false
17
17
 
18
18
 
19
19
  field :progress, LMSGraphQL::Types::Canvas::CanvasProgress, null: false
20
20
 
21
- def resolve(course_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__student_id__assignment_id: nil)
21
+ def resolve(course_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__assignment_id___student_id_: nil)
22
22
  context[:canvas_api].call("GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_SUBMISSIONS").proxy(
23
23
  "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_COURSES_SUBMISSIONS",
24
24
  {
@@ -33,7 +33,7 @@ module LMSGraphQL
33
33
  "grade_data[<student_id>][media_comment_id]": grade_data__student_id__media_comment_id,
34
34
  "grade_data[<student_id>][media_comment_type]": grade_data__student_id__media_comment_type,
35
35
  "grade_data[<student_id>][file_ids]": grade_data__student_id__file_ids,
36
- "grade_data[<student_id>][assignment_id]": grade_data__student_id__assignment_id
36
+ "grade_data[<assignment_id>][<student_id>]": grade_data__assignment_id___student_id_
37
37
  },
38
38
  ).parsed_response
39
39
  end
@@ -14,12 +14,12 @@ module LMSGraphQL
14
14
  argument :grade_data__student_id__media_comment_id, String, required: false
15
15
  argument :grade_data__student_id__media_comment_type, String, required: false
16
16
  argument :grade_data__student_id__file_ids, [Int], required: false
17
- argument :grade_data__student_id__assignment_id, Int, required: false
17
+ argument :grade_data__assignment_id___student_id_, Int, required: false
18
18
 
19
19
 
20
20
  field :progress, LMSGraphQL::Types::Canvas::CanvasProgress, null: false
21
21
 
22
- def resolve(section_id:, assignment_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__student_id__assignment_id: nil)
22
+ def resolve(section_id:, assignment_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__assignment_id___student_id_: nil)
23
23
  context[:canvas_api].call("GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_ASSIGNMENTS").proxy(
24
24
  "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_ASSIGNMENTS",
25
25
  {
@@ -35,7 +35,7 @@ module LMSGraphQL
35
35
  "grade_data[<student_id>][media_comment_id]": grade_data__student_id__media_comment_id,
36
36
  "grade_data[<student_id>][media_comment_type]": grade_data__student_id__media_comment_type,
37
37
  "grade_data[<student_id>][file_ids]": grade_data__student_id__file_ids,
38
- "grade_data[<student_id>][assignment_id]": grade_data__student_id__assignment_id
38
+ "grade_data[<assignment_id>][<student_id>]": grade_data__assignment_id___student_id_
39
39
  },
40
40
  ).parsed_response
41
41
  end
@@ -13,12 +13,12 @@ module LMSGraphQL
13
13
  argument :grade_data__student_id__media_comment_id, String, required: false
14
14
  argument :grade_data__student_id__media_comment_type, String, required: false
15
15
  argument :grade_data__student_id__file_ids, [Int], required: false
16
- argument :grade_data__student_id__assignment_id, Int, required: false
16
+ argument :grade_data__assignment_id___student_id_, Int, required: false
17
17
 
18
18
 
19
19
  field :progress, LMSGraphQL::Types::Canvas::CanvasProgress, null: false
20
20
 
21
- def resolve(section_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__student_id__assignment_id: nil)
21
+ def resolve(section_id:, grade_data__student_id__posted_grade: nil, grade_data__student_id__excuse: nil, grade_data__student_id__rubric_assessment: nil, grade_data__student_id__text_comment: nil, grade_data__student_id__group_comment: nil, grade_data__student_id__media_comment_id: nil, grade_data__student_id__media_comment_type: nil, grade_data__student_id__file_ids: nil, grade_data__assignment_id___student_id_: nil)
22
22
  context[:canvas_api].call("GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_SUBMISSIONS").proxy(
23
23
  "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_SUBMISSIONS",
24
24
  {
@@ -33,7 +33,7 @@ module LMSGraphQL
33
33
  "grade_data[<student_id>][media_comment_id]": grade_data__student_id__media_comment_id,
34
34
  "grade_data[<student_id>][media_comment_type]": grade_data__student_id__media_comment_type,
35
35
  "grade_data[<student_id>][file_ids]": grade_data__student_id__file_ids,
36
- "grade_data[<student_id>][assignment_id]": grade_data__student_id__assignment_id
36
+ "grade_data[<assignment_id>][<student_id>]": grade_data__assignment_id___student_id_
37
37
  },
38
38
  ).parsed_response
39
39
  end
@@ -0,0 +1,51 @@
1
+ require_relative "../canvas_base_mutation"
2
+
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class GradeOrCommentOnSubmissionByAnonymousIdCourse < BaseMutation
7
+ argument :course_id, ID, required: true
8
+ argument :assignment_id, ID, required: true
9
+ argument :anonymous_id, ID, required: true
10
+ argument :comment_text_comment, String, required: false
11
+ argument :comment_group_comment, Boolean, required: false
12
+ argument :comment_media_comment_id, String, required: false
13
+ argument :comment_media_comment_type, String, required: false
14
+ argument :comment_file_ids, [Int], required: false
15
+ argument :include_visibility, String, required: false
16
+ argument :submission_posted_grade, String, required: false
17
+ argument :submission_excuse, Boolean, required: false
18
+ argument :submission_late_policy_status, String, required: false
19
+ argument :submission_seconds_late_override, Int, required: false
20
+ argument :rubric_assessment, String, required: false
21
+
22
+
23
+ field :return_value, Boolean, null: false
24
+
25
+ def resolve(course_id:, assignment_id:, anonymous_id:, comment_text_comment: nil, comment_group_comment: nil, comment_media_comment_id: nil, comment_media_comment_type: nil, comment_file_ids: nil, include_visibility: nil, submission_posted_grade: nil, submission_excuse: nil, submission_late_policy_status: nil, submission_seconds_late_override: nil, rubric_assessment: nil)
26
+ context[:canvas_api].call("GRADE_OR_COMMENT_ON_SUBMISSION_BY_ANONYMOUS_ID_COURSES").proxy(
27
+ "GRADE_OR_COMMENT_ON_SUBMISSION_BY_ANONYMOUS_ID_COURSES",
28
+ {
29
+ "course_id": course_id,
30
+ "assignment_id": assignment_id,
31
+ "anonymous_id": anonymous_id
32
+ },
33
+ {
34
+ "comment[text_comment]": comment_text_comment,
35
+ "comment[group_comment]": comment_group_comment,
36
+ "comment[media_comment_id]": comment_media_comment_id,
37
+ "comment[media_comment_type]": comment_media_comment_type,
38
+ "comment[file_ids]": comment_file_ids,
39
+ "include[visibility]": include_visibility,
40
+ "submission[posted_grade]": submission_posted_grade,
41
+ "submission[excuse]": submission_excuse,
42
+ "submission[late_policy_status]": submission_late_policy_status,
43
+ "submission[seconds_late_override]": submission_seconds_late_override,
44
+ "rubric_assessment": rubric_assessment
45
+ },
46
+ ).parsed_response
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,51 @@
1
+ require_relative "../canvas_base_mutation"
2
+
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class GradeOrCommentOnSubmissionByAnonymousIdSection < BaseMutation
7
+ argument :section_id, ID, required: true
8
+ argument :assignment_id, ID, required: true
9
+ argument :anonymous_id, ID, required: true
10
+ argument :comment_text_comment, String, required: false
11
+ argument :comment_group_comment, Boolean, required: false
12
+ argument :comment_media_comment_id, String, required: false
13
+ argument :comment_media_comment_type, String, required: false
14
+ argument :comment_file_ids, [Int], required: false
15
+ argument :include_visibility, String, required: false
16
+ argument :submission_posted_grade, String, required: false
17
+ argument :submission_excuse, Boolean, required: false
18
+ argument :submission_late_policy_status, String, required: false
19
+ argument :submission_seconds_late_override, Int, required: false
20
+ argument :rubric_assessment, String, required: false
21
+
22
+
23
+ field :return_value, Boolean, null: false
24
+
25
+ def resolve(section_id:, assignment_id:, anonymous_id:, comment_text_comment: nil, comment_group_comment: nil, comment_media_comment_id: nil, comment_media_comment_type: nil, comment_file_ids: nil, include_visibility: nil, submission_posted_grade: nil, submission_excuse: nil, submission_late_policy_status: nil, submission_seconds_late_override: nil, rubric_assessment: nil)
26
+ context[:canvas_api].call("GRADE_OR_COMMENT_ON_SUBMISSION_BY_ANONYMOUS_ID_SECTIONS").proxy(
27
+ "GRADE_OR_COMMENT_ON_SUBMISSION_BY_ANONYMOUS_ID_SECTIONS",
28
+ {
29
+ "section_id": section_id,
30
+ "assignment_id": assignment_id,
31
+ "anonymous_id": anonymous_id
32
+ },
33
+ {
34
+ "comment[text_comment]": comment_text_comment,
35
+ "comment[group_comment]": comment_group_comment,
36
+ "comment[media_comment_id]": comment_media_comment_id,
37
+ "comment[media_comment_type]": comment_media_comment_type,
38
+ "comment[file_ids]": comment_file_ids,
39
+ "include[visibility]": include_visibility,
40
+ "submission[posted_grade]": submission_posted_grade,
41
+ "submission[excuse]": submission_excuse,
42
+ "submission[late_policy_status]": submission_late_policy_status,
43
+ "submission[seconds_late_override]": submission_seconds_late_override,
44
+ "rubric_assessment": rubric_assessment
45
+ },
46
+ ).parsed_response
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "../canvas_base_mutation"
2
+
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class MarkDocumentAnnotationsAsReadCourse < BaseMutation
7
+ argument :course_id, ID, required: true
8
+ argument :assignment_id, ID, required: true
9
+ argument :user_id, ID, required: true
10
+
11
+
12
+ field :return_value, Boolean, null: false
13
+
14
+ def resolve(course_id:, assignment_id:, user_id:)
15
+ context[:canvas_api].call("MARK_DOCUMENT_ANNOTATIONS_AS_READ_COURSES").proxy(
16
+ "MARK_DOCUMENT_ANNOTATIONS_AS_READ_COURSES",
17
+ {
18
+ "course_id": course_id,
19
+ "assignment_id": assignment_id,
20
+ "user_id": user_id
21
+ },
22
+ {},
23
+ ).parsed_response
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "../canvas_base_mutation"
2
+
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class MarkDocumentAnnotationsAsReadSection < BaseMutation
7
+ argument :section_id, ID, required: true
8
+ argument :assignment_id, ID, required: true
9
+ argument :user_id, ID, required: true
10
+
11
+
12
+ field :return_value, Boolean, null: false
13
+
14
+ def resolve(section_id:, assignment_id:, user_id:)
15
+ context[:canvas_api].call("MARK_DOCUMENT_ANNOTATIONS_AS_READ_SECTIONS").proxy(
16
+ "MARK_DOCUMENT_ANNOTATIONS_AS_READ_SECTIONS",
17
+ {
18
+ "section_id": section_id,
19
+ "assignment_id": assignment_id,
20
+ "user_id": user_id
21
+ },
22
+ {},
23
+ ).parsed_response
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "../canvas_base_mutation"
2
+
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class MarkRubricCommentsAsReadCourse < BaseMutation
7
+ argument :course_id, ID, required: true
8
+ argument :assignment_id, ID, required: true
9
+ argument :user_id, ID, required: true
10
+
11
+
12
+ field :return_value, Boolean, null: false
13
+
14
+ def resolve(course_id:, assignment_id:, user_id:)
15
+ context[:canvas_api].call("MARK_RUBRIC_COMMENTS_AS_READ_COURSES").proxy(
16
+ "MARK_RUBRIC_COMMENTS_AS_READ_COURSES",
17
+ {
18
+ "course_id": course_id,
19
+ "assignment_id": assignment_id,
20
+ "user_id": user_id
21
+ },
22
+ {},
23
+ ).parsed_response
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require_relative "../canvas_base_mutation"
2
+
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class MarkRubricCommentsAsReadSection < BaseMutation
7
+ argument :section_id, ID, required: true
8
+ argument :assignment_id, ID, required: true
9
+ argument :user_id, ID, required: true
10
+
11
+
12
+ field :return_value, Boolean, null: false
13
+
14
+ def resolve(section_id:, assignment_id:, user_id:)
15
+ context[:canvas_api].call("MARK_RUBRIC_COMMENTS_AS_READ_SECTIONS").proxy(
16
+ "MARK_RUBRIC_COMMENTS_AS_READ_SECTIONS",
17
+ {
18
+ "section_id": section_id,
19
+ "assignment_id": assignment_id,
20
+ "user_id": user_id
21
+ },
22
+ {},
23
+ ).parsed_response
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,27 @@
1
+ require_relative "../canvas_base_mutation"
2
+
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class ModerateAllEportfoliosForUser < BaseMutation
7
+ argument :user_id, ID, required: true
8
+ argument :spam_status, String, required: false
9
+
10
+
11
+ field :return_value, Boolean, null: false
12
+
13
+ def resolve(user_id:, spam_status: nil)
14
+ context[:canvas_api].call("MODERATE_ALL_EPORTFOLIOS_FOR_USER").proxy(
15
+ "MODERATE_ALL_EPORTFOLIOS_FOR_USER",
16
+ {
17
+ "user_id": user_id
18
+ },
19
+ {
20
+ "spam_status": spam_status
21
+ },
22
+ ).parsed_response
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,27 @@
1
+ require_relative "../canvas_base_mutation"
2
+ require_relative "../../types/canvas/e_portfolio"
3
+ module LMSGraphQL
4
+ module Mutations
5
+ module Canvas
6
+ class ModerateEportfolio < BaseMutation
7
+ argument :eportfolio_id, ID, required: true
8
+ argument :spam_status, String, required: false
9
+
10
+
11
+ field :e_portfolio, LMSGraphQL::Types::Canvas::CanvasePortfolio, null: false
12
+
13
+ def resolve(eportfolio_id:, spam_status: nil)
14
+ context[:canvas_api].call("MODERATE_EPORTFOLIO").proxy(
15
+ "MODERATE_EPORTFOLIO",
16
+ {
17
+ "eportfolio_id": eportfolio_id
18
+ },
19
+ {
20
+ "spam_status": spam_status
21
+ },
22
+ ).parsed_response
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end