Class: LMSGraphQL::Mutations::Canvas::CreateNewGradingStandardCourse

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

Instance Method Summary collapse

Instance Method Details

#resolve(course_id:, title:, grading_scheme_entry_name:, grading_scheme_entry_value:) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/lms_graphql/mutations/canvas/create_new_grading_standard_courses.rb', line 15

def resolve(course_id:, title:, grading_scheme_entry_name:, grading_scheme_entry_value:)
  context[:canvas_api].call("CREATE_NEW_GRADING_STANDARD_COURSES").proxy(
    "CREATE_NEW_GRADING_STANDARD_COURSES",
    {
      "course_id": course_id
    },
    {
      "title": title,
      "grading_scheme_entry[name]": grading_scheme_entry_name,
      "grading_scheme_entry[value]": grading_scheme_entry_value
    },
  ).parsed_response
end