Go to file
John Corrigan ad52cabec3 fix anonymous peer review checkbox on graded discussion form.
fixes CNVS-19782

The checkbox used to determine whether or not an assignment's peer
reviews should be considered anonymous, which is part of a backbone
view, did not function properly if it was 'nested' (i.e., if the name on
the field should be `assiginment[anonymous_peer_reviews]`, instead of just
`anonymous_peer_reviews`. The `checkbox` helper is already setup to
handle this; we just needed to pass the `nested` value to it, and to
update how we determine whether or not the checkbox should appear
checked, so as to avoid manually setting the checkbox's `name`
attribute.

Additionally, this patch fixes a bug in the
`RubricAssessment#considered_anonymous?` method, which would blow up if
the model did not have a related rubric_association. I've added a
protection to two other methods that would have thrown exceptions in the
absence of a rubric_assocation as well.

Finally, I updated the logic in the SubmissionComment policy
declaration, so that when trying to `:read_author`, a student can always
see the name of a teacher, even if the comment is marked as anonymous.

test plan:
- as a teacher, create a graded discussion topic. When doing say, enable
  peer reviews, and enable anonymous peer reviews.
- as a student, submit an entry for the graded discussion topic.
- as a teacher, assign a peer review to a student for the submission
  above.
- as the reviewer student, submit a review.
- as the reviewed student, navigate to the submission details page
  (/courses/:course_id/assignments/:assignment_id/submissions/:user_id)
  and observe the comment list on the right hand side of the page.
- observe that the name of the reviewer student is not present, and
  instead it says 'Anonymous User'.
- as the teacher, navigate to the same submission page, and observe the
  comment list on the right hand side of the page.
- observe that the name of the reviewer student IS present.
- as the teacher, navigate to the same submission page, and observe the
  comment list on the right hand side of the page
- as the teacher, leave a comment on the submitted assignment.
- as the reviewed student, navigate to the submission details page, and
  observe the comment list on the right hand side of the page.
- observe that the name of the reviewer teacher IS present.

Change-Id: I572dd7fa319cd784e59f00057898fcea5349c899
Reviewed-on: https://gerrit.instructure.com/52099
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-04-22 14:23:49 +00:00
Gemfile.d bump i18n gem 2015-04-17 19:49:17 +00:00
app fix anonymous peer review checkbox on graded discussion form. 2015-04-22 14:23:49 +00:00
bin rails 4.0.10 2014-09-16 22:07:39 +00:00
client_apps Alters attempt indicators for a11y 2015-03-05 19:58:35 +00:00
config Updated pt-BR translation 2015-04-22 05:21:59 -06:00
db/migrate add missing index supporting a foreign key 2015-04-21 15:19:26 +00:00
doc don't forget initial setup for your database when using docker-compose 2015-04-11 14:10:36 +00:00
docker-compose initial live events implementation 2015-04-03 15:22:33 +00:00
gems remove document_id prefix from legacy documents when using the new api 2015-04-21 03:06:25 +00:00
guard Implement PostGrades dialog in ReactJS 2014-11-19 23:55:56 +00:00
lib move oauth2 methods to their own controller 2015-04-21 20:54:29 +00:00
public rubric should remember 'use for grading' setting before page refresh 2015-04-21 20:27:18 +00:00
script skip comment building on diff if no ruby changes 2015-04-15 21:20:51 +00:00
spec fix anonymous peer review checkbox on graded discussion form. 2015-04-22 14:23:49 +00:00
.bowerrc introduced bower to manage js dependencies 2013-12-13 17:45:57 +00:00
.dockerignore docker-compose based dev environment 2015-03-30 20:59:48 +00:00
.fontcustom-manifest.json Add Import/Export Icons 2015-02-19 16:26:52 +00:00
.gitignore docker-compose based dev environment 2015-03-30 20:59:48 +00:00
.i18nignore bump rails 3 to github branch for ruby 2.2 compatibility 2015-02-18 22:55:20 +00:00
.jshintrc make jslint settings more sane 2012-08-17 11:04:40 -06:00
.rubocop.yml tone down some noisy style complaints 2015-04-15 22:45:07 +00:00
.travis.yml more travis builds 2014-02-10 16:23:19 +00:00
CONTRIBUTING.md add a contributing doc for github coolness 2012-09-19 10:16:04 -06:00
COPYRIGHT Initial commit. 2011-01-31 18:57:29 -07:00
Gemfile use eval_gemfile for bundler goodness 2015-02-18 18:15:14 +00:00
Guardfile added jsx 2014-11-03 23:20:33 +00:00
LICENSE Initial commit. 2011-01-31 18:57:29 -07:00
README.md remove travis.ci badge until we are re-enabled 2014-07-01 23:08:00 +00:00
Rakefile remove rails 2 support 2014-08-06 18:16:19 +00:00
bower.json Upgrades react-modal to the latest version in bower 2015-04-01 16:51:11 +00:00
code_of_conduct.md contributor code of conduct 2014-12-23 18:13:59 +00:00
config.ru start adding rails 3.0 support 2013-03-22 19:08:40 +00:00
docker-compose.yml initial live events implementation 2015-04-03 15:22:33 +00:00
karma.conf.js address a number of issues with the js test suite 2015-02-20 16:35:17 +00:00
package.json Make changes for node 12/iojs. 2015-03-05 22:43:38 +00:00

README.md

Canvas LMS

Canvas is a new, open-source LMS by Instructure Inc. It is released under the AGPLv3 license for use by anyone interested in learning more about or using learning management systems.

Please see our main wiki page for more information

Installation

Detailed instructions for installation and configuration of Canvas are provided on our wiki.