diff --git a/app/models/quizzes/quiz.rb b/app/models/quizzes/quiz.rb index 742322ab9d8..f67375d81b2 100644 --- a/app/models/quizzes/quiz.rb +++ b/app/models/quizzes/quiz.rb @@ -309,7 +309,7 @@ class Quizzes::Quiz < ActiveRecord::Base # If the quiz suddenly changes from non-graded to graded, # then this will update the existing submissions to reflect quiz # scores in the gradebook. - self.quiz_submissions.each { |s| s.save } + self.quiz_submissions.each { |s| s.save! } end attr_accessor :saved_by diff --git a/spec/models/quizzes/quiz_spec.rb b/spec/models/quizzes/quiz_spec.rb index 4875a5ed1fe..8319ab6846a 100644 --- a/spec/models/quizzes/quiz_spec.rb +++ b/spec/models/quizzes/quiz_spec.rb @@ -972,7 +972,7 @@ describe Quizzes::Quiz do it "should not allow quiz points higher than allowable by postgres" do q = Quizzes::Quiz.new(:points_possible => 2000000001) q.valid?.should == false - q.errors.on(:points_possible).should == "must be less than or equal to 2000000000" + Array(q.errors[:points_possible]).should == ["must be less than or equal to 2000000000"] end end