Commit Graph

36275 Commits

Author SHA1 Message Date
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
James Butters 04d45e6031 create skeleton jenkinsfiles for builds
closes: CORE-3247

Change-Id: I538b52f65c683a5896cb87ae9c7313bc4ed13f6b
Reviewed-on: https://gerrit.instructure.com/205078
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2019-08-20 16:09:00 +00:00
Jon Willesen bd060bc291 start of direct share course selection tray
This includes some general utilities

Note: There is a bug in the instui Tray that mounts the contents of the
Tray twice, which results in multiple fetches for the managed courses.
We're going to ignore this for now since the right fix is to fix Tray
and not work around it.

flag=direct_share
refs ADMIN-2811

test plan:
- On the discussions index page, click on the kabob menu for a
  discussion and choose "Copy To...".
- A tray should open and load a list of the courses you are allowed to
  manage. There is no other functionality in the tray yet.

Change-Id: Ic0f5e841f61cd3cdaef7b681db2907089c561665
Reviewed-on: https://gerrit.instructure.com/204331
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2019-08-20 16:05:09 +00:00
Rex Fleischer 12508a9880 update migration to delete tags without restrictor
the context_module_importer will remove all tags for associating
items with a destroy_all call. this signals the restrictor to mark
them as "manually_deleted", which will then never allow the
state of a tag to be changed by a migration because it thinks
that a user overridden that tags state.

note that this will not fix the problem if the tag was already
created and then removed by the migration. we would have to
do a data fix to remove the bad "manually_deleted" tags on
content.

flag = none

fixes: ADMIN-2716

Test-Plan:
* create a master course and a child course
* in master course, create 2 modules and an assignment in each
* run a sync and check the child course
* in master course, move assignment from second module into first
* in master course, delete the empty module
* in master course, update the moved assignment
* run a sync and make sure everything looks the same in child

Change-Id: I7a7df96a333d72055bdd7852d5abe65727d5b983
Reviewed-on: https://gerrit.instructure.com/204478
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
2019-08-20 15:53:46 +00:00
Mysti Lilla 25b9eb099e Create model for direct share
closes ADMIN-2808
flag=direct_share

Test plan
- n/a

Change-Id: I1481e273b76bf969ce8e3a510702bfa1f11fb0d7
Reviewed-on: https://gerrit.instructure.com/204282
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Mysti Lilla <mysti@instructure.com>
2019-08-20 15:50:18 +00:00
Drake Harper 88e41e069a Add asset_name property to asset_accessed event type
Fixes PLAT-4718

Test Plan:
-create an event
-verify asset_name is in body of event

-create a context external tool
-verify asset name is not in body of event

Change-Id: I96d38dfc74b1888aae962e62ee06d025f83ff35b
Reviewed-on: https://gerrit.instructure.com/204268
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Oxana Jurosevic
2019-08-20 15:28:14 +00:00
Ryan Shaw 6db8bf2abf fix some prop-type warnings
These appeared in browser console while I was testing other stuff

Test plan:
* you shouldn’t see propType warnings about these in the browser console

Change-Id: I722106ef6f8a3b4e764e4790c82d7d487fe325cb
Reviewed-on: https://gerrit.instructure.com/205755
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 15:19:36 +00:00
Ryan Shaw 53b3d55e84 Avoid a JS error on pages with no nav
This will avoid a JS error in the console on the 404 page as well as the
“Masquerade as” page (or any other page that doesn’t render the Global
Nav but does js_bundle the “navigation_header” bundle. The error wasn’t
actually breaking anything but it was getting logged.

Test plan:
* as an admin
* go to /courses/x/?become_student
* it should render the “become user” page and there should be no JS
  JS error logged to the console

Change-Id: I57006e233a65922654c5e7833de8bc3ae935fca3
Reviewed-on: https://gerrit.instructure.com/205613
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 15:19:17 +00:00
Ryan Shaw c5f62b811b Upgrade @instructure/media-capture and media-player
Test plan:
* use the media capture stuff from the new RCE
* it should look the same but use instUI 6 components

Change-Id: If5e41b75652898c0d2a4d51eedb4fc437d68f7d2
Reviewed-on: https://gerrit.instructure.com/205695
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 14:43:06 +00:00
Ryan Shaw bf446dd05f Now that i18nliner can understand it, turn back on fragments
The previous commit makes it so i18nliner can understand <> instead of
<React.Fragment>, so this turns back on the eslint rule we had to turn
Off

Test plan:
* run bin/rake i18n:generate_js (or let the Jenkins builds run)
* it should pass

Change-Id: Ia3204cd6c3147eb52ca612adbb3b20b2df8c6921
Reviewed-on: https://gerrit.instructure.com/205378
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 14:06:41 +00:00
Derek Bender 2524f91b0b github: Update stale bot
In the interest of continuing to improve our Open Source presence this
patchset does the following:
- update the config to include default settings and documentation (code
  comments) from probot repo
- add more exempt labels to include "in progress" type labels that would
  be under Instructure's control
- change the staleLabel from "wontfix" to "No Activity"
- limit the number of issues to tag per run to 5, so we don't spam
  ourselves or github if suddenly 5+ come up for marking
- limit stalebot to issues, assuming the average PR should be
  investigated and closed by a person, but this could be changed in
  the future
- change the comment from a passive "kthx bye" to a more empathetic
  response that communicates:

  A) who: this is an automated bot
  B) what/how: the bot's criteria for closing
  C) when: timeline for the next action (i.e. closing in 30 days)
  D) where: link to the mailing list for reopening or further help
  E) why: explain why this bot exists, specifically that often issues
     are abandoned because issues are fixed behind the scenes or that
     the issue is possibly no longer applicable.

Note: After this merges, rename the "wontfix" label to "No Activity"

Change-Id: I3376d69132a46e234e9c908f4c2dec0362987f8f
Reviewed-on: https://gerrit.instructure.com/205232
Tested-by: Jenkins
Reviewed-by: Cynthia Coan <ccoan@instructure.com>
Product-Review: Cynthia Coan <ccoan@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2019-08-20 13:39:44 +00:00
Matthew Lemon f5d03babc5 add user groups to the graphql user_type
Test Plan
* Add a user to multiple groups
* Navigate to /graphiql and run the following query

`query MyQuery {
  legacyNode(_id: <your_user_id>, type: User) {
    ... on User {
      groups {
        _id
        name
        createdAt
        updatedAt
        id
      }
    }
  }
}`

* verify that the qraphql response contains the groups associated with
  your user

fixes COMMS-2302
flag=assignments_2

Change-Id: I4b54195b9862cfa379a0024c7da263f1403c114b
Reviewed-on: https://gerrit.instructure.com/205066
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2019-08-19 22:20:44 +00:00
Luke Chesser aa51074396 Point Unsplash setup instructions to Wiki
fixes #1487

It would be helpful to be able to give extra context on submitting an application, including having the developers note that it's for Canvas LMS, so that our team doesn't have to go through the normal review process.

Change-Id: I41f3f5d9ab8ffec8a8f3b71f44f66bb66dc6e8af
Reviewed-on: https://gerrit.instructure.com/205689
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Jenkins
2019-08-19 20:40:05 +00:00
Ed Schiebel cd4a8e834d Update yarn.lock
the entry to ui-focusable unexpectedly changed.

