remove feature flag for quiz regrade
closes CNVS-9075 test plan: - create a quiz with at least one question - take quiz as a student - edit quiz as instructor and choose different correct answer - verify that quiz regrade options display for all instructor accounts Change-Id: I1e44de97994010d4491bf395a00b6d4a250d9ab6 Reviewed-on: https://gerrit.instructure.com/25850 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Derek DeVries <ddevries@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Jason Madsen <jmadsen@instructure.com>
This commit is contained in:
parent
50f00a733f
commit
44766218ae
|
@ -208,8 +208,7 @@ class QuizzesController < ApplicationController
|
|||
:QUIZZES_URL => polymorphic_url([@context, :quizzes]),
|
||||
:QUIZ_FILTERS_URL => polymorphic_url([@context, @quiz, :filters]),
|
||||
:CONTEXT_ACTION_SOURCE => :quizzes,
|
||||
:REGRADE_OPTIONS => regrade_options,
|
||||
:ENABLE_QUIZ_REGRADE => @domain_root_account.enable_quiz_regrade? }
|
||||
:REGRADE_OPTIONS => regrade_options }
|
||||
append_sis_data(hash)
|
||||
js_env(hash)
|
||||
render :action => "new"
|
||||
|
|
|
@ -174,7 +174,6 @@ class Account < ActiveRecord::Base
|
|||
add_setting :self_registration, :boolean => true, :root_only => true, :default => false
|
||||
add_setting :large_course_rosters, :boolean => true, :root_only => true, :default => false
|
||||
add_setting :edit_institution_email, :boolean => true, :root_only => true, :default => true
|
||||
add_setting :enable_quiz_regrade, :boolean => true, :root_only => true, :default => false
|
||||
add_setting :agenda_view, boolean: true, root_only: true, default: false
|
||||
add_setting :enable_fabulous_quizzes, :boolean => true, :root_only => true, :default => false
|
||||
|
||||
|
@ -1347,14 +1346,6 @@ class Account < ActiveRecord::Base
|
|||
change_root_account_setting!(:enable_draft, false)
|
||||
end
|
||||
|
||||
def enable_quiz_regrade!
|
||||
change_root_account_setting!(:enable_quiz_regrade, true)
|
||||
end
|
||||
|
||||
def disable_quiz_regrade!
|
||||
change_root_account_setting!(:enable_quiz_regrade, false)
|
||||
end
|
||||
|
||||
def enable_fabulous_quizzes!
|
||||
change_root_account_setting!(:enable_fabulous_quizzes, true)
|
||||
end
|
||||
|
|
|
@ -57,7 +57,7 @@ class QuizQuestion < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def question_data=(data)
|
||||
if data[:regrade_option] && self.quiz.context.root_account.enable_quiz_regrade?
|
||||
if data[:regrade_option]
|
||||
update_question_regrade(data[:regrade_option], data[:regrade_user])
|
||||
end
|
||||
|
||||
|
|
|
@ -1698,7 +1698,7 @@ define([
|
|||
return;
|
||||
}
|
||||
|
||||
if ($("#student_submissions_warning").length == 0 || !ENV.ENABLE_QUIZ_REGRADE) {
|
||||
if ($("#student_submissions_warning").length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1034,32 +1034,6 @@ describe Account do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#enable_quiz_regrade!" do
|
||||
|
||||
it "updates the enable_quiz_regrade setting and saves the account" do
|
||||
account = Account.create!
|
||||
account.enable_quiz_regrade!
|
||||
account.root_account.enable_quiz_regrade?.should == true
|
||||
end
|
||||
end
|
||||
|
||||
describe ":enable_quiz_regrade setting" do
|
||||
|
||||
it "is false by default" do
|
||||
account = Account.create!
|
||||
account.enable_quiz_regrade?.should == false
|
||||
end
|
||||
end
|
||||
|
||||
describe "#disable_quiz_regrade!" do
|
||||
|
||||
it "updates the enable_quiz_regrade setting and saves the account" do
|
||||
account = Account.create!
|
||||
account.disable_quiz_regrade!
|
||||
account.root_account.enable_quiz_regrade?.should == false
|
||||
end
|
||||
end
|
||||
|
||||
describe "#change_root_account_setting!" do
|
||||
|
||||
it "changes the given setting_name's value with the new_value passed" do
|
||||
|
|
|
@ -43,7 +43,6 @@ describe QuizQuestion do
|
|||
describe "#question_data=" do
|
||||
before do
|
||||
course_with_teacher
|
||||
course.root_account.enable_quiz_regrade!
|
||||
|
||||
@quiz = @course.quizzes.create
|
||||
|
||||
|
|
Loading…
Reference in New Issue