Class: LMSGraphQL::Mutations::Canvas::GradeOrCommentOnMultipleSubmissionsSectionsAssignment

Inherits:
BaseMutation
  • Object
show all
Defined in:
lib/lms_graphql/mutations/canvas/grade_or_comment_on_multiple_submissions_sections_assignments.rb

Instance Method Summary collapse

Instance Method Details

#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) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/lms_graphql/mutations/canvas/grade_or_comment_on_multiple_submissions_sections_assignments.rb', line 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)
  context[:canvas_api].call("GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_ASSIGNMENTS").proxy(
    "GRADE_OR_COMMENT_ON_MULTIPLE_SUBMISSIONS_SECTIONS_ASSIGNMENTS",
    {
      "section_id": section_id,
      "assignment_id": assignment_id
    },
    {
      "grade_data[<student_id>][posted_grade]": grade_data__student_id__posted_grade,
      "grade_data[<student_id>][excuse]": grade_data__student_id__excuse,
      "grade_data[<student_id>][rubric_assessment]": grade_data__student_id__rubric_assessment,
      "grade_data[<student_id>][text_comment]": grade_data__student_id__text_comment,
      "grade_data[<student_id>][group_comment]": grade_data__student_id__group_comment,
      "grade_data[<student_id>][media_comment_id]": grade_data__student_id__media_comment_id,
      "grade_data[<student_id>][media_comment_type]": grade_data__student_id__media_comment_type,
      "grade_data[<student_id>][file_ids]": grade_data__student_id__file_ids,
      "grade_data[<student_id>][assignment_id]": grade_data__student_id__assignment_id
    },
  ).parsed_response
end