2017-04-28 04:17:40 +08:00
|
|
|
#
|
|
|
|
# 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/>.
|
|
|
|
|
2016-11-18 06:06:00 +08:00
|
|
|
class AddIndexToSubmissionCommentDraft < ActiveRecord::Migration[4.2]
|
autosave comments on navigating to different user in speedgrader
closes CNVS-28529
While in SpeedGrader, if you have something entered in the comments
field and, without submitting those comments, you navigate to a
different user or otherwise navigate away from SpeedGrader, your
comments will now automatically be saved as "draft" comments for
that user's submission.
Draft comments
* don't show up anywhere other than while grading
* are invisible to users whether or not the assignment is muted
* are only "submittable" by the author of the draft comment
test plan:
1. Create a course, with at least two students
2. Add a quiz with at least one essay type question
3. As each student, take the quiz
4. As the teacher, grade the quiz and start up SpeedGrader
5. Enter comments for the first student's submission but do *not*
submit them
6. Navigate to the next student
7. You should see a message telling you your comment was
auto-saved
8. Go back to the previous student
9. You should see your comment styled differently with a red
asterisk before it, indicating a draft comment (also using
aria-label for a11y goodness)
10.Enter another comment and this time submit it
11.You should see your comment styled normally without a red
asterisk before it, indicating a normal (non-draft) comment
12.Try steps 5 through 11 with different ways of leaving that
student in step #6 e.g. using the drop down, or quitting
SpeedGrader altogether and you should see the same results for
draft comments
13.Go back to a submission with a draft comment.
14.Click on the button labelled "Publish" next to your draft
comment.
15.Watch your comment change in appearance from a draft comment
to a regular comment
16.Delete any comment and watch it disappear from the comment
list.
17.Go to the next student
18.Go back to the previous student for whose submission you
deleted the comment
19.Notice the deleted comment remains missing from the comment
list.
20.Verify that, if logged in as a student, you never see draft
comments
Change-Id: If32294a7bed6f847709b54d4c8e4fc21fb2a6eca
Reviewed-on: https://gerrit.instructure.com/77133
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Christi Wruck
2016-04-14 05:02:28 +08:00
|
|
|
tag :postdeploy
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def change
|
|
|
|
add_index :submission_comments, :draft, algorithm: :concurrently
|
|
|
|
end
|
|
|
|
end
|