Commit Graph

460 Commits

Author SHA1 Message Date
Neil Gupta a0336482a6 fix typo in docker setup readme
Change-Id: I61a6e1ca8632ca5839875125eb407f2a99835999
Reviewed-on: https://gerrit.instructure.com/133909
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2017-11-27 23:07:17 +00:00
Andrew Gardener 7a4b4d82b8
Add term name to tools variable substitutions
test plan:
* add a new custom field, `term_name=$Canvas.term.name`, to an external tool
* open launch link to external tool
* verify that `custom_term_name` was part of the launch request and is correct
2017-11-22 13:03:32 -08:00
Simon Williams 44d0ca7ac8 api: doc fixes for swagger compat
Change-Id: Ife5140b237c58e2040dc536e98bce3fcda73c64a
Reviewed-on: https://gerrit.instructure.com/133529
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-11-22 15:48:04 +00:00
Rob Orton dacb3dc7be document that account_id is sticky for courses
Change-Id: Id26d3cbce7ee81e8944f847239db860925ef2177
Reviewed-on: https://gerrit.instructure.com/133367
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-11-20 21:58:25 +00:00
Spencer Olson 0b7d4135a0 tweak docker_dev_setup script
Adds the dinghy tap before trying to install it.

Test Plan:
1. On a machine running OSX without dinghy installed, run the
   docker_dev_setup script. Verify dinghy is set up without issue.

Change-Id: I0479323aefd21554fb3bc2a8f00ced727b497496
Reviewed-on: https://gerrit.instructure.com/132850
Reviewed-by: Omar Khan <okhan@instructure.com>
Tested-by: Jenkins
QA-Review: Omar Khan <okhan@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
2017-11-15 22:19:08 +00:00
Rob Orton 9e3f0e8401 leave integration_ids undocumented for now
we plan to change how this done later and will
update the documentation at that time

fixes CORE-635

test plan
 - rake doc:api should work

Change-Id: I51562e580cfdd1296b312cba531ea65d623a8fe5
Reviewed-on: https://gerrit.instructure.com/132632
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-11-13 20:26:24 +00:00
Rob Orton 9077f360a5 document integration_ids in sis import
fixes CORE-617

test plan
 - rake doc:api should work

Change-Id: I4cb8d9581c60af0cce5779be02b7782d378fff8f
Reviewed-on: https://gerrit.instructure.com/132159
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
2017-11-08 04:32:28 +00:00
Rob Orton 548e0fca61 allow removing integration_ids
fixes CORE-367

test plan
 - remove user_integration_ids from users with
   the change_sis_id importer

Change-Id: If3b09dad034326a9cab351608ec7ca3b7565f4be
Reviewed-on: https://gerrit.instructure.com/130598
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-11-03 21:54:39 +00:00
wdransfield 053ffc39ca Store EULA agreement timestamp
Closes PLAT-2879

Test Plan:
- Install a plagiarim tool that offers a service named
  'vnd.Canvas.Eula'. Example:
  {"endpoint"=>"http://originality.docker/eula",
   "action"=>["GET"],
   "@id"=>"http://originality.docker/lti/v2/services#vnd.Canvas.Eula",
   "@type"=>"RestService"}
- Associate the tool with an assignment.
- As a student go to the assignment submission page.
  Verify and verify the page requires agreeing to the
  Eula before submitting.
- Retrieve the submission via api using the plagiarism
  tool and verify the submission object returned contains
  a timestamp showing when the user clicked the checkbox.

Change-Id: I2a8cac02666b66fbb76d4b55f980a45dfdac2fa6
Reviewed-on: https://gerrit.instructure.com/129858
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Karl Lloyd <karl@instructure.com>
2017-11-02 19:43:35 +00:00
Omar Khan b70b6b2936 Add docker_dev_setup.sh script
This script sets up a full docker development environment from scratch,
on mac and debian-based linux.

Test plan:

- On mac, run script/docker_dev_setup.sh
- Answer the prompts
- Check that the script completes successfully
- Run docker-compose up
- Open http://canvas.docker
- Repeat on ubuntu xenial

Change-Id: Ic1eb0bad791fcbfe3953691623f2fbfb40b9298b
Reviewed-on: https://gerrit.instructure.com/130857
Tested-by: Jenkins
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
2017-11-01 23:02:50 +00:00
Brad Humphrey 123bf2ef64 update oauth2 api to include replace_tokens
test plan:
	check the docs at /doc/api/file.oauth.html
	for the replace_tokens documentation

Change-Id: I8ff04dcbe8a930cfc0e2bab11a095524dcf8615e
Reviewed-on: https://gerrit.instructure.com/131112
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2017-10-30 19:20:05 +00:00
Derek Bender ba72375012 enable better_errors for development part two
This re-enables better_errors with an opt in policy for
binding_of_caller (which powers the browser REPL) to safeguard
by defautl against RCE with tools like ssh, ngrok or localtunnel

The key for enabling the console is BETTER_ERRORS_ENABLE_CONSOLE
and the key for disabling better_errors altogether is
BETTER_ERRORS_DISABLE.

Docker users: set your TRUSTED_IP address in your environment
variables to access better errors in you web container.

fixes: GRADE-156

test plan:
 - by default, no live REPL console should be present when the
   error page is present (e.g. /accounts/0)
 - given BETTER_ERRORS_ENABLE_CONSOLE=true
 - the live REPL console is now present
 - given BETTER_ERRORS_DISABLE=true
 - the better errors page is not displayed (e.g. /accounts/0)

Change-Id: Ia259bc466136d678aa0b33047dda5f2aa0b3c28d
Reviewed-on: https://gerrit.instructure.com/95120
QA-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-10-23 16:09:33 +00:00
Andrew Butterfield 6d9aae54b0 Change references to grade_changed event to grade_change event
fixes PLAT-2867

Test plan:
* Ensure documentation is correct for both live events and lti
  capabilities
* Ensure grade_change capability works for LTI 2 tools

Change-Id: I68c381883a9feb50f2f3705f1aa0f122db766e61
Reviewed-on: https://gerrit.instructure.com/130067
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2017-10-19 14:28:17 +00:00
Nik Nyby cab770e2a1 plagiarism platform docs: remove smart quotes
These are messing up the syntax highlighting, and aren't valid JSON.

closes CNVS-40054
closes gh-1140

Change-Id: I6632d1091e193aa4686f2f5d37c8b96c4c020b5f
Reviewed-on: https://gerrit.instructure.com/130214
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
QA-Review: Omar Khan <okhan@instructure.com>
2017-10-18 22:51:23 +00:00
wdransfield c0f7738cea Add text editor contents and selection variable expansions
Closes PLAT-2792

Test Plan:
- Install a tool that uses the new
  'com.instructure.Editor.contents' and
  'com.instructure.Editor.selection' varaiable
  expansions in a content item launch.
- Navigate to a page that uses the RCE
- Enter some content in the editor and highlight
  a portion of that content.
- Do a launch and verify the complete contents of the
  editor is sent as com.instructure.Editor.contents and
  the selected content is sent as com.instructure.Editor.selection.

Change-Id: Id2b3104b6324aa62d9ae3025b593de367eb5d6a3
Reviewed-on: https://gerrit.instructure.com/129005
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Karl Lloyd <karl@instructure.com>
2017-10-16 20:10:02 +00:00
Jeff Belser 9a78c89799 variable substitution for brand config JSON
refs PLAT-2840

Test plan:
  1. Install an LTI tool with the variable substitution:
     `com.instructure.brandConfigJSON`
  2. Ensure that it appears on launch as the brand config JSON
  3. Ensure it is well documented within variable expander writeup
  4. Tests pass

Change-Id: I4bfa7db8e89fa0f0ae2b0a81a610b97e556d69e9
Reviewed-on: https://gerrit.instructure.com/128374
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Jeff Belser <jbelser@instructure.com>
2017-10-13 22:25:55 +00:00
wdransfield c3a4e90334 Add group id to submission live events
Closes PLAT-2874

Test Plan:
- Create a group assignment associated with a
  plagiarism detection tool.
- As a student submit to the assignment and verify
  the resulting live event contains the group id.
- Resubmit to the assignment and verify the resulting
  live event contains the group id.
- Create an originality report for the submission.
- From speed grader trigger the resubmit to plagiarism
  tool provider button to emit a live event.
- Verify the resulting live event contains the submission's
  group id.

Change-Id: I3ae14946c2b08e4f0ae6bb5175621609bf31524c
Reviewed-on: https://gerrit.instructure.com/128835
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-10-09 14:33:13 +00:00
Simon Williams 2d95ae1f62 allow linking to lti test settings section
Change-Id: Iec0010904a62bde85bf8bd5494775fd02e0e5585
Reviewed-on: https://gerrit.instructure.com/128246
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-10-05 19:00:19 +00:00
Rob Orton 8ca2f083f2 allow removing blueprint course links from sis import
fixes CNVS-39563

test plan
 - run sis import with dissociate
 - it should remove the link

Change-Id: Id512802fe5f805ef4074b4a79cf19b9012c232c1
Reviewed-on: https://gerrit.instructure.com/127873
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-10-04 18:59:12 +00:00
Rob Orton d5c141ee0c don't delete enrollments if an active login remains
fixes CNVS-39623

test plan
 - have a user with two logins and enrollments
 - remove one through sis import
 - the enrollments should not be deleted

Change-Id: Idb95db90ba0eedfcb19b27208c0af639bf13f75f
Reviewed-on: https://gerrit.instructure.com/127946
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-10-03 23:35:04 +00:00
Andrew Huff 7b4dc8e4cd small tweaks to live-events doc
two small changes:

http://kinesis.docker -> http://kinesis.canvaslms.docker: dinghy
automatically sets up this `VIRTUAL_HOST`-equivalent for us. It's better
to use this form when you have multiple projects that have a `kinesis`
service defined in docker-compose.yml

mystream -> live-events: this is just a typo that was overlooked in a
previous commit

test plan: none

Change-Id: Ieec67fcf3ce3dafa8fa43e8fa18df6e35ab3adeb
Reviewed-on: https://gerrit.instructure.com/128156
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Andrew Huff <ahuff@instructure.com>
QA-Review: Andrew Huff <ahuff@instructure.com>
2017-10-02 23:05:50 +00:00
Rob Orton c5daffa68b create multi_term_batch_mode
fixes CNVS-39621

test plan
 - run multi_term_batch_mode sis imports
 - it should remove excluded items from all
   included terms
 - run rake doc:api
 - api docs and sis_csv doc should generate and be
   clear

Change-Id: I315b8bf4a78422a8b9f96cf330da6aa1553cacb8
Reviewed-on: https://gerrit.instructure.com/127686
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-10-02 18:55:59 +00:00
Jacob Fugal 201d0d6b6a read from Location on 201 response from upload
fixes CNVS-39065

vs. success_url for legacy path or body of S3 redirect. for parity with
those old responses, we need to have the Location returned from the
capture include the `enhanced_preview_url` when appropriate.

not sure why, but when S3 gives you a redirect after successful upload,
the XHR follows the redirect happily. when inst-fs does, Canvas gives a
CORS error (at least during local development with docker). rather than
try and tell the difference and fix, it, we really shouldn't be
redirecting anyways. use the appropriate REST status and let the client
know that it wants to fetch from the Location explicitly. this explicit
request is happy without any CORS mangling.

test-plan:
 - have your local canvas connected to local inst-fs
 - go to <canvas>/files
 - upload a new file
 - upload should succeed, including adding the new file to the UI
 - repeat for any other place you can think of to upload a file in
   canvas, including:
   - avatars
   - gradebook
   - submissions
   - conversations
   - etc.

Change-Id: I312aaa17fd000843131c89023e827410cc5e13c6
Reviewed-on: https://gerrit.instructure.com/126012
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2017-10-02 17:30:41 +00:00
Andrew Butterfield 6b3e3389a9 Add LTI variable substitutions for brand config urls
fixes PLAT-2840

Test plan:
* Install a tool with the following variable substitutions
  com.instructure.brandConfigJSON.url
  com.instructure.brandConfigJS.url
* Ensure that they are subtituted on launch
* Ensure that the variable expander documentation includes these
  substitutions

Change-Id: I0c0287b8b4bd029c9dd0619a5f08d8a3b9306c02
Reviewed-on: https://gerrit.instructure.com/126806
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2017-09-27 18:04:44 +00:00
Rob Orton 6a6129e6ff allow other states for enrollment diffing
fixes CNVS-39457


test plan
 - pass diffing_drop_status to sis import api
 - enrollments dropped by exclusion(through diffing)
   should be marked as the state passed

Change-Id: I5866c9456b1fa5b32ba4f723b20c6e3aa3c4d1ab
Reviewed-on: https://gerrit.instructure.com/126856
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-09-25 23:21:34 +00:00
Tyler Pickett 099365aec1 Add rake task to populate Consul from dynamic_settings.yml
Fixes: CNVS-39293

Since we eliminated the pre-population functionality from our Consul
wrapper we needed something to conveniently populate the KV store.

Test Plan:
- Start a Consul server
- Run `bin/rake canvas:seed_consul`
- Verify that values were written to the KV store.

Change-Id: I340011b7d00ed4e3dd2918e3f101f6377fc72d7e
Reviewed-on: https://gerrit.instructure.com/126574
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2017-09-19 18:08:39 +00:00
wdransfield f848bf5c64 Add 'lti_user_id' to submission live events
Closes PLAT-2824

Test Plan:

- Create a submission with an attachment as a student in an
  assignmetn associated with a plagiarism detection tool.
- Verify that the live event emitted contains an `lti_user_id`
  that matches the `lti_context_id` of the student.
- As a teacher click the `resubmit to plagiarism tool` button in
  speedgrader. Verify that the live event emitted contains the
  `lti_user_id` filed set to the student's `lti_context_id`.

Change-Id: I26d1da652f22ef7fd1cde361688704598db29fa7
Reviewed-on: https://gerrit.instructure.com/125503
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-09-19 15:49:13 +00:00
Rob Orton 670268e010 add admin importer to sis imports
fixes CNVS-37748

test plan
 - run migrations
 - it should create and delete admins through sis import
 - check docs with rake doc:api
 - the documentation should be correct

Change-Id: I251fd5b0af06293dcb74699fdcfe8f950f779683
Reviewed-on: https://gerrit.instructure.com/119403
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-08-22 22:22:21 +00:00
Andrew Butterfield 7a9aba044c Add post message token variable substitution documentation
Test plan:
n/a

Change-Id: Ica2a976f7cd8ba8d5b9317f8a324b473a491fdc4
Reviewed-on: https://gerrit.instructure.com/123407
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2017-08-21 18:48:13 +00:00
Omar Khan 0fdd64e53f Remove karma container from docker-compose.override.yml
Test plan:

- Add docker-compose/js-tests.override.yml to COMPOSE_FILE in .env
- docker-compose build js-tests
- docker-compose run --rm js-tests

Change-Id: I6d43cb2da47c1b6985a9fefd9cc23262e5f56233
Reviewed-on: https://gerrit.instructure.com/123284
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Omar Khan <okhan@instructure.com>
2017-08-18 20:03:30 +00:00
Christopher Whitten 53a5d7cb53 Improve OAuth 2 DELETE token endpoint documentation
Change-Id: Ife1a327c4fdd9de6fb6579d9128cd2da1acc182e
Reviewed-on: https://gerrit.instructure.com/123180
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-08-17 23:22:48 +00:00
Omar Khan 399414b3ec Run javascript tests in headless chrome
Test plan: docker-compose run --rm karma yarn test

Change-Id: I316d80e7a1b712b0dda91a390c4dddeb09b3e6fb
Reviewed-on: https://gerrit.instructure.com/122776
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-08-16 16:11:52 +00:00
Derek Bender 4ec005d23e update README for docker known issues
Change-Id: I4a30c225b190c3a2ca0d9181150ca1fe4b584dfb
Reviewed-on: https://gerrit.instructure.com/122656
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2017-08-14 18:43:47 +00:00
Cody Cutrer 622ed3314a require yarn, not npm
Change-Id: I2dbb037d4cbb0de7952dde19196c6937d18924e9
Reviewed-on: https://gerrit.instructure.com/122554
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-08-14 15:27:14 +00:00
Cody Cutrer c3c8c10360 try to explain the opaqueness of upload_params better
closes CNVS-37422

Change-Id: I3965d69e1382adc2f887ccc035777a2c3251bf65
Reviewed-on: https://gerrit.instructure.com/122181
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-08-09 19:30:08 +00:00
James Williams ad05fdbf8b master courses: allow blueprint associations via sis imports
test plan:
* with blueprint courses enabled,
* create a blueprint course with an sis id
* create a course by uploading a sis batch with a
courses.csv file, adding a `blueprint_course_id` column
set to the blueprint course's sis id
* it should add the sis imported course as an
 associated course

closes #CNVS-37739

Change-Id: I9b0bced1a3e1f672effc69c10e929e7ee4cd258f
Reviewed-on: https://gerrit.instructure.com/116987
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-08-04 13:27:45 +00:00
Rob Orton 31f2f1b3c2 detect batch mode changes with a threshold and abort
fixes CNVS-37843

test plan
 - run an import for a term adding 2 courses
 - import an empty course file in batch mode with
   the change_threshold set
 - it should not delete the courses and the batch
   should be aborted

Change-Id: Icc809c102b56be547405c5882602a6f9b32d4576
Reviewed-on: https://gerrit.instructure.com/118137
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-07-18 20:08:26 +00:00
wdransfield c1e2c199b4 Add com.instructure.Assignment.lti.id variable expansion
Closes PLAT-2715

Test Plan:
- Verify the default tool consumer profile contains
  the com.instructure.Assignment.lti.id capability.
- Install a plagiarism detection tool that uses an
  LTI launch for display originality reports. The
  message in the resource handler associated with
  the originality report launch should have the
  com.instructure.Assignment.lti.id enabled. The
  message associated with the
  `Canvas.placements.similarityDetection` capability
  should also have the the new capability enabled.
- Associated the tool with an assignment. Verify that
  a parameter named com_instructure_assignment_lti_id
  is sent in the launch from the create/edit UI. Its
  value should match the ext_lti_assignment_id param.
- Create an originality report and do the associated
  tool launch.
- Verify a com_instructure_assignment_lti_id parameter
  is sent. The value should match the ext_lti_assignment_id
  sent in the assignment creattion config launch.

Change-Id: I722dd16a6cc5e62a447f76f10e9f0f582a11a33a
Reviewed-on: https://gerrit.instructure.com/119029
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-07-17 15:25:19 +00:00
Tyler Pickett 9a6bc639e3 Deduplicate some oauth documentation
Change-Id: I414aeb3b41dbe0db0159883c4fd24c2a8bad6262
Fixes: CNVS-38098
Reviewed-on: https://gerrit.instructure.com/118895
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2017-07-13 18:17:48 +00:00
Rob Orton f05889bfa0 add ability to swap sis ids with a sis import
fixes CNVS-37718

test plan
 - run rake doc:api
 - verify sis documentation is valid
 - change sis ids of users, courses, sections,
   terms, groups, and accounts

Change-Id: I347348cddd1e237368548a4e7ff245582e33d706
Reviewed-on: https://gerrit.instructure.com/116881
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-07-10 19:48:10 +00:00
wdransfield 2c0bfb9efb Add Context.title variable expansion
Closes PLAT-2699

Test Plan:
- Add an LTI2 tool that uses `Context.title` in one of its
  message's enabled_capability array.
- Launch the tool from a course and verify that the `context_title`
  param is set to the name of the course.
- Launch the tool from an account and verify that the `context_title`
  param is set to the name of the account.

Change-Id: I6e734b36022bbd3e7f4ab2dc920271ea8da6df71
Reviewed-on: https://gerrit.instructure.com/117863
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-07-07 21:12:50 +00:00
Tyler Pickett 08b1d698e1 remove docker-toolbox for macOS as a viable way to use docker
Change-Id: I9e38843083ea97045a817f0b13d73ba9c453ca10
Reviewed-on: https://gerrit.instructure.com/117888
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
QA-Review: Tyler Pickett <tpickett@instructure.com>
Tested-by: Tyler Pickett <tpickett@instructure.com>
2017-07-05 19:11:23 +00:00
wdransfield 55fce28b93 Add submisson, attachment, and report id variable expansions
Closes PLAT-2688

Test Plan:
- Install an plagiarism detection tool that uses
  LTI launches for displaying originality reports.
  The message handler for these launches should have
  com.instructure.OriginalityReport.id,
  com.instructure.Submission.id,
  and com.instructure.File.id in it's enabled
  capability array.
- Create an originality report with the tool and
  launch the originality report.
- Verify that parameters for each of these three
  capabilities are send and set correctly.

Change-Id: I2cb246e3a48f5e63a60ff6a0d90a003aaf9c8d62
Reviewed-on: https://gerrit.instructure.com/116377
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-07-05 18:49:40 +00:00
Rob Orton f5292eb60d allow a change threshold to be set for sis imports
fixes CNVS-37751

test plan
 - set change_threshold to 10
 - upload an empty file or one that is more than
   10% different from the diffing master
 - it should not delete all items, or not use
   diffing
 - run rake doc:api and verify documentation

Change-Id: Ifced7e4b76b747b37a7c0b0d5dd065da4a8d68dc
Reviewed-on: https://gerrit.instructure.com/116886
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-06-29 17:16:57 +00:00
wdransfield 683aab7790 Varaible expansions for LTI2 service endpoints
Closes PLAT-2690

Test Plan:
- Test the following variable substitutions. Each should get set
  to their corresponding service URL (the endpoint of the each
  service can be found in the tool consumer profile or in each
  lti api controller).

Change-Id: I37f756cabd0e38e7ea850cdfff7c37e4b8886a85
Reviewed-on: https://gerrit.instructure.com/116480
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-06-29 13:30:27 +00:00
Cody Cutrer 75c7538888 drop rails 4.2
also, allow rails 5.1

Change-Id: If480c2a2c01a7578552dc70f4bdcf3a46df40e7b
Reviewed-on: https://gerrit.instructure.com/115654
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
2017-06-27 15:29:51 +00:00
Jesse Poulos 8652238b78 Switch url in variable sub docs to html instead of markdown
The current markdown for the IMS LTI specification link invariable
substitutions documentation is terribad. This changes it to html so the
link actually works

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake doc:api)
3) navigate to <your host url>/doc/api/file.tools_xml.html
4) make sure the IMS LTI specification link works

Fixes PLAT-2630

Change-Id: I64f23030aeb7236b86eec945b2db3d53f9528c42
Reviewed-on: https://gerrit.instructure.com/116596
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-06-22 18:43:07 +00:00
Cody Cutrer fe76918cfa API for initiating a web session from an access token
fixes CNVS-37391

test plan:
 * generate an access token
 * hit /login/session_token with your access token
 * in an incognito window, paste the returned URL in (quickly)
 * you should be logged in

Change-Id: Ic12f98156f070e9932d0ff3e12c07b2de9e02db5
Reviewed-on: https://gerrit.instructure.com/115271
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-06-15 22:38:47 +00:00
Jeremy Putnam f7185d4e6d fix typo in sis documentation
fixes SIS-2807

test plan
it should say 'section' not 'account'

Change-Id: Ica1ec5a3a519a2257ea5803fe933506874e8fa37
Reviewed-on: https://gerrit.instructure.com/115488
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
2017-06-14 18:18:26 +00:00
wdransfield 346bbc54b3 Webhook subscriptions documentation
Closes PLAT-2310

Test Plan:
Visit /doc/api/webhooks_subscriptions.html and check for accuracy,
spelling, and grammar.

Change-Id: I724f11a3fa306df2e7162c582dca1235b7ccd79b
Reviewed-on: https://gerrit.instructure.com/114201
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-06-12 16:01:48 +00:00
wdransfield 8d66a1893c Add originality report documentation
Closes PLAT-2312, PLAT-2311

Test Plan:

Verify that the Originality Report
api docs now show up at /doc/api and that
the information is accurate.

Change-Id: I783024ff0ea1e71fc1132518adac6b61313ca82e
Reviewed-on: https://gerrit.instructure.com/113906
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Tested-by: Jenkins
2017-06-12 13:22:13 +00:00
wdransfield 27f3eea651 Add plagiarism detection platform docs
Closes PLAT-2615

Test Plan:
Verify the plagiarism docs are now
included in the nav of
https://canvas.instructure.com/doc/api/index.html

Change-Id: I460af377280207d849a2db01e051ae781431c7f9
Reviewed-on: https://gerrit.instructure.com/113792
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-06-08 18:32:03 +00:00
Spencer Uresk d899c22074 Specify user and pseudonym when sending logged_in event
fixes DS-1714

Currently, the logged_in event does not send user information.
This change explicitly passes in the user and pseudonym when
sending the logged_in event, which merges them into the context.

This change also adds the pseudonym's account id and sis id.

Test Plan:
- Login to Canvas
- View live event data, ensure that user_id and user_login
exist in the payload.
- Ensure user account id and sis id are in the attributes.

Change-Id: If720a2b8094de558f79cbae42a7c5156ad86c556
Reviewed-on: https://gerrit.instructure.com/110289
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Spencer Uresk <suresk@instructure.com>
2017-06-06 21:37:29 +00:00
Jeremy Stanley 3d47677764 teacher-side index, show, and details APIs
test plan:
 - render API documentation
 - ensure links between blueprint and associated endpoints
   work properly in API documentation
 - ensure the link from "Set or remove restrictions" to the
   "Course API Update" link works properly in API docs
 - ensure teachers in associated courses who are not
   enrolled in the blueprint and not account admins
   can use the three endpoints in "Associated Course History"
   and that these work as expected
 - the notification links for teachers should be as follows:
   #!/blueprint/blueprint_subscriptions/X/Y
   where X is the BlueprintSubscription ID
   and Y is the ContentMigration ID
 - the notification links for admins should be as follows:
   #!/blueprint/blueprint_templates/X/Y
   where X is the MasterTemplate ID
   and Y is the MasterMigration ID
 (note that making these links work is MC-217)

closes MC-215

Change-Id: I3b0462faf888f8df91cfbd0acb1566da3d60bebc
Reviewed-on: https://gerrit.instructure.com/112840
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-05-31 15:08:01 +00:00
Xander Moffatt 4fc527af33 add uuids to certain live events for Address Book
* events: user, group, course, account creation only
* update README as well

refs CNVS-35485

test plan:
* run automated tests
* fire live events to check fields are passed

Change-Id: If7fa5adcb292bbdf657cd4f5952715cd1005c80b
Reviewed-on: https://gerrit.instructure.com/113107
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
2017-05-25 19:50:16 +00:00
Tyler Pickett 29e1ddec0f Optionally configure live events via Consul
Fixes: CNVS-35832
Refs: CNVS-32864

This was super simple because of the change to using a hash for
configuring LiveEvents instead of a PluginSetting object

Change-Id: Ia34cb905e22a21c822f48b581e3e3cd4f7a738d3
Reviewed-on: https://gerrit.instructure.com/110193
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2017-05-10 16:07:41 +00:00
Cody Cutrer df4bb2ce0b fix xAPI link in API docs
Change-Id: I40713a4ed5d33b10c7375c0e3a56c93e97b4424f
Reviewed-on: https://gerrit.instructure.com/110412
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-05-02 03:11:18 +00:00
Matthew Wheeler 162f010ebc Add fields to live events
Fixes PLAT-2483

* Add root_account_lti_guid
* Re-add provider

Test Plan:

- setup multiple root accounts with /c/108963/
- spinup local live-event testing services
- test out live-event spawning processes as a result of a delayed job
- assert that the kinesis stream contains events with attributes
  containing `root_account_lti_guid` and `provider`

Change-Id: If8e44924145fb8687a16b189d63ad58528ec901e
Reviewed-on: https://gerrit.instructure.com/108970
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
2017-04-26 21:23:35 +00:00
Derek Bender 1c53ab3d72 add late_policy controller/serializer
closes CNVS-36146

test plan:
- hit the following api endpoint (id is the course id):
  - /api/v1/courses/:id/late_policy
  with the following verbs:
  - GET (show)
  - POST (create)
  - PATCH (update)
  the following valid params for LatePolicy are available:
  - missing_submission_deduction_enabled
  - missing_submission_deduction
  - late_submission_deduction_enabled
  - late_submisison_deduction
  - late_submission_interval
  - late_submission_minimum_percent_enabled
  - late_submission_minimum_percent
  example set of valid params:
  - missing_submission_deduction_enabled: false
  - late_submission_deduction_enabled: true
  - late_submisison_deduction: '1'
  - late_submission_interval: 'hour'
  - late_submission_minimum_percent_enabled: true
  - late_submission_minimum_percent: '10'
  example set of invalid params:
  - late_submisison_deduction: '-1'
  the user must be a user with manage_grades permissions such as a
  teacher enrolled in the course, otherwise the json response will have
  an unauthorized message
- refer to the api docs for late_policy for more details

Change-Id: I9e3b2704680cf4b1f9b789deb1dccb2a1ccaa5d5
Reviewed-on: https://gerrit.instructure.com/108989
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-26 19:09:55 +00:00
Jacob Fugal 986476711c fix documentation for selenium w/ docker
Change-Id: Icdb7a99d704d032825820ae49fe0c638f80427ae
Reviewed-on: https://gerrit.instructure.com/108804
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2017-04-17 17:03:18 +00:00
Cody Cutrer 06589510bc doc: clarify that state is not part of redirect uri
refs gh-1018

Change-Id: Ief43fbb68bf8e1fad858424f94fcaca22a77f0a3
Reviewed-on: https://gerrit.instructure.com/107596
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-04-05 17:41:13 +00:00
Jayce Higgins f0f0e7f5ec Add producer to Live Event metadata
Fixes: PLAT-2371

Test-Plan:
 - spinup local live-event testing services
  - test out live-event spawning processes
    -- check live event docs for triggers of events
  - assert that the kinesis stream contains events with attributes
    containing `producer: 'canvas'`

Change-Id: I68789294005d60dc873a4316b60ff1a93a4e9b94
Reviewed-on: https://gerrit.instructure.com/105622
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
2017-04-05 15:31:26 +00:00
wdransfield 905c65551d Add 'lti_assignment_id' to submission and assignment live events
Closes PLAT-2438

Test Plan:
For each of the following live event types, verify that a field
named 'lti_assignment_id' is included and set to the 'lti_context_id'
of the assignment associated with the event:
   * submission_created
   * submission_updated
   * plagiarsim_resubmit
   * assignment_created
   * assignment_updated

