Commit Graph

3358 Commits

Author SHA1 Message Date
Jackson Howe dc7fb86e17 Fix issue where rce strips fonts
The fallback font sans-serif was included in the rce config with a
space, i.e. 'sans- serif', which caused issues with the Architect's
Daughter and Balsamiq Sans fonts. If these fonts were used in the
rce, the styling was stipped from the element on save.

Fixes LS-1383
flag = rce_enhancements

Test plan:
 - In RCE, write some text and change font to Architect's Daughter
 - Save the page
 - Font should appear correctly in rendered text
 - Repeat for Balsamiq Sans

Change-Id: Id39415c5744247cb4153c549f941c7fefe4c3aa7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245990
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-08-26 19:36:01 +00:00
Alex Anderson dcc31d315e Fix iframes affected by sandbox regression
A hotfix was pushed out which strips the sandbox
attribute from iframes. We should only strip it if the
iframe was affected by the regression introduced
with LS-743.

Test Plan:
Create a page
Add the following iFrame content:
<p><iframe src="https://docs.google.com/presentation/d/1X7DeC2XASzkjWsYX9eJuKid2Yxe_WxIksQP0mkYYl30/edit?usp=sharing" width="800" height="480" sandbox="allow-scripts allow-forms allow-same-origin"></iframe></p>
Save. On the page, try requesting access. A confirm
modal should appear.

Change the page content to the following:
<p><iframe src="https://docs.google.com/presentation/d/1X7DeC2XASzkjWsYX9eJuKid2Yxe_WxIksQP0mkYYl30/edit?usp=sharing" width="800" height="480" sandbox="allow-scripts allow-same-origin"></iframe></p>
Save. On the page, try requesting access. The confirm
modal should NOT appear and an error should be logged
to the console.

flag=none

Refs CNVS-49914

Change-Id: I20d0763a7ccf6e73163cf9056fdfad72efa2448c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245002
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Alex Anderson <raanderson@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2020-08-21 15:48:18 +00:00
Alex Anderson 189cac4b32 Add Lato Extended font
Note: This reverts a previous revert, reintroducing the fix
without the regression.

The Lato Google Font is missing a bunch of glyphs which are
necessary for displaying certain languages. This adds the
extended character set fonts to Canvas to self-host the fonts.

It also changes the `font-family` CSS property to use the new
"Lato Extended" font, falling back to regular "Lato". It continues
to load the Google Fonts font, in the hopes that the Google
Fonts font will load faster (because it is about 10x smaller, due
to fewer character glyphs), and then the extended Lato font will
load and override the Google Font.

Test Plan:
Open the following page in the RCE and copy the raw HTML:
https://osmith.instructure.com/courses/1093/pages/reo-a-iwi-a-e-i-o-o-u-u-m-n-e-s-c-r-z-u
Paste that HTML into a page RCE raw HTML editor on your
testing Canvas instance and save the page. Also copy and
paste the page title to test bold characters.
ON WINDOWS, notice that the font renders basically the same
for extended characters as it does for latin characters.

Also, make sure the italic version works correctly
Within a Canvas course, create a page.
Enter text, highlight the text and select the italics icon to italicize the text. Notice that the text is italicized.
Save the page and notice that the text should be italicized and the correct font weight.

Fixes LS-317

flag=none

Change-Id: I2a44fd43d5433f3cecc9a1c43589643284536245
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244837
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Alex Anderson <raanderson@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
2020-08-21 15:47:53 +00:00
Steve Kacsmark 272a2dc450 Support upto 16 places precision during take
closes QO-646
flag = none

Test Plan:
  - Create a classic quiz with a numeric question.
  - Add a numeric question
  - Add a precision answer with 6 or more decimal places
  - Update and save the quiz
  - Preview the quiz
  - Enter an answer for the numeric question with a precision of
    up to 16 places
  - Click off the field
  - It should not round down.

Note: 16 is the maximum precision in several places in the code,
  and historically how this behaved before the bug being
  corrected was introduced. This preserves that behavior.
Change-Id: Ic7441cbb6e0e4d76e0ef121bc24e7587c1f196dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245537
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
2020-08-20 00:15:46 +00:00
Michael Brewer-Davis d838f65f82 remove criteria from outcomes view/edit when mastery scales enabled
closes OUT-3768
flag=account_level_mastery_scales

Test plan:
with account_level_mastery_scales on and off
- verify account and course outcomes page can be viewed
- verify outcomes can be viewed, created, edited, deleted
  - when FF is on, view and form should not include rubric
    criteria or scoring method
- when rubrics are aligned
  - verify changing outcome prompts warning that
    aligned rubrics will be updated
- when aligned rubric is assessed
  - verify that the "some students have been assessed" warning
    appears when FF is off
  - verify warning does not appear when FF is on, because
    we will not be updating scoring params
- on rubrics page and assignments page
  - verify that outcome scoring details are still displayed
    when choosing an outcome in the "Find Outcome" dialog
    (when creating/editing a rubric)
    - when FF is off, this data should come from the outcome
    - when FF is on, this data should come from the mastery
      scale if present
- on question banks page
  - verify as with rubrics, when aligning an outcome to a
    question bank