Change-Id: Iba491ab95d415d5bb37677da8ebeae9aeb36dffc
Reviewed-on: https://gerrit.instructure.com/205624
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-19 20:07:48 +00:00
Jeremy Stanley c5ab512178 direct import of content export
test plan:
 1. do a common cartridge export via the API
    and save the id of the ContentExport (you need not
    actually download the file)
 2. render the API docs and see how the content migration API
    can accept settings[content_export_id] in lieu of a
    file upload or file_url
 3. test importing the export into another course via the
    content_migrations API and content_export_id
 4. ensure you get an error if you specify the id of an
    export that you do not have access to (i.e., you did not
    create the export, you are not an account admin, and
    you are not a teacher in the export's source course)

closes ADMIN-2815

flag=none

Change-Id: I9e405bc573f734bc180735a4f2c10654eaa2aea6
Reviewed-on: https://gerrit.instructure.com/204482
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
2019-08-19 20:04:15 +00:00
Aaron Griffin 591280a37c a11y: add fieldset/legend elements to quizzes
Test Plan:
- Given a quiz with a multiple choice, multiple answer, and true false
  question
- Preview or take the quiz
- Confirm answers are wrapped in a fieldset
- Confirm screenreader reads the legend text

Closes QO-509

Change-Id: Ia099ed3f339f5ebc3ff57920620954e068af95c0
Reviewed-on: https://gerrit.instructure.com/205195
Tested-by: Jenkins
Reviewed-by: Jim Simon <jsimon@instructure.com>
QA-Review: Nathan Nuclear <nathan@instructure.com>
Product-Review: Nathan Nuclear <nathan@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
2019-08-19 19:47:52 +00:00
Adrian Packel efb1deb064 Exclude deleted groups from filter
Do not show deleted groups/group categories in the student group filter.
If a filter is selected and then subsequently deleted, behave as though
no filter is applied until such time as a valid group is selected.

fixes GRADE-2275

Test plan:
- Have a course with New Gradebook and some group sets/groups
  - Enable the "Launch SpeedGrader filtered by student group" setting
- Open New Gradebook and filter by a group
- Go to the course's People page and delete the specific group you're
  filtering by
- Return to New Gradebook
  - The group filter should be cleared and all students should be shown
  - The submission details tray should disable the SpeedGrader link
    because no group is selected (except for group assignments)
- WITHOUT selecting a new group:
  - Open the view page for an assignment:
    - The SpeedGrader link/group select on the right-hand side should
      not have a group pre-selected, and the list of eligible groups
      should not include the deleted group
  - Open SpeedGrader directly for an assignment:
    - /courses/<course_id>/gradebook/speed_grader?assignment_id=<id>
    - All students should be shown (we should not attempt to filter by
      the selected-but-deleted group)
- Select a new group for real and make sure things work as before:
  - Check that Gradebook filters properly by the now-selected group
    - Check that the submission details tray now allows you to access
      SpeedGrader
  - Check that the view page for an assignment recognizes the selected
    group
  - Check that SpeedGrader filters by the selected group

Change-Id: Ib528e6594afc80e50d4e0127b62a161226c674bb
Reviewed-on: https://gerrit.instructure.com/205287
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-08-19 19:00:29 +00:00
Adrian Packel 8f59c3abb5 Use theme nav color for SG post/hide grades icon
Have the "Post/Hide Grades" icon in SpeedGrader use the value of the
current theme's "Nav Icon" setting to determine the icon color.
(SpeedGrader's header uses the value of the "Nav Background" setting for
its own color; if that was set to white, this icon would appear not to
be displaying.)

fixes GRADE-2371

Test plan:
- Have a course with New Gradebook and Post Policies enabled
- Set up a custom theme in Canvas
  - Set the "Nav Background" color to white
  - Set the "Nav Icon" color to something different/distinct
  - Apply your new theme
- Open SpeedGrader
  - The header should match your "Nav Background" color
  - The post/hide grades icon should match your "Nav Icon" color(*)
  - Make sure this holds for both the "post grades" and "hide grades"
    icons

(*) For whatever reason, the gradebook icon (the leftmost of the icons
in the upper-left) uses the "Nav Link" theme color instead of "Nav
Icon," so it will likely be a different color from the other two. For
our icon, we're just trying to mimic the non-post-policies muting icon.

Change-Id: I6cbc50d367e937c67422fc698dfcfa81d3c03521
Reviewed-on: https://gerrit.instructure.com/205474
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
2019-08-19 18:56:43 +00:00
Ryan Norton fe564598cd add edit page for saved text drafts in a2
when a text entry submission is saved it should navigate to the
saved draft page as a precursor to opening the RCE.

this page should allow you to edit or delete the current draft.

Test Plan:
* as a teacher, create a text entry assignment
* as a student in a2, navigate to the assignment
* with no submission draft saved, you should be taken to the
  draft entry page
* clicking Start Entry should open the RCE

* clicking Cancel now will take you to the saved draft page
** this is because starting the entry saves a blank draft since
   it is no longer an unstarted entry
* refreshing the submission should now always load the saved
  draft page
* clicking the trash icon will delete the entry
* refreshing the submission should now return to the Start
  Entry page

* from the RCE page, typing some words and clicking Save should
  direct you to the Saved Draft page
* clicking Edit should return you to the RCE with the saved draft

fixes COMMS-2267

Change-Id: Idfe2506d6c8928aaf0deb8bb49688a03e710d28f
Reviewed-on: https://gerrit.instructure.com/204686
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Tested-by: Jenkins
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
2019-08-19 16:58:25 +00:00
Gabriel Brady 81d20ec754 fix(CorrectAnswerDonut) Replace donut chart with text
fixes QO-488

Test plan:
- Create a quiz
- Take the quiz
- View quiz statistics
- Verify donut chart does not appear
- Verify plain-text correct answer ratio does appear

Change-Id: I5cda69c300a63904d21ce0626573f9ee4dadea75
Reviewed-on: https://gerrit.instructure.com/205375
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
2019-08-19 16:57:10 +00:00
Steven Burnett 554d66538b change internation sms drop down to include region
fixes COMMS-2308

Test Plan:
- words change to country or region from country

Change-Id: I4de93657c923c17445df2d39553806eaa6ebba0b
Reviewed-on: https://gerrit.instructure.com/205557
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
2019-08-19 16:46:59 +00:00
Erin Hallmark 47403bb5cd remove beta label from final grade override feature option
This commit also clarifes functionality in the K-12
Specific Features feature option and also removes
the beta label.

CLOSES: GRADE-2379

Test plan:
- Open Account Settings
- Open Feature Options tab
- View beta label removed from final grade override

Change-Id: I595bddd5cd6ba4222ddd1b397f2370cb2b665426
Reviewed-on: https://gerrit.instructure.com/205501
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
QA-Review: Erin Hallmark <erin@instructure.com>
2019-08-19 15:58:42 +00:00
Clay Diffrient 9869118d38 Add error handling to the RCE
This makes it so that RCE errors get surfaced in a
visible and actionable location when they occur.

Test Plan:
  - Precondition: Do NOT have canvas-rce-api running
  - Go to an instance of an RCE
  - Try and upload a picture
  - Above the RCE you should see an error message.

closes COREFE-8
closes COREFE-9

flag = rce_enhancements

Change-Id: Icde2dd386da45d7d47dcda24fcddb04156749835
Reviewed-on: https://gerrit.instructure.com/204022
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-08-19 15:33:43 +00:00