Change-Id: I7fa46e414da3a2fab8e4a5ac2c7d213a0dd3ec3c
Reviewed-on: https://gerrit.instructure.com/107104
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-04-03 13:27:31 +00:00
Jayce Higgins 4420c72cfb Add root_account_uuid to canvas LiveEvents
Fixes: PLAT-2369

Test-Plan:
  - spinup local live-event testing services
  - test out live-event spawning processes
    -- check live event docs for triggers of events
  - assert that the kinesis stream contains events with attributes
    containing `root_account_uuid`

Change-Id: I3ad3d64621c7726d30de9a8a8824e8b0e5d5aab2
Reviewed-on: https://gerrit.instructure.com/105621
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
2017-03-31 20:54:25 +00:00
wdransfield 825ac340ba Update ToolProxyBinding.memberships.url docs
Closes PLAT-2419

Test Plan:
Generate documentation and verify the
ToolProxyBinding.memberships.url variable substitution
has a note about being for future use.

Change-Id: If380aa043da8249e5d5237e73c24692284d9ca21
Reviewed-on: https://gerrit.instructure.com/106668
Tested-by: Jenkins
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-29 14:45:08 +00:00
Jacob Fugal 54da1d33f6 additional live events instrumentation
refs CNVS-32764

for address book

- add group_updated and group_membership_updated events
- add associated_user_id to enrollment_created and enrollment_updated
  events for observer enrollments
- add workflow_state to group_memberhsip_created events
- add context_type, context_id, account_id, and workflow_state to
  group_created events

test-plan:
- configure local canvas to write live events to a local kinesis stream

[group fields, group_updated events]
- create a course group; the group_created event in the stream should
  have a context_type of 'Course', a context_id of the group's course,
  an account_id of the group's account, and a workflow_state of created
- create an account group; the group_created event in the stream should
  have a context_type of 'Account', a context_id of the group's account,
  an account_id of the same, and a workflow_state of 'created'
- delete a group; a group_updated event should be emitted in the stream,
  with all the same fields and a workflow_state of 'deleted'

[group_membership fields, group_membership_updated events]
- add a user to a group; the group_membership_created event in the
  stream should have a workflow_state of 'accepted'
- remove the user from the same group; a group_membership_updated event
  should be emitted in the stream, with all the same fields and a
  workflow_state of 'deleted'

[enrollment associated_user_id field]
- create a non-observer enrollment (e.g. teacher); the
  enrollment_created event should not include an associated_user_id
- create an observer enrollment without an assigned observee; the
  enrollment_created event should include a null associated_user_id
- attach the observer enrollment to an observee; the enrollment_updated
  event should include the updated associated_user_id

Change-Id: I15066b7c6cc85f914be433530d542c6f13643e6a
Reviewed-on: https://gerrit.instructure.com/106335
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2017-03-28 21:12:54 +00:00
wdransfield d6f4a9dec1 Plagiarism resubmit event type
Closes PLAT-2404, PLAT-1910

Test Plan:
- Create an assignment associated with a similarity
  detection tool.
- Verify that a subscription with the
  'submission_created' and 'plagiarism_resubmit'
  event types is created in Dynamo.
- Create an assignment of type online upload
- As a student submit a document for the assignment
  submission.
- Create an originality report for the submission with
  the workflow state set to 'error'
- Navigate to the submission in speed grader and
  click the resubmit to TII button.
- Verify canvas emits a 'plagiarism_resubmit'
  event
- Verify you can create/manage subscriptions of this new
  type via the subscriptions api (See https://docs.google.com/
  document/d/12x6Peif-I-0zvl2uMv2JVbQdZumGGqMtspWKYTqlL9o/edit)

Change-Id: Ia9eff1c61bf0b5662e0b6bc1d088026afd03e8af
Reviewed-on: https://gerrit.instructure.com/106187
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-28 19:13:55 +00:00
Cody Cutrer 7ccd78c001 rails 5: fix eager loading in production mode
fixes CNVS-34845

in particular, delete a file (lib/kaltura.rb) that is never used anymore,
and move api_routes.rb out of lib, as it's not meant to ever be loaded
in the app

Change-Id: Ia950b3eb50b90dfaccec1784e3e612589091989e
Reviewed-on: https://gerrit.instructure.com/105444
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-21 23:04:28 +00:00
Ryan Shaw 5b88629fe0 Remove RequireJS support
closes: CNVS-31785

test plan:
all builds should pass

Change-Id: I2925934692a3d2f115f1289d7b50cb72d8cb907f
Reviewed-on: https://gerrit.instructure.com/104492
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 22:10:23 +00:00
Rob Orton 24ea9b9d34 add limit_section_privileges to enrollments importer
fixes CNVS-34697

test plan
 - enrollment imports should work
 - adding column limit_section_privileges should set
enrollment.limit_privileges_to_course_section

Change-Id: I363c16036de19808ec21793f1b999d004fbf6a12
Reviewed-on: https://gerrit.instructure.com/104049
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-03-10 22:14:44 +00:00
Cody Cutrer e8897414f8 rails 5: fix API docs
Change-Id: Ifc6a768ee45edd61346748dfcd536d6beeaa8eee
Reviewed-on: https://gerrit.instructure.com/104749
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2017-03-10 19:39:05 +00:00
Derek Bender 1aa3185c95 add Curve Grades to AssignmentColumnHeader
Add a doc to track the merging procedures once we wish to replace
gradebook with gradezilla as the only gradebook.

closes: CNVS-35020

test plan:
 - Given a course with graded assignment submissions
 - Given at least one assignment (named A) with a student in a
   closed grading period
 - Given at least one assignment (B) with a grading type of pass/fail
 - Given at least one assignment (C) with no points
 - Given at least one assignment (D) with exactly 0 points possible
 - Given at least one assignment (E) in a current grading period, with a
   grading type of "points" and with a positive nonzero points
   possible value (the opposite of all the above restrictions)

 - When on the gradezilla enabled gradebook page as a teacher
 - Ensure "Curve Grades" is in the assignment header drop down
 - Ensure the "Curve Grades" menu item for assignment E is not disabled
 - Ensure clicking on "Curve Grades" for assignment E pops up the Curve
   Grades Dialog
 - Ensure supplying a curve value and clicking post does update grades
 - Ensure the "Curve Grades" menu item is disabled for assignments
   B, C, D
 - Ensure clicking on "Curve Grades" for assignment A flashes an error
   message about at least one student in a closed grading period

 - When on the gradezilla enabled gradebook page as an admin
 - Ensure clicking on "Curve Grades" for assignment A does not flash an
   error message and the curve grades dialog will display and persist
   grades upon posting

Change-Id: Ie6f1ae730bc2f3aa0556d6b0e32334a126e95881
Reviewed-on: https://gerrit.instructure.com/103445
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-03-06 23:53:01 +00:00
Andrew Huff 991796e22b docs: update recommended `dinghy create` options
The docs now recommend giving dinghy 50GB of disk space instead of the
default 20GB. Hopefully this will help alleviate annoyances caused by
out-of-space errors when you are developing multiple dockerized services

Before this commit, doing a fresh install of canvas used up 38% of
dinghy's available disk space

Change-Id: Ifbbcd2aaee073b7beb9a7c724c4cec1a0ae7ac4f
Reviewed-on: https://gerrit.instructure.com/103873
Tested-by: Jenkins
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Product-Review: Andrew Huff <ahuff@instructure.com>
QA-Review: Andrew Huff <ahuff@instructure.com>
2017-03-03 01:30:31 +00:00
Ryan Shaw 05f55c1c30 Deprecate `npm` client. Use `yarn` instead
Closes: CNVS-35152

This changes all our tooling that used `npm` to
Run scripts to use `yarn`. `npm` will still work
for now but if you have yarn installed, it will use
that.

Cheat Sheet:
old command      -> new command
npm install      -> yarn install (or just `yarn`)
npm run webpack  -> yarn run webpack
npm test         -> yarn test
See more at https://yarnpkg.com

Test plan:
* all Jenkins builds should pass
* without yarn installed:
* run script/nuke_node.sh
* it should work and warn you about how `npm` is deprecated
* now install yarn, e.g.: `brew install yarn`
* run script/nuke_node.sh again
* it should work and you should see silly yarn emoji
  in the output and it should be a lot faster

* the docker changes I made should work and docker should
  build correctly and use yarn.

Change-Id: I4aa31eeae3ecc504634a7c72a1ea0d3396f445e3
Reviewed-on: https://gerrit.instructure.com/102969
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-01 19:39:01 +00:00
Brad Horrocks bbfe35b108 update variable expanders
Add docs on how to update them
Update everytime we run doc:api

Change-Id: I3c7aa55d051fa5474e267897138ab01c3c7c3fb8
Reviewed-on: https://gerrit.instructure.com/102177
Reviewed-by: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2017-02-27 23:15:19 +00:00
Nathan Mills 4ecc648078 add lti option to prefer sis email
fixes PLAT-2324

test plan:

output to test:
 the lti message parameters :
   `lis_person_contact_email_primary`
  variable expansions:
   `Person.email.primary`
   `vnd.Canvas.Person.email.sis`

- test that the above outputs behaviour hasn't changed
- add <lticm:property name="prefer_sis_email">true</lticm:property>
to the extension settings portion of the xml config
- make sure you don't have an sis email
- the behavior shouldn't change
- set an sis email address
- you should now get the sis email for
`lis_person_contact_email_primary`

- test that the behaviour of `vnd.Canvas.Person.email.sis` hasn't
changed

Change-Id: Iaca2e036170ed1173309fd4596a4d6e1b016b6dd
Reviewed-on: https://gerrit.instructure.com/103195
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2017-02-27 17:57:23 +00:00
Ryan Shaw 1145e951c1 eliminate the need to run karma & webpack separately
TL;DR: running JS tests in canvas will be a lot faster & simpler

What you need to know as a developer writing JS in canvas:

Lets say you are working on the “dashboard_cards” feature, just run:
  `npm run jspec-watch spec/javascripts/jsx/dashboard_card`
While you write code and it will have a watcher that catches
any changes and re-runs just the dashboar_card specs if you save any
file that went into it. It should run & reload in less than a few
seconds. You can give it the path to a specific spec file or have it
run an entire directory.

Or, if you are working on something that might touch a lot of stuff, run:
  `npm run test-watch`
and while you are changing stuff, it will run *all* the QUnit specs on
any change. It should only take a couple seconds for webpack to process
the file change and to reload the specs in the browser.

