forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't enable double blind grader anonymity by default
fixes GRADE-1205 test plan: * BEFORE checking out this patchset, make sure you have some assignments in your database * check out this patchset and run migrations * check your database, all assignment rows should be updated so that grader_comments_visible_to_graders and grader_names_visible_to_final_grader are true Change-Id: I2750375838b9cadba490accc190e9abcbd7d9b25 Reviewed-on: https://gerrit.instructure.com/152296 Tested-by: Jenkins Reviewed-by: Adrian Packel <[email protected]> Reviewed-by: Spencer Olson <[email protected]> QA-Review: Adrian Packel <[email protected]> Product-Review: Keith T. Garner <[email protected]>
- Loading branch information
Showing
5 changed files
with
101 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Copyright (C) 2018 - 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/>. | ||
|
||
class FixGraderVisibilityData < ActiveRecord::Migration[5.0] | ||
tag :postdeploy | ||
|
||
def self.up | ||
DataFixup::FixGraderVisibilityData.send_later_if_production_enqueue_args( | ||
:run, | ||
{ | ||
priority: Delayed::LOW_PRIORITY, | ||
n_strand: ["DataFixup::FixGraderVisibilityData", Shard.current.database_server.id] | ||
} | ||
) | ||
end | ||
end |
30 changes: 30 additions & 0 deletions
30
db/migrate/20180601153016_change_anonymous_grading_defaults.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# | ||
# Copyright (C) 2018 - 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/>. | ||
|
||
class ChangeAnonymousGradingDefaults < ActiveRecord::Migration[5.0] | ||
tag :predeploy | ||
|
||
def self.up | ||
change_column_default :assignments, :grader_comments_visible_to_graders, true | ||
change_column_default :assignments, :grader_names_visible_to_final_grader, true | ||
end | ||
|
||
def self.down | ||
change_column_default :assignments, :grader_comments_visible_to_graders, false | ||
change_column_default :assignments, :grader_names_visible_to_final_grader, false | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copyright (C) 2018 - 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/>. | ||
# | ||
|
||
module DataFixup::FixGraderVisibilityData | ||
def self.run | ||
Assignment.where("grader_comments_visible_to_graders IS NOT TRUE AND grader_names_visible_to_final_grader IS NOT TRUE"). | ||
in_batches.update_all( | ||
grader_comments_visible_to_graders: true, | ||
grader_names_visible_to_final_grader: true | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters