Commit Graph

36547 Commits

Author SHA1 Message Date
Ryan Shaw e91e2340fe upgrade React to 16.9.0
note: this will start logging a lot of deprecation warnings from
React about stuff like componentWillMount and componentWillReceiveProps.
Teams should update their code to not use those things so those
Deprecations go away

Test plan:
* automated builds should pass

Change-Id: I42a340dacdb43d410c7246945c025e0eb83220fa
Reviewed-on: https://gerrit.instructure.com/205772
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 23:40:32 +00:00
Ryan Shaw 34ce9ed39e spec: fix flaky flashNotificationsSpec
This was sporadically failing, see:
https://jenkins.instructure.com/job/canvas__linters-and-js/69043/testReport/junit/(root)/FlashNotifications/FlashNotifications_screenreader_message/

Test plan:
* this spec should pass

Change-Id: Ibf56b24778a7be86fd588415ed19c775d534060e
Reviewed-on: https://gerrit.instructure.com/206043
Tested-by: Jenkins
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 23:19:46 +00:00
Cameron Matheson 4b98213b57 support date ranges in mutation audit log
Test plan:
  search for mutations between a date range using the mutation audit log

closes GQL-82

Change-Id: I99b7cba460261fe556073f3b5cc410dd1c3250e2
Reviewed-on: https://gerrit.instructure.com/205573
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-21 22:35:21 +00:00
Ryan Norton f386768ff8 move submit button into shared a2 space
because we will eventually allow for multiple submission types
in an assignment we will need to be able to submit for multiple
type with a single press of the submit button.

for this purpose we are moving the submit button into a shared
space that is capable of managing the submission of all valid
types for an assignment.

this commit removes the upload and submit alert handling to be
added at a future time.

Test Plan:
* as a teacher, create an online_upload assignment
* as a student in a2, navigate to this assignment
* confirm you can:
** not see the submit button by default
** can add and remove attachments
** can see the pizza tracker update correctly with changes
** can see the submit button when attachments are added
** the button is removed correctly when attachments are
   removed
** can successfully submit to the assignment when the button
   is pressed

* as a teacher, create an online_text_entry assignment
* as a student in a2, navigate to this assignment
* confirm you can:
** not see the submit button by default
** can start an entry
** can edit an entry
** can delete an entry
** can see the pizza tracker update correctly with changes
** can see the submit button when a draft body is added
** the button is removed when the draft is cleared
Note: the submit button currently is not active for text

flag=assignments_2
fixes COMMS-2303

Change-Id: I02dd71ccd07646424bd2ad2bb3f522aceb58fd12
Reviewed-on: https://gerrit.instructure.com/205965
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Norton <rnorton@instructure.com>
2019-08-21 22:09:42 +00:00
James Williams bd4ea897ae pull plugins list from gerrit_builder in jenkinsfile
closes #CORE-3251

Change-Id: I5ef41255a81c706265f19566900c664dd69f9bbf
Reviewed-on: https://gerrit.instructure.com/206105
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Jenkins
2019-08-21 21:49:55 +00:00
Rob Orton a4b4a14640 api: add ability to set grade_passback_setting
fixes CORE-3216

test plan
 - in api set grade_passback_setting on course

Change-Id: Ief381fae7b81e2eb6db096adcebfcf999e987b3f
Reviewed-on: https://gerrit.instructure.com/205916
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
2019-08-21 21:40:07 +00:00
Matthew Lemon c716b456b9 add folder tree to more options modal in A2
Test Plan
* Create a course and add a student to it
* Create an assignment in the course with an online upload submission
  type
* Ensure that the student has multiple folders associated with them
  * group folders
  * personal folders
  * course folders (I believe that only teachers are able to create
    folders in the course)
* As the student navigate to the assignment and click the `More Options`
  button in the file drop
* Folders associated with the user should be displayed

fixes COMMS-2286
flag=assignments_2

Change-Id: Ib355af2e243ce6b7f5bc24d8d96e95262d9d3dca
Reviewed-on: https://gerrit.instructure.com/205067
Tested-by: Jenkins
Product-Review: Matthew Lemon <mlemon@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
2019-08-21 21:27:11 +00:00
wdransfield 591829e85c Add live region info to default tool alerts
Closes PLAT-4813

Test Plan:
- Configure a default tool and navigate to the assignment create
  UI.
