replace gradezilla with gradebook in rails

refs TALLY-565

test plan:
 * Verify Jenkins passes

Change-Id: I6f7e18589688d7d9144a92503a5656f08a66fa95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227230
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
This commit is contained in:
Jeremy Neander 2020-02-19 09:17:46 -06:00
parent 7111f9b016
commit c089810d89
13 changed files with 17 additions and 71 deletions

View File

@ -975,11 +975,11 @@ class GradebooksController < ApplicationController
end
def render_default_gradebook
render "gradebooks/gradezilla/gradebook"
render "gradebooks/gradebook"
end
def render_individual_gradebook
render "gradebooks/gradezilla/individual"
render "gradebooks/individual"
end
def percentage(weight)

View File

@ -18,8 +18,8 @@
@import "base/environment";
@import "pages/shared/message_students.scss";
@import "pages/gradezilla/learning_outcome_gradebook.scss";
@import "pages/gradezilla/gradebook.scss";
@import "pages/gradezilla/grade_passback.scss";
@import "pages/gradebook/learning_outcome_gradebook.scss";
@import "pages/gradebook/gradebook.scss";
@import "pages/gradebook/grade_passback.scss";
@import "components/carousel.scss";
@import "components/grade_detail_tray.scss";

View File

@ -22,8 +22,8 @@
@show_left_side = true
@collapse_course_menu = true
@show_embedded_chat = false
css_bundle :slickgrid, :gradezilla
js_bundle :gradezilla
css_bundle :slickgrid, :gradebook
js_bundle :gradebook
%>
<div id="keyboard_navigation"></div>
<div id="gradebook_wrapper">

View File

@ -1,9 +0,0 @@
TODO list for promoting Gradezilla Gradebook to the Default Gradebook:
[ ] delete app/coffeescripts/gradebook
[ ] move files in app/coffeescripts/gradezilla to app/coffeescripts/gradebook
[ ] delete app/jsx/gradebook
[ ] move files in app/jsx/gradezilla to app/jsx/gradebook
[ ] move files in app/coffeescripts/shared that are gradezilla only to app/coffeescripts/gradebook
[ ] move files in spec/coffeescripts/shared that are gradezilla only to spec/coffeescripts/gradebook
[ ] remove @beta from APIs

View File

@ -69,7 +69,7 @@ module.exports = {
'canvas-rce-old-async-chunk',
'permissions_index',
// The Gradebook bundles will be reduced in size as a part of GRADE-942.
'gradezilla',
'gradebook',
'screenreader_gradebook',
// This bundle got pushed over the limit by translations being added and
// the simplest fix was to ignore it at the moment, to unblock selenium

View File

@ -643,39 +643,39 @@ describe GradebooksController do
it "renders default gradebook when preferred with 'default'" do
@admin.preferences[:gradebook_version] = "default"
get "show", params: { course_id: @course.id }
expect(response).to render_template("gradebooks/gradezilla/gradebook")
expect(response).to render_template("gradebooks/gradebook")
end
it "renders default gradebook when preferred with '2'" do
# most users will have this set from before New Gradebook existed
@admin.preferences[:gradebook_version] = "2"
get "show", params: { course_id: @course.id }
expect(response).to render_template("gradebooks/gradezilla/gradebook")
expect(response).to render_template("gradebooks/gradebook")
end
it "renders screenreader gradebook when preferred with 'individual'" do
@admin.preferences[:gradebook_version] = "individual"
get "show", params: { course_id: @course.id }
expect(response).to render_template("gradebooks/gradezilla/individual")
expect(response).to render_template("gradebooks/individual")
end
it "renders screenreader gradebook when preferred with 'srgb'" do
# most a11y users will have this set from before New Gradebook existed
@admin.preferences[:gradebook_version] = "srgb"
get "show", params: { course_id: @course.id }
expect(response).to render_template("gradebooks/gradezilla/individual")
expect(response).to render_template("gradebooks/individual")
end
it "renders default gradebook when user has no preference" do
get "show", params: { course_id: @course.id }
expect(response).to render_template("gradebooks/gradezilla/gradebook")
expect(response).to render_template("gradebooks/gradebook")
end
it "ignores the parameter version when not in development" do
allow(Rails.env).to receive(:development?).and_return(false)
@admin.preferences[:gradebook_version] = "default"
get "show", params: { course_id: @course.id, version: "individual" }
expect(response).to render_template("gradebooks/gradezilla/gradebook")
expect(response).to render_template("gradebooks/gradebook")
end
end
@ -689,7 +689,7 @@ describe GradebooksController do
it "renders default gradebook" do
get "show", params: { course_id: @course.id, version: "default" }
expect(response).to render_template("gradebooks/gradezilla/gradebook")
expect(response).to render_template("gradebooks/gradebook")
end
end
@ -703,7 +703,7 @@ describe GradebooksController do
it "renders screenreader gradebook" do
get "show", params: { course_id: @course.id, version: "individual" }
expect(response).to render_template("gradebooks/gradezilla/individual")
expect(response).to render_template("gradebooks/individual")
end
end
@ -1077,7 +1077,7 @@ describe GradebooksController do
it "redirects to Individual View with a friendly URL" do
@teacher.preferences[:gradebook_version] = "srgb"
get "show", params: {:course_id => @course.id}
expect(response).to render_template("gradebooks/gradezilla/individual")
expect(response).to render_template("gradebooks/individual")
end
it "requests groups without wiki_page assignments" do

View File

@ -1,22 +0,0 @@
#
# Copyright (C) 2016 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
# This file will be removed after `analytics` is updated to not depend on it.
require_relative 'gradebook_cells_page'
Gradezilla::Cells = Gradebook::Cells

View File

@ -1,23 +0,0 @@
#
# Copyright (C) 2016 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
# This file will be removed after `analytics` is updated to not depend on it.
require_relative 'gradebook_page'
Gradezilla = Gradebook