23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/lms_graphql/mutations/canvas/update_module_item.rb', line 23
def resolve(course_id:, module_id:, id:, module_item_title: nil, module_item_position: nil, module_item_indent: nil, module_item_external_url: nil, module_item_new_tab: nil, module_item_completion_requirement_type: nil, module_item_completion_requirement_min_score: nil, module_item_published: nil, module_item_module_id: nil)
context[:canvas_api].call("UPDATE_MODULE_ITEM").proxy(
"UPDATE_MODULE_ITEM",
{
"course_id": course_id,
"module_id": module_id,
"id": id
},
{
"module_item[title]": module_item_title,
"module_item[position]": module_item_position,
"module_item[indent]": module_item_indent,
"module_item[external_url]": module_item_external_url,
"module_item[new_tab]": module_item_new_tab,
"module_item[completion_requirement][type]": module_item_completion_requirement_type,
"module_item[completion_requirement][min_score]": module_item_completion_requirement_min_score,
"module_item[published]": module_item_published,
"module_item[module_id]": module_item_module_id
},
).parsed_response
end
|