Commit Graph

239 Commits

Author SHA1 Message Date
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
Simon Williams d40e833a59 add documentation for ssha_password to sis csv upload
fixes CNVS-17612

test plan:
- try using this feature in sis csv import and make sure it works as
  advertised

Change-Id: I07517af1d9d8567642268057772c49cc47036eb5
Reviewed-on: https://gerrit.instructure.com/73329
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-03-11 03:59:15 +00:00
Simon Williams 3b5f74d950 docs: clarify that parent_account_id is a required column
for an account csv sis import, the file must include the
parent_account_id column even if all the values in it are blank, so that
we can differentiate the file from a group import.

fixes CNVS-16875

test plan:
- check sis csv docs

Change-Id: I5c897a249886e8234a530ce9ea8e3b3dec88c093
Reviewed-on: https://gerrit.instructure.com/73205
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-02-29 23:32:45 +00:00
Cody Cutrer b7f00ab032 document and extend usage of integration_id for users
refs CNVS-26735

test plan:
 * create a user, pseudonym, and update a pseudonym via API
   setting integration_id
 * it should work
 * with a user with an integration id set, launch an LTI tool
   with the Canvas.user.sisIntegrationId variable being sent;
   ensure it gets sent

Change-Id: I549ba6e64e993c4867acfe33577722c1118b8988
Reviewed-on: https://gerrit.instructure.com/70874
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-02-18 20:11:01 +00:00
Brad Horrocks d32b139459 Helper scripts for setting up docker
Change-Id: I9a4916e4e41d7405775cfde79688598be596e9fd
Reviewed-on: https://gerrit.instructure.com/71750
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-02-11 23:17:00 +00:00
Brian Palmer 3cfeb24072 use our pre-built kinesalite docker image
This image is an appliance more in line with the postgres or redis
images, so it manages its own data volume. Thus the docker-compose and
doc file changes.

Change-Id: I8f435400bd8427313d0bc290c84cd44639ead074
Reviewed-on: https://gerrit.instructure.com/71502
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-02-09 18:47:11 +00:00
Brian Palmer bffe1e78b8 switch api doc syntax highlighter theme
The sunburst theme wasn't high contrast enough.

test plan: `rake doc:api` and the generated api docs should be using the
default prettify.js theme, which is darker text on a white background.

Change-Id: I44f3e105ea11a99308163318db675f9be5c41f24
Reviewed-on: https://gerrit.instructure.com/71813
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-02-09 17:44:15 +00:00
Ethan Vizitei c5aed8b9df update webpack docs
Add FAQ, where we can add things as people run into problems

Change-Id: I671bee6d53c845d66de7d65fd25baf46adb1d240
Reviewed-on: https://gerrit.instructure.com/71533
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-02-04 22:05:02 +00:00
Simon Williams 30d7f4cb54 doc: fix link to dinghy install
fixes gh-754

test plan: dinghy link in docs should work

Change-Id: I655145f5440f076717c4131b5bf9d24e88b3ef3e
Reviewed-on: https://gerrit.instructure.com/71149
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2016-01-29 23:42:59 +00:00
Cody Cutrer 3d6658f0ce accept t/f for boolean in Api
and document boolean parameter formats

Change-Id: I70b295e93c6f19b471bfc6f4b31f3a7c3642d8f4
Reviewed-on: https://gerrit.instructure.com/70861
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-26 02:50:09 +00:00
Brian Palmer ba91140a07 api docs scrollbars and sidebar color
refs CNVS-26515

A couple more tweaks from UX

test plan: generate the api docs, bask in the glory. scrollbars should
only appear when necessary on example code, not always.

Change-Id: I2513ff160ddd226cb01614ec90e45780dec15a06
Reviewed-on: https://gerrit.instructure.com/70787
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-21 22:39:27 +00:00
Brian Palmer d8b3f004be api doc styling updates
refs CNVS-26515

Some tweaks from UX to bring the docs more in line with the rest of
Canvas, and better call out important information.

test plan: generate and view the api docs

Change-Id: Ibf1d56f1dcdd663d993efca8f48513136baa009b
Reviewed-on: https://gerrit.instructure.com/70648
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-20 21:09:57 +00:00
Brian Palmer 8d723a7c61 api doc request parameter formatting
refs CNVS-26515

Request params are now formatted in an HTML table, with separate fields
for name, type, required/optional, valid enum values, and description.
This is at the same time more compact and more readable.

To parse this information out of what is actually free-form text
comments, I'm re-using the OpenAPI (swagger) parsing code, which I
tweaked and simplified slightly. Eventually I'd like to see the whole
API documentation generated from the OpenAPI spec, and then we can
slowly move away from using free-form code comments to more declarative
code constructs, but still generate an OpenAPI spec and get the same API
docs.

test plan: Generate the api documentation, and view request parameter
information. you should see the new formatting.