- Return some content from the default tool
- Verify the "success" notification is announced in a screen
  reader

Change-Id: Ia713945de77251c85a3e50dd554aa938bf95e893
Reviewed-on: https://gerrit.instructure.com/206087
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-08-21 21:05:12 +00:00
Jeremy Neander e5bb40bc06 use updated instui select for grade detail tray
closes GRADE-2319

test plan:
 * Smoke test grade detail tray grade input
 * Smoke test entering grades as:
    * points
    * percent
    * letter grade
    * complete/incomplete

Change-Id: Id4bc13fbb5934b7b3985cab1f53356c50e08810d
Reviewed-on: https://gerrit.instructure.com/205492
Tested-by: Jenkins
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
2019-08-21 20:57:03 +00:00
wdransfield 23976a2942 Escape default tool name
Closes PLAT-4814

Test Plan:
- set the default tool name to a value with some html elements
  in the string
- Verify the html is escaped when displayed in the assignment
  create/edit ui

Change-Id: I13ba0dc62acfa3feeaaca56af0cf0bc6d6487a9a
Reviewed-on: https://gerrit.instructure.com/206100
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-08-21 20:06:37 +00:00
Rob Orton 57616667df make variable expander for grade_passback_setting
fixes CORE-3215

test plan
 - have a course with grade_passback_setting
 - use gradePassbackSetting variable in lti tool
 - it should return the setting

Change-Id: I0f598c8563d9f9d40e1d1f49c483a93bbde364a0
Reviewed-on: https://gerrit.instructure.com/205841
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-21 19:57:54 +00:00
Cody Cutrer 4f267c41b9 various rails 6 fixes
Change-Id: I9a2da0fe619170e6a297ad5d1b9dd3e11daf3782
Reviewed-on: https://gerrit.instructure.com/206054
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-21 19:47:32 +00:00
Cody Cutrer aa5811bdff drop support for a Redis ring as MultiCache
plz to just use HACache

Change-Id: I06bb7d23ee24e1ef11be87af7745880ddcebd4bf
Reviewed-on: https://gerrit.instructure.com/205564
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-21 18:21:46 +00:00
James Butters b300131fa8 spec: get the vendored gems build working in new jenkins
closes: CORE-3261

Change-Id: Ice35a7dcd0cc128cffdeeacac9ff19878f57946f
Reviewed-on: https://gerrit.instructure.com/205341
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-08-21 18:18:20 +00:00
Ryan Shaw fcf586ec96 spec: fix flaky Navigation.test.js spec
Test plan:
* this should pass both on the patchset builds and the master build

Change-Id: I5e2a4a45a6e870db949077c24e9b4360c43dd9f6
Reviewed-on: https://gerrit.instructure.com/206029
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 16:52:00 +00:00
Ryan Shaw 088d703b08 upgrade rest of npm deps
Change-Id: Iec484ae47eae9eb56a1e11e1f749385925e4fb30
Reviewed-on: https://gerrit.instructure.com/205775
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 16:40:54 +00:00
Mark Valentine c7e4c64830 add feature flags for custom reports
- general flag to indicate root account
  wants to use experimental features in
  custom reports.

refs: PFS-13510

Test Plan:
Dev verified feature flag worked locally.

Change-Id: I4e124c63644c2ac2494c3413b66e13587ab0df78
Reviewed-on: https://gerrit.instructure.com/205454
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
2019-08-21 16:37:53 +00:00
Ryan Shaw d2a9d5eba7 upgrade immer and immutability-helper npm deps
here are 2->3 changes from immutability-helper
Huge thanks to @jedmao for converting the library to typescript!
New: TypeScript definitions are now generated from TypeScript source. 
meaning they will always be 100% in sync w/ the source code.
New: exported Context class.
Deprecated: stop using const myUpdate = newContext().update and start 
using const myContext = new Context(); myContext.update(...).
Deprecated: stop using update.extend and start using import { extend } 
from 'immutability-helper' or const { extend } = new Context().


test plan:
* the only thing that uses immer is the assignments_2 teacher stuff,
  that should still work
* discussions, gradingPeriods, and the CreateOrUpdateUserModal use
  immutability-helper, those should still all work

Change-Id: If6b62788be5d3929b5a0ddd64e1b63aa09916b84
Reviewed-on: https://gerrit.instructure.com/205773
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 16:12:52 +00:00
Ed Schiebel 1b1631c694 Add @instructure/uid dependency to canvas
test plan:
  yarn test:karma builds w/o errors

