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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
- 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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>