Change-Id: Ia1e7cb6f53a341121ca8b94d23a2801c331ce533
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
2020-08-19 17:50:27 +00:00
Ed Schiebel 80e89a73af Add an Apps menu item to the RCE menubar
closes LS-1287
flag=rce_enhancements

test plan:
  same as the Apps toolbar button, except for the menu
  - add at least 6 lti tools to your course
    (you can add less if you set ENV.MAX_MRU_LTI_TOOLS=something<5)
  - edit something that opens the RCE
  > the Tools menu to include Apps
  - click the Apps item
  > expect a sub-menu with "View All"
  - click it and open a tool from the popup dialog
  - dismiss the tool
  - open Tools > Apps again
  > expect to see your recently opened tool listed, followed by
    "View All"
  - click the tool from the menu
  > expect it to open
  > expect the menu to still show the tool only once
  - open tools from "View All" until you have MAX_MRU_LTI_TOOLS in the menu
  - open Tools > Apps
  > expect the tools in the menu to be listed alphabetically
  - open 1 more tool
  > expect the menu to have removed the first opened tool
    and added the most recently used tool (so those listed
    are the MAX most recently opened)

Change-Id: Ic351f2edfd33ccb10869393400a7a968bcb1a7a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244845
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
2020-08-19 15:58:48 +00:00
James Williams 2d3fb763ef sanitize data-* attributes from subtitles
test plan:
* follow the steps listed in the ticket
* it should not cause an alert

closes #LS-1267

Change-Id: I899b51960469c3be158975cba1a07f75bc50b835
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245286
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-08-18 20:04:25 +00:00
James Williams 8492def001 sanitize chapter text in subtitles
test plan:
* follow the instructions in the ticket to upload the
given media tracks
* it should not cause an alert

closes #LS-1268

Change-Id: I3560e3b6f35cfe266d71eb42b89c5ad33ccaaffa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245285
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-08-18 19:06:41 +00:00
James Williams fef632aba0 recursively escape objects
test plan:
* create html content using the example
 provided in the ticket
* it should not cause an alert

closes #LS-1315

Change-Id: Ife4ece47242c95040770bb3b7af75a010ed99bde
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245258
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-08-18 19:06:36 +00:00
Jackson Howe 32ce84ead4 Fix issue with expand/collapse all modules button
Fixes an issue where the expand/collapse all button click callback
was being registered before the node existed in the DOM. Moves the
callback registration to document.ready.

Also hides/shows the expand/collapse all depending on whether there
are any modules in the course.

Fixes LS-1327
flag=none

Test plan:
 - Generally the same as LS-399
 - Create an empty course, go to modules
 - Expect expand/collapse all button to be hidden
 - Create module, expect button to appear with correct text
 - Delete module, expect it to be gone
 - Expect functionality to work and persist across reloads

Change-Id: I20684e3c4e6406882bb6bc84ab2f791a6153d278
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-08-17 16:23:32 +00:00
Jeremy Stanley a258858a22 add recent history to global nav
test plan:
 - enable page views
 - enable Recent History feature
 - the global nav should show recent activity
   with links to the pages, the name of the context,
   and the time since the activity
   - the history should also appear in the
     responsive global nav, when the browser
     width is reduced
 - render API documentation
 - ensure the History API behaves as documented
 - ensure if an admin masquerades as a student,
   1. the admin does not see the student's history
      (but does see her own history as the student)
   2. the student does not see what the admin did
      while masquerading as him

closes LS-1311
flag = recent_history

Change-Id: I4c41f58622ce9ac7f18d00744ba108fd51b2d03a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/200801
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-08-17 15:50:21 +00:00
Alex Anderson 6bbb46cf95 Fix sandbox "allow-popups" errors
Test Plan:
Let's make sure existing sandbox attributes are properly removed.
Change a page to have the following content:
<iframe src="https://docs.google.com/document/d/1054I9jXtjHmSwFUuj60YsyQ-DloZpORzBffO3KDdv2k" width="100%" height="600" sandbox="allow-scripts allow-forms allow-same-origin"></iframe>
Save
Clicking the 'Request Access' link should open up a confirm modal.
Don't see the error message in the devtools console

flag=none

Fixes CNVS-49914

Change-Id: I261e428185c01f2800c7a89131da2161b00e16ae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244965
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
2020-08-13 19:30:06 +00:00
Erin Hallmark 9be2ff569e Update community urls to reflect platform move
The Canvas Community moved to a new platform and links were affected.
Updated links in the UI to reflect new URLs so customers have them
instead of having to rely on redirects.

CLOSES: FOO-852
flag=none

Test plan:
- jenkins passes
- links work

Change-Id: I4bad04dbd550d24c48a4aac54fb3c5a547947e7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244878
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Erin Hallmark <erin@instructure.com>
2020-08-12 20:17:02 +00:00
Xander Moffatt b2a7cd9e9c accept explicit client id when retrieving tool
* this will assist in finding the MS Teams tool in non-iad regions,
during a full window launch in Safari

refs INTEROP-5960
flag=none

test plan
* create two context external tools that:
  * are on different shards
  * have different domains
  * are linked to the same developer key