Change-Id: I631dabdf9214e2d44bedaa4f4ff1451fcc0e76b0
Reviewed-on: https://gerrit.instructure.com/206016
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-08-21 16:08:30 +00:00
Ryan Shaw afa9bfc624 fix a deprecation from sinon.sandbox
We get a lot of these in our logs:
`sandbox.create()` is deprecated. Use default sandbox at `sinon.sandbox`
or create new sandboxes with `sinon.createSandbox()`'

This should fix that

Change-Id: I3fda9d219dbcc768405763876924eef16d0d1c9b
Reviewed-on: https://gerrit.instructure.com/206013
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 16:04:42 +00:00
Ryan Shaw 28ee5e8b80 npx react-codemod manual-bind-to-arrow
this is the result of running `npx react-codemod manual-bind-to-arrow .`

test plan:
* nothing should change

Change-Id: I178aef4b91b9b04c900d484a02728c042f1cb018
Reviewed-on: https://gerrit.instructure.com/205784
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-21 16:04:26 +00:00
Adrian Packel d561e2070d Make muted/unposted droppable once more
When the grade calculator attempts to apply drop rules, don't
automatically exempt muted assignments (or unposted submissions in the
case of Post Policies) from being dropped. Continue treating them as 0
points (if computing final score) or ignoring them altogether (if
computing posted score), but generally allow them to be dropped. This
fixes a calculation issue that could occur for an assignment group with
drop rules: muted/unposted submissions that should have been dropped
completely were still included (but treated as 0 points), with the
result that the group's points_possible value was higher than could ever
have been attained given the drop rules in place.

fixes GRADE-2356

Test plan:
- Have a course with New Gradebook and Post Policies enabled
- Set up an assignment group
  - Add 2 assignments worth 10 points each
  - Set a drop rule to drop the lowest assignment
- Open Gradebook
  - Grade a student on the first assignment but not the second
- Export to CSV
  - The "final score" column should reflect just the one graded
    assignment and should not treat the ungraded assignment as 0

- Repeat this setup in an Old Gradebook course
  - Mute the second assignment (to make it "unposted")
- Export to CSV
  - The "final score" column should be the same as above

Change-Id: I91903d481fcbedf60180e5dcabe96106308586e9
Reviewed-on: https://gerrit.instructure.com/205856
Product-Review: Keith Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2019-08-21 15:28:50 +00:00
Steven Burnett e614f14517 add ability to save media objects to canvas-media
fixes COMMS-2314
refs COMMS-2293

Test Plan
- create a media type assignment
- as a student in a2 with notorious
  running locally go to record a video/upload
  a video file
- notice it works and posts back to the containing dom

Change-Id: I6c00c688b33deee017b7babb3729ff57d3dd2114
Reviewed-on: https://gerrit.instructure.com/205605
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-08-21 15:12:17 +00:00
wdransfield c8261d1476 Show error message when configured default tool is not installed
Closes PLAT-4804


Test Plan:
- configure a default tool that is not installed
- verify an error is dispalyed when creating an assignment

Change-Id: I90b395c441cd07e884d1b71244a95bf72dc03020
Reviewed-on: https://gerrit.instructure.com/205866
Tested-by: Jenkins
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2019-08-21 15:03:34 +00:00
Keith T. Garner 68ddb0f000 fix checks for muted/unposted submissions in submission comments
With the change to post policies, we need to check if the submission
is posted and not check against the assignment muted attribute.

fixes GRADE-2369

test plan:
 - Create a course with new gradebook and post policies enabled, a
   teacher, and a student
 - In the course, create an assignment and set the assignment to
   manual posting
 - As a teacher, leave a submission comment
 - Confirm no notifications went out
 - In the rails console, confirm that no ContentParticipation object
   was created

Change-Id: Ib5ac4d010acf1462ac56f55546e7dbf17292c56d
Reviewed-on: https://gerrit.instructure.com/205616
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-08-21 14:47:20 +00:00
wdransfield cb8225d52d Allow customizing default tool button text and info message
Closes PLAT-4748

Test Plan
- Set DEFAULT_ASSIGNMENT_TOOL_BUTTON_TEXT in your root account
  settings to a string
- Set DEFAULT_ASSIGNMENT_TOOL_INFO_MESSAGE in your root account
  settings to a string
