Go to file
Gary Mei db48d23136 save context and annotation id on docviewer events
Context and annotation id are necessary keys to looking up an
annotation in DocViewer. This just allows that information to be
saved when it is sent from DocViewer.

closes GRADE-1593

Test Plan
 - Create/edit dynamic_settings.yml and add in an entry under
   "config" that is:

     canvadoc:
       secret: "c2Vrcml0"

   * the secret is "sekrit" base64 encoded if you're curious.

 - Open a rails console and enter:
   `Canvas::Security.create_jwt({}, nil, 'sekrit', :HS512)`
   The resulting token is your auth token for the duration of testing.

 - Create an assignment that accepts file uploads.
 - As a student, submit to that with a document.
 - As a teacher, launch speedgrader once for that assignment and view
   the document.
 - Open a rails console and find the submission, the attachment for
   that submission, and the canvadoc id related to that attachment.

 - Post to the docviewer audit events url
   (submissions/:submission_id/docviewer_audit_events)
   with data in the body looking like:

   {
      docviewer_audit_event: {
        annotation_body: "",
        annotation_id: "23",
        color: "",
        content: "",
        context: "some context",
        created_at: "",
        modified_at: "",
        page: "",
        type: ""
      },
      token: your token from the second step,
      canvas_user_id: id of the teacher,
      document_id: the canvadoc id
   }

 - Open a rails console and verify that an AnonymousOrModerationEvent
   with the attributes context and annotation_id saved in the
   payload.

Change-Id: I7431fbbb93926e755db5fb83a2004f3fa232fc45
Reviewed-on: https://gerrit.instructure.com/165276
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-09-24 19:26:33 +00:00
.github Add config for github bot to close old issues 2018-07-19 17:16:13 +00:00
Gemfile.d pin chromedriver-helper 2018-09-17 18:05:15 +00:00
app save context and annotation id on docviewer events 2018-09-24 19:26:33 +00:00
bin spec: Add git SHA to pact file consumer version. 2018-07-07 00:01:58 +00:00
build Upgrade yarn from 1.7.0 to 1.9.4 2018-08-14 16:11:54 +00:00
client_apps Use yarn workspaces 2018-06-04 20:02:02 +00:00
config correctly handle send_in_each_region if region config is not set 2018-09-20 13:17:55 +00:00
db/migrate don't run datafixup in a transaction 2018-09-15 13:48:40 +00:00
doc update api change log 2018-10-06 release 2018-09-20 19:28:33 +00:00
docker-compose Add dc config to jwk set_keys 2018-08-10 17:44:48 +00:00
frontend_build Add raven to collect deprecations warnings 2018-08-23 16:19:11 +00:00
gems allow whitelisted query param to be added to lti launch body 2018-09-19 18:46:36 +00:00
jest upgrade react from 0.14.9 to 15.x 2018-09-17 15:42:14 +00:00
lib handle missing content on blueprint external export 2018-09-24 16:50:05 +00:00
packages update locales with new translations 2018-09-24 10:43:12 +00:00
pact Include context_name in planner item response 2018-08-29 22:20:52 +00:00
public create assessment audit tray for speedgrader 2018-09-24 18:26:35 +00:00
script add packages/*/node_modules to nuke_node script 2018-09-12 04:12:29 +00:00
spec save context and annotation id on docviewer events 2018-09-24 19:26:33 +00:00
.babelrc add babel-plugin-transform-runtime for smaller JS 2017-10-12 14:35:46 +00:00
.bowerrc introduced bower to manage js dependencies 2013-12-13 17:45:57 +00:00
.codeclimate.yml disable ESLint in code climate 2017-02-14 17:47:39 +00:00
.dockerignore fix canvas-planner docker build process 2018-04-17 14:44:18 +00:00
.editorconfig Add EditorConfig configuration file to help maintain code style 2016-11-15 20:08:55 +00:00
.eslintignore ignore AmbiguousBlockAssociation for specs 2018-02-12 18:37:09 +00:00
.eslintrc.js fix eslint for announcements 2018-08-17 16:33:26 +00:00
.gitignore Add a way to generate better js coverage 2018-07-17 14:19:03 +00:00
.i18nignore bump rails 3 to github branch for ruby 2.2 compatibility 2015-02-18 22:55:20 +00:00
.i18nrc upgrade to node 6 2016-08-09 23:37:07 +00:00
.jshintrc make jslint settings more sane 2012-08-17 11:04:40 -06:00
.npmrc fix brand config previewing and skipping 2015-10-27 16:16:15 +00:00
.nvmrc Use node 8.10.0 instead of 8.9.4 2018-03-09 18:56:22 +00:00
.prettierrc Add .prettierrc so it matches our existing code 2017-11-03 16:21:50 +00:00
.rubocop.yml spec: remove ExpectChange and TimesMap 2018-08-31 14:53:41 +00:00
.selinimumignore Revert and bring InstIcons into Canvas 2016-11-29 20:52:54 +00:00
.stylelintrc stylelint: shorthand-property-no-redundant-values 2018-08-31 18:48:46 +00:00
.travis.yml more travis builds 2014-02-10 16:23:19 +00:00
CONTRIBUTING.md Add CLA FAQ from legal 2018-01-22 16:41:44 -05:00
COPYRIGHT Initial commit. 2011-01-31 18:57:29 -07:00
Dockerfile Upgrade yarn from 1.7.0 to 1.9.4 2018-08-14 16:11:54 +00:00
Dockerfile-production Upgrade yarn from 1.7.0 to 1.9.4 2018-08-14 16:11:54 +00:00
Gemfile allow choosing rails 5.1 via consul 2017-10-11 19:13:02 +00:00
LICENSE Initial commit. 2011-01-31 18:57:29 -07:00
README.md Update README.md since Canvas is still modern 2016-12-15 03:18:28 +00:00
Rakefile remove dead parallelized specs task 2016-11-10 21:41:08 +00:00
bower.json spec: remove ember-qunit 2018-07-13 14:24:41 +00:00
code_of_conduct.md contributor code of conduct 2014-12-23 18:13:59 +00:00
config.ru remove extra logging to debug Passenger connection orphan issue 2017-07-14 16:27:03 +00:00
docker-compose.jenkins.yml Rename docker-compose.test.yml 2017-05-17 18:51:53 +00:00
docker-compose.override.yml upgrade yarn to 1.6.0 2018-04-19 20:31:06 +00:00
docker-compose.yml Use redis:alpine 2017-07-31 22:31:40 +00:00
gulpfile.js polyfill es6.number for IE11 2018-06-12 15:01:24 +00:00
issue_template.md Make issue template disclaimer a comment 2018-05-01 15:00:27 +00:00
jest.config.js add jest-canvas-mock to silence a bunch of warnings 2018-09-07 15:18:15 +00:00
karma.conf.js Add a way to generate better js coverage 2018-07-17 14:19:03 +00:00
package.json dowgrade format-message so canvas-planner works 2018-09-20 23:57:16 +00:00
schema.graphql graphql: use new relay-node interface 2018-09-21 22:09:42 +00:00
webpack.config.js don't pass frontend build files through babel 2016-11-08 20:29:29 +00:00
webpack.production.config.js a couple uglifyJS settings to make prod debugging easier 2018-05-03 19:52:15 +00:00
webpack.test.config.js upgrade react from 0.14.9 to 15.x 2018-09-17 15:42:14 +00:00
yarn.lock dowgrade format-message so canvas-planner works 2018-09-20 23:57:16 +00:00

README.md

Canvas LMS

Canvas is a modern, open-source LMS developed and maintained 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.