* retrieve a tool using the external tools API:
  * using an API access token and header `Authorization: Bearer <token>`
  * GET `<canvas>/api/v1/courses/:id/external_tools`
* try to retrieve tool B from tool B's shard, using tool A's url
  * using the above API request,
  * add this query parameter: `?url=<encoded url of tool A>`
  * this should not find a tool and return nil, since the tools have
    different urls
* try again
  * using the above API request and query parameter,
  * add this query parameter: `&client_id=<developer key id>`
  * this should succeed and retrieve tool B

Change-Id: Ife6912c01c16bb3209c9d3e39c92468b4f2e9ce8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244148
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Michael Guymon <mguymon@instructure.com>
2020-08-12 18:10:20 +00:00
Alex Anderson 489572e455 Revert the Lato Extended font change
The original patchset made it so italic fonts weren't
working correctly. This reverts that change so we
don't introduce a regression.

Test Plan:
Within a Canvas course, create a page.
Enter text, highlight the text and select the italics icon to italicize the text. Notice that the text is italicized.
Save the page. The text should be italicized.

Fixes LS-1313

Change-Id: Id6a58979499a45f62abfc5f5ee911d335c32067c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244835
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Alex Anderson <raanderson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-08-12 15:28:48 +00:00
Jeremy Stanley 3e718cb479 direct share for modules and module items
test plan:
 - enable Direct Share feature
 - ensure Canvas jobs are running
 - on the modules page, select the kebab menu next to a module
   and choose "Copy To...", and ensure the module can be
   copied to another course
 - on the modules page, select the module kebab menu and
   choose "Send To...", and ensure the module can be sent
   to another teacher in the account
   - As that teacher, ensure the module can be imported
     into a course
 - on the modules page, select the kebab menu next to module
   items of all shareable types (assignments, discussions,
   pages, quizzes) and ensure "Copy To" and "Send To" work'
   (and module items other than these types do not have the
   options available)
 - repeat the previous step using newly added objects
   (that were added to the module after the page load,
   without reloading the page) and ensure "Copy To" and
   "Send To" appear and work for the four types given,
   and do not appear for all other types
 - with the direct_share feature turned off, "Copy To"
   and "Send To" do not appear in the menu for existing
   or newly created items

flag = direct_share

closes LS-1254

Change-Id: If44f9e3a7b364828caa71bb49b9e9ec37433f70f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244185
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-08-11 20:15:48 +00:00
Cody Cutrer d4f043851e rip out course_user_search feature flag
refs FOO-834

test plan:
 * click around account settings, especially course and user search
 * nothing should be broken

Change-Id: I532794f85bac099c126aec2bc5fa570a7723b37a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244658
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2020-08-11 17:28:50 +00:00
Ed Schiebel 443f439ef8 stop mucking with youtube links in the new RCE
this change removes the automatic swizzling of youtube video links,
but as a side-effect you lose the inline-preview feature.

closes LS-1273
flag=rce_enhancements

test plan:
  - in the old RCE, create a link to a youtube video
  - you get a "preview will go here" box around the link
  - create another youtube link, but check the "disable inline preview"
    checkbox
  - you just get a link
  - save
  - you'll get a thumbnail preview below the first link. the 2nd link
    is just a link

  - edit in the new RCE
  > expect both youtube video links to just be links
  - create another external link to a youtube video
  > expect it to be just a link
  - save
  > expect the youtube previewable link created in the old RCE to
    still get the preview thumbnail
  > expect the preview disabled and the link created in the new RCE
    to simply be links

  extra credit
  - enter a URL as text in the RCE and hit return
  > expect it to automatically be converted into a link.

Change-Id: I49450e21c6c2aa17ec3d890947a181d9e3d298d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244419
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-08-10 17:02:29 +00:00
Ed Schiebel 201d78f494 Add MRU lti tools menu to RCE toolbar
closes LS-1184
flag=rce_enhancements

test plan:
  - add at least 6 lti tools to your course
    (you can add less if you set ENV.MAX_MRU_LTI_TOOLS=something<5)
  - edit something that opens the RCE
  > expect to see the plain plug external tools toolbar button
  - click it and open a tool from the popup dialog
  - dismiss the tool
  > expect the external tools toolbar button to be a menu button
    (it has a down-caret next to the plug)
  - click it
  > expect to see your recently opened tool listed, followed by
    "View All"
  - click the tool from the menu
  > expect it to open
  > expect the menu to still show the tool only once
  - open tools from "View All" until you have MAX_MRU_LTI_TOOLS in the menu
  > expect the tools to be listed alphabetically
  - open 1 more tool
  > expect the lti tools menu to have removed the first opened tool
    and added the most recently used tool (so those listed
    are the MAX most recently opened)

Change-Id: Ia1cebe6b4ff24fff0953975740cee94942b4bb2b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244260
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-08-07 15:21:02 +00:00
Spencer Olson 5b3ddc9702 make speedgrader selectmenu work with home/end
closes EVAL-638
flag=none

Test Plan:
1. In a course with multiple sections and >= 3 students, navigate
   to SpeedGrader for an assignment.