- Navigate to the create/edit assignment UI
- Verify the default tool button shows the button text you
  specified and the info banner shows the info string you
  specified

Change-Id: I137b65dd9dfe513060607d4927ffaa258ca74863
Reviewed-on: https://gerrit.instructure.com/205263
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-08-21 14:06:28 +00:00
wdransfield af308d950c Default to "default" tool if one is configured
Closes PLAT-4777

Test Plan:
1. Configure a default tool
2. Create an online assignment
3. Create another assignment. Verify the
  submission type defaults to the default
  tool
4. Repeat steps 2 and 3 for each available
   submission type

Change-Id: I8ae0b74f43af9bc32626a26b443bb08926db27ae
Reviewed-on: https://gerrit.instructure.com/205241
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-08-21 14:06:20 +00:00
Matt Sessions af2dacd242 Add a groupSubmissionConnection to the gql assignment type
refs: MBL-12809

Test Plan:
 - Create a grouped submission
 - Ensure that users are assigned to the different groups
 - in graphiql perform an assignment query and
   have it return the groupSubmissionConnection
 - All the filters should stil work

Change-Id: I2c6bc333970f85b5961e48ed821bce0ccae62152
Reviewed-on: https://gerrit.instructure.com/204193
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Matt Sessions <msessions@instructure.com>
Product-Review: Matt Sessions <msessions@instructure.com>
2019-08-21 13:50:38 +00:00
Clay Diffrient 6554a019d8 Remove autobreadcrumbs from xhr requests in Raven
This will prevent Raven from mocking out the global fetch function.
Tests that rely on the mocking functionality will pass.  This also
removes a console.log statement that led to this discovery

Test Plan:
  - Provide a valid DEPRECATION_SENTRY_DSN environment variable
  - Run Navigation.test.js and it should pass

closes CORE-214

flag = none

Change-Id: I7e229c39808ca0bffed7caf2e2ed25755c7f6185
Reviewed-on: https://gerrit.instructure.com/205914
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-08-20 23:34:20 +00:00
Cameron Matheson ed30b3dce9 remove address book specs/plugin
Test plan: specs pass

Change-Id: Id3394d6da6c738db078754c97398eb5112458550
Reviewed-on: https://gerrit.instructure.com/205138
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2019-08-20 22:51:37 +00:00
Ryan Norton d43c5389e0 move submission types under AttemptType folder
to clean up the file structure a bit we are moving the file
attempt types underneat the AttemptType folder

the only outstanding type is the MoreOptions file which is
being handled in a separate commit to avoid rebase conflicts

Test Plan:
* as a student in A2 you should be able to load submissions for:
** File Upload
** Text Entry
** File Preview

* specs should pass

fixes COMMS-2310

Change-Id: Ib5f5646e63049bf5ea1014eeaf5569633fa72e1a
Reviewed-on: https://gerrit.instructure.com/205758
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2019-08-20 22:11:49 +00:00
Ryan Norton 77811d92e5 add assignment criteria check on submission drafts
to avoid checking every possible combination of draft states
inside of a submission draft to determine if it exists, we are
instead consolidating it to a single source on the draft model

this returns true if the current draft state matches the
submission type criteria defined on the assignment

this also adds the meetsAssignmentCriteria check to graphql to
allow the field to be easily accessed throughout A2

Test Plan:
* as a student in A2, the pizza tracker state should properly
  reflect 'Available', 'Uploaded', or 'Submitted' as it progresses
  through the flow
* file upload submission types should maintain their current
  behavior
* text entry submission types should now reflect 'Uploaded' when
  there is a non-null (including empty) text body

* in the /graphiql endpoint you should be able to run something
  like:

```
assignment(id: "13") {
  submissionsConnection(filter: {states: unsubmitted}) {
    nodes {
      submissionDraft {
        meetsAssignmentCriteria
      }
    }
  }
}
```

and get the expected result depending on whether or not you
have a draft

fixes COMMS-2309

Change-Id: Ic1df6636d754076fbd67a62fb6f884d6a734de2b
Reviewed-on: https://gerrit.instructure.com/205696
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-08-20 22:11:41 +00:00
wdransfield 04a2c758fc Add error handling for assignment default tools
Closes PLAT-4776

Test Plan:
- Create a new default tool assignment and attempt
  to save without selecting content
