enhanced gradebook lock down query param routing
currently the new enhanced individual gradebook is able to be accessed with the FF off if the user knows to navigate to the gradebook url with the query param ?version=individual_enhanced. This commit adds a check on the backend during the routing that will now direct the user to the traditional gradebook grid if the FF is off. closes EVAL-3419 flag=individual_gradebook_enhancements test plan: - navigate to /courses/<course_id>/gradebook?version=individual_enhanced and verify that you are directed to traditional gradebook Change-Id: Ief0c905ffd919a0ea87a3c7643a07fff3ab9ac67 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325291 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com> QA-Review: Rohan Chugh <rohan.chugh@instructure.com> Product-Review: Ravi Koll <ravi.koll@instructure.com>
This commit is contained in:
parent
05a574d908
commit
c9aeea6cf9
|
@ -320,7 +320,8 @@ class GradebooksController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
if gradebook_version == "individual_enhanced"
|
||||
individual_enhanced_enabled = @context.root_account.feature_enabled?(:individual_gradebook_enhancements)
|
||||
if gradebook_version == "individual_enhanced" && individual_enhanced_enabled
|
||||
show_enhanced_individual_gradebook
|
||||
elsif ["srgb", "individual"].include?(gradebook_version)
|
||||
show_individual_gradebook
|
||||
|
|
|
@ -217,7 +217,7 @@ individual_gradebook_enhancements:
|
|||
to Individual Gradebook
|
||||
environments:
|
||||
ci:
|
||||
state: on # enable for automated testings builds and local testing
|
||||
state: allowed_on # enable for automated testings builds and local testing
|
||||
development:
|
||||
state: allowed_on # enable for local development
|
||||
hide_zero_point_quizzes_option:
|
||||
|
|
|
@ -1021,6 +1021,20 @@ describe GradebooksController do
|
|||
expect(response).to render_template("gradebooks/gradebook")
|
||||
end
|
||||
|
||||
it "renders enhanced individual gradebook when individual_enhanced & individual_gradebook_enhancements is enabled" do
|
||||
@course.root_account.enable_feature!(:individual_gradebook_enhancements)
|
||||
@admin.set_preference(:gradebook_version, "individual_enhanced")
|
||||
get "show", params: { course_id: @course.id }
|
||||
expect(response).to render_template("layouts/application")
|
||||
end
|
||||
|
||||
it "renders traditional gradebook when individual_gradebook_enhancements is disabled" do
|
||||
@course.root_account.disable_feature!(:individual_gradebook_enhancements)
|
||||
@admin.set_preference(:gradebook_version, "individual_enhanced")
|
||||
get "show", params: { course_id: @course.id }
|
||||
expect(response).to render_template("gradebooks/gradebook")
|
||||
end
|
||||
|
||||
describe "score to ungraded" do
|
||||
before do
|
||||
options = Gradebook::ApplyScoreToUngradedSubmissions::Options.new(
|
||||
|
|
Loading…
Reference in New Issue