fix resetting courses with integration ids
test plan: * create a course * give it an integration id through the api * reset the course content from the settings page * should work closes #CNVS-17370 Change-Id: I66d935e4688e9854a6f47604e33e358d7a0308fa Reviewed-on: https://gerrit.instructure.com/61003 Tested-by: Jenkins Reviewed-by: Dan Minkevitch <dan@instructure.com> QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com> Product-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
3fb0700092
commit
430d144b2a
|
@ -2558,7 +2558,7 @@ class Course < ActiveRecord::Base
|
|||
# get its id to move over sections and enrollments. Setting this course to
|
||||
# deleted has to be last otherwise it would set all the enrollments to
|
||||
# deleted before they got moved
|
||||
self.uuid = self.sis_source_id = self.sis_batch_id = nil;
|
||||
self.uuid = self.sis_source_id = self.sis_batch_id = self.integration_id = nil;
|
||||
self.save!
|
||||
Course.process_as_sis { new_course.save! }
|
||||
self.course_sections.update_all(:course_id => new_course)
|
||||
|
|
Loading…
Reference in New Issue