Commit Graph

42166 Commits

Author SHA1 Message Date
James Butters 945f7358b3 improve rebase when running canvas_update script
no longer forced to switch branches, just rebase master on top
of current branch.

flag = none
closes: DE-363

Test:
- Jenkins docker build passes
- run canvas_update locally with local branch

Change-Id: I6fc7c23d6b18f44a2824a717006cac5974e79307
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252029
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-11-11 20:24:45 +00:00
Ethan Vizitei 5bc6efa368 don't explode when there's a dot in the path
closes FOO-1194
flag=none

If people manually construct paths trying
to target a specific file, instead of
a simple failure the react_files
endpoint would try to render a template
in the format of the file extension.

TEST PLAN:
  1) create a folder in a course
  2) visit a path UNDER that folder with
     a dot in the path (doesn't matter whether
     it exists or not) like
     /courses/3/files/folder/MyFolder/my_file.css
  3) you should be taken to the files area for the
     contextual course, not a page error. (404
     response from the API will occur in the network
     panel still for non-existing file)

https: //github.com/rails/rails/issues/28901#issuecomment-297747521
Change-Id: I7384af5bc0a684dc580907ae7f5f5f959387ad15
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252507
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-11-11 19:29:09 +00:00
Matthew Lemon 43f6f67d4e create MessageBody component for canvas inbox
fixes VICE-855
flag=react_inbox

Test Plan:
- navigate to client_apps/canvas_inbox and run yarn install
  && yarn storybook
- type in the text area and note the actions tab in storybook
  should reflect the typed changes

Change-Id: I2939a5fbf44a45a0fad6ea405f7cdda7ac758572
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251899
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
2020-11-11 18:02:20 +00:00
Robin Kuss f3c955858e spec:rce full screen view test
Closes LS-1540

Test Plan: Runs through Jenkins a few times

Change-Id: I23ab215573c0ab93afb64ae7a277a69e53720612
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252395
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: Robin Kuss <rkuss@instructure.com>
2020-11-11 17:48:27 +00:00
Evan Francis b03b00a36a Outcome Export - handling account mastery scales
closes: OUT-3973

flag = account_level_mastery_scales

test plan:
1.Create account level outcome, fill out the description
2.Check that new outcome has ratings and calculation method
3.Run the Outcome_export report
4.Turn on FF
5.Re-run the Outcome_export report
6.Validate the presence of score information in first report
7.Validate the absence of score information in second
8.Validate all other information is the same
9.Check the updated information button

Change-Id: I61032f4ae16cb9b5b78ab31c9992b9da20b05a76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252211
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Jody Sailor
2020-11-11 17:08:48 +00:00
Adrian Packel 5285cd9f22 Add override score import release flag
closes EVAL-1291
flag=import_override_scores_in_gradebook

Test plan:
- Check that the feature flag exists on the site-admin level
- It doesn't do anything yet

Change-Id: I36fca7bb32af9118fa0453b79e1fac80d46c2585
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252510
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: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-11-11 17:05:13 +00:00
Brian Watson 774563a9cf Sort proficiency ratings upon save
closes OUT-3972

flag=account_level_mastery_scales

Test-plan: - Enable Account-Level Mastery Scales
 - Add a new rating that contains a point value equal to something
   that exists already. Verify that an error is displayed denoting
   that unique point values are required. Focus should be set to
   the points value
 - Add some profiency ratings with varying points and ensure that
   the proficiency ratings are re-ordered upon submission
 - Shuffle the ratings up and down by changing the point values,
   make sure that the Mastery sticks with the rating it was previously
   assigned to.
 - Do the same as above but with color
 - Verify that the |Save| button is enabled/disabled as expected

Change-Id: I986113f84677ad896210ea9b088d573963408d06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250186
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Jody Sailor
2020-11-11 17:01:20 +00:00
Adrian Packel f242ddcfa6 Fix curving grades when displaying by percent
fixes EVAL-1268
flag=none

Test plan:
- Have a course with multiple students
- Create an assignment with "Display Grade as" set to "Percentage" and a
  possible point value dramatically different from 100 (e.g., 500)
- In Gradebook, enter grades as percentages for students for the
  assignment
- Select "Curve Grades" from the assignment header menu and choose a new
  average grade that will result in a change to grades, and click the
  "Curve Grades" button
- When the action finishes, the percentages for the new grades should be
  within 0% and 100% and reflect the average grade you chose above,
  rather than, say, ranging from 0% to 500% if you chose a value of 500
  points

Change-Id: If1d165dc027d53054d957798f3f0f6cfd3e8451c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250705
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2020-11-11 16:44:32 +00:00
Jenkins 47763f158b [i18n] Update package translations
Change-Id: I30913ac997652cc25a687bb8bbce670b94105b7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252475
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-11-11 04:49:26 +00:00
Aaron Ogata b9ee898297 add another potential docker flakiness retry
Change-Id: I6d85fe48ade7a3161a5063d9c324294cf0b2314b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252439
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-11-10 22:49:24 +00:00
Charley Kline 792ed47c03 Sort the permission list properly
Fixes FOO-1192
flag=none

The permission list is supposed to be sorted, and in fact the
code tries to sort it before launching the permissions interface,
but it's using a compare function that returns a Boolean instead
of the expected negative, zero, or positive numeric value. Pretty
sure the behavior of `Array.sort()` is undefined in that case,
so no surprise that the list isn't getting sorted right.

Test plan:
* Go to the permissions page
* "Manage Pages" should be in the right alphabetical spot on
  the list and not at the end

Change-Id: I7f2b1fdc28f2677de3834e6c193a65fa3dc082b5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252410
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-11-10 22:14:38 +00:00
Cody Cutrer 260bbd74de properly handle german genitive case on profile settings page
closes FOO-363

note that this commit is supposed to be relatively targeted -
there are other uses of genitives (possessives) in Canvas, but I'm
only doing the one at this time, and only writing more complex rules
for german (and even then, only the one case requested in this ticket).
It's already going to require the string it's placed in to be
re-translated in every language (though for many it won't change).
I want to limit exposure until translators have a working example
of how to form their translations when a noun is already in
the genitive case.

test plan:
 * run with RAILS_LOAD_ALL_LOCALES=1
 * go to your settings page, and change your name to something that ends in `x`
   (say... Max)
 * change your language to Deutch (german)
 * save and reload
 * it should say "Max' Settings"
 * change your name to something that doesn't in in x, z, or s (say... Cody)
 * save _and_ reload (the javascript won't work right; again, this is a
   targeted change. once it's proven, we'll make it more robust)
 * it should now say "Codys Settings"
 * change language back to English, save and reload
 * it should now say "Cody's Settings"

Change-Id: Ief17484c5fd6eb9968a1c74102c06ea4891e5108
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252002
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>
2020-11-10 22:04:31 +00:00
Simon Williams a46383fa3f ensure live events context is torn down on exception
and organize the application controller before/after actions a bit

test plan: even a request that produces an exception should tear down
the live events context. tests should pass

Change-Id: I6bd7a8948d41481bd2060bcfe02e3fc16b5e4a98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252406
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-11-10 21:07:32 +00:00
Evan Battaglia 494207756c Populate root_account_id if only 1 root account
i.e., open-source Canvas users.

Test plan:
- ensure you do not have any courses or groups related to the site
  admin, and have only one root account
- have a variety of records in the different groups of models mentioned
  in the code with root_account_id not filled
- have some developer keys with account_id=null and
  root_account_id=null, and associated account tokens
- run migrations
- check that developer keys and access tokens have root_account_id set
  to the site admin id
- check that the other models have root_account_id filled to the
  non-site-admin root account

closes INTEROP-6275

Change-Id: I1e7057e81555db305f2f143c2d9fa4c1416219e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250763
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2020-11-10 21:04:09 +00:00
Aaron Ogata 82efbe4e8a send patchset link in cache report
[change-merged]
[build-registry-path=jenkins/canvas-lms/better-cache-report]

Change-Id: I9038f2a89ea1f0119dfd76c5d917c4446d8fe79c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252399
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-11-10 20:36:09 +00:00
Cody Cutrer 6d5e9a4ad5 fix Account[.#]sub_account(?:_ids)?_recursive cross-shard
fixes FOO-1091

test plan:
 * call /api/v1/accounts/<id>/sub_accounts?recursive=true addressing
   a different shard than the account is on
 * it should return results

Change-Id: Ib20d6ba07c248eefe3d42c7362f7cc36207145c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252005
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-11-10 20:30:44 +00:00
Ethan Vizitei e6ae468af4 make routes work for media downloads
closes FOO-1186
flag=none

discussion entries and announcements
were generating a lot of failures

TEST PLAN:
  1) make a new discussion entry with a video
     embed.
  2) notification should get sent, and it should
     have a media download url pointing at the
     course the topic lives in

Change-Id: I888a8508bd18ac9e37727eab5ede9e7a0102f184
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252278
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-11-10 20:13:09 +00:00
Aaron Ogata 0070f199be share dependencies cache image between builds
refs DE-370

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-370]

Test Plan:
1. pre-merge build uses cache
2. post-merge build uses cache for post-merge image
3. post-merge build uses cache for pre-merge image
4. post-merge build reuses webpack-builder for pre-merge

Change-Id: Ie5d5eaad2d9da1f324a87020cb70658d42b0bf94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252353
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-11-10 19:27:39 +00:00
Ed Schiebel d3b19810ff Override canvas theme to use Lato Extended font
closes LS-1607
flag=none

With LS-1599 we started loading "Lato Extended" instead of Lato.
Unfortunately this wasn't used by INSTUI which resorted to a
fallback font in the font-family stack. On an Apple device this
was Helvecica Neue, which look an awful lot like Lato and went
unnoticed. On Windows it fell back to Arial which looks markedly
different.

This change overrides the canvas themes with a font-family stack
that includes  Lato Extended.

test plan:
  - With the 'disable_lato_extended' setting not == 'false' (which
    should be the case unless you set it)
  - Load any page with instui (e.g. the student dashboard)
  - See that text in instui components is rendered with
    Lato Extended
    - the easiest way to do this is to use firefox' devtools. Inspect
      the element, then look at the Fonts tab in the right-hand pane.
    - it wouldn't hurt to look at Canvas in Windows to make sur
      it look right

Change-Id: I0ce08d1cffce46210cfbd4a54b7200fadacbf214
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252345
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-11-10 19:01:06 +00:00
Ed Schiebel 9ed2f77a1c Add search to the RCE's course links tray
closes LS-1574
flag=rce_enhancements

Be sure to rebase you canvas-rce-api.

test plan:
  - in the RCE, open Links > Course Links
  - expand one of the accordion sections
  - enter at least 3 chars in the search box
  > expect the list of links to match the search
  > expect focus to remain in the search box
  - open a different accordion section
  > expect the list of links to match the previous search
  - click the x clear button
  > expect to see all the links

  - close and reopen the tray
  > expect the search textbox and clear button to be disabled
    while data is being loaded (the spinner is showing).
  - type something in the search box
  > expect the search box to be readonly and clear button
    to be disabled while data is being loaded

Change-Id: Iae98489ac80098966abbca7c4df0dda4d39b1a7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251029
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: Peyton Craighill <pcraighill@instructure.com>
2020-11-10 18:50:42 +00:00
Mark McDermott 5135c2c16f Fix quiz score miscalculation
The summation of multiple float values can return
an incorrect value due to the way floats are
represented in Ruby.

Closes: QO-493
flag=none

test plan:
- Create a quiz as a teacher with three questions all
  worth 1.3 points
- Get all quiz questions correct as student
- Check gradebook page for request from
  `/api/v1/courses/:course_id/students/submissions` shows
  `grade` and `score` as a decimal number with
  only 2 significant digits
- Check the
 `/api/v1/courses/:course_id/assignments/:assignment_id/submissions`
  for the same behavior

-

Change-Id: I3365a3447107021c223c6da1f7658d97c2336c08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252051
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Han Yan <hyan@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Matthew Goodwin <mattg@instructure.com>
2020-11-10 17:40:38 +00:00
Ethan Vizitei 6829eba640 improve error handling for missing eportfoilios
closes FOO-1190
flag=none

record the ACTUAL error that eportfolio
fetching fails with, and then raise
a specific error that we can handle without
writting an error report.

TEST PLAN:
  1) missing eportfolios still don't render
  2) error report doesn't get written

Change-Id: If52c120205f6520c26c1c6a1d6152f7b7c24c58a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252355
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>
2020-11-10 17:24:09 +00:00
Wagner Gonçalves 797058c228 Add custom variable Context.id.history
We're  adding a new custom variable substitution that returns a string
with a comma-separeted list of course ids in reverse chronological order
from which content has been copied related to the current course.

Requesting partners: (Aug2020: Cengage, Sep2020: Google)

closes INTEROP-6145
flag=none

test-plan:
* Have an LTI tool installed in your local Canvas at a course
level that uses the new custom variable.
* Ensure that your current user is enrolled in at least section
in the course the tool is installed in.
* Launch the tool and ensure that under the custom claims you see
the course ids variable expanded to a string that matches the ids where
the content of the current course was copied for.

Change-Id: Ie8fcabf4303f73cd647325a12b5f92974cdde511
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250268
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-11-10 17:07:34 +00:00
Ethan Vizitei fb08e465aa test students will have deleted comments
closes FOO-1178
flag=none

TEST PLAN:
  1) make a submission comment on a submission.
     Job will get enqueued to build stream items.
  2) delete the submission (before the job runs,
     probably want jobs paused or down)
  3) run jobs, error should get logged in job log
     but not sent to sentry or error report.

Change-Id: I7affd2479bf5e8fbb0173bae3f345ee6ad730348
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252269
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>
2020-11-10 16:01:52 +00:00
Tucker McKnight cb83a398dd spec: Run live events specs if an env var is set
All are being skipped for now due to flakiness, but we'll want to
be able to run them in a separate job.

Change-Id: I2389d826a4161bee4a3678a67f8fbd1596a5f521
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252314
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2020-11-10 00:31:34 +00:00
Ed Schiebel 0fc8ce19f7 New approach to MathJax-ifying equations
closes LS-1601
flag=new_math_equation_handling

The previous approach was to replace the equation image with the
equation's LaTeX in canvas' backend, but not all user content sent
to the browser passes through UserContent.escape. Discussions
and legacy quiz questions included. The backend approach also suffered
from the an ugly visual where the LaTeX is displayed onscreen until
MathJax typesets it.

In a previous commit, I caught Discussion replies in apiUserContent
where the screenreader assistive mathml is injected into the DOM
adjacent to the image. That worked but we now had 2 places
where the replacement was taking place, and quiz questions are
still being missed.

A better approach is to handle it all in a central location, which
is with the code that detects math is on the page. The new approach
is to inject the LaTeX into the DOM adjacent to the image just before
MathJax does its processing, then removes the image when it finished.
This way the equation image is displayed to the user while MathJaX
does its work, and since we look for new math in a MutationObserver
watching the whole document, we never miss any equation images on the page.

Because we are looking for mutations anywhere on the page, there may
be nodes we want to ignore (e.g. the quiz timer). This is handled
by adding to the ignore_list css selector in main.js

test plan:
  - with the "Updated math equation handling" flag on
    (and optionally 'Support LaTex math equations almost everywhere")
  - double check that equations created with the rce equation editor
    are processed with mathjax all over canvas
  > expect equation images to be visible until replaced by MathJax
    typeset versions
  - Discussions:
    - reply to a discussion with an equation (inline and equation editor)
    > expect them to be typeset by mathjax
    - edit a reply and save
    > expect the the reply to have it's math processed by mathjax
  - Legacy Quizzes
    - create a quiz, set it so 1 question per page
    - add a couple questions with equations
    - preview the quiz, moving forward and back thru the questions
    > expect the questions go have their equations typeset by mathjax

Change-Id: I9e2ec4fd53de06748156bbd4adadac7e2b1e205f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252222
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: Peyton Craighill <pcraighill@instructure.com>
2020-11-09 22:38:36 +00:00
Gary Mei 29ca659af5 fix grading when scheme uses 2 decimal places
fixes EVAL-1263
flag=none

Test Plan
- Create a grading scheme with very granular values and 1 of the
  grades has a range less than 1, like so:
  A: 90.95 - 100
  B: 90.50 - <90.95
  C: 80 - <90.50
- In the Gradebook, grade a student with the grade "B".
- Verify that the score saved is 90.94.

Change-Id: I649198a6ab7d6f349974454a3a51fd22c4a59eda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250900
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2020-11-09 22:01:14 +00:00
Davis Hyer b56396e6c7 remove example components
refs VICE-858
flag=react_inbox

test plan:
  - n/a

qa risk: low

Change-Id: I9b88b36d99f4ae2a7dae07a2cd8edd96f58f60f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252277
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Ben Nelson <bnelson@instructure.com>
Product-Review: Ben Nelson <bnelson@instructure.com>
2020-11-09 21:52:01 +00:00
Service Cloud Jenkins aa20fc5df7 Update parallel_runtime_rspec.log from build 104
Change-Id: I4f558bb0cf32a910aa1be71bec3220dea9466e88
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252226
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-11-09 21:00:54 +00:00
Jeremy Stanley 0728b46979 delete submission file from speedgrader
test plan:
 - as a student, submit a file to an assignment
 - as a teacher, view the submission in speedgrader, and note
   that there is a download link (down arrow) to the right of
   the file, but there is not a trash icon
 - as an account administrator, view the submission. you
   should see a trash icon.
    - click it, and you'll get a confirmation prompt.
    - confirm, and the page reloads with the submission
      replaced by "file_removed.pdf"

closes LS-1583

Change-Id: I571cb3666d48936840df14d6bbfd8587ea52a873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251411
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-11-09 20:50:01 +00:00
Wagner Gonçalves d4d6cbeaf2 close tray when LTI tool executed the success return url
When a tool redirects to the success return URL from the
assignment_index_menu placement, we need to close the tray and refresh
the current page to load the new assignments.

closes INTEROP-6264
flag=none

test-plan:
* Have an LTI tool installed in your local Canvas.
* Have a Course recorded.
* The `Assignment Index Menu` must be enabled into the `placements` for
this tool,  in case you need to change the placements, keep sure that
delayed jobs were executed to reflect this new configuration.
* Access the `Assignments` page, click into the `Assignments Settings`
button and then click into the tool;
* After the tool launch into the tray area, you can submmit the success
return url and check that the page was reloaded and the tray was closed.

Into the `lti-1.3-test-tool` we added a button called
`Call the success return URL` that will trigger the success return url.

Change-Id: If81da19060d55240f6a79252e5d9e8932470d405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2020-11-09 19:55:54 +00:00
James Butters e430225103 stable branches pull corresponding plugin stable branch
when using stable branches, pull all plugins from same branch.

Test Plan:
- Jenkins build passes
- Jenkins build from stable branch pulls stable branch plugins
- Jenkins plugin build from branch pull canvas and other plugins
  from same branch.
  - test with canvas-lms-refspec commit flag and without

Change-Id: I07d62f9c75413fe2a0c035b43a14634baa814eef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252250
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-11-09 19:34:59 +00:00
Ahmad Amireh 58dfa6e240 sanitize links in course link validator
fixes FOO-936

| TEST PLAN
  ---- ----

- choose an image for a course from Flickr
- in a rails console, adjust the url to something fishy:

    Course.last.update_attribute(:image_url,
      'javascript:alert("boo")'
    )

- visit the course link validator & validate
- verify it reports a problem with the image
- click on the link and verify it does not alert and instead takes you
  to a blank page

Change-Id: I3da842ffe77fc4551078f677b87f31d3c6ab943c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252010
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2020-11-09 18:24:45 +00:00
Ben Nelson 7459f17bbb create MessageDetailItem for new Canvas Inbox
Test Plan:
 - View the component in Storybook
 - The passed in data should render, matching designs
 - The action buttons should fire their callback with the selection

closes VICE-845
flag=react_inbox

Change-Id: I5a894cdeea8fea8618243b63aa00bcf209b069c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252162
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
2020-11-09 18:08:01 +00:00
August Thornton 91e9039fe9 convert clone group set JQueryUI dialog to InstUI modal
This is the only instance of this modal that gets
rendered with the prop (implicitly) for this case as
`openedFromCaution: false`. this component gets used as
a guard of caution before modifying a particular group set
in a myriad of files pertaining to groups and members.

closes FOO-910
flag = none

test plan:
 - As a Teacher navigate to a course's People page
 - Create a Group Set if not having done so already
 - Click on the hamburger menu and select |Clone Group Set|
 - Verify the title of the Group Set is populated in the
   name field and it's prepended with `(Clone)`
 - You are able to cancel changes without consequence
 - You are able to Submit the form to clone that particular
   group set
 - You are returned in your newly cloned group set

Change-Id: I58c23a1eea8e52112b640188905940f46b12fc7e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251588
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>
2020-11-09 17:12:07 +00:00
Spencer Olson 1957ca8d20 only fetch assignments for selected grading period
Changes the assignment loading strategy for the Gradebook when Grading
Periods are being used. Now, two requests are made to get assignments;
the first requests only assignments in the current grading period, the
second requests the rest of the assignments in the course. When the
former returns, we can show the gradebook to the user. When the
latter returns, we allow the user to change the grading period in the
dropdown.

closes EVAL-1247
flag=none

Test Plan:
1. Create a course with multiple grading periods, with different
   assignments in each grading period (and a handful of assignments
   that are due in different grading periods for different students).
2. Go to the Gradebook.
3. Select "All Grading Periods" from the grading
   period dropdown. Refresh the page. When the page refreshes, verify
   in your browser dev tools that there is only a single request to
   get assignment groups + assignments.
4. Verify you can change the grading period in the dropdown and the
   expected assignments are shown.
5. Select a grading period from the grading period dropdown. Refresh
   the page. When the page refreshes, verify in your browser dev tools
   that there are two requests to get assignment groups + assignments.
   One request should have an 'assignment_ids' param that includes only
   the assignments in the current grading period. The other request
   should have an 'assignment_ids' param that includes all the rest of
   the assignment_ids for the course. if there are any assignments that
   are in both the current grading period AND and other grading period,
   you should see that assignment_id in the former call but not in the
   latter.
6. Before the call for the "rest of the assignments" returns, note that
   the menu options in the grading period dropdown are disabled. Once
   that call returns, note that the options in the menu are re-enabled.
   Once they are enabled, verify that you can change the grading period
   and the expected assignments are shown.
7. Do a quick smoke-test of using other filters in conjunction with the
   grading period filter to make sure everything works as expected.
8. Do a general smoke-test to make sure the gradebook and its filters
   work as expected for a course that does not use grading periods.
9. Verify the assignment_ids param added to the
   AssignmentGroupsAPI#index works as expected (expected behavior is
   described in the API docs for it).

Change-Id: I856810333e56de012982fb704d9cfc9a1a44b8d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250580
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
2020-11-09 17:07:52 +00:00
Evan Francis 7a997b350c Ensure outcome reports use course level settings
closes: OUT-3881

flag = account_level_mastery_scales

test plan:
1. Create assignment, account & course level outcomes
1b. Make sure we have at least 2 students enrolled
1c. Enable FF
2. Create mastery scales for account & course
3. Create rubric for outcomes -> assignment
4. Grade both outcomes for all students
5. Run the outcome_report and student competency
reports and validate we see scores associated
with the course level mastery scale
6. Modify the rubric to remove the course level
outcome and mastery scale
7. Re-run the outcome_report and student competency
reports and validate we now see scores associated
with the account level mastery scale

Change-Id: Ica91469905b1bcb30c785f989ecfff047ba27920
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251034
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Jody Sailor
2020-11-09 17:05:41 +00:00
Ethan Vizitei fc97202aa6 remove migration shims for auditors datastore
closes FOO-1024

rather than provide migration instructions for all
users to get off of cassandra and on to postgres
for their auditors data, this will
default any un-configured installs to write
both places for now.

After a year, which is the retention window for
auditors data, we can force reads to come from AR
and deprecate/remove any cassandra code
entirely.

also clean up some model tests to not reach so deeply into
the implementation of auditors

Change-Id: If4ca01682618f85d04c9ee7a91522f4c1deac1ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249162
Reviewed-by: Simon Williams <simon@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-11-09 16:30:30 +00:00
Robin Kuss a292ca7d2c spec: add mathjax rce test
Closes LS-1542

Test Plan:  Validate in Jenkins and verify functionality with manual
view

Change-Id: I19b4c9dd7ceb8dddd48025870558ad6301272b5f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252013
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: Robin Kuss <rkuss@instructure.com>
2020-11-09 16:17:00 +00:00
Andrea Cirulli 6270c915d6 move the making stage logic in jenkinsfile to canvas-builds
Moving logic related to the creation of a stage in Jenkinsfile to
canvas-builds.

refs DE-334
flag = none

test-plan:
- Build passes using the new makeFromJob function
- Build behaves as expected that is the same way the current
Jenkinsfile works
- Ensure CDC works forcing a migration
- Ensure FSC works forcing failures

Change-Id: I70b5e68e03166c5a34bf7542c10e8751e15981d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250770
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2020-11-09 15:46:00 +00:00
Manoel Quirino Neto 6b0ed1602b Fix delete assessment does not remove learning mastery score
When an assignment/rubric has been used to assess an outcome and
then the assessment is deleted using the delete endpoint for
rubric assessments the learning mastery gradebook does not update

closes OUT-4047
flag=none

Test plan:
- Create and publish course with one student enrollment
- Create an outcome
- Create a rubric and add the outcome as a rating
- Create an assignment and associate the rubric
- Assess the student on the outcome
- Run the delete api endpoint to remove the rubric assessment or
  destroy the assessment via console
- View the students learning mastery grades and see the score won't
  being applied

Change-Id: Ie665eaade9b2fc6a6756328aa5658eb0d505b75f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252163
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Augusto Callejas <acallejas@instructure.com>
2020-11-09 15:37:17 +00:00
Aaron Ogata f01193f3f9 retag instructure/ruby-passenger in case it has changed
Change-Id: Ic53a5c60b551ea84ad4755ec10049bdc42ab6691
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252243
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-11-09 15:32:26 +00:00
James Butters c979373f50 other branches building on jenkins
[canvas-builds-refspec=de97029ae53f268357222cbdea908873f5c2f7d7]

dev branches will rebase with their head, then rebase with master.
stable branches no rebase.
any other branches will follow the stable branch workflow.

flag = none
closes: DE-18

Test Plan:
- Normal build passes
- dev branch build rebases correctly
- image tags are working with branches, replacing
  forward slash with underscore.

Change-Id: Ibf3f4b97c42b0aea5d49f14bb498a09dae7c091f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251756
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2020-11-09 14:28:55 +00:00
Jenkins 18f062b20e update sv-x-k12 translation
Change-Id: I12ad0a3c52d1f44b63f8ca1594e3f8db7f13ef37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252221
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-11-07 05:48:21 +00:00
Jenkins 4dc913ef16 update nb-x-k12 translation
Change-Id: I3db12a8f2d951f68955addc0605b90cc64dcc910
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252220
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-11-07 05:46:32 +00:00
Jenkins 2fbd4e4da5 update da-x-k12 translation
Change-Id: Iffd4e7b90b5c8542ac09341ff7e55fb184fda195
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252219
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-11-07 05:42:30 +00:00
Jenkins 7d3575347e [i18n] Update package translations
Change-Id: Iebe90d95b56409371034d4407217b57d03ec7df1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252217
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-11-07 04:48:33 +00:00
Ethan Vizitei 8f9d0114eb downgrade content migration timeouts to WARN
closes FOO-1121
flag = none

TEST PLAN:
  1) content migration timeouts should write log
     entries
  2) content migration timeouts should NOT write
     to sentry
Change-Id: Ib79668a1aea89058d702b277fd6d07d59b48a444

Change-Id: I199f173239a652d25d6344f98288696fad636258
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252142
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-11-06 22:03:18 +00:00
Ethan Vizitei 7f5ef5fd1c unify error report skipping strategies
closes FOO-1129
flag=none

TEST PLAN:
  1) Error Reports should still not get written
     for:
       ActionController::ParameterMissing
       SearchTermHelper::SearchTermTooShortError

Change-Id: I7f1902bd7eed182a6a407e07060c462a62f4c38f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252147
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-11-06 22:03:16 +00:00
Ethan Vizitei 86251a52e4 let account_reports use canvas::errors system
closes FOO-1174
flag=none

TEST PLAN:
  1) failed reports should still get error reports

Change-Id: Id4a00e9ebd5854e3bf9d8b729f2b036cb094cfbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-11-06 22:03:06 +00:00