- Verify you cannot save an an error is displayed
- Select content with the default tool
- Verify you can now save

Change-Id: I96083b03d4029c859e6683327707bec1bbd70909
Reviewed-on: https://gerrit.instructure.com/205129
Tested-by: Jenkins
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-08-20 21:59:05 +00:00
wdransfield a63c1f0468 Create default tool assignment from "quick create"
Closes PLAT-4695

Test Plan:
- Create a a default tool assignment from the
  quick create modal in the assignment index page
- Edit the new assignment
- Verify you can select content from the default
  tool as the default
- Verify you can save and launch the assignment
- Verify you can create non-default external
  tool assignments as before
- Verify you can create non-default and default
  external tool assignments withouth the "quick
  create" modal

Change-Id: I94578f99c3d200e3dac57a13a7d5f7157413618b
Reviewed-on: https://gerrit.instructure.com/204847
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-08-20 21:58:49 +00:00
Ed Schiebel d0146696db Add allowShortCircuit exception for no-unused-expressions
test plan:
  - node ./node_modules/.bin/eslint packages/canvas-rce/src/bridge/Bridge.js
    does not generate a warning or error.

Change-Id: I136f9bce39ea9a85999cbd5b244fd9d021b3a123
Reviewed-on: https://gerrit.instructure.com/205915
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2019-08-20 21:51:01 +00:00
Ryan Shaw c862be6b26 spec: try to fix another flaky spec
Sometimes this file fails on Jenkins.
See: https://jenkins.instructure.com/job/canvas__linters-and-js/68936/testReport/junit/(root)/GradebookSettingsModal%20_%20when%20updating%20the%20course%20post%20policy%20_%20when%20the%20call%20to%20setCoursePostPolicy%20succeeds%20_%20when%20getAssignmentPostPolicies%20succeeds/GradebookSettingsModal___when_updating_the_course_post_policy___when_the_call_to_setCoursePostPolicy_succeeds___when_getAssignmentPostPolicies_succeeds_closes_the_modal/

This is an attempt to maybe figure out why

In the past, I’ve seen problems because qUnit didn’t handle async 
Functions like it handled returning promises so that is what I am
Trying to do here

Test plan:
* this spec should pass and not fail sporadically

Change-Id: I688228f37c2643bd7085d322312b953b31cb3af7
Reviewed-on: https://gerrit.instructure.com/205909
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2019-08-20 21:36:24 +00:00
Carl Kibler 8b43bb6968 fix InstUI 6 deprecation in user search page
fixes ADMIN-2773

test plan:
 - Check functionality of account->people search page. That Select
   options update choices. None of the options throw errors, etc.
 - When option is set, like Teacher, refresh the page and setting
   should remain and filter correctly
 - Warnings about <Select> deprecation gone from page, though some
   others exist.
 - the Select acts like an editable input, but that's due to
   underlying InstUI component. Being worked on in other tickets.

flag=none

Change-Id: I32a6d0b868bf393c9ca0b6f9accbbf3a0e01d5a5
Reviewed-on: https://gerrit.instructure.com/204706
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
2019-08-20 21:12:34 +00:00
Ryan Shaw 7c015bbef7 spec: try to make alert_enforcement.test less brittle
See https://jenkins.instructure.com/job/canvas__linters-and-js/68848/testReport/junit/(root)/%20adds%20csp%20policies%20to%20iframes%20existing%20on%20the%20page%20when%20called/_adds_csp_policies_to_iframes_existing_on_the_page_when_called/ 
For an example of this failing

Test plan:
This spec should not fail on Jenkins

Change-Id: Iee72652f39fa375e0eab1312f21e534374ccead0
Reviewed-on: https://gerrit.instructure.com/205862
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 21:07:43 +00:00
Rob Orton a0012b2fb3 make course grade passback setting sticky
fixes CORE-3214

test plan
 - import courses and set setting
 - change setting
 - import should not override the setting

Change-Id: Ic1a9695cdcfe252102ec85324b658effa152407e
Reviewed-on: https://gerrit.instructure.com/205832
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-20 20:49:35 +00:00
Ryan Shaw c188fafe76 spec: fix another flaky spec
if something in this spec failed, it would not restore the stubbed 
function back to what it was

Also, using `async` in before/after hooks has caused problems before
in other places so I rewrote that to use an return explicit promise
instead

test plan:
* we should hopefully get less errors like this:
https://jenkins.instructure.com/job/canvas__linters-and-js/68893