Jenkins can now just run “npm test” for the webpack build. No need to
bundle install then run rake tasks just to run js tests.

This change also starts warning you when you have specs that take a
long time to run (e.g.: https://cl.ly/2i1O3O0J1504). It turns out we
have some *really* slow js specs (like selenium-level slow) so if you
notice a slow spec that you our your team wrote, please fix it.

Longer details:

To test our JS in webpack, we used to
1. run webpack with an env var set so it only does our ember stuff
2. run karma against ember
3. run webpack again against all the rest of the specs canvas
4 run karma again against all the specs in canvas
that took a long time. this change makes it so both the ember
specs and the specs in the rest of canvas run all in the same karma.
it also makes it so karma runs webpack itself. so you don’t need
to run `npm run webpack-test && karma start` to run tests, just
`npm run test` (which is just an alias to `karma start`). it also means
there is now just one watcher (karma) instead of one for both webpack
and karma.

Closes: CNVS-34977

Test plan:
* Jenkins builds should pass
* Try running different variations of the commands up there in the
  description. They should work and be fast-ish.

Change-Id: Ia97f9bfa3677763f218f5f02c9463344f180bc6c
Reviewed-on: https://gerrit.instructure.com/102169
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-02-17 21:52:05 +00:00
Simon Williams 2354ca0af8 doc: tweak wording on lti admin navigation doc
closes CNVS-17833

test plan: /doc/api/file.tools_xml.html makes sense

Change-Id: If3dd5e97c95713a8b86521ed3cb956e2daa32f7b
Reviewed-on: https://gerrit.instructure.com/101823
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-02-13 20:27:50 +00:00
wdransfield 5304c98661 LTI2 only send Context.id when requested
Fixes PLAT-2246

Test Plan:
- Install an lti2 tool without
  the 'Context.id' capability
  enabled.
- Launch the tool and verify that
  the context_id param is absent.
- Install an lti2 tool with the
  'Context.id' capability
- Launch the tool and verify that
  the context_id param is present.
- Verify the Context.id capability
  is preseint in the TCP.

Change-Id: I164f2ca675d77c9ad743d0dad0f8d4ee7364444c
Reviewed-on: https://gerrit.instructure.com/101478
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-02-13 20:11:27 +00:00
wdransfield adff709f9d Add variable substitution capabilities to TCP
Fixes PLAT-2235

Test Plan:
- Get the Canvas TCP and verify it contains all
  capabilities listed in lib/lti/capabilities_helper.rb:3
  in its capability_offered section.
- Install an LTI2 tool, launch it, and verify
  none of the following parameters are sent in
  the launch:
  * launch_presentation_document_target
  * launch_presentation_locale
  * tool_consumer_instance_guid
  * lis_course_section_sourcedid
  * roles
  * lis_person_sourcedid
 - Each of the above params now have an associated
   capability offered by Canvas. If a TP wants
   one of the above parameters sent in their
   tool launch they must include the associated
   capability in their enabled_capability section
   of the tool proxy.

   Verify adding the associated capability in the
   tool profile causes the paramter to be sent
   in the tool launch. See variable_expander.rb
   docs for a mapping of capabilities to
   variable names

Change-Id: I027d079d9d3cf53715fcf8ca4d9d8759af02cb88
Reviewed-on: https://gerrit.instructure.com/101336
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-02-13 17:33:17 +00:00
Andrew Huff b347a9e844 edit broken command for docker setup
The old command used to print `version: 2` instead of `version: '2'`,
which made docker-compose angry:

  ERROR: Version in "./docker-compose.local.ahuff.yml" is invalid - it should be a string.

Change-Id: Ie4d34db6f99fe3c6efc3dd439003a7a6f1a315bb
Reviewed-on: https://gerrit.instructure.com/101079
Tested-by: Jenkins
Reviewed-by: Eric Coan <ecoan@instructure.com>
Product-Review: Andrew Huff <ahuff@instructure.com>
QA-Review: Andrew Huff <ahuff@instructure.com>
2017-02-04 02:10:56 +00:00
Neil Gupta ee7f0e5fc3 Update docker readme
Change-Id: I3cb832133ddb993e469991bfedbca623563818b0
Reviewed-on: https://gerrit.instructure.com/101024
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2017-02-03 00:25:25 +00:00
Benjamin Porter 31c8163517 Fix bug in doc rendering to HTML
The missing newline caused the markdown to be rendered
all on the same line.

Change-Id: Ibf6982536cd5edaa908a52a1fe885814d5f8dc50
Reviewed-on: https://gerrit.instructure.com/100568
Tested-by: Jenkins
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2017-02-01 23:15:55 +00:00
Simon Williams a6407de2db clarify SIS batch mode documentation
closes CNVS-34488

test plan: read api SIS batch mode section, make sure it makes sense

Change-Id: Ib716675c1e9542ac96415ec1c5f82b449df749f5
Reviewed-on: https://gerrit.instructure.com/100342
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-01-26 19:37:33 +00:00
Simon Williams 0125d8ec55 update SIS api docs about stickyness
closes CNVS-29185

test plan: make sure SIS api docs about stickyness look right

Change-Id: I4f3f1ce3d8172b4027cd31b02e73a5db0273afdb
Reviewed-on: https://gerrit.instructure.com/100329
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-01-26 19:37:28 +00:00
Benjamin Porter 48440e7bf9 Add some clarifying info to the docker docs
Change-Id: I856c0531d961cc1bacbf0f60a863c9a059e3b21d
Reviewed-on: https://gerrit.instructure.com/99237
Tested-by: Jenkins
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
2017-01-25 22:50:12 +00:00
Cody Cutrer 6beba043bc fix some ruby 2.4 deprecations
the thread_safe gem has deprecations too, but they'll require Rails 5.1
until they're fixed (when both activesupport and tzinfo no longer
depend on it)

Change-Id: Ic53839d911ba8ed4d463d17f9dd7207673510f3a
Reviewed-on: https://gerrit.instructure.com/100499
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-01-25 21:53:37 +00:00
Jesse Poulos ec4ed44c61 Document oauth_compliant as a possible XML config option
Currently, there is no documentation that shows how to configure an
external tool so that Canvas omits launch URL query parameters from the
POST body (see PLAT-2025). This update adds that documentation.

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to the following:
<your host url>/doc/api/file.tools_xml.html
4) check for spelling, grammar, accuracy of information and that the new
link works

Fixes PLAT-2146

Change-Id: Ie111872b39ae212d473034d74464bc1a011bf7ea
Reviewed-on: https://gerrit.instructure.com/99714
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-16 22:51:18 +00:00
Jesse Poulos f8119abfe9 add custom variable for institution assigned (i.e. sis) email
Before this fix, there was not a way to determine the launching users sis
added email address without accessing API. This causes pain for some
integrations that relied on the lis_person_sourced_id since that value can
change if the user changes their default email (i.e. stars a different email).
This update adds a way to send the users institution assigned email during an
LTI launch.

Test plan:
1) create a course
2) create a user and enroll them in the course
3) create another user via SIS and enroll them in the course
4) install a tool with the $Person.email.sis custom field
5) launch the tool as each user added in 2 and 3
6) verify that
      1) the default value of "$Person.email.sis" is passed in
      the launch parameters for the user that *was not* added via SIS and
      2) the value of the email assigned to the user that *was* added via SIS is
      passed in the launch

Fixes PLAT-2164

Change-Id: Ibbc15c8a3108d51aac680f7b4cd778e2677927b9
Reviewed-on: https://gerrit.instructure.com/99503
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-16 21:02:51 +00:00
Jesse Poulos 81ce3822ec Document ltiLaunchUrl as a possible resultData node
Currently, there is no documentation that shows how to pass an LTI launch url
via grade passback. This update adds that documentation.

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to the following:
<your host url>/doc/api/file.assignment_tools.html
4) check for spelling, grammar, accuracy of information and that the new
link works

Fixes PLAT-2066

Change-Id: I028ff980e91348e0e8aa389e80fe9dac94be9df9
Reviewed-on: https://gerrit.instructure.com/99392
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-13 20:23:07 +00:00
Jesse Poulos 2ef7a5191e add custom variable for course workflow_state
Before this fix, there was not a way to determine the workflow_state of the
course without accessing API. This fix adds a way to send the course
workflow_state during an LTI launch.

Test plan:
1) create a course
2) install a tool with the $Canvas.course.workflowState custom field
3) launch the tool and verify that the course workflow_state is passed in
the launch parameters

Fixes PLAT-1956

Change-Id: I933ddcd45c689ecd054e692c7e4dc993874dc995
Reviewed-on: https://gerrit.instructure.com/94987
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-13 19:56:20 +00:00
Michael Brewer-Davis a78cc8b2a5 ensure cyoe only references fully graded, non-muted assignments
- add muted and grading_complete fields to live events

refs: OUT-577

Test alongside g/97097

Test plan:
- Partially graded items
    1.  Create a quiz with some automated and some manually graded
        content.  Apply mastery paths rules to trigger other assignments.
    2.  As student, take the quiz, such that your score on the
        automatically graded content would trigger a mastery path rule
    3.  Verify that no content is released
    4.  As teacher, grade the remaining questions of the quiz such that
        master paths content should be released.
    5.  Verify that the appropriate content is released to the student.

- Muted items
    1.  Create an assignment with mastery paths rules
    2.  As student, submit the assignment
    3.  As teacher, mute the assignment
    4.  Grade the submissions such that master paths content should be
        released
    5.  As student, verify that no content has been released
    6.  As teacher, unmute the assignment
    7.  As student, verify that the appopriate content has been released.

Change-Id: I312aba018ca262a907c6a23a938af739842e28ae
Reviewed-on: https://gerrit.instructure.com/97098
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-01-11 20:21:40 +00:00
Jesse Poulos 4ec3f40825 Updates the variable expansion documentation
The variable expansion documentation has instances of information being
outright incorrect, or just confusing. Furthermore, there are no examples
of how to invoke custom fields via variable expansion. For everything
(except the `Canvas.file` type variables), I've documented what is actually
returned as well as an example of what the data might look like. I've also
added examples of how tools can be configured to use custom fields (via
API, UI, or XML).

Test Plan:
Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to the following:
<your host url>/doc/api/file.tools_variable_substitutions.html
4) check for spelling, grammar, accuracy of information and that any links
work

Fixes PLAT-2022

