Remove copy_blueprint_settings flag

closes LF-286
flag = none

Test plan:
 - Create a course and set it as a blueprint course in course settings
 - In course settings, select "Locked Objects By Type" and define a few
   types as locked
 - Save settings
 - Click "copy course" in the sidebar
 - Check "copy blueprint settings"
 - Expect the blueprint settings to be preserved in the new course

Change-Id: Iab6c174cdf5f25d3922290d29d1fe2f1091c98aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318567
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Guardado <jonathan.guardado@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
This commit is contained in:
Jackson Howe 2023-05-18 15:25:16 -06:00
parent 3af61de394
commit 7e0e19f885
6 changed files with 8 additions and 10 deletions

View File

@ -183,7 +183,7 @@ class ContentMigrationsController < ApplicationController
js_env(NEW_QUIZZES_IMPORT_THIRD: new_quizzes_import_third_party?)
js_env(NEW_QUIZZES_MIGRATION_DEFAULT: new_quizzes_migration_default)
js_env(SHOW_SELECTABLE_OUTCOMES_IN_IMPORT: @domain_root_account.feature_enabled?("selectable_outcomes_in_course_copy"))
js_env(BLUEPRINT_ELIGIBLE_IMPORT: @domain_root_account.feature_enabled?(:copy_blueprint_settings) && MasterCourses::MasterTemplate.blueprint_eligible?(@context))
js_env(BLUEPRINT_ELIGIBLE_IMPORT: MasterCourses::MasterTemplate.blueprint_eligible?(@context))
set_tutorial_js_env
end
end
@ -501,7 +501,7 @@ class ContentMigrationsController < ApplicationController
#
# You can include multiple copy parameters to selectively import multiple items or groups of items.
#
# @argument type ["context_modules"|"assignments"|"quizzes"|"assessment_question_banks"|"d"iscussion_topics"|"wiki_pages"|"context_external_tools"|"tool_profiles"|"announcements"|"calendar_events"|"rubrics"|"groups"|"learning_outcomes"|"attachments"]
# @argument type ["context_modules"|"assignments"|"quizzes"|"assessment_question_banks"|"discussion_topics"|"wiki_pages"|"context_external_tools"|"tool_profiles"|"announcements"|"calendar_events"|"rubrics"|"groups"|"learning_outcomes"|"attachments"]
# The type of content to enumerate.
#
# @returns list of content items

View File

@ -97,7 +97,7 @@
</label>
</div>
<% if @context.root_account.feature_enabled?(:copy_blueprint_settings) && MasterCourses::MasterTemplate.is_master_course?(@context) %>
<% if MasterCourses::MasterTemplate.is_master_course?(@context) %>
<div class="controls import-blueprint-settings" style="margin-left: 2em; padding-bottom: 0.75em;">
<label class="checkbox">
<input type="checkbox" name="settings[import_blueprint_settings]">

View File

@ -417,11 +417,6 @@ scheduled_page_publication:
state: hidden
display_name: Scheduled page publication
description: Allows course pages to be published on a schedule
copy_blueprint_settings:
applies_to: RootAccount
state: hidden
display_name: Copy Blueprint Course settings
description: Allows Blueprint Course settings to be exported and copied to another Blueprint Course
send_usage_metrics:
state: hidden
display_name: Send usage metrics

View File

@ -326,7 +326,7 @@ module Canvas::Migration::Helpers
content_list << { type: "syllabus_body", property: "#{property_prefix}[all_syllabus_body]", title: COURSE_SYLLABUS_TYPE.call }
content_list << { type: "course_paces", property: "#{property_prefix}[all_course_paces]", title: COURSE_PACE_TYPE.call } if source.course_paces.primary.not_deleted.any?
if @migration && @migration.context.root_account.feature_enabled?(:copy_blueprint_settings) && MasterCourses::MasterTemplate.blueprint_eligible?(@migration.context)
if @migration && MasterCourses::MasterTemplate.blueprint_eligible?(@migration.context)
content_list << { type: "blueprint_settings", property: "#{property_prefix}[all_blueprint_settings]", title: BLUEPRINT_SETTING_TYPE.call }
end

View File

@ -846,6 +846,7 @@ describe ContentMigrationsController, type: :request do
json = api_call(:get, @migration_url, @params)
expect(json).to eq [{ "type" => "course_settings", "property" => "copy[all_course_settings]", "title" => "Course Settings" },
{ "type" => "syllabus_body", "property" => "copy[all_syllabus_body]", "title" => "Syllabus Body" },
{ "type" => "blueprint_settings", "property" => "copy[all_blueprint_settings]", "title" => "Blueprint Settings" },
{ "type" => "context_modules", "property" => "copy[all_context_modules]", "title" => "Modules", "count" => 1, "sub_items_url" => "http://www.example.com/api/v1/courses/#{@orig_course.id}/content_migrations/#{@migration.id}/selective_data?type=context_modules" },
{ "type" => "discussion_topics", "property" => "copy[all_discussion_topics]", "title" => "Discussion Topics", "count" => 1, "sub_items_url" => "http://www.example.com/api/v1/courses/#{@orig_course.id}/content_migrations/#{@migration.id}/selective_data?type=discussion_topics" },
{ "type" => "wiki_pages", "property" => "copy[all_wiki_pages]", "title" => "Pages", "count" => 1, "sub_items_url" => "http://www.example.com/api/v1/courses/#{@orig_course.id}/content_migrations/#{@migration.id}/selective_data?type=wiki_pages" },

View File

@ -224,6 +224,7 @@ describe Canvas::Migration::Helpers::SelectiveContentFormatter do
let(:top_level_items) do
[{ type: "course_settings", property: "copy[all_course_settings]", title: "Course Settings" },
{ type: "syllabus_body", property: "copy[all_syllabus_body]", title: "Syllabus Body" },
{ type: "blueprint_settings", property: "copy[all_blueprint_settings]", title: "Blueprint Settings" },
{ type: "context_modules", property: "copy[all_context_modules]", title: "Modules", count: 1, sub_items_url: "https://example.com?type=context_modules" },
{ type: "tool_profiles", property: "copy[all_tool_profiles]", title: "Tool Profiles", count: 1, sub_items_url: "https://example.com?type=tool_profiles" },
{ type: "discussion_topics", property: "copy[all_discussion_topics]", title: "Discussion Topics", count: 1, sub_items_url: "https://example.com?type=discussion_topics" },
@ -365,7 +366,8 @@ describe Canvas::Migration::Helpers::SelectiveContentFormatter do
it "ignores in top-level list" do
expect(formatter.get_content_list).to eq [{ type: "course_settings", property: "copy[all_course_settings]", title: "Course Settings" },
{ type: "syllabus_body", property: "copy[all_syllabus_body]", title: "Syllabus Body" }]
{ type: "syllabus_body", property: "copy[all_syllabus_body]", title: "Syllabus Body" },
{ type: "blueprint_settings", property: "copy[all_blueprint_settings]", title: "Blueprint Settings" }]
end
it "ignores in specific item request" do