Change-Id: Ida00869d96a9b2d9fa84c29079ddf2511a2d5917
Reviewed-on: https://gerrit.instructure.com/70485
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-20 21:09:48 +00:00
Brian Palmer 933a052061 fix typing of api doc @model definitions
refs CNVS-26515

Pretty much anything that wasn't a number was being rendered as a
string, including sub-arrays and sub-objects. Worse, a lot of our api
docs were defining them using ruby syntax rather than json syntax.

This change fixes types so that booleans, arrays, and objects all render
correctly in the @model docs (the "A ModuleItem object looks like:"
sections of the docs). It also adds some basic error checking to help
avoid future mistakes.

This doesn't fully support the "$ref" OpenAPI (swagger) syntax yet, but
still renders examples for "$ref" fields when an example is provided.
Eventually it'd be nice to auto-generate an example for "$ref" fields,
since we can look at the linked documentation and just embed it.

test plan: generate the api documentation and look through the @model
definitions at the top of each Resources page. the new rendering should
show more accurate type information.

Change-Id: Id5af514cd235e66af2ce868bce95eb49d71062ab
Reviewed-on: https://gerrit.instructure.com/70484
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-20 19:07:41 +00:00
Brian Palmer 73e1c32fff further api doc syntax highlighting improvements
refs CNVS-26515

Renders the @model definitions as json, and improves the json
formatting. Also renders all json as the prettify "js" type internally,
because we put a lot of code comments in our json which isn't strictly json
anymore, and so doesn't render correctly as json.

test plan: compile the api docs and look at some @model blocks ("A File
object looks like", e.g. in the Files API) to verify the new formatting.

Change-Id: Icac9ad04bb42af80da66bc5ad0b5adead70ec168
Reviewed-on: https://gerrit.instructure.com/70483
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-20 19:07:33 +00:00
Brian Palmer 1069d1221a fix api route display
refs CNVS-26515

The rails4 upgrade changed the formatting so that this sub didn't match
anymore, and we ended up with "(.:format)" on the end of each url.

test plan: generate the api docs, the path for each endpoint shouldn't
include "(.:format)" at the end.

Change-Id: I8073c30d780b23abacc97f417e608db598415b28
Reviewed-on: https://gerrit.instructure.com/70537
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2016-01-20 16:48:32 +00:00
Jon Willesen d0364ce2d7 add optional docker config for cassandra
Change-Id: I2e24741a2cfbd6d2a3ba16739fc68a6a807c601c
Reviewed-on: https://gerrit.instructure.com/69909
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
2016-01-18 17:37:30 +00:00
Brian Palmer 3390bfae08 improve api documentation syntax highlighting
refs CNVS-26515

Switch to the prettify library and highlight not just json but html,
xml, and bash.

test plan:
`rake doc:api` and open up the generated docs. throughout the docs, code
should be syntax highlighted, including stuff like curl commands and xml
that weren't highlighted before. It should be easier to copy/paste this
code now, without a weird hidden text box appearing.

Change-Id: Icd33159836826e144cb14b96187cb8c645559885
Reviewed-on: https://gerrit.instructure.com/70345
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2016-01-15 23:25:27 +00:00
Ethan Vizitei 2a78a61561 webpack via file config
closes CNVS-26213

Allow using a config file rather than an env var
for turning on web pack.

TEST PLAN:
 1) set USE_WEBPACK env var to nothing
 2) touch config/WEBPACK
 3) web pack should still be enabled
 4) rm config/WEBPACK
 5) restart server
 6) canvas should use require-js bundles again

Change-Id: Ie733b66326482341c2371fddefe17c1cfa3006b3
Reviewed-on: https://gerrit.instructure.com/69739
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-09 18:09:48 +00:00
Ethan Vizitei 542d5896a1 remove proximity loader
refs CNVS-25916

Proximity loader makes little sense
in a bundled environment anyway. This was
the last thing that used it.

TEST PLAN:

1) regression test profile editing, avatar in
   particular
2) web pack selenium builds should have another passing file

Change-Id: Id6e0a93f1dbcf308b49500ead5f72551adad73d8
Reviewed-on: https://gerrit.instructure.com/69407
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-05 20:17:21 +00:00
Matt Smith 6ba9c9242d added live events for assignments and submissions
* issueid: DS-595
* test plan:
  * create assignment and submission
  * update assignment and submission
  * ensure appropriate messages are in the kinesis queue

Change-Id: I0d7730c8a4ec01f780ae3b77581efb7b48c2733e
Reviewed-on: https://gerrit.instructure.com/68362
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Linda Feng <lfeng@instructure.com>
2015-12-18 21:41:50 +00:00
Benjamin Porter 09f6262c03 Add some clarification to the docs
When not using dinghy, canvas is accessible on localhost:3000.

Test Plan:

    - None required.  This is documentation only

Change-Id: I4bc91bb50e7a4387b97235aafd377a4bd1e24040
Reviewed-on: https://gerrit.instructure.com/69033
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
2015-12-18 18:09:52 +00:00