Change-Id: I754bc2c5e48d4cdd4738c6d03d4d7e3c12a621b1
Reviewed-on: https://gerrit.instructure.com/96801
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-10 17:24:31 +00:00
Jesse Poulos b63159ff62 Update OAuth2 documentation in API docs
There were a variety of inaccuracies or points of confusion in the OAuth
API documentation. This update is intended to clarify some of the areas of
the documentation that frequently confuse 3rd party developers.

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to the following:
<your host url>/doc/api/file.oauth.html
<your host url>/doc/api/file.oauth_endpoints.html
4) check for spelling, grammar, accuracy of information and that the new
link works

Fixes PLAT-1624

Change-Id: Ia8a9b1bd2890d921557b47a5e390279f9be7d72f
Reviewed-on: https://gerrit.instructure.com/93972
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-04 22:23:48 +00:00
Rob Orton ed7f2e0f95 remove invalid line from api doc
fixes CNVS-33731

test plan
 - really?
 - you want a test plan?

Change-Id: I45b6db000de8c6c913d56df8cd07e93d470619da
Reviewed-on: https://gerrit.instructure.com/98312
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
2016-12-21 22:10:18 +00:00
Derek Bender f30ef06a83 disable editing assignments in closed periods
if an assignment is locked by having any due date
in a closed grading period all fields are locked except
RCE, submission type fields, peer review fields.

closes: CNVS-30899

Test Plan
 - lock an assignment edit page by having at least one
   due date in a closed grading period
 - create an assignment with at least one due date in
   a closed grading period
 - go to the edit the assignment page
   (e.g. /courses/1/assignments/1/edit)
 - all fields are locked except for
   - description (RCE)
   - submission type
   - peer reviews
 - if an assignment is not locked, all fields should
   be editable as normal
 - if the user is an admin, they can edit anything they want

Change-Id: I5cbee4e552331915280c949f467565069aee8743
Reviewed-on: https://gerrit.instructure.com/93380
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
Tested-by: Jenkins
2016-12-14 21:51:08 +00:00
Jacob Fugal 5582a4bf06 always use global ids in live events
test-plan:
 - have live events enabled (see doc/live_events.md)
 - tail the live events stream (see same doc)
 - create a course; emitted course_created event should have global IDs
 - enroll a new user in the course; emitted user_created,
   user_account_association_created, enrollment_created, and
   enrollment_state_created events should all have global IDs
 - create an account notification; emitted account_notification_created
   event should have a global ID

Change-Id: Ib127a3bd2c88d607efdf0063857a9873e78e9483
Reviewed-on: https://gerrit.instructure.com/97358
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2016-12-12 22:26:20 +00:00
Felix Milea-Ciobanu 5aeb620c44 add webpack hooks with osx notifications
test plan:
- add the following line to your .bashrc/.zshrc or equivalent,
 making sure to replace the CANVAS_PATH:
 export ENABLE_CANVAS_WEBPACK_HOOKS=1
 source $CANVAS_PATH/frontend_build/webpackHooks/macNotifications.sh
- reload your shell (`source ~/.zshrc` or equivalent)
- run `npm run webpack-development`
- notice that a notification is displayed in OS X when the build
 starts and finishes

Change-Id: I1139bdf4da2711fa9ce340eaa96165ccbd3ceec1
Reviewed-on: https://gerrit.instructure.com/95656
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2016-12-05 21:54:06 +00:00
Tyler Pickett 2e91a8b9ef Pass selected asset ids on to LTI tools for content migrations.
Change-Id: Iee9032868df426ba2215dc750e699ac24d945647
Refs: PLAT-1945
Reviewed-on: https://gerrit.instructure.com/95550
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Tyler Pickett <tpickett@instructure.com>
2016-12-01 21:44:59 +00:00
Tyler Pickett 1dcab9d724 Add LTI external content import functionality
Change-Id: Ib5a52bba96ef9a322e68ba9575ac33fb78965d21
Refs: PLAT-1759 PLAT-1760
Reviewed-on: https://gerrit.instructure.com/94943
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2016-12-01 21:32:58 +00:00
Felix Milea-Ciobanu 03e93802fb add npm script that can run specific js specs
example usage: `npm run jspec spec/javascripts/jsx/files`

refs CNVS-33223

test plan:
- current webpack test build should work exactly the same
- `npm run jspec` should build + run all specs
- `npm run jspec path/to/stuff` should build + run only specified
 specs
- should work with both directories and individual files
- `jspec-watch` should watch + build a path, but not run specs

Change-Id: I788dd38a6c69a4c36a1300fcecf43678bc7f5327
Reviewed-on: https://gerrit.instructure.com/94625
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2016-11-30 18:37:23 +00:00
Bryan Petty 616e054fa5 set +x on docker entrypoints that require it
Docker entrypoints can't be executed unless they are set as executable.

Also fixes a few other discrepancies:
- adds common docker-compose.local.*.yml to .dockerignore
- updates docs for enabling phantomjs-tests container
- mount common volumes for js-tests and phantomjs-tests containers

Test Plan:
1. Enable phantomjs-tests and js-tests docker containers.
2. docker-compose build --pull
3. Ensure phantomjs-tests and js-tests containers work.

Change-Id: I1ab20575f9936b6cfc2c61501441b1137c9df4cb
Reviewed-on: https://gerrit.instructure.com/95690
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
2016-11-28 22:58:58 +00:00
Jonathan Featherstone 2cb8db1983 Add course_created and course_updated live events
Test Plan:
  * Set up Kinesis locally (see doc/live_events.md for details)
  * Create a new course, verify that 'course_created' event is sent to
    kinesis stream
  * Modify existing course, verify that 'course_modified' is sent to
    kinesis stream

refs CNVS-30242

Change-Id: I8b0b27110cc3fd03ee21d27a56aad14b52071a3c
Reviewed-on: https://gerrit.instructure.com/95709
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2016-11-28 20:56:02 +00:00
Jonathan Featherstone 818ae22138 Add user_created and user_updated live events
Test Plan:
* Set up Kinesis locally (see doc/live_events.md for details)
* Create a new user, verify that 'user_created' event is sent to kinesis
  stream
* Modify existing user, verify that 'user_modified' is sent to kinesis
  stream

refs CNVS-30242

Change-Id: I827f63b5106abec17810f4dc9a700277d7550254
Reviewed-on: https://gerrit.instructure.com/95204
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2016-11-28 20:55:53 +00:00
Colleen Palmer fd9d1fc283 Fix overlapping text in API documentation tables
fixes: CNVS-33249

Test Plan:
- Compile/load api docs
- See word wrapping happing on table cell now

Change-Id: I0bb5bb2ea2a975dccc946d0e321e64debb1e940b
Reviewed-on: https://gerrit.instructure.com/95712
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
2016-11-22 02:56:36 +00:00
Rob Orton ad1d989dac document encouraging using string ids
fixes CNVS-33451

test plan
 - specs should pass

Change-Id: Ib46dbc8de59c5502cde5ebdb02d4cdd8eeb3cf91
Reviewed-on: https://gerrit.instructure.com/95764
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
2016-11-22 02:11:13 +00:00
Brad Horrocks 880f36e806 Cleanup Docker Docs, fix invalid version
Change-Id: I7262813593998444896f136e536e8e726ad4fdec
Reviewed-on: https://gerrit.instructure.com/95367
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-11-16 16:44:58 +00:00
Brad Horrocks 3c809153d1 docker-compose.yml v2
If you have a docker-compose.override file you'll want to
move it somewhere else.

mv docker-compose.override.yml docker-compose.`whoami`.yml

Once you've updated your override file to the version 2 syntax, you
should add it to the COMPOSE_FILE environment variable. Probably in a
.env file in the project root.

Test plan:

You'll need to remove your existing canvas containers and volumes to 
fully test this.

to do so run this **BEFORE** you checkout this patchset

```
docker-compose down
docker-compose ps -q | docker rm
docker volume ls -q | grep canvaslms | xargs docker volume rm 
```


then you should be able to get up and running using the following

```
cp docker-compose/config/* config/
dc build
dcr web bundle exec rake db:create db:initial_setup
dc up
```

You should be able to access canvas like normal

Change-Id: Ia7ff76cfdd4f46278fc1cb2a03969fdadaa4a434
Reviewed-on: https://gerrit.instructure.com/91008
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-11-15 17:06:37 +00:00
Chris Hart 6ea6cf4d2e Make Lato the default Canvas font
Fixes: CNVS-30278

The product design team wants to standardize
on Lato across all Instructure products. See
JIRA for more information.

With this change, we no longer have to use
font-weight: 300 etc to make the right
weight of Helvetica show up. We can go back
to simply using bold and normal, etc.; so
those rules have been updated in this
commit.

Test plan:
to accurately test this you need to set up your
canvas to use a CDN. there is a dev CDN that ops
has set up for us. you put the settings in
config/canvas_cdn.yml. slack ryan if you need help
setting that up or need to know what the values
are to use.
you also need to edit your config/environments/development.rb
file so it look like this:

config.action_controller.perform_caching = true
ENV['USE_OPTIMIZED_JS'] = 'true'

and then when you make any changes you need to run:
bundle exec rake canvas:compile_assets
bundle exec rake canvas:cdn:upload_to_s3
touch tmp/restart.txt

for the changes to be seen

- This change applies only to new UI. Legacy
  should be unchanged.

- Clear cache and cookies first.

- Go to Canvas. On the first page load only
  you should see a slight shifting of the text
  as Canvas loads the Lato font and falls
  back on the Helvetica system font.

- From that point on, Lato should be
  cached in the browser and load instantly
  when you move between views:
  http://screencast.com/t/hZhUZOhH

- Canvas should still work in all supported
  languages and browsers.

Not yet converted:
- TinyMCE textarea fiekd
- Mobile login

Change-Id: I861e609c01824f60ac38d3fc15e5b960a06e44de
Reviewed-on: https://gerrit.instructure.com/85737
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2016-11-11 22:09:26 +00:00
Simon Williams 6862281ba6 Revert "enable better_errors for development"
This reverts commit c0e20beb55.