Change-Id: Iaa4e3d25e6136157cc9ae5ab8405b4cc46d0e242
Reviewed-on: https://gerrit.instructure.com/205852
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 20:11:11 +00:00
Clay Diffrient 52aae5f542 See what is going on here
Change-Id: I820b3d641e10bfa39eb5483522d9d0e2b2483124
Reviewed-on: https://gerrit.instructure.com/205888
Tested-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 20:04:42 +00:00
Ed Schiebel a015bfcb5e Have screenreader announce tinymce popup toolbars
closes COREFE-100

Note: INSTUI-2229 will address the React warnings you see in the
console

test plan
  - in the rce with a screenreader running, so stuff that causes
    the link, image, or table popup toolbar to appear
  > expect the screenreader to tell you it's there
  - experiment with moving from table to link to image, and mix
    in going to plain text in between too.

Change-Id: I7997298764821c6e7ad254999269ab7fc2406d9e
Reviewed-on: https://gerrit.instructure.com/204383
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Daniel Sasaki <dsasaki@instructure.com>
2019-08-20 19:54:10 +00:00
Clay Diffrient d2c7180e12 spec: Mock fetch on global
refs COREFE-214

Test Plan:
  - Specs pass

flag = none

Change-Id: I6c7cbcb6fdc6771e56ff78b37a532948c19610c6
Reviewed-on: https://gerrit.instructure.com/205825
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 19:28:48 +00:00
James Williams aaa4f01c0c fix unsubmitted incomplete progressions with post policies
test plan:
* enable post policies
* create a module with a "must score at least" requirement
* students who have not submitted to the assignment yet
 should have an empty icon on the modules page

closes #ADMIN-2805

Change-Id: I2734384590c78bc47356279fcc56b603f886985d
Reviewed-on: https://gerrit.instructure.com/204355
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2019-08-20 19:14:56 +00:00
Ryan Shaw 34863b79ee Better 40x/50x error handling for all `fetch` requests
Closes: COREFE-213

When fixing CORE-3260 I noticed that there might possibly be other areas
where we might possibly run into similar errors with other fetch 
requests

And it also made me realize *why* fetch requests weren’t working for
older versions of edge (it was because the older version of the `fetch`
spec said not to include credentials, aka cookies, by default. So older
Edge and Firefox would have the same problem), so we can revert what 
we did in g/204432. If we always set “credentials: “same-origin”” 
explicity like we do in this commit, it should fix it.

Test plan
* yarn jest \
app/jsx/dashboard_card/__tests__/CourseActivitySummaryStore.test.js
Should pass

Change-Id: I7c1b33cd24cec15ad86c0e9c68e3df627ed85c7a
Reviewed-on: https://gerrit.instructure.com/205690
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 18:36:02 +00:00
Ryan Shaw f4e36a93d6 upgrade some NPM dependencies
Change-Id: If2a90959713e292a46c9d5e9c75c89a37f7316b6
Reviewed-on: https://gerrit.instructure.com/205007
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 18:30:44 +00:00
Ryan Shaw 072889f8e1 spec: fix flaky ProficiencyTable tests
these were actually making unstubbed XHR requests.

test plan:
* these tests should pass and the build should be a little more stable 

Change-Id: I8c03e67cdfde2f2ec6f2b6769e279ae7d8cffe9a
Reviewed-on: https://gerrit.instructure.com/205782
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-20 17:38:57 +00:00
James Williams 32615c5823 add updated_at to enrollment_states
Change-Id: I5d66e52d993dc2d9692dbe1690a2060a3336220d
Reviewed-on: https://gerrit.instructure.com/202960
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-20 17:06:58 +00:00
James Williams d641ac44e2 use versionable model ids in partition precreator
closes #CORE-3256

Change-Id: I88a21eb9c0b404ba843149d20cdd3e13b48bc313
Reviewed-on: https://gerrit.instructure.com/204647
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-20 16:51:20 +00:00
Clay Diffrient a81c12bb17 spec: Use only one way of async testing
We shouldn't use a done callback and return a promise
together.  We should pick one or the other

refs COREFE-215

Test Plan:
  - Specs pass

Change-Id: I03c6a672bcdddb357d3010f114758f4e849ed4df
Reviewed-on: https://gerrit.instructure.com/205814
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-08-20 16:48:43 +00:00