record deleted courses through full batch sis imports
test plan: * enable sis imports for the root account * import a course through a sis import * re-import a sis import without the course using "full batch update", which will cause the course to be deleted * in the course activity log, it should record that the course was deleted closes #CNVS-30070 Change-Id: I4e1cd8091fc11ab88dab8f2987ecfcec0b4fa731 Reviewed-on: https://gerrit.instructure.com/82990 Reviewed-by: Steven Burnett <sburnett@instructure.com> Tested-by: Jenkins QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com> Product-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
9b1a2bfd86
commit
c619c4a170
|
@ -276,6 +276,9 @@ class SisBatch < ActiveRecord::Base
|
|||
course.clear_sis_stickiness(:workflow_state)
|
||||
course.skip_broadcasts = true
|
||||
course.destroy
|
||||
|
||||
Auditors::Course.record_deleted(course, self.user, :source => :sis, :sis_batch => self)
|
||||
|
||||
current_row += 1
|
||||
self.fast_update_progress(current_row.to_f/total_rows * 100)
|
||||
end
|
||||
|
|
|
@ -390,6 +390,7 @@ s2,test_1,section2,active},
|
|||
expect(@course.reload).to be_claimed
|
||||
expect(b.data[:counts][:batch_sections_deleted]).to eq 1
|
||||
|
||||
Auditors::Course.expects(:record_deleted).once.with(@course, anything, anything)
|
||||
# only supply courses
|
||||
b = process_csv_data(
|
||||
[%{course_id,short_name,long_name,term_id}],
|
||||
|
|
Loading…
Reference in New Issue