Change-Id: Ic8663b4c50ff15e535e3cb27af7a002502314111
Reviewed-on: https://gerrit.instructure.com/94946
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-11-11 18:27:52 +00:00
Jesse Poulos 6782976a48 Clarify "rich editor" and "link selection" api docs
Documentation was innacurrate surrounding the "text" query parameter.
Before this fix, the field was marked as optional; it is now required.
Furthermore, it was implied that one could highlight text and replace the
returned url would be used as a hyperlink for that text; now it states that
the highlighted text will be replaced. Another patchset will update these
same endpoints to state that resource selection is being deprecated in
place of content-item. This fix does not address that.

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to <your host url>/doc/api/file.link_selection_tools.html and
<your host url>//doc/api/file.editor_button_tools.html
4) check for spelling, grammar, accuracy of information and that the new
link works

Fixes PLAT-1920

Change-Id: Ib2b563d3902935441f76f582112a99dd53d8d56d
Reviewed-on: https://gerrit.instructure.com/93869
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2016-11-09 20:59:58 +00:00
Jeremy Neander d0aa529dc6 purge performance gradebook
This removes the ill-fated React Gradebook.

This commit is effectively a revert of
b9534edd64

closes CNVS-32394

test plan:
* ensure 'Gradebook Performance' is no longer available
* ensure other Gradebooks are still functional
    * Default Gradebook basic happy path
    * Individual Gradebook (SRGB) basic happy path

Change-Id: Ie71ab4dfb17f494c2a7c17a27cd551a84e7efb96
Reviewed-on: https://gerrit.instructure.com/94005
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-11-09 20:05:17 +00:00
Tyler Pickett 8898927e25 Establish LTI content migration plugin
This gets some of the infrastructure in place to handle this process
along with the start export method.

Change-Id: Id757a111aeb64c307021eb621e0624b0b3d8b7eb
Fixes: PLAT-1755 PLAT-1758
Reviewed-on: https://gerrit.instructure.com/93853
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2016-11-08 20:18:07 +00:00
Neil Gupta 48f24a9626 Add support for opening Better Errors links in another editor
Also fixes the file path to work from Docker

Test plan:
* Follow instructions in `development_with_docker.md` and make sure it
behaves as expected

Change-Id: I0093b036c33b2d6f6e002f03ab16e89cf29d9a3d
Reviewed-on: https://gerrit.instructure.com/94001
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2016-11-02 18:23:39 +00:00
Cemal Aktas 74b72bb5a1 spec: Add docker chrome container
Test Plan:
 N/A

Usage:
open vnc://secret:secret@seleniumff.docker          (firefox)
open vnc://secret:secret@seleniumch.docker:5901     (chrome)

Change-Id: Ic23bc0d13fa9fe3745fbf9835b5d20e128be3d91
Reviewed-on: https://gerrit.instructure.com/93921
Tested-by: Jenkins
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Product-Review: Cemal Aktas <caktas@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
2016-11-02 17:58:19 +00:00
Cameron Sutter b46d6e3bb3 fire global announcement live events
closes MBL-6063

test plan:
- I'm not sure how these things are tested, but
- create an account notification
- check that a live event was fired off

Change-Id: I2d041183fc4da859a9c7f2ab9a28f1572a02ccfb
Reviewed-on: https://gerrit.instructure.com/93222
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2016-10-28 22:15:57 +00:00
Jesse Poulos ea801e37a1 Document xml config to launch in new tab from course navigation
PLAT-1203 added the ability launch from a course navigation placement
in a new window. This documentation update adds how this is done to
the API docs.

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to <your host url>/doc/api/external_tools.html
4) check for spelling, grammar, accuracy of information
5) nagivate to to <your host url>/doc/api/file.tools_xml.html
6) repeat #4 here

Change-Id: If584b248e30f2bc8ec7440b132f5a9e25e901088
Reviewed-on: https://gerrit.instructure.com/93599
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2016-10-28 19:53:55 +00:00
Jesse Poulos 6721d605b5 Add content item to API docs and add deprecation resource select
Resource selection (under "Editor Button" and "Link Selection") in the API
docs has been replaced by content item. This update adds content item
documentation and adds warnings the to the two resource selection sections
stating that they have been deprecated. The introduction page has also
been updated to reflect these changes

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to the following:
<your host url>/doc/api/file.link_selection_tools.html
<your host url>/doc/api/file.editor_button_tools.html
<your host url>/doc/api/file.content_item.html
<your host url>/doc/api/file.editor_button_tools.html
<your host url>/doc/api/file.editor_button_tools.html
4) check for spelling, grammar, accuracy of information and that the new
link works

Fixes PLAT-1921

Change-Id: I62e5d8debb4ae8c00f5cbcca9009cde668adefab
Reviewed-on: https://gerrit.instructure.com/93897
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2016-10-28 19:53:36 +00:00
Cody Cutrer bd0792d40b convert tail_kinesis to aws sdk v2
Change-Id: Ia95ea52e094602137b5b591c7635852c70b35372
Reviewed-on: https://gerrit.instructure.com/93023
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Eric Coan <ecoan@instructure.com>
2016-10-26 15:21:14 +00:00
Jesse Poulos 32174cb6b7 Clarify API documentation for environmental settings
Users are often confused when they read the API documentation for external tool
configurations that use custom launch parameters for test and beta. They think
that they are able to simply install the tool in beta/test with immediate
effect. Instead, the custom environment settings are established during the
refresh process. This updates the API documentation under "configuring" to
clarify this behavior.

Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake doc:api)
3) navigate to <your host url>/doc/api/file.tools_xml.html
4) check for spelling, grammar, accuracy of information and that the new link
 works

Fixes PLAT-1259

Change-Id: Ia5e3cbf7ae7cfe76726f2725291a02f818f0731a
Reviewed-on: https://gerrit.instructure.com/93011
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2016-10-24 16:16:03 +00:00
Derek Bender c0e20beb55 enable better_errors for development
To turn off, set DISABLE_BETTER_ERRORS ENV variable:

    export DISABLE_BETTER_ERRORS=true

To re-enable, delete or unset the DISABLE_BETTER_ERRORS ENV var.
Setting the key to false will not work.

Change-Id: Icfe3985365d7fb3c3f2d005e998807bb9614fba1
Reviewed-on: https://gerrit.instructure.com/84383
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2016-10-14 19:09:06 +00:00
Simon Gaeremynck af60de97bb Live events - Attachments
test plan:
  * create attachments by uploading course files
  * update display name of course files
  * delete some course files
  * delete a course wiki page
  * ensure appropriate messages are in the kinesis queue

Change-Id: I3036a3079abef5a5ae3b51b71c325e0fe2cbae05
Reviewed-on: https://gerrit.instructure.com/88703
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-09-09 16:37:54 +00:00
Kacey Roberts 9f2419ec19 New Observer for when a Enrollment is modified for live envents
fixes: PFS-5114

test case:
- Update a enrollment and verify that it fires the event message
- Create a enrollment and verify the create event is still fired.

Change-Id: I2f5b45a2b766c6fc8dcc7dac27924b476c07cf32
Reviewed-on: https://gerrit.instructure.com/87560
Reviewed-by: Cody Tanner <ctanner@instructure.com>
Reviewed-by: Andrew Huff <ahuff@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Brandon Broschinsky <brandonbr@instructure.com>
2016-08-30 15:53:29 +00:00
Jeremy Stanley 45046eff1a document course_format sis import column
refs CNVS-30561

Change-Id: I60e1ec0e47f42f6bbe5097d186692bce537bae01
Reviewed-on: https://gerrit.instructure.com/87846
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2016-08-24 17:08:18 +00:00
Andrew Huff 3983e8da1c add Enrollment + UserAccountAssociation kinesis live events
Adds kinesis events for enrollment create and
user_account_association create.

Adds missing specs for kinesis events

Test Plan:
* Set up Kinesis locally (see doc/live_events.md for instructions)
* Create an enrollment; verify that a `enrollment_created` event is sent
  to kinesis (use the `script/tail_kinesis` tool to view kinesis events)
* Reigster a new user; verify that a `user_account_association_created`
  event is sent to kinesis with `is_admin: false`
* Reigster a new admin; verify that a `user_account_association_created`
  event is sent to kinesis with `is_admin: true`

refs CNVS-30241
refs CNVS-30242

Change-Id: If1a4a2f415b95cc78a177a7cef75fbb03808dce1
Reviewed-on: https://gerrit.instructure.com/84339
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Andrew Huff <ahuff@instructure.com>
2016-08-07 17:39:06 +00:00
Benjamin Porter 7fa948227d Add some helpful info to the docker development doc
Add some documentation for Docker for Mac now that it is out of beta and
is available in a stable form.  Also add some info on dory for linux.

Test Plan:

    None.  Documentation only.

Change-Id: I38cee842dcc7a8fa24a1606d5fd684777b8c9690
Reviewed-on: https://gerrit.instructure.com/86507
Tested-by: Jenkins
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Andy VanWagoner <andy@instructure.com>
Reviewed-by: Andy VanWagoner <andy@instructure.com>
2016-07-29 21:47:49 +00:00
Cody Cutrer 3a022627f1 federated attributes backend
refs CNVS-28864

test plan:
 * ensure the API docs for authentication providers render;
   familiarize yourself with the formats of the
   federated_attributes configuration
 * configure a SAML provider, via the API, passing
   federated_attributes
 * do a SAML login, passing some of the attributes you
   configured in the previous step; the user should update
   in Canvas with the passed attributes
 * enable JIT provisioning
 * ensure a new user being created via SAML gets the
   attributes set correctly
 * configure one of the federated_attributes as
   "provisioning_only": true
 * do a normal login; that attribute should not update
 * create a new user via JIT provisioning; that
   attribute should still be set

Change-Id: I0a5f3215bafd5c1980d2ea5deb62f2b22a79f8aa
Reviewed-on: https://gerrit.instructure.com/80677
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-07-13 19:00:00 +00:00
Steven Burnett 46f2d03162 update js readme for coverage instructions
Change-Id: If92df49446d4786bc47f3e716647b7f82408680f
Reviewed-on: https://gerrit.instructure.com/84995
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2016-07-12 17:07:51 +00:00
Christian Prescott 88459eb4a7 add score and points_possible to grade_change live event
refs CYOE-190

Test Plan
1. Monitor live events as sent from canvas, or as received by the CYOE
   lambda or web app. Ensure grade_change events are raised with
   correct attributes for all cases where grade or score is affected:
- submission is graded for the first time in an assignment. ensure nil
  old_score and old_grade.
- submission is regraded. ensure (old_)points_possible is not changed.
- assignment changes grading_type. ensure grade changes, but score does
  not.
