Closes FOO-1577
flag = none
Since assignments_2 teacher page is currently unused, just
update the import source for the <Select> component to InstUI 7.
Select works entirely differently in InstUI 7 so this is almost
certainly going to completely break a lot of functionality, but
for now just skip the failing tests rather than update all the
code to deal with the new <Select> usage.
Also put in some comments warning whoever picks that code up
next that there is work to be done on date and time pickers.
Test plan:
* build passes
* No more imports from "@instructure/ui-forms" in assignments_2
Change-Id: I0ad71714ea0728071738043b585582758d04cbf6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261312
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Closes FOO-1716
flag = none
Since assignments_2 teacher page is currently unused, just
short out the calls to the deprecated InstUI <DateTimeInput>
component rather than fix them right now.
Also skipped some tests that would fail without that component.
And put in some comments warning whoever picks that code up
next that there is work to be done on date and time pickers.
Test plan:
* build passes
* No more DateTimeInput in assignments_2
Change-Id: I37262cd41d656873e6ca401ee520db0db80d0a37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261286
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
refs FOO-1171
flag=none
test plan:
- migration works up and down
- tests pass
Change-Id: Ib309f1249a84d44492af8298d44fee3efa40992c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260534
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
Closes: COREFE-212
The attack vector this was trying to fix has been fixed in all browsers
since 2011 (https://security.stackexchange.com/questions/155518/)
and so is not a problem in any of the browsers we support
See this answer for more details of what the attack was and how
it is no longer a problem: https://stackoverflow.com/a/2669766/7159335
This will make it a lot easier for all of our api request so we don’t
Have to worry about that anymore
Test plan:
* in a browser where you are logged into canvas
* go to /api/v1/users/self
* it should not have a “while(1);” in front of the json
Change-Id: I3750672c41791040f7fb09b2e35bad7966060101
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/205090
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
there is an index on the user_id and context_id, we want to find from
the keys of the index and let root_account get populated from favorite
context
test plan
- specs should pass
fixes VICE-1236
flag=none
Change-Id: I70f2ceaa941d38cd7a7de054b0888044d3325a25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261298
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
fixes VICE-1235
flag=none
InstUI had a few hidden gems, this switches us to use them
test plan:
- open storybook
- components should more closely match the original updated
designs
qa risk: low
Change-Id: Ibd68ec64a764d4c93132d934e4eb94ca0d4f7c26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261328
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
This change adds apps to the resources page with
canvas_for_elementary enabled. Shows all the non-hidden course_nav
apps for each of the user's non-homeroom courses. Apps installed in
multiple courses only show up once, but a modal is presented to choose
launch context.
Also adds error handling and loading incdicators for apps and staff
info on the resources page.
flag=canvas_for_elementary
closes LS-1770
Test plan:
- Enroll a user in at least one homeroom and one non-homeroom course in
a k5 subaccount
- Go to the Resources tab on the dashboard
- Expect to see a loading indicator while loading
- After loading, expect to see student applications section with app
buttons listed for each app installed in non-homeroom courses
- Click on an app
- If the app is installed in more than one course, expect to see a
modal, else, the click will immediately launch the tool in the
associated course
- Simulate a browser connection failure when the apps are loading,
expect to
see an error message appear
- Remove all apps, expect to not see the apps section at all
Change-Id: Ie98df547e37342f3b42da69e94923e4f2da6b5d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260692
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Do not allow concluded students to submit in the enhanced student view;
also prevent them from redoing an attempt or starting a new one, and add
a notice saying that their enrollment has been concluded.
fixes EVAL-1413
flag=assignments_2_student
Test plan:
- Have a course with assignment enhancements enabled and a student
- Conclude the student's enrollment
- As the concluded student, check that the following hold:
- If you already submitted, the "New Attempt" button should not appear
in the header
- If you have a submission in progress, the "Submit" button should not
appear
- (note that you can currently modify your draft; this will be fixed
eventually but isn't a concern for this ticket)
- If you have not yet submitted anything, the option to choose a
submission type should not be shown
- At the bottom of the page, you should see some text informing you
that you can't submit because your enrollment has been concluded
- As a student who is not concluded, check that you have the ability to
submit/redo/begin a submission as usual
Change-Id: I294e5181e106e4bbaf893fc271335d37475a30b2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260690
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
When adding a link to the RCE the validations to check the file
content were changed; instead of using isAudioOrVideo, isImage or
isVideo now the fileEmbed method of the mimeClass will be used to
make sure the browser supports the file
fixes LS-1933
flag=none
Test Plan:
Scenario 1:
1- Upload a file to a course with image/ content type not supported
by the browser (e.g. dxf file)
2- Create or edit a page to see the RCE
3- Type some text and highlight it.
4- Use the arrow next to the links button to choose "Course links"
and then choose files in the right.
5- Click the file you uploaded in step 1 and notice it does not try
to embed the image; instead it creates a link of the text to that
file
Scenario 2:
1- Upload a file to a course with image/ content type supported
by the browser (e.g. png file)
2- Repeat steps 2,3 and 4 of the Scenario 1
3- Click the file you uploaded in step 1 and notice it image is
rendered without problems
Change-Id: I389dd25393e7e36556301d5e4216b699f71da76f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260702
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
flag=none
Test-plan:
- Verify output is less noisy with a11y team
Change-Id: I432121254c29822ce310d9fbcf5d0f1bc8576873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261120
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
flag = none
Test plan: tests pass again
Change-Id: I99e8baccf116add29295d5580b8ec61d61053439
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261329
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jeff Largent <jeff.largent@instructure.com>
Tested-by: Jeff Largent <jeff.largent@instructure.com>
This change adds a new component that appears under the "Today" item
in the K-5 Dashboard Schedule tab when there are missing submissions
for assignments in the past. It initially displays as a collapsed list
calling out the number of missing assignments, and displays all
missing assignments as Planner items when expanded.
closes LS-1761
flag = canvas_for_elementary
Test plan:
- Create a text submission assignment, an assigned quiz, and an
assigned discussion in a new or existing course with due dates in
the past
- Log in as a student enrolled in the course who hasn't submitted
any submissions for those assignments
- Go to the Schedule tab of the K-5 planner as that student
- Expect to see a link by Today with the text "Show 3 missing items"
and a warning icon next to it
- Click with link / button to expand it
- Expect to see 3 items in the list linking to the assignments, with
the appropriate icon based on whether the assignment is a quiz,
discussion, or something else
- Expect the items to have a warning icon instead of a checkbox
- Expect the items to show the name of the course in the course's
color below the assignment name
- Enter a submission for one of the assignments
- Back on the Schedule tab, expect the link to say "Show 2 missing
items"
- Enter submissions for all missing assignments (or become a user
with no missing assignments)
- On the Schedule tab, expect the link to not appear
Change-Id: I27f2e45fa03d31e2d48e5e907e202d0bee96c90d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260559
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
When a XML with an invalid encoding is sent to the `grade_passback`
endpoint, it's checked by `check_outcome` method, which was raising a
500 error when converting the xml to a string.
We're changing the `check_outcome` method, to catch that error, and
return a success response with description error message in the
imsx_description property.
closes INTEROP-6515
flag=none
test-plan:
- spec's should pass;
- Have installed https://github.com/instructure/lti_example LTI Outcome
Service Example;
- Have an assignment with external tool submission using the LTI Outcome
Service Example;
- As a student, you should be able to grade passback using the tool;
- You have to change the tool to send a xml with invalid encoding like:
%{<?xml version="1.0" encoding="utf8"?><imsx_POXEnvelopeRequest \
xmlns = "http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0"> \
</imsx_POXEnvelopeRequest>}
- You should be able to submit the grade passback and receive a XML with
imsx_codeMajor=unsupported and imsx_description contains the text
`Invalid XML: unknown encoding name - utf8`;
Change-Id: I6febbc55a5979a9a21f8b72f464d09d4f57a726e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261045
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
fixes VICE-1194
flag=none
test plan:
- Go to graphql. go to legacy node> Discussion
there you should see new attributes.
- rspec will specfically list the added
attributes
qa risk: low
Change-Id: I3e7cac9c82ff3888e8598f5b5a45fb35e8579c5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261122
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
refactor check_dependencies and add print_missing_dependencies
to work with both mac and linux.
closes: DE-577
flag = none
Test Plan:
-run docker_dev_setup on mac with missing depenedencies or
docker-compose version older than 1.20.0
-script dies with message about missing dependencies
-run docker_dev_setup on linux with missing dependencies or
docker-compose verions older than 1.20.0
-script dies with message about missing dependencies
-run docker_dev_setup on linux without dory
-prompoted to skip dory, if 'y' script continues and does
not try to start dory. If 'n' script dies with message to
install dory then rerun.
Change-Id: I07f191cdfacbcd2124d8be69541999f57f1ff777
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261155
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Test Plan
1. Pull down commit
2. Run storybook `yarn storybook`
3. Test the Discussion Post Toolbar in storybook
Expect: Design Criteria is met and all callbacks are working
Change-Id: I687fa92e1d0b981022c1e429621642e5bb96698b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261133
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
It turns out creating a Microsoft group for a course is a two-step
process; the easiest way to determine if both steps have run is to save
Microsoft's ID for the group one the model, and only save it once we
have run both steps.
flag=none
refs INTEROP-6567
Test plan:
- run migration up, observe new field in DB
- run migration down, observe field is gone
Change-Id: I46be7cce6555cdc8a91770fc13cd94ea9dec23b9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260506
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
closes INTEROP-6597
flag=none
Test plan:
- rake db:migrate
- try creating a MicrosoftGroup::UserMapping model. make sure Rails
requires it to have both a root account and a user id (failing
validation otherwise). Make sure Rails also fails validation if you
try to create two records with the same user id and root account id.
- describe table (\d+ microsoft_groups_user_mappings) and check that
root account id is non-nullable, the indexes look good,
replica identity is on [root_account_id, id]
- Rollback migration (rake db:migrate:down VERSION=20210308210138) and
check that table is gone
Change-Id: I2430eec8843494409e0026fbe761cc7945abf568
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260311
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
The `infer_file_extension` first should try to infer the extension from
name, filename, or url parameters, because, there's more than one mime
type to the same extension, like text/plain: dat, txt, hh, hlp.
In case the extension wasn't find, we will try to find using the
content_type parameter.
closes INTEROP-6616
flag=none
test-plan:
1. Have a Course recorded;
2. Have a Student enrolled in this Course;
3. Have an Assignment recorded to this Course with some restrict upload
file types;
4. Enable the assignment enhancements feature in the course settings;
5. Logged as a student, you should be able to upload files with
diferrent extensions (according to extensions restricted in step 3)
without receiving the console error `filetype not allowed`;
6. You should be able to receive the console error `filetype not allowed`
when trying to upload a file with a extension that wasn't in the
restricted list;
7. Accessing the submission details, you should be able to validate if
the attachment corresponds to the file you submitted;
8. Accessing the speed grader as a Teacher, you should be able to preview
or download the file submitted;
9. You should be able to you should be able to upload files after
disabling the assignment enhancements feature and execute steps 5
until 8;
Change-Id: Ie54b16fb3b6906554a2e1aad6010ad54d86a60f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260893
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
flag=none
Test Plan:
Verify new documentation's links work correctly.
Verify the documentation is free of grammatical errors.
Change-Id: I54ab36dbe846353cee848f9e31c32bf647fb575c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261062
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>