Javascript's parseFloat supports this natively, so we can handle it if
all else fails.
Test Plan:
- As a teacher, create a quiz with a numeric question
- Enter `3e4` as an answer
- On blur, see it replaced with `3000`
Closes QO-512
Change-Id: Ia7c7e196ed0baa302fc6b6f79eda611955f75d2b
Reviewed-on: https://gerrit.instructure.com/206463
Tested-by: Jenkins
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
Reviewed-by: Connor Williams <cowilliams@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Fixes bug where lowest rating range would not scale when adjusting
total points. Also fixes a bug where changing a rubric's total points
and resetting to the initial value would not scale points evenly.
Fixes OUT-3074, OUT-3239
Test plan:
- Create a ranged rubric with ratings 100-75, 75-50, 50-0.
- Update total points in the rubric to 200.
- Ensure lowest range scales from 100-0.
- After saving, change total points to 0 for the same rubric.
- Reset rubric total points to 200.
- Ensure each range scales evenly and adjusts from 0. New values
should be 200-100, 100-0, 0.
- Ensure ratings display properly in other languages (one that
uses colons instead of decimal points, for example).
Change-Id: Iddc2078e49cf1202dcbf111c0deeece8949ea464
Reviewed-on: https://gerrit.instructure.com/205295
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
keeps selenium selectors from breaking
closes #ADMIN-2848
Change-Id: I5bfb15df6a1754d1bcdd468491e611216fa9477e
Reviewed-on: https://gerrit.instructure.com/206456
Tested-by: Jenkins
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Adds submission_types and exclude_submission_types params to
calendar_events_api#user_index.
closes CAT-2923
Test Plan:
1. Verify the submission_types and exclude_submission_types
params work as intended when calling calendar_events_api#user_index.
Change-Id: I667b3cfd190d33c50f4e2b62fab1ee2af5925c41
Reviewed-on: https://gerrit.instructure.com/206731
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Nick Pitrak <npitrak@instructure.com>
QA-Review: Nick Pitrak <npitrak@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
fixes: ADMIN-2836
feature = none
test-plan:
passes jenkins. we cannot manually test this functionality until
it's hooked up with tickets that use this
Change-Id: I57a42da130ea6d00f5dd8ad3edf3d4e1b311e3ac
Reviewed-on: https://gerrit.instructure.com/205848
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Tested-by: Jenkins
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
fixes: ADMIN-2843
flag=none
Test-Plan:
- ensure the test ff can be toggled
- ensure the test ff can only show in site admin
Change-Id: I354f3a296c393b2e73c0487bff6fc10247f0fe9e
Reviewed-on: https://gerrit.instructure.com/206698
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
trying to do a cross-shard course copy from a course that
has old exports tries to use old local identifiers but
was generating them on the wrong shard
closes #ADMIN-2849
Change-Id: I4039a1a5f4bf10521d96e06da1d907b0fe14710a
Reviewed-on: https://gerrit.instructure.com/206800
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
I did this first for canvas’s jest tests, but this does it for
karma/qUnit, canvas-rce, canvas-planner and dev mode too.
test plan:
* run `yarn test`
* you should see a lot less react deprecation messages
Change-Id: I5f5cee08d705b749526be87fd79cfc937c015145
Reviewed-on: https://gerrit.instructure.com/206879
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes PLAT-4744
Test Plan:
- see that the index action returns a list
Change-Id: I92cc07c5476c7dd48202f38b62e09df6aa591b62
Reviewed-on: https://gerrit.instructure.com/206435
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
Images are still course only. Will be addressed in the text ticket
closes COREFE-204
test plan:
- have a course with some files
- have a teacher and a student with personal files
- go to the course as a teacher
> expect rce Documents toolbar button menu to
show Upload, Course Documents, and My Documents
- upload document(s)
> expect it to succeed
> expect the new files to appear in the Course Documents
tray
> expect the files to appear in the course's files folder
(/courses/:id/files)
- select My Documents from the toolbar menu
> expect my documents to be shown in the tray
- use the filter to switch to Course Documents
> expect course documents to be shown in the tray
- repeat, starting with Course documents and flipping to My documents
- go to the course as a student
> expect rce Documents toolbar button menus to
show Upload and My Documents only
- upload document(s)
> expect it to succeed
> expect the new files to appear in the user's file page's
My Files (/files).
> do NOT expect the files to show up in the course's Files page
(/courses/:id/files)
Change-Id: I279e46ef422a8895e1f38688d98ceabfc5f9ce88
Reviewed-on: https://gerrit.instructure.com/205359
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Change-Id: Icb82453081986645af91e3175dc3ee166b604fc9
Reviewed-on: https://gerrit.instructure.com/206908
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Test plan: graphiql works
flag = none
Change-Id: Ia8bd7100024cab45746a27f370d5423e6c5fa9e6
Reviewed-on: https://gerrit.instructure.com/206853
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
When a teacher updates a quiz score in SpeedGrader and we subsequently
re-fetch submission data, merge the fetched data into the existing
submission object for the student by calling setOrUpdateSubmission,
rather than just setting the student's submission to point to the new
object. The latter approach leaves references to the outdated
submission data in place elsewhere, which could result in the un-updated
score erroneously being displayed after some actions (e.g.,
posting/hiding grades).
fixes GRADE-2367
Test plan:
- Have a course with New Gradebook and Post Polices
- Create a graded quiz with at least one question
- Set the quiz to be manually posted
- As a student, take the quiz
- As a teacher, open the submitted quiz in SpeedGrader
- Change the score to one or more questions and click "Update Scores"
- On submitting, the updated score should be displayed in the grade
input on the right-hand side
- Post grades for the quiz
- Confirm that the grade input does *not* revert to the submission's
pre-update score, but instead keeps displaying its current value
- Hide grades for the quiz
- Confirm that the input once again does not revert
Change-Id: I01cd58445929e7dbafbb2d41209aaa8c88e6cada
Reviewed-on: https://gerrit.instructure.com/206288
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
my last thing fixed it in one spot but it fails in another now
lets see if we just give it more memory if that will work
Change-Id: Ia4a5aef21f3a07ac2d383682de1cfc4fe2d71f73
Reviewed-on: https://gerrit.instructure.com/206869
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
fixes: COREFE-229
2 things:
1. there was a problem with deprecated.test.js where node would
run out of memory
2. When raven went to log stuff it would die because it would try
to use window.fetch, but that is just a mocked function in jest
Change-Id: Ib8a4de3605606a9bf0496634f93bfed3731a5d1a
Reviewed-on: https://gerrit.instructure.com/206857
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes COMMS-2316
TEST PLAN
-------------------------------
all tests pass
Change-Id: I0c270bb7a8d5dfa166641648841e619a1a21c0f4
Reviewed-on: https://gerrit.instructure.com/206348
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Tested-by: Jenkins
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
Test plan:
* yarn jest app/jsx/developer_keys/__tests__/CustomizationOption.test.js
You should not see:
Warning: validateDOMNesting(...): <tr> cannot appear as a child of <div>
in tr (created by CustomizationOption)
in CustomizationOption (created by WrapperComponent)
in WrapperComponent
Change-Id: I9a16a01c7d4323bce09aaa17c1b8cda681231e7d
Reviewed-on: https://gerrit.instructure.com/206830
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes PLAT-4761
Test Plan:
- see that a call to this endpoint will show a sub
Change-Id: Ifc299aebe5cfbadaf82a1970f75ad182ffa31b29
Reviewed-on: https://gerrit.instructure.com/206489
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Jenkins
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
This is the result of running:
jscodeshift -t ../js-codemod/transforms/arrow-function.js .
see: https://github.com/cpojer/js-codemod#arrow-function
Transforms callbacks only when it can guarantee it won't break this
context in the function.
Also transforms function() { }.bind(this) calls to () => {}.
jscodeshift -t js-codemod/transforms/arrow-function.js <file>
Change-Id: I04d20c818002b3dce5a43d8e91f01d904f966706
Reviewed-on: https://gerrit.instructure.com/205785
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
In order to help track down some of the build flakiness in the js
build, to be able to reason better about the asynchrony going on,
I went through and made functions that weren’t really intended to return
a promise not `async` and made it clear what promise we are returning
when we have a promise that does something like
`return Promise.all([foo, bar, baz])`
So for example:
Instead of doing:
async function foo () {
return Promise.all([fetchThing(), fetchOtherThing()])
}
Just remove the “async” part and do
function foo () {
return Promise.all([fetchThing(), fetchOtherThing()])
}
if you want to leave the “async” part on the function you could also do:
async function foo () {
return await Promise.all([fetchThing(), fetchOtherThing()])
}
Change-Id: Iff050350e28d5dbff0b939b244efec3b2b400be3
Reviewed-on: https://gerrit.instructure.com/206447
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Also, fix some
Test plan:
* run `yarn jest`
* you should see less of those react 16.9.x lifestyle deprecations
In the console output
Change-Id: Ic63e977fe8067756d0a276e316b23dab004da94f
Reviewed-on: https://gerrit.instructure.com/206813
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
fixes COMMS-2293
Test Plan:
** this requires notorious to test. If you have questions on how
to get that set up check the meeseeks startup guide
- as a student with a2 on go to a media type submission assignment
- click on the "add media recording" button
- notice you get 2 tabs record and browse
- add either a video or record one of your pretty face
- save
- notice it shows up in the dom centered and styled well
- party as you can rewatch yourself multiple times
Change-Id: I434fdc02ebce1dc63bf53aace638788439ac1029
Reviewed-on: https://gerrit.instructure.com/206103
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
Test Plan:
* Create an assignment
* Submit the assignment, and keep clicking the submit button
* Notice that the submit button is disabled after the first click, and
only one new submission is created
fixes COMMS-2317
flag = assignments_2
Change-Id: Iddd63b71d20b9ea3f2c9bcf7a17503918cca5dfe
Reviewed-on: https://gerrit.instructure.com/206218
Tested-by: Jenkins
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
For New Jenkins builds, don't fallback to pulling the image from
master if the patchset image isn't available. We don't want the
tests to pass against the wrong image.
Use PATCHSET_TAG instead of re-creating the starlord url.
Change-Id: Id77e4110f597308064922c1bb37d03b520a4d6b9
Reviewed-on: https://gerrit.instructure.com/206742
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Executing a graphql query was a poor way to pre-build the schema (it
would try to start a transaction and set statement timeouts). This just
builds the schema and will never issue a query.
Change-Id: I23a9eeff394fec68b65f7f24b42e3942f70f50a3
Reviewed-on: https://gerrit.instructure.com/206768
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
fixes ADMIN-2845
flag=a11y_left_menu
test plan:
- Enable 'Accessible Sidebar Menu' flag in site admin
- in a course, disable Announcements so show icon shows up, then
navigate to Announcements page. Link & icon should be on
same line
Change-Id: I3edac4999affac17c8256b071e917756f97f030c
Reviewed-on: https://gerrit.instructure.com/206085
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
this allows this to be overwritten easier
refs CORE-3276
test plan
- specs should pass
Change-Id: Ia149c35ab23ac7432a2e481f8b88d660d8e7fb13
Reviewed-on: https://gerrit.instructure.com/206627
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
also update the updated_at to get elapsed time of user merge
Change-Id: I699365cbba2530bd6a5eab4439704b1adeecaa13
Reviewed-on: https://gerrit.instructure.com/198715
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes PLAT-4773
Test Plan:
- Verify the new "compact_live_event_payloads"
release flag is visible in the root account and
defaults to "off"
- Enable the feature flag
- Verify null values are removed from live event
payloads
Change-Id: I8f91ead101fa3cd81fe8553f7f8ff6e94b294128
Reviewed-on: https://gerrit.instructure.com/206307
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Jenkins
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Oxana Jurosevic