only try to import active outcomes and groups
test plan: * create an account-level outcome group * create an outcome in that group, but then delete it * in a course, find and import the account-level group * should not import a broken outcome link to the deleted outcome fixes #CNVS-2015 Change-Id: I59d3404038960e156cd7b3e8540df286f27d1569 Reviewed-on: https://gerrit.instructure.com/34797 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jeremy Stanley <jeremy@instructure.com> Product-Review: Jeremy Stanley <jeremy@instructure.com> QA-Review: Clare Strong <clare@instructure.com>
This commit is contained in:
parent
5f927946c5
commit
413e30a4de
|
@ -164,12 +164,12 @@ class LearningOutcomeGroup < ActiveRecord::Base
|
|||
copy.save!
|
||||
|
||||
# copy the group contents
|
||||
original.child_outcome_groups.each do |group|
|
||||
original.child_outcome_groups.active.each do |group|
|
||||
next if opts[:only] && opts[:only][group.asset_string] != "1"
|
||||
copy.add_outcome_group(group, opts)
|
||||
end
|
||||
|
||||
original.child_outcome_links.each do |link|
|
||||
original.child_outcome_links.active.each do |link|
|
||||
next if opts[:only] && opts[:only][link.asset_string] != "1"
|
||||
copy.add_outcome(link.content)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue