flag=none
We've got a new locale-sensitive URL which added a line
to the static en.json file, so it gets dirty every time
translations are built. The "correct" version needs to
be on master to avoid dirtying local dev repos.
This is just one big long one-line JSON, but Gerrit's
change highlighting will make it easy to see what has
been made different.
Test plan:
* You agree with the change
Change-Id: Icdffe47a17eea4e0cb78c23ebded2348dd88947a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310852
Reviewed-by: Aaron Shafovaloff <ashafovaloff@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>
Refs FOO-3069
flag=none
We've got a new locale-sensitive URL which added a line
to the static en.json file, so it gets dirty every time
translations are built. The "correct" version needs to
be on master to avoid dirtying local dev repos.
To make this easier to review, the actual change in en.json
was the addition of the line:
"community.basics_find_url" : "https://community.canvaslms.com/t5/Canvas-Basics-Guide/Where-do-I-find-my-institution-s-URL-to-access-Canvas/ta-p/82",
That can be a little hard to pick out from the smashed-
together one line version.
Test plan:
* run script/canvas_update
* your master branch should still be clean
Change-Id: I233b91432e8a7e89c3b3a118472fc2907306071e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310065
Reviewed-by: August Thornton <august@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>
One tricky bit I had to deal with here was migrating developer_key scopes
refs MAT-1140
flag=none
test plan:
- jenkins passes
- canvas still runs
- you can set|change the course image on the course settings page
- you can upload an image from the rce
- Unsplash does not show up on the /plugins page
Change-Id: I36a88bcba0cd6f39a45a61ea38ede39f99d58a42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308631
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Deyvison Penha <deyvison.penha@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Deyvison Penha <deyvison.penha@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Refs QO-896
Closes FOO-3063
flag=none
The JSON generator for I18n translations was fixed
to include explicit objects for the various language
plurals, which forced a change in the fallback English
translation JSON. This change should be committed.
Test plan:
* none
Change-Id: I78e751348a843d348c1418f2f5c560153a7e8062
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299289
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
This PS adds the new add account calendars modal, and some
refactoring in the sidebar and calendar to support dynamically added
contexts
closes LS-3252
flag= account_calendar_events
Test plan:
- Enable the “Account-level calendars” flag in the site admin account
- Go to the calendar and expect to see the “+” button to add
calendars
- Click the “+” button and expect to see the Add other calendars
modal
- Expect to see the number of available calendars to search through
in the search bar
- Select some accounts and save the changes
- Expect to see the new enabled accounts in the sidebar in the
“Other Calendars” section
- Expect the new calendar to be functional as the other contexts.
- Open the modal again and type some random text in the search bar
and expect to see the empty state.
- If you don’t have +100 account associations you can modify the
calendarsPerRequest prop of the AccountCalendarModal to something
like 2 to generate the show more option
- Press the “Show more” option until you fetch the total of available
calendars and expect not to see the “Show more” option anymore
Change-Id: Ib2bd6decd574d18e5295a97c9b37fc52c0c98498
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/298602
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: Allison Howell <allison.howell@instructure.com>
Refs FOO-2801
flag=none
The "flatten translation files" commit caused i18n_generate_js to
alter the en.json file. Assuming it won't change very much, this
just commits the new one.
Test plan:
* builds succeed
Change-Id: Ife3d6dd47774bcc6be1ba32d595487f2c4266585
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294907
Reviewed-by: Jacob Burroughs <jburroughs@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>
refs FOO-2801
flag = none
[change-merged][build-registry-path=jenkins/canvas-lms/foo-2801]
[pin-commit-analytics=4fd9e2fbb7fc2790ba7985bb4025e901bf33a9e3]
this part reaches the goal of this series where we turn the locale
files that are used by our JS engine into plain JSON files that don't
need any special processing and are also of a simpler structure
before, translations were stored in a tree structure that we needed to
traverse in order to look up a translation, which we did by
deconstructing keys through the "." operator:
I18n.lookup("foo.bar.baz")
{
en: {
foo: {
bar: {
baz: "Hello!" // <-- this
}
}
}
}
now, translations are stored in a flat dictionary structure where the
keys are not processed in any special way but are instead "fully
qualified":
I18n.lookup("foo.bar.baz")
{
en: {
"foo.bar.baz": "Hello!"
}
}
this is nice when you consider that the previous structure contained a
mixture of nested keys and flat ones, based on different conditions:
{
en: {
"asdf_1234": "ASDF", // inferred, so it was never "nested"
"foo": {
"bar": {
"baz": {
"one": "One banana",
"other": "Many many bananas"
}
}
}
}
}
because, for example, keys that are inferred by i18nliner end up at
the root level and not nested. You also never knew whether a key was a
container or a phrase that was pluralized, because they both had the
shape of an object.
Now these distinctions are gone; a key is always fully-qualified
regardless of how it was specified:
1) inferred: I18n.t("Inferred key")
// => inferred_key_c49e3743
2) absolute: I18n.t('#buttons.cancel')
// => buttons.cancel
3) relative: I18n = useScope('outer')
I18n.t('something', 'Something')
// => outer.something
4) nested: I18n = useScope('outer');
I18n.t('something.inside', 'Something inside')
// => outer.something.inside
5) pluralized: I18n.t({
one: 'One banana',
other: 'Many bananas'
})
// => many_many_bananas_ce8e7fb7.one
// => many_many_bananas_ce8e7fb7.other
Change-Id: I7c33fbd2321d7d56994223d65f2572db0ac12ed5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293675
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
refs FOO-2801
flag = none
[change-merged][build-registry-path=jenkins/canvas-lms/foo-2801]
gems/canvas_i18nliner is now a package @instructure/i18nliner-canvas and
lives in the same repo on github along with the 3 other i18nliner
libraries.. this was done to make it easier for maintainers to deal with
this code, since changing one part may break the other due to how
they're architected
the source on github: https://github.com/instructure/i18nliner-js
~ test plan ~
build is still OK, this only affects the generation of files, and those
i manually verified to be identical before and after
Change-Id: I78afa8a808f1699c10aced8466cfade066848bc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294209
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
refs FOO-2801
flag = none
move implementation of Rake tasks into their own Ruby modules so that we
may more easily test them; the Rake tasks will do any necessary IO while
the stuff in lib/ will be confined to the logic
~ test plan ~
we can still run i18n:check and i18n:generate_js
Change-Id: I14526acb41d3efec3a27cd6435a853a515ba41b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292205
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
closes EVAL-2304
flag=updated_mastery_connect_icon
Test Plan:
- Turn FF OFF
- Create a Mastery Connect Assignment
- ensure the old icon is displayed in the assignments and modules
list for students and teachers
- Turn FF ON
- ensure the new icon is displayed in the assignments and modules
list forstudents and teachers
Change-Id: Ic8aba10592c0cba3fae393d00b8768355a83519f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287726
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Refs FOO-2645
flag = none
Looks like something messed with the _core_en.js translations file
in a previous commit, which is now making a test fail. This fixes that.
Test plan:
* Tests pass
Change-Id: I0d5dae00f9d90417437c783a9d7561f2867592d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286062
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
refs FOO-2645
flag = none
this applies the first two codemods: updatePropNames and updateV7Props.
We can still remain on v7 at this point.
To reproduce this:
- clone github.com/instructure/instructure-ui
- activate node 14 and run "yarn install"
- apply the first mod with this command:
npx jscodeshift \
-t packages/ui-codemods/lib/updatePropNames.ts \
--config=packages/instui-config/codemod-configs/v7/propNames.config.json\
~/src/canvas-lms/ui
- apply the second mod with this command:
npx jscodeshift \
-t packages/ui-codemods/lib/updateV7Props.ts \
-fileName updateV7PropsWarnings.txt \
~/src/canvas-lms/ui
substitute ~/src/canvas-lms with the path to ur canvas installation
~ TEST PLAN ~
~~~~~~~~~
not sure if it's reasonable to be spot-checking all the affected sites,
we should be able to rely on the test suite for that, but it won't hurt
to look and click through things
Change-Id: Ie120b773550633f418fae5635d1943083a65005e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285028
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
refs FOO-2720
refs DE-1022
Currently, translations are compiled on a per-scope level. The primary problem by doing this is that each generated scope file contains the translations for all languages, leading users to needing to download translations for languages they will never use.
Instead, we now generate a single translations file per language. This file is loaded and cached by the browser at the beginning of page load.
[change-merged]
[build-registry-path=jenkins/canvas-lms/de-1022]
Change-Id: I64b0d054b04e3d81bb7263650481d1d3fe9a4868
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284285
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fixes MAT-525
flag=none
Test Plan 1:
- Click on 'Admin' option and click on the user
- Go to 'Themes' and select 'Minimalist'. It is possible
that you need to save it with an alias before applying
changes
- On 'Themes', right-click on the 'Current' card for the
applied theme. Check for the following property:
.ic-ThemeCard-status.ic-ThemeCard-status--is-active-theme
- The "background" value is #0B874B (one of the required
values)
NOTE: this also applies for the 'Apply theme' button
Test plan 2
- Click on 'Account'
- Right-click on the avatar element and check for the
property --Avatar__elMgc-Color. Value is #0374b5.
Changes apply as expected
** ADDITIONAL DETAILS **
- Considering the number of modified files, the
changes made may affect many different options
that aren't listed here, so the support and
validation from other teams related to the
nature of this fix is being requested.
Change-Id: I973a081d18fee74fa1e4f4b904760276e303b124
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280894
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes OUT-4483
flag=improved_outcomes_management
test-plan:
- enable flag
- visit accounts/self/outcomes
- switch to mobile viewport
- open up the Find modal
- verify you can navigate groups and click on the
action link to view outcomes within that group
- verify exiting and reopening the modal resets the state
and restores the default view
- verify the Find Outcomes Billboard is present until
the action link is clicked
- repeat steps for a course
Change-Id: If5ccfcf21d713b354efed101bc39212280dbf6ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269884
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Ben Friedman <ben.friedman@instructure.com>
flag=improved_outcomes_management
closes OUT-4595
test-plan:
> enable flag
> click on an outcome group at the account or course level
> create a new group within it via the move modal
> refresh the page
> click on the newly created group via the tree browser
> verify there is a message indicating that there are no
outcomes in the group
Change-Id: I6ffe17a33d809ce7945d4f276f4a39d77485b5d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269892
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Ben Friedman <ben.friedman@instructure.com>
closes OUT-4486
flag=improved_lmgb
test-plan:
- run a canvas:compile_assets before testing
- with the flag off, visit the LMGB within a course
- verify no change to functionality
- enable the flag
- verify visiting the lmgb now gives a outcome
proficiency rating filter at the top of the screen
- verify each rating can be disabled
- verify the ratings shown reflect the resolved
outcome proficiency of the course and that there is
another rating for 'not assessed'
Change-Id: I684f6f0b86bd9df2de7177a8b7fbe1bd63d89778
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265643
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
Product-Review: Jody Sailor
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Manoel Quirino <manoel.quirino@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
refs FOO-1808
flag = none
Change-Id: Ia45e21324fca452f43ed000f5daa8bead27a3505
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263015
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: Simon Williams <simon@instructure.com>
fixes: EVAL-522
flag=none
Test Plan:
Prerequisite: Have a course with any number of students enrolled.
1. Create an online submission assignment with a past or soon due date.
2. Wait until the due date has passed.
3. Go into SpeedGrader and notice the 'Missing' label is present.
Change-Id: I6086877b4b7f2ecbca75e64803945093f4197f52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259106
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
refs INTEROP-6636
flag=none
* open new tab/window or a popup window depending on the message
the tool sends
* include new data from the tool like placement (so that deep linking
launches work), type of window, and width/height of popup
* keep a reference to opened window and close it when the dialog that
opened it also closes
* send postMessages to window.opener if present, instead of
window.parent - helps with tabs/popups opened by the page
* include the canvas placement in the LTI 1.3 launch token, in the
custom claims section - this is required so that the tool can pass it
in the full window launch request, so that Canvas knows whether it
should use a normal launch or a deep linking launch
test plan:
* make sure associated commits for the test tool and safari gem are
checked out and set up, see the test plan for those
* in safari, create a new assignment of type external tool
* choose the test tool from the list of tools
* it should tell you that it needs to open in a popup
* click the button and a popup should open (note: you should not have
Safari in fullscreen mode which is a bummer)
* you should click submit on that form to return a resource link
* the popup should close and the external tool dialog should have a
url in it, like normal
Change-Id: I46dc47cca7f26140041b6a638a8056a7cc0843db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261771
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Renders the modules server-side and puts them in a hidden div, which
is set to be visible when the modules tab is active.
closes LS-2024
flag=canvas_for_elementary
Test plan:
- As a teacher, visit a k5 course
- Click on the modules tab, expect to see the modules (as you'd see
them in a classic course)
- Also, expect expand/collapse button to work as expected (had to
tweak some of that code)
Change-Id: I4f5c9ae885f6cddca4020d14aef8e13c0c5cad8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261880
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
closes LS-2111
flag=new_math_equation_handling
I thought we'd get into trouble asking MathJax to process nodes
it had generated, but it was breaking existing content where there
is legitimate content inside <div class="MathJax_Displah"> divs
(see https://coastdistrict.instructure.com/courses/79832/discussion_topics/835725)
Let's not do that for now, and think some more about how that got in there.
test plan:
- create some content with the RCE
- in the HTML editor, add something like
<div class="MathJax_Display">
<use eq editor to insert equation here
</div>
- save
> expect it to get typeset by MathJax
Change-Id: Ifea3cf25c93692a64265ba66b5683b179f673a13
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262217
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes LS-2105
flag=new_math_equation_handling
This change adds a math processing error handler that will remove
offending the MathJax output.
test plan:
- i have no idea how to trigger the error. All I know is that
it worked on
https://coastdistrict.instructure.com/courses/79832/discussion_topics/835725
Change-Id: Ifbf763b51733ea0f7622975a4d902bb9d3fb6ef7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262142
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
closes LS-2002
flag=rce_enhancements
The location of the div containing the RCE is before the textarea
in the old RCE and after in the new. Tweak the jquery form validation
to find the div in either case.
test plan:
- create a text entry assignment
- as a student go to submit, but click Submit with nothing
in the RCE
> expect the "Required Field" top to be pointing at the RCE
> expect 1 TAB to put you inside the RCE's content area
- the same should work with creating a global announcement
- if you can think of a place where there's a textarea that's
NOT associated with an RCE and undergoes jquery form validation,
(I don't think there are any) it would be good to test that too
Change-Id: Ibcffa37cd8bb957c68313e593ef69c66c4a90d57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262109
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: Ed Schiebel <eschiebel@instructure.com>
Closes FOO-1803
flag = none
Even though speed_grader.js is in public/javascripts instead
of app/jsx, it still makes use of React and InstUI. No code
changes, just the imports.
Test plan:
* speedgrader still works, especially Buttons, TextAreas, Pills,
and Tooltips.
Change-Id: I0b82e219b721fd65b64a5946c915664f83d7a78c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262054
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
closes QO-714
flag=none
test plan:
- create an OAAT old quiz with file upload questions
- upload a file and click Next before file upload is done
- a confirm box is pop up with warning messages
Change-Id: Ib34838463a8965c50a44f174364d4e5b8de9c58f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261751
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
refs LS-2076
flag=none
test plan: it's automated so should be good but if you want...
- make sure RCE Better File Previewing is ON
- create a new page
- add a link to a previewable course document (like a pdf)
- switch to html editor
- edit the href to end in `/:fileID/preview`
- eg `/courses/1/files/1/preview`
- switch back to rce editor
- select the link > Link Options > preview inline
- save the page
- click the file link > should open previewer inline
Change-Id: Iebe67af22f0a4fd83d6be98386b6eea2714fda60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261809
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
fixes LS-2076
flag=rce_better_file_downloading
test plan:
- Create a new page
- Link to a course document
- Switch to html editor
- Change the href of the a tag to end in `/:fileID/preview`
- Save the page
- Verify that link has a download button
- Clicking the link should preview the file
- Clicking the download button should download the file
Change-Id: I4751f2ffc1043c1c3bd23310817b82ef34a7ed7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261674
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
When the two respective flags are on, add the file download button
next to announcement attachment links on the homeroom page, and
clicking on attachment will open preview overlay.
flag=rce_better_file_downloading,rce_better_file_previewing
closes LS-1946
Test plan:
- Create an announcement with an attachment in a homeroom course
- Go to the (k5) dashboard
- Under the announcement, expect to see a link to the file
- Clicking the link should open a preview overlay (though the file
won't show unless you have canvadocs enabled)
- There should be a download button next to the link which downloads
the attachment
Change-Id: I0076550de559a9537e6c0c865ca405ca222d17cd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261535
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
closes LS-2055
flag=rce_better_file_downloading
test plan: automated :)
If you want extra credit:
- Enable 'RCE Better File Downloading'
- Create a new page with:
- course link (like a page)
- edit html and add class='instructure_file_link' to the `a` tag
- external link (like http://google.com)
- link to a document (like a pdf) and keep it a link
- The Course Link should not have a download button
- The external link should not have a download button
- The document link should have a download button
Change-Id: I8136175164341cb844ad9036b371b956db810ff0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261507
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Guardado <jonathan.guardado@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
Test plan:
- Create an annotated document assignment
- Open the assignment as a student
- The document iframe should display
Refs EVAL-1366
flag=annotated_document_submissions
Change-Id: I781038d78ed95965a57b417388fe1288e9557a28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260502
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
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>
When replacing the image for the math_equation_latex wrapper, the
style from the image is copied to the wrapper before removing the
Image from the DOM, with this the new wrapper will keep the style
including the alignment.
fixes LS-1941
flag=none
Test Plan:
- Enable the feature flag Math: Updated equation handling on the
account level
- Edit or create a page in a course to see the RCE
- Use the "insert math equation" button on the toolbar to insert an
equation image
- Use the "Align" button on the toolbar to center the image on the
page and save the content
- Notice the formula gets rendered in the expected position keeping
the alignment.
Change-Id: Ie2a90dc4b24236dacb34d8183b7c0066eaa8b196
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260985
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
closes LS-2032
flag=rce_better_file_downloading
test plan:
- with the rce better file downloading flag on
- in the rce, add an external link
- in the rce, add another external link, edit the HTML and add
class="instructure_file_link" to the <a> element
- in the rce, add a file link
- in the rce, add a youtube link using the external link dialog
- save
> expect only the file link to get a download button
> expect the youtube link not to get a preview thing
Change-Id: Ifab8f8957ca1c7b1fcc9a84b81254dc73fbbcd22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260719
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes LS-2020
flag=none
test plan:
- in the RCE, add a file link and enable auto-open of the inline preview
- edit the HTML and remove the instructure_file_link class name from
the link
- save
> expect the link's preview to auto-open
> expect this to work with the rce_better_file_previewing and
_downloading flags on or off
Change-Id: I2c17561cd0f6d6ec534031187624f8fc6feed598
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260632
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
When adding the icons for the LTIs in the RCE, there is a parse
error trying to assign an object when a string is expected, the
provided fix is to validate the parameter before the assignation.
For fixing the second problem about blocking the possibility to add
an LTI with ‘Editor button’ placement inactive to the RCE, some
callbacks and validations were added when the placement is set
to active/inactive.
fixes LS-1940
flag=none
Test Plan:
Issue 1:
- Having a course with RCE Enhancements enabled
- Go to your account configuration and add one LTI to RCE
- Set at least one of the placements for the added LTI to inactive
- Create or edit a course to display the RCE
- Then the LTI icon should be rendered in the toolbar
Issue 2:
- Go to your account configuration and add another LTI to the RCE
- Set the ‘Editor Button’ placement for the added to inactive
- Then the toggle button is removed from the UI
- Change the ‘Editor Button’ placement to active
- Then the toggle button is added back to the UI
- Add a LTI to RCE and then set the ‘Editor Button’ placement to
inactive
- Then the LTI will be removed from the favorite apps list and
the toggle button will be removed from the UI
Change-Id: I83599f6a6d3feff2ef403b9fcd18e7d0b5626a51
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260197
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
refs FOO-1408
flag = none
This reverts commit c904d83673.
Original commit 9af1badd2f.
I've also made an adjustment where you may only include a directory and
not a specific file so that we don't make it possible to configure
outside of an ".i18nrc" file (a measure to eliminate surprises that's
all)
before:
{ "include": [ "path/to/dir/.i18nrc" ] }
now:
{ "include": [ "path/to/dir" ] }
:: test plan
run "rake canvas:compile_assets" and visit any page with JavaScript
text, that text should display correctly
Change-Id: I320ec4056270647835035f45501d310b18d9cb25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258178
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
fixes OUT-4268
flag=reassign_assignments
test plan:
- Enable "Reassign Assignments" and "Assignment Allowed Attempts"
feature options
- Create an assignment that allows up to 2 attempts with
a due date
- As a student, submit to the assignment
- As a teacher, reassign the submission in SpeedGrader
- As a student, resubmit to the assignment
- As a teacher, confirm that the assignment cannot be
reassigned anymore.
Change-Id: I7632a569b33ae555f01b2ffca8f024ac84cabb6c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259301
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
closes OUT-4269
flag=reassign_assignments
test plan:
- Enable "Reassign Assignments" feature option
- Create an assignment with a due date
- As a student, submit to the assignment
- As a teacher, reassign the submission in SpeedGrader
- Confirm that the reassign button now displays "Reassigned"
Change-Id: Iebc6c52114a0265b86ab8bd3cc7f137af591f229
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259331
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Jody Sailor
closes LS-1925
flag=rce_better_file_downloading
This fixes a bug introduced with LS-1910. We mistakenly removed
/download from the end of the file download URL. While this works
in a dev environment, it does not in a prod-like env.
This change ensures the URL's path ends with 1 and only 1 /download
test plan:
- either create a file link in the old rce, or create one in the
new rce and edit the href to append /download to the url's path
- save
> expect the path part of the href on the link behind the download
icon to end in /download
- click on the download icon
> expect the file to be downloaded
Change-Id: I7e73aa46ec04f8c6c7914e7d020d84cc37d83ff2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259292
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes INTEROP-6315, INTEROP-6319
flag=none
test plan:
* Have an LTI tool installed with homework submission and RCE editor
placement enabled;
* Have a Course recorded;
* Have a Student enrolled to this Course;
* Have an Assignment recorded to this Course;
* Have LTI links added to the RCE editor in that assignment (later,
we'll check if this link still working because we're changing the
resource_link_lookup_id to resource_link_lookup_uuid LTI tool launch
parameter)
* As a Student you should be able to access the Assignment to submit your
homework. At the submission homework page you should be able to find
LTI tool (usually rendered in a tab);
* Specify the custom params do you want to record, and submit it from the
tool. You can add some comment too, and click to the submit assignment
button;
* When accessing the Submission Details page you should be able to see
that the tool was launched. At this point, the tool is launched via m
eta refresh tag https://www.w3.org/TR/WCAG20-TECHS/H76.html.
You can check the application logs to see that a request was performed
with resource_link_lookup_uuid parameter and you could check that the
custom claim contains all custom params specified in the previous step;
* As a Teacher/SiteAdmin when accessing the SpeedGrader via Gradebook
page you should be able to acces the homework submission via tray.
After selecting the desired student you should be able to see the tool
launched via iframe and the src URL should have the
resource_link_lookup_uuid (I did this by inspecting the HTML elements)
parameter. You should check if the custom claim has all expected
parameters;
* You can Re-Submit a homework with different custom params to check
that the custom claim was changed and was generate a new resource link
(resource_link_lookup_uuid);
* Check if the LTI links added to the RCE editor still working;
* Add new links to the RCE editor and check if is working as expected;
[fsc-timeout=30]
Change-Id: I00c2bcdc02c7a5134efff1deff836657071067fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256716
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
closes LS-1911
flag=rce_better_downloading
test plan:
- with rce_better_downloading flag on
- in the old rce, create a link to a .txt and a .pdf file
- view the result
> expect the download icon next to both files
Change-Id: Icbc0d15f34fcfb1433bb5a80299c4f2408f4892b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259023
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes LS-1910
flag=rce_better_file_downloading
The old RCE included '/download' in the file URL's path, and the
download buttton added another '/download'. We don't really need
/download in the URL to make the file download, so don't add it.
test plan:
- either create a file link in the old rce, or create one in the
new rce and edit the href to append /download to the url's path
- save
- click on the download icon
> expect the file to be downloaded
Change-Id: Ib8eb9db70950b1f4341668b2b256bdb76a69008b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259009
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
fixes QO-667
flag=none
test plan:
- create a classic quiz and add a numerical answer
question
- add a precision answer with at least two numbers
to the left of the decimal and at least one
to the right
- e.g. 99.9 with precision 3
- preview the quiz and attempt to answer correctly
- after entering an answer, see that trailing zeroes
are not added to a total of 16 decimal points
- e.g. 99.9 must not change to 99.9000000000000057
Change-Id: I575843ee6d115d9966558c78b649a539c7d58d36
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257300
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
with formula questions in classic quizzes
fixes: QO-630
flag=none
test plan:
- create a quiz and create a formula question.
- in the stem of your question define 2 variables.
- for the first variable, in both the min and max,
put 14.2 (with 1 decimal place)
- for the second, put 3.3 with 1 decimal place.
- for the formula enter the first variable minus
the second divided by 2.
- when you generate the results, set them to show up to 1 decimal place.
- the result must be 12.6
Change-Id: I42e1831814bdf82f8fd19268d1857d0e6c34aa57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258249
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
When an assignment is date locked and in a future module, it displays as
locked due to prerequisites instead and links to the previous assignment
in module order. It should instead display that the assignment is locked
until a specific date.
closes EVAL-1416
flag=assignments_2_student
Test Plan:
- Have course with at least one student
- Create an assignment that is not yet available until a future date
- Create two modules
- Put the assignment just created in the second module and anything else
in the first module besides the title
- Navigate to the assignment created as the student and make sure the
correct date is displayed as to when the assignment will be available
- Ensure it doesn't mention or link to any prerequisites
Change-Id: Ib4a4d4a977d38135838c44ff97adfce650b175fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257710
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>