- assignment changes points_possible. ensure score is unchanged,
  old_points_possible is correct. ensure subsequent events have correct
  old_points_possible.

Change-Id: I0ae18772fc816340a23a9b48aee3c00af7a12bcf
Reviewed-on: https://gerrit.instructure.com/81381
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
2016-06-30 18:19:19 +00:00
Andrew Butterfield 3e0ef2a8ff Fix documentation on variable substitution
Test plan:
n/a

Change-Id: Ib9133f16af8999c5cf832483d2d49b0134b121f7
Reviewed-on: https://gerrit.instructure.com/83790
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Andrew Butterfield <abutterfield@instructure.com>
2016-06-29 19:27:20 +00:00
Ben Nelson 063f21ed1d update some documentation
Change-Id: I4120b2348ffa0d76361786762509c10645f429c3
Reviewed-on: https://gerrit.instructure.com/82013
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
2016-06-27 17:44:13 +00:00
Ryan Taylor 6b57f5e76c Add documentation to LTI Assignment workflow state variable
Refs CNVS-30048

Test Plan:
 - Pretty much good

Change-Id: Ia3b93b987b84b233c33891011db7995cae07c8b5
Reviewed-on: https://gerrit.instructure.com/83140
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Chris Wang <cwang@instructure.com>
2016-06-23 21:06:25 +00:00
Bryan Petty 7b2bd67424 fix local docker selenium configuration
Changes:
- Uses standalone selenium node (meant for use without hub).
- Selenium node upgraded from 2.45.0 to 2.53.0.
- Upgrades Firefox from 34.0 to 45.0 (uses upstream version now).
- Clarify docker docs for running selenium specs a bit.
- Enable use of selenium container on checkout without changes.
- No longer requires link in web container.
  - Requires dinghy/dory though for proxy, but it already did.
- Fixes /tmp/.X99-lock issue on container re-use.

Change-Id: I31793103e62022dea227b181a738383788660f6d
Reviewed-on: https://gerrit.instructure.com/83193
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-06-21 21:21:45 +00:00
Andrew Butterfield 602d502f5d Add variable substitution for user groups
fixes PLAT-1606

Test plan:
* Create some groups in a course and add a user to them
* Install a tool that has a collaboration and course navigation
  placement
* Include the following custom variable in the xml config
  user_group_ids=$Canvas.user.courseGroupOpaqueIds
* Ensure that on launches where the context is a course the variable is
  properly expanded to include a list of context ids for the groups the
  user launching is a part of in the course
* The variable substitution for membership service changed to
  $ToolProxyBinding.memberships.url
* Ensure that the membership service variable expansion still works in
  both the group and course context

Change-Id: I31a2a56e8d3b0c528f2cebe82c63148afdc80722
Reviewed-on: https://gerrit.instructure.com/82633
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2016-06-17 16:58:49 +00:00
Dan Minkevitch 2579abf917 Set REMOTE_DEBUGGING_ENABLED to off by default
There seem to be miscellaneous reports surrounding the performance
impact people have been having when this flag is enabled. Changing
it from opt-out to opt-in is a safer default mechanism to prevent
future users from experiencing this and having to debug the issue.

Change-Id: I61b4b85720f1e421f6980b700f06ddea7f4780c0
Reviewed-on: https://gerrit.instructure.com/82779
Reviewed-by: Andrew Huff <ahuff@instructure.com>
Tested-by: Jenkins
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
2016-06-16 23:11:53 +00:00
Rob Orton c51429778e remove closed and completed from groups
fixes SIS-2121

test plan
 - sis imports should work when passing closed or
   completed
 - specs should pass

Change-Id: If7d976a774448aaa8db3d748c46bc485cfe7bf7c
Reviewed-on: https://gerrit.instructure.com/82120
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-06-16 22:24:25 +00:00
Bryan Petty 0cdf11b94f add mailcatcher for docker dev
Test Plan:
1. Ensure that the `jobs` docker container is running.
2. Trigger any kind of email notification.
3. Verify email shows up here: http://mail.canvas.docker/

Change-Id: I94074d5601bb1817444fb85220aada2ba2fef82f
Reviewed-on: https://gerrit.instructure.com/79319
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
2016-06-15 20:59:07 +00:00
Neil Gupta d611168314 Don't make containerized phantomjs karma tests single-run
Change-Id: I6c3162b5e414a4ce9e814fb847153db8ddd87ab4
Reviewed-on: https://gerrit.instructure.com/82166
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2016-06-09 23:40:42 +00:00
Simon Williams 98ffdcf6ad stringify global ids for live events
fixes CNVS-29727

test plan:
- enable live events
- ensure that all global ids come through as strings

Change-Id: I54d1105d442dc92b0d973777fd745864bea1f232
Reviewed-on: https://gerrit.instructure.com/81428
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-06-09 18:19:38 +00:00
Ben Rinaca a9865a0136 Add support for remote debugging
Using remote byebug means you don't have to alter the configuration of
your docker containers to get a byebug session. Also makes it possible
to byebug a running job.

This will only run byebug when the process is started outside of a TTY,
ex: in a docker container, so that we're sure we don't interfere with
byebug when running locally instead of in docker.

Also add some notes on how to use pry-remote if someone prefers pry over
byebug.

Change-Id: I38b4365ce2ab7536bf16548f26a37b951273b792
Reviewed-on: https://gerrit.instructure.com/80772
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins
Product-Review: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ben Rinaca <brinaca@instructure.com>
2016-05-31 22:11:35 +00:00
Rob Orton 44e1915c10 add user_observer to sis imports
closes CNVS-29218

test plan
 - test user_observer imports
 - test creation, deletion, diffing mode
 - check that deleting user_observers also removes
   observer enrollments for the observer/student
 - generate docs and check /doc/api/file.sis_csv.html

Change-Id: I1c6a5a5e231ea4deb1bd9d214651b2a851e56887
Reviewed-on: https://gerrit.instructure.com/79088
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
2016-05-25 15:26:13 +00:00
Simon Williams 96eaab56d3 add instructions for interacting with a debugger in docker
Change-Id: I4804426046d683d5bd6ea172331966b2013b0989
Reviewed-on: https://gerrit.instructure.com/80015
Tested-by: Jenkins
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-05-19 19:45:36 +00:00
Bryan Petty 5fb540adab improve monospace font styles in API docs
Offers a more widely supported web-safe Windows monospace font in
place of Consolas (using Lucida Console instead). Also fixes the
missing fallback on request-params table cells.

Test Plan:
1. Verify monospaced font is used for request params in API docs in
   various browsers on Windows.
2. OSX-based browsers continue to use Monaco font for same params.

Change-Id: Ib3ac606b50c298391742901ed103eb92bc063bd8
Reviewed-on: https://gerrit.instructure.com/79208
Tested-by: Jenkins
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
2016-05-13 16:29:15 +00:00
Clay Diffrient 2bcaa987f2 Add documentation for testing javascript
Change-Id: Ia26753b76292a698c05080dcd3c0c7b904008a0b
Reviewed-on: https://gerrit.instructure.com/78720
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Clay Diffrient <cdiffrient@instructure.com>
2016-05-06 19:34:12 +00:00
Rob Orton d035d49bfa fix typo
Change-Id: Ia9a1b4c4276ed42d8a5ae8a842370bcbe72d7912
Reviewed-on: https://gerrit.instructure.com/78857
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2016-05-05 17:39:55 +00:00
Cody Cutrer f2b0bc129d rename oauth scopes param to the standard scope
and it's space separated, not comma separated

refs gh-807

note that the old form - scopes - is still accepted for now

Change-Id: I98e038125c3491abd54eb50c99d6efdf3e25acd7
Reviewed-on: https://gerrit.instructure.com/77412
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-05-05 15:49:53 +00:00
Brad Horrocks f51cefcc67 Better LTI Variable Substitution Docs
Generate LTI Variable Substitution Docs from the code
Uses YARD's plugin hooks to generate the markdown.

I couldn't find a good way to do this with YARDs builtin generation
stuff. So I hacked together. No pretty, but gets the job done.

You can update the generated markdown by running this
```
script/generate_lti_variable_subustition_markdown
```

Our yard templates, dont process markdown files like YARD is supposed
to.i Not sure why? 🤷

Fixes https://github.com/instructure/canvas-lms/issues/592

Change-Id: If0728d357dc745d81381e818ed62d087d76f0e66
Reviewed-on: https://gerrit.instructure.com/74312
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-05-02 19:15:46 +00:00
Michael Brewer-Davis 7b4331bd12 add root account lti_guid to live_events
- supports CYOE integration

refs: CYOE-80

Test plan:
1.  Setup live events in account (can use kinesis docker-compose
    container
2.  Setup live events listener (e.g., script/tail_kinesis)
3.  Perform action in canvas that generates event (asset_accessed)
4.  Verify that root_account_lti_guid is defined in the live
    event and matches the account lti_guid (from rails console)

Change-Id: Idb78a9df3ce02b2c0295d3d94a6e68855358ced6
Reviewed-on: https://gerrit.instructure.com/76265
Tested-by: Jenkins
Reviewed-by: Matt Smith <msmith@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2016-04-14 21:14:26 +00:00
Josh Orr c43cd8e5de Pass username to OAuth2 login flow
Closes MBL-5463

Test Plan:
GET login/oauth2/auth using the appropriate params for your canvas
install + the new param of `unique_id={username}`
Ensure that the username provided as a param is automatically populated
into the username field of login form.

Change-Id: I2d226953186cff2fecc5a19cbadd8627013481e8
Reviewed-on: https://gerrit.instructure.com/74208
QA-Review: Ben Kirato <benk@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2016-03-16 17:03:36 +00:00
Michael Brewer-Davis ab229b47a4 add student/assignment ids to grade/submission events
- allows CYOE listener to avoid api call to reconcile
  students/assignments/grades

refs CYOE-80

Test plan:
1.  Set up live_events in Canvas
2.  Monitor the live_events stream using
      `script/tail_kinesis`
3.  Create and grade on a student assignment
4.  Verify that there are user_id and assignment_id
    fields on the `grade_change`, `submission_created`,
    and `submission_updated` events

Change-Id: I0c24d6773e5f635b0f6a00cd18865600c498a98d
Reviewed-on: https://gerrit.instructure.com/74155
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Matt Smith <msmith@instructure.com>
2016-03-15 14:19:14 +00:00