2. Click on the student select menu. Verify there is a section flyout
   menu as the first option in the menu. Click on any student name that
   is not the first or last student in the list. This should result in
   the menu closing and the student you clicked being selected (and
   focus still on the menu).
3. Press the HOME key. Verify the first student in the select menu is
   selected, and their sumbmission content and awarded grades are shown.
4. Press the END key. Verify the last student in the select menu is
   selected, and their submission content and awarded grades are shown.

Change-Id: I0fc53883b5f550c49acb163574b7722b84f35278
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243692
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Jody Sailor
2020-08-05 21:32:52 +00:00
Gary Mei 69d6f56a54 add label to select menu in speedgrader
closes EVAL-1026
flag=none

Test Plan
- With a supported browser/screenreader combination, navigate to the
student select menu in SpeedGrader.
- Verify that the screenreader reads out a description of the select
menu.

Change-Id: Ic53eceb3741710ab67639f08b171f14c87c71817
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243684
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-08-04 19:26:03 +00:00
Adrian Packel a812d2ae3e Don't auto-edit custom columns in Gradebook grid
Prevent custom gradebook columns from switching to editing mode
automatically when selected via keyboard navigation (but not when
directly clicked). This requires us to partially bypass SlickGrid's
internal event handling and exercise some additional control over when a
column should enter editing mode.

fixes EVAL-1002
flag=none

Test plan:
- Have a course with some students
- In Gradebook, enable the "Notes" column or create a custom column

Ensure the following behavior for cells in the column:
- When the user accesses a custom column cell by clicking, it
  automatically switches to edit mode
- When the user navigates to a custom column cell using the arrow
  keys, it does *not* automatically switch to edit mode, but instead
  just focuses the cell
  - Pressing Enter should switch to editing when the cell is focused
- Test the following keyboard-navigation scenarios and make sure
  there's no auto-editing:
  - Accessing a cell from a different column using the left/right
    arrows
  - Accessing a cell from the column's header using the down arrow
  - Accessing a cell from the last entry of the previous column using
    the down arrow (this skips the header column and goes straight to
    the first row of data)
- Test arrow-key navigation within the grid generally and make sure
  nothing goes horribly wrong

Change-Id: I0db301b484b8e50847d7824ba3876ebd1e394e14
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243495
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Daniel Sasaki <dsasaki@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
2020-08-03 18:28:59 +00:00
Conrad Beach 315f85aaef Update allowances for certain LTI iframes
Closes INTEROP-5994
flag=none

We embed our LTI tool inside of Canvas pages.
One of the features of our LTI tool requires
microphone permissions from the client in order
to work. However, the code that generates the
`<iframe />` HTML that our tool is embedded in
does not allow us to request microphone permissions
because the `allow` attribute on the `<iframe />`
does not include microphone in the list.

In fcae49e4e5
all other (presumably all other) LTI iframes were
given the following value for the `allow` attribute.

```
geolocation; microphone; camera; midi; encrypted-media
```

(Minor changes to this list of permissions have been
made since the original addition in that commit.)

This branch updates the iframe used to embed LTI tools
and other content items so that the iframe has the
same list of values for its `allow` attribute as
other iframes have.
(As set in `Lti::Launch.iframe_allowances`.)

This will increase uniformity across LTI iframes and
will allow full functionality for LTI tools embedded
on pages.

Test Plan:
  - Verify that iframes for embedded LTI tools and
    other content items have have the following allowances
    set: `geolocation; microphone; camera; midi;
    encrypted-media; autoplay`. For example, when an
    LTI tool is embedded in a Canvas page.
  - When the user agent is blank or Chrome, the
    allowances should be: `geolocation *;
    microphone *; camera *; midi *;
    encrypted-media *; autoplay *`

Change-Id: I874f9e422e3ce8e6f0beae83ffdef7c7863101d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243866
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
2020-07-30 19:50:25 +00:00
Jackson Howe 175e2b9682 Add expand/collapse all button to modules index
Button at top of modules index expands/collapses all modules and
remembers choice.

Fixes LS-399
flag = none

Test plan:
 - Open modules for a course
 - Click collapse all button at top
 - Expect all modules to be collapsed, button changes to 'Expand
   'All'
 - Refresh page, still should be collapsed, button same
 - Click button again
 - Expect all modules to expand, button changes back to 'Collapse
   'All'
 - Opening and closing individual modules in combination with
   clicking all button should work as expected
 - Repeat as student

Change-Id: I1cb49adbd0e32bb7a625cab5678d63c7d99be719
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243327
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Anderson <raanderson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-07-30 15:36:22 +00:00
Alex Anderson 896cfc7195 Adds Lato Extended font
The Lato Google Font is missing a bunch of glyphs which are
necessary for displaying certain languages. This adds the
extended character set fonts to Canvas to self-host the fonts.

It also changes the `font-family` CSS property to use the new
"Lato Extended" font, falling back to regular "Lato". It continues
to load the Google Fonts font, in the hopes that the Google
Fonts font will load faster (because it is about 10x smaller, due
to fewer character glyphs), and then the extended Lato font will
load and override the Google Font.

