remove the new teacher registration email

This email only went to site admins, and isn't useful.

This commit stops new notifications being created, a subsequent commit
will remove the no longer used code and data.

refs CNVS-15219

Change-Id: Ibd8c88c7310cf3dcfb06cf0c782f2b3cf571d843
Reviewed-on: https://gerrit.instructure.com/40375
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
This commit is contained in:
Brian Palmer 2014-09-02 11:08:52 -06:00
parent d8d747f187
commit fdefc984ae
3 changed files with 2 additions and 12 deletions

View File

@ -246,8 +246,6 @@ class User < ActiveRecord::Base
scope.group("users.id")
}
has_a_broadcast_policy
attr_accessor :require_acceptance_of_terms, :require_presence_of_name,
:require_self_enrollment_code, :self_enrollment_code,
:self_enrollment_course, :validation_root_account
@ -535,14 +533,6 @@ class User < ActiveRecord::Base
# DEPRECATED, override new_registration instead
def new_teacher_registration(form_params = {}); new_registration(form_params); end
set_broadcast_policy do |p|
p.dispatch :new_teacher_registration
p.to { Account.site_admin.users }
p.whenever { |record|
record.just_created && record.school_name && record.school_position
}
end
def assign_uuid
# DON'T use ||=, because that will cause an immediate save to the db if it
# doesn't already exist

View File

@ -175,7 +175,7 @@ module SIS
User.transaction(:requires_new => true) do
if user.changed?
user_touched = true
raise ImportError, user.errors.first.join(" ") if !user.save_without_broadcasting && user.errors.size > 0
raise ImportError, user.errors.first.join(" ") if !user.save && user.errors.size > 0
elsif @batch
@users_to_set_sis_batch_ids << user.id
end

View File

@ -31,7 +31,7 @@ describe SIS::UserImporter do
# this is the fun bit where we get to stub User.new to insert a sleep into
# the transaction loop.
User.any_instance.expects(:save_without_broadcasting).times(3).returns { Timecop.travel(5.seconds) }
User.any_instance.expects(:save).times(3).returns { Timecop.travel(5.seconds) }
# two for each user
User.expects(:transaction).times(6).yields