Skip to content

Commit fab58ae

Browse files
committed
remove enrollment.sis_user_id since it can't be trusted
refs CNVS-29138 test plan - specs should pass Change-Id: Ie2b703cbc61198dd44a2f9cebe351bc28df1db01 Reviewed-on: https://gerrit.instructure.com/78718 Tested-by: Jenkins Reviewed-by: Cody Cutrer <cody@instructure.com> Product-Review: Rob Orton <rob@instructure.com> QA-Review: Rob Orton <rob@instructure.com>
1 parent 30d3357 commit fab58ae

2 files changed

Lines changed: 0 additions & 23 deletions

File tree

app/models/enrollment.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,21 +1185,6 @@ def self.cross_shard_invitations?
11851185
false
11861186
end
11871187

1188-
# DO NOT TRUST
1189-
# This is only a convenience method to assist in identifying which enrollment
1190-
# goes to which user when users have accidentally been merged together
1191-
# This is the *only* reason the sis_source_id column has not been dropped
1192-
def sis_user_id
1193-
return @sis_user_id if @sis_user_id
1194-
sis_source_id_parts = sis_source_id ? sis_source_id.split(':') : []
1195-
if sis_source_id_parts.length == 4
1196-
@sis_user_id = sis_source_id_parts[1]
1197-
else
1198-
@sis_user_id = sis_source_id_parts[0]
1199-
end
1200-
@sis_user_id
1201-
end
1202-
12031188
def total_activity_time
12041189
self.read_attribute(:total_activity_time).to_i
12051190
end

spec/models/enrollment_spec.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,14 +1916,6 @@ def enrollment_dates_override_test
19161916
end
19171917
end
19181918

1919-
describe "#sis_user_id" do
1920-
it "should work when sis_source_id is nil" do
1921-
course_with_student(:active_all => 1)
1922-
expect(@enrollment.sis_source_id).to be_nil
1923-
expect(@enrollment.sis_user_id).to be_nil
1924-
end
1925-
end
1926-
19271919
describe "updating cached due dates" do
19281920
before :once do
19291921
course_with_student

0 commit comments

Comments
 (0)