Test Plan:
Open the following page in the RCE and copy the raw HTML:
https://osmith.instructure.com/courses/1093/pages/reo-a-iwi-a-e-i-o-o-u-u-m-n-e-s-c-r-z-u
Paste that HTML into a page RCE raw HTML editor on your
testing Canvas instance and save the page. Also copy and
paste the page title to test bold characters.
ON WINDOWS, notice that the font renders basically the same
for extended characters as it does for latin characters.

Fixes LS-317

flag=none
Change-Id: I5a7bb21f17f3049d9c07a9eebbd59690e01845e8

Change-Id: I603c5cee9905f315f92c0a0d39b5e2751a8f6c49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243281
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Alex Anderson <raanderson@instructure.com>
2020-07-27 18:33:35 +00:00
Spencer Olson 83b6757e7b add text to link in speedgrader
Removes two links from SpeedGrader and adds text for one link. The two
removed links were solely being used to store data; the data they
contained is now injected into the JS environment in the controller.

closes EVAL-1014
flag=none

Test Plan:
1. Create a graded assignment that accepts file uploads, and use a
   rubric to grade. As a student, submit a file to the assignment.
2. As a teacher, go to SpeedGrader.
3. Grade the student using the grade input and verify the AJAX request
   to post the grade succeeds.
4. Grade the student using a rubric, and click to save the rubric.
   Verify the AJAX request to save the rubric succeeds.
5. Using a screenreader, navigate to the "download file" icon (arrow
   pointing down). Verify the screenreader reads, "Download this file".

Change-Id: Id42c409098513c9b81cc0fd1c65f0e8a95edff12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242998
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-07-22 21:13:12 +00:00
Ahmad Amireh 7d9abef396 remove "responsive_admin_settings" flag
fixes FOO-284
flag  = none

Since this flag is now enabled for everybody, we can remove a lot of the
branching that was happening in CSS/JS.

| TEST PLAN /
| ---- ----

Verify that each of the following sites looks OK in responsive mode:

- Editing a discussion topic
- Feature flags
- Permissions
- Theme editor
  - "Login page" preview inside of theme preview (very bottom)
- Account terms (viewing & adding a new one)
- Account settings
- Account settings -> Announcements
  - Details for a single announcement
- Course settings -> Apps / External Apps

Change-Id: Ia016f2c7bbe08200ca9b6816cc0495ef22a68286
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243109
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-07-22 21:08:43 +00:00
Ed Schiebel 6a6e858522 Don't hide RCE's menubar
We used to require the user to type a magic kb shortcut to see the menubar.
It's always visible, so we don't require that any more.

This change also fixes focus issues when opening then closing the kb shortcut
modal that was discovered while fixing the RCE's kb shortcuts.

This change also cleans up the kb shortcut handling

closes LS-1183
flag=rce_enhancements

test plan:
  - open a page with the RCE
  > expect to see the menubar
  - anywhere in the editor's content area or menubar or toolbar or statusbar
    type: alt-0 or alt-f8
    > expect the kb shortcut modal to open
    - type ESC or click the close button
    > expect focus to return to where it was
  - anywhere in the editor's content area or menubar or toolbar or statusbar
    - type alt-F9
    > expect focus to move to the menubar
    > expect arrow keys to move in the menu
    > expect TAB to move to the toolbar
    > expect ESC to return you to the content area
  - anywhere in the editor's content area or menubar or toolbar or statusbar
    type alt-f10
    > expect focus to move to the toolbar
    > expect arrow keys to move among the buttons in the section of the toolbar
    > expect tab to move between sections of the toolbar
    > expect esc to move to the content area
  - fron somewhere before the RCE, tab into it
    > expect the show-on-focus-kb-shortcut-button to appear
    - click it
    > expect the modal to open
    - close the modal
    > expect focus to return to the magic button
  - click the kb shortcut button in the status bar
    > expect the modal to open
    - close the modal
    > expect focus to return to the button

Change-Id: I22549aab501a909cfff78fd9fa05c4ec16a59238
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242571
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-07-22 14:27:52 +00:00
Ed Schiebel 642f6038cf Fix error in swizzling auto-preview link's href
when a link to a file has a preview (auto-inline or not), there's
code that edits its href to remove "download" from the path and
"wrap=1" from the query_string. There was a bug that if the href
included a verifier the result was something like
"/users/2/files/17&verifier=xxx", which is invalid. This tweaks
the href editing so the result looks like
"/users/2/files/17?verifier=xxx", which is valid and works.

closes LA-1170, LA-1083
flag=none

test plan:
  - as a teacher, create a discussion
  - as a student in the course, reply and upload 2 pdfs
  - in the first, use link options to set to auto preview
  - leave the 2nd alone
  - save
  - as the teacher
    > expect the 1st file to auto-preview
    > expect the 2nd to preview if you click the icon
    > expect to be able to click on eiher file w/o error
      (wlll either preview or download)
  - as different student in the course, view the discussion
    > expect the same results as the teacher

Change-Id: I4b03be74d9536ee645e335e7945e17cd7a7ef98b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242791
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2020-07-17 20:56:31 +00:00
Jeremy Stanley 3ef3eea516 fix enabling the add module item button
only check for a selection if the user is looking at a page
that requires a selection

