Class: LMSGraphQL::Mutations::Canvas::CreateContentMigrationUser

Inherits:
CanvasBaseMutation
  • Object
show all
Defined in:
lib/lms_graphql/mutations/canvas/create_content_migration_users.rb

Instance Method Summary collapse

Instance Method Details

#resolve(user_id:, migration_type:, pre_attachment_name: nil, pre_attachment_star: nil, settings_file_url: nil, settings_source_course_id: nil, settings_folder_id: nil, settings_overwrite_quizzes: nil, settings_question_bank_id: nil, settings_question_bank_name: nil, date_shift_options_shift_dates: nil, date_shift_options_old_start_date: nil, date_shift_options_old_end_date: nil, date_shift_options_new_start_date: nil, date_shift_options_new_end_date: nil, date_shift_options_day_substitutions_X: nil, date_shift_options_remove_dates: nil) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/lms_graphql/mutations/canvas/create_content_migration_users.rb', line 25

def resolve(user_id:, migration_type:, pre_attachment_name: nil, pre_attachment_star: nil, settings_file_url: nil, settings_source_course_id: nil, settings_folder_id: nil, settings_overwrite_quizzes: nil, settings_question_bank_id: nil, settings_question_bank_name: nil, date_shift_options_shift_dates: nil, date_shift_options_old_start_date: nil, date_shift_options_old_end_date: nil, date_shift_options_new_start_date: nil, date_shift_options_new_end_date: nil, date_shift_options_day_substitutions_X: nil, date_shift_options_remove_dates: nil)
  ctx[:canvas_api].proxy(
    "CREATE_CONTENT_MIGRATION_USERS",
    {
      "user_id": user_id,
      "migration_type": migration_type,
      "pre_attachment[name]": pre_attachment_name,
      "pre_attachment[*]": pre_attachment_star,
      "settings[file_url]": settings_file_url,
      "settings[source_course_id]": settings_source_course_id,
      "settings[folder_id]": settings_folder_id,
      "settings[overwrite_quizzes]": settings_overwrite_quizzes,
      "settings[question_bank_id]": settings_question_bank_id,
      "settings[question_bank_name]": settings_question_bank_name,
      "date_shift_options[shift_dates]": date_shift_options_shift_dates,
      "date_shift_options[old_start_date]": date_shift_options_old_start_date,
      "date_shift_options[old_end_date]": date_shift_options_old_end_date,
      "date_shift_options[new_start_date]": date_shift_options_new_start_date,
      "date_shift_options[new_end_date]": date_shift_options_new_end_date,
      "date_shift_options[day_substitutions][X]": date_shift_options_day_substitutions_X,
      "date_shift_options[remove_dates]": date_shift_options_remove_dates            },
    nil,
  ).parsed_response
end