test plan:
 - enable the module file drag and drop option
 - add a text header, external URL, or external tool to a module
 - add another one. the button should be enabled

fixes LS-1089

flag = module_dnd

Change-Id: Ib0a1d386a6768a287351d8aff9c8d713e9bb1886
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242807
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-07-17 20:14:53 +00:00
Pat Renner 321238cfb3 move proficiency tab to account outcomes page
closes OUT-3757
closes OUT-3756
flag=account_level_mastery_scales

test-plan:
- Open up account level rubrics page and ensure you can
see the rubrics tab and learning mastery tab
- Open up the account level outcomes tab and
ensure you only see the outcomes picker ui
- Enable the account_level_mastery_scales FF
- Ensure the account level outcomes page now has two tabs,
one for outcomes and one for mastery scales
- Ensure course outcomes/rubrics ui did not change
- Ensure opening account level rubrics only brings up the rubrics ui

Change-Id: I46e4e01f07e77b61eb7ea63a2baae8f1b4d869be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242081
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adam Lenning <adam.lenning@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
2020-07-15 20:37:48 +00:00
Ed Schiebel 4d546a3ddb Support role attribute on any element in the RCE
"role" was not white-listed as a valid attribute. Though it has been
proposed as a global attribute, I don't think it was ever officially
adopted that way in a standard. However it seems to have been implemented
as a global attribute by browsers.  This change adds it as a white-listed
attribute to any element.
This change will address the issue in the old and new RCEs

closes LS-1164
flag=none

test plan:
  - in the RCE create a table and a link and whatever else you want
  - flip to HTML edit view and add a role. (e.g. role="presentation"
    on the table, role="button" on the anchor)
  - flip back to wysiwyg editor mode
  - flip back to html edit mode
  > expect the role attributes to still be in the html
  - save whatever it is you're editing
  > expect the role attributes to still be in the html on the saved page

Change-Id: Idc99c3792184a72211c655ab45707527365b97aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242176
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: Ed Schiebel <eschiebel@instructure.com>
2020-07-09 16:21:09 +00:00
Michael Brewer-Davis db5906dbb2 ignore unparseable postMessage events
closes OUT-3781
flag=none

- postMessage events from other sources (e.g. google integration)
  are not necessarily in a JSON-formatted string format

Test plan:
- verify no warnings emitted in files selenium tests
- if possible, verify legacy LTI behavior still
  functions

Change-Id: I6e50bed414493b58503c867dc5564e941f7b6d17
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241995
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-07-07 19:40:38 +00:00
Clint Furse 83afb02706 show MasteryConnect data on Module Index
closes LS-731
flag = submission_type_tool_placement

Test Plan:
- requires changes and test plan from LA-728
- add an assignment linked to an MC assessment
- add the assignment to a module
- the entry on the module index page should show
   a different icon and show the assessment
   objectives under the title

Change-Id: If83310541456e7e1eb8fd8972ae12a1cc4e5c231
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241600
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
2020-07-06 14:31:16 +00:00
Jacob Fugal f71f1aa81d safari inst-fs service worker
closes SAS-1474, SAS-1452

canvas server-side, when:
  * a canvas request would generate a redirect to an inst-fs file
  * but the request also includes a `X-Canvas-File-Location` header
  * and the request is session authenticated

then the server instead responds with a JSON object with:
  * a `location` field containing the nominal redirect target
  * a `token` field containing a token that can be used as a value for
    an `Authorization: Bearer <token>` header when requesting the file

a service worker is then added that intercepts non-navigation GET
requests to those endpoints. it adds the X-Canvas-File-Location header
to the request, and then issues a followup request for the returned
location with the Authorization header added. in effect, it's following
the redirect but with the Authorization header injected. inst-fs can
then recognize the Authorization header as a means of user
authentication in the absence of cookies.

finally, the service worker is installed only if:
  * the plugin setting controlling it is enabled
  * the browser is Safari 13+

other browsers are able to use simpler work arounds when cookie blocking
is enabled and can thus take advantage otherwise.

test-plan:
 * have canvas and inst-fs both served over https
 * for safari, be using 13.1 or newer with tracking prevention enabled
 * leave the service worker disabled through the inst-fs plugin setting
 * have an image uploaded to inst-fs
 * visit the image's preview page in the files UI:
   - in safari: observe the image fails to load
   - in chrome: observe the image successfully loads
 * enable the service worker via the plugin setting
 * refresh the image's preview page:
   - in safari: observe the image now successfully loads
   - in chrome: the image still successfully loads, but does so without
     involving the service worker

Change-Id: Ie28f2cad40f67549bfbb4c7c6604f215581fbe18
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/237135
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-07-02 22:39:11 +00:00
Clint Furse ef3249f62f show MasteryConnect data on Assign index page
closes LS-730
flag = submission_type_tool_placement

Test Plan:
- requires changes and test plan from LA-728
- icon_url should be passed as part of MC metadata
- once assignment is created, view the assignment index page
- verify icon is displayed and the assessment objectives is displayed
   as per given design

Change-Id: I9d8d98011e6d2db76bd279153545ace5a4545296
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240477
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-07-02 20:23:11 +00:00
Alex Anderson 8855def32f Add favorited LTI tools to RCE toolbar
Takes external tools labeled as favorite and includes them in the toolbar.
Embeds the icon into an SVG to be used as the toolbar icon.
Only shows a max of 2 favorite tools.
Also moved the tools favorites to be next to the media upload icons,
as per Peyton's request.

Includes Selenium tests

Test plan:
Enable RCE Enhancements
Activate some apps (Wikipedia and Dropbox work well)
Use Ed's new work to favorite those two apps (or one of them - you do you)
Open an RCE page.
The icons should appear in the toolbar to the right.
Clicking the icon opens up the LTI tool modal properly.

flag = rce_enhancements

Closes LS-532

Change-Id: I96ace173793093f1fd2aa9dba546e7d4cd973c42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240530
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2020-07-01 19:33:50 +00:00
Xander Moffatt 8807d5e5cb close dialog during lti submission from More tab
closes PLAT-5808
flag=none

test plan:
* install at least 3 LTI tools for homework_submission using Eduappcenter
* install the LTI 1.3 test tool with a homework_submission placement
* as a teacher,
  * create an assignment with online file submission
* as a student,
  * submit that assignment using a normal file upload, check that it works
  * submit using the test tool from the top tab of submission options
  * choose the File option for deep linking response
  * check that it works
  * submit using the test tool from the More tab of submission options
  * choose the File option for deep linking response
  * check that it works

Change-Id: I690dccff812e1b237624b05a5fff9bac35baf9af
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240047
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
2020-06-30 17:03:19 +00:00
Cody Cutrer e45056f453 make web-app-manifest/manifest.json dynamic
fixes USERS-364

so that branded icons are properly shown

test plan:
 * use the theme editor and upload a custom icon for Mobile
   Homescreen Icon
 * on an Android device, bookmark the canvas website to your homescreen
 * you should see your custom icon

NOTE: because this uses the existing brand config variable, apple and
android will now share an icon, whereas they have differed in the past

Change-Id: Ibb1e6da5a42dae630a04651071618b2504a7f3ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229636
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
2020-06-22 16:22:59 +00:00
Jeremy Stanley af6a38619c add progress bar for content migration uploads
test plan:
 - you should see a progress bar appear while
   uploading a file for a content migration
   (zip, common cartridge, etc.).
 - the spinner should not appear when a
   progress bar is present
 - the spinner should still show up for migrations
   that do not involve an upload (e.g., course copy)
 - if you attempt to upload a file that would exceed
   your quota, the progress bar should not remain visible
   and the submit button should not stay "Uploading..."
 - if you complete a migration upload and start another,
   you should not briefly see a 100% progress bar
   appear before going back to 0 and starting again
 - if you attempt to start a migration that requires an
   upload without actually choosing a file to upload,
   you should get an appropriate error and the
   "Uploading..." message should not persist

closes LA-1112

flag = none

Change-Id: I632885b1b8cf257f087cda9577867e2a21840785
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239555
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-06-19 05:30:56 +00:00
Jacob Burroughs 8e9cac93eb Make account registration work for keyboard only
Change-Id: Iaa882c863e1ea540bc1cd6a61313507cccfea741
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240098
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-06-18 22:17:11 +00:00
Ed Schiebel 1ac5fd4fb7 Update tinymce to v5.3.1
closes LA-991
flag=rce_enhancements

Replaced a few toolbar icons with the instui versions for consistency.

test plan:
  - specs pass and everything still works

Change-Id: Ibb488d6df2457f2e41138e40b3b3d9469eb68215
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239388
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2020-06-17 14:25:53 +00:00
Jared Amen 2639e16aac Add progress indicator to assignment file upload
test plan:
  * upload a file >= 100 MB in size for an assignment submission
  * you should see a progress circle indicator next to the
    submit button while the file is submitting.

fixes LA-615

flag = none

Change-Id: I1cc7a724c9da17ea45477ef72c5a82f1c7eb5ee4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239815
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2020-06-15 22:20:44 +00:00
Jeremy Stanley 4055ee5a95 add onProgress option to uploadFile / ajaxJSONPreparedFiles
test plan:

this should be tested in conjunction with a commit that adds
an onProgress option to $.ajaxJSONPreparedFiles to report upload
progress

flag=none

refs LA-615

Change-Id: I1ffe941938ba3e677af3450158c67486587df2ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239464
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2020-06-15 15:43:31 +00:00
Ed Schiebel 5722072214 fix decorative images in the rce
RCE images used to be identified by the presence of the data-is-decorative
attribute, and no alt text.This caused a11y audit failures. The new
approach is to mark the image with role="presentation" and leave the allt
text alone. This has the nice side effect of letting the user change her
mind about being decorative w/o losing the alt text.

The image options tray no longer disables the alt text textbox.

closes LA-1116
flag = rce_enhancements

test plan:
  - embed an image in the rce (having some text around it will be
    helpful later)
  - click on it and Options
  - in the Image Options tray, check the "Decorative Image" checkbox
  - click Done
  - inspect the image
  > expect role="presentation" to be present
  > expect the alt="your text here" to be present
  - click the a11y audit button
  > expect the image to pass the audit
  - save the learning object you were working in
  - read the resulting page with a screenreader
  > expect the image to be skipped over

Change-Id: Ia0aadd1d65fe207af0b676464078b08e98285761
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239726
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-06-11 22:00:49 +00:00
Han Yan 34e424c408 fix pressing enter update quiz question scores in SpeedGrader
flag = none

closes QO-625

test plan:
- create a classic quiz and take it as a student
- in speedgrader, input a score for a question and enter
- score input for the question should be updated

Change-Id: I61f9d29896d638a3fa1d0b20e8159dc12fb1dce9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238376
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
2020-06-10 18:33:27 +00:00
Cody Cutrer f5d2e8ef15 add Sign in with Apple icon
also make sure it reads correctly with their silly branding

refs USERS-604

test plan:
 * add _just_ apple auth provider
 * go to /login/canvas
 * it should read "Sign in with Apple"
 * add another well known auth provider, like GitHub
 * go to /login/canvas again
 * it should only have the icons
 * remove the apple auth provider
 * go to /login/canvas again
 * it should read "Login with GitHub"

Change-Id: I100dc2e4b2609bd097c2ce0337212b83af3bddbd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239413
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-05 21:31:51 +00:00
Davis Hyer 30449ebc71 limit keyboard shortcut dialog to '?'
fixes KNO-483
flag=none

Previously, we had a few pages that supported keyboard
shortcuts for opening the dialog modal. For most pages,
a user could press ',', '?', or '/'. Our docs heavily
referenced using the comma, sometimes mentioning support
of the question mark. Because the comma is reserved in
NVDA, users navigating Canvas with NVDA could not access
the modal via the comma shortcut. This commit changes
the shortcut to consistently ONLY support '?'.

see https://community.canvaslms.com/docs/DOC-2061-accessibility-within-canvas
for more info on the pages that support keyboard shortcuts

test plan:
  - for each of the following pages, this should be true:
    - pressing ',' should not open the shortcut modal
    - pressing '/' should not open the shortcut modal
    - pressing '?' should open the shortcut modal
  - Assignment index (/courses/:id/assignments)
  - Discussion Topic show (/courses/:id/dicussion_topic/:id)
  - Gradebook index (/courses/:id/gradebook)
  - Course Module index (/courses/:id/modules)
  - SpeedGrader index (/courses/:id/gradebook/speed_grader)

qa risk: low

Change-Id: Ifc95d141afb598f1996913735fe724a2ee60e573
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2020-05-29 21:32:14 +00:00
Laura Gonzalez-Horwitz 4b39e744b8 Add Balsamiq Sans as k6 theme font
flag=canvas_k6_theme

Refs UXS-110

Test plan:
1. Turn on RCE Enhancements and Canvas Elementary Theming flags
	You can turn them on at the admin level
	You can turn them to 'allow' at the admin level
	and on at the course level
2. Navigate to any page with RCE. Ex. Syllabus tab in any course
3. Edit the RCE content.  By default,
	the font should be Balsamic Sans
4. Open the hidden menu (Option + F9)
5. Select Architect's Daughter font
6. Add an additional line to the RCE content
7. Close the editing mode
8. The text should be in the fonts in which it was typed

Change-Id: I3045ea638dfcc044869295369d976d496c5e8657
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238298
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
2020-05-22 22:33:04 +00:00
Adrian Packel f7e168c77b Submit only one comment at a time in SG
Do not attempt to submit comments in SpeedGrader if a submission request
is already in progress. Although we already disable the "Submit" button
while waiting for a response, navigating between students would still
attempt to record the current comment text as a draft (even if the user
had already explicitly saved it) without checking whether a request was
in progress.

flag=none
fixes TALLY-620

Test plan:

- Have a course with an assignment and some students
- Open SpeedGrader for the assignment

- Ensure the server will take a while to process comment requests
  - To do this, you can make a change on the server to force a reload
    (e.g., add a line to update_submission in gradebooks_controller),
    or get yourself a terrible internet connection if you're not testing
    locally.

- Ensure non-draft comments aren't wrongly saved as drafts:
  - Type some text in the comment box for a student
  - Click "Submit"
  - Immediately start hitting the "j" and/or "k" keys with great vigor
  - This should *not* cause a zillion draft comments to be saved
  - Eventually the actual submission request should finish, and should
    add a non-draft comment for the intended student (and only that
    student)
- Ensure draft comments only get one copy saved:
  - Slow down your server again, as above
  - Type some comment text, but do not submit it
  - Using the arrow buttons at the top, furiously move between students
  - This should *not* cause zillions of draft comments to be saved
  - Eventually, the actual draft comment should be saved for the
    intended student (and only that student)
- Ensure the more civilized behavior below works as expected:
  - Submitting a comment and calmly waiting for the submission to go
    through
  - Typing some comment text, switching students, and waiting for the
    draft comment to be saved without making a ruckus
  - Typing some comment text, closing the page, and then re-opening the
    page with no hullabaloo (the text should have been saved as a draft)

Change-Id: I57e0781333c763ba22842749f0130fe6c21eb319
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/237373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2020-05-22 15:00:11 +00:00