Commit Graph

40244 Commits

Author SHA1 Message Date
Simon Williams 354b2fc5c9 squash old migrations, p32
Change-Id: I58a7083f764b03b607ca776a03fa6bb1067eca30
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236784
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-16 18:59:16 +00:00
Aaron Ogata 715c99bd72 spec: fix broken expect
refs DE-11

flag = none

Change-Id: I0d3fcdccc30ae9df147f7672d4915d7d974729d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240341
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-16 18:58:19 +00:00
Alex Anderson 519c25eb4f Remove 'role="status"' from the RCE status bar.
According to WCAG 2.1, the "status" role is supposed to be used
to announce to the user when something changes. The linked ticket
specifically says we don't want that behavior, so I removed
`aria="status"` from the RCE status bar.

See https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA22.html

Test Plan:
With the RCE Enhancements feature flag on
Navigate to an RCE page
Turn on the screen reader (VoiceOver)
Start typing.
The contents of the status bar are not announced, unless
you navigate the screen reader to that section of the webpage.

flag = rce_enhancements

Closes LS-1072

Change-Id: I74d0262b1a2e22ed3ca3d8f6959c58ad822af57f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240268
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: Alex Anderson <raanderson@instructure.com>
2020-06-16 18:30:19 +00:00
Aaron Ogata cb94e18160 spec: fix rcs sidebar spec intermittents
refs DE-11

flag = none

Change-Id: I86a73c2b2bfee6beaf040b25c8b363053bb90acc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240314
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-16 17:53:18 +00:00
Ahmad Amireh 73cd5180e6 resolve root_account_id for group_memberships
fixes USERS-410
flag  = none

- test plan
- ---- ----

- create a course then go to People, create a group, and add some
  student to it
- verify the GroupMembership record has its root account id populated

Change-Id: Id8e1146a703a760e55eb52d7d8d2d1351f23c71a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240238
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-16 17:49:20 +00:00
August Thornton 4da7f8497e set root_account_id for AccessToken
closes USERS-413
flag = none

test plan:
 - User access tokens can still be created under profile settings
 - Access tokens can be generated via the OAuth2 flow
 - Access tokens work as they did before

Change-Id: I7772a82e686853b7d83215b1ab3f2a8dd8155d56
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240290
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>
2020-06-16 17:46:15 +00:00
Charley Kline c99e787c07 Populate root_account_id on role_overrides
Closes USERS-411
flag=none

Sets the root_account_id column on a role_override record
when it is saved and root_account_id has not already been set.

Test plan:
* Have some role_overrides in your setup
* Alter an existing role_override
* It should now have a non-nil root_account_id
* Create a new role_override
* It should have a non-nil root_account_id

Change-Id: I47aea30dab387b51ee7a3f89291545f1390b3292
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240262
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2020-06-16 17:36:05 +00:00
Cody Cutrer 4f597e78d4 split submissions root_account_id migration into two
Change-Id: I8e0ded3a504a71d2e727f03909c4f378bc673b01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240245
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-06-16 17:18:37 +00:00
Ryan Norton ff9ab0b594 remove covid logic from Jenkinsfile
this removes the covid branch logic from the Jenkinsfile
as we no longer use this workflow

fixes DE-8

Test Plan:
1. Jenkins should still pass

flag = none

Change-Id: I0e0267d94d88d5c1cf8a1427d2c4c1250b967616
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240206
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Ryan Norton <rnorton@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
2020-06-16 17:08:46 +00:00
Derek Bender 8b25095c54 Spec: Improve jenkins page formatters
This will allow the test result pages in jenkins to *always*
show timestamps so it's clear what we mean by "oldest"
and "newest."

Change-Id: If7a317250eab118e961a0bc29103c86e134ce09c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240189
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-06-16 16:53:36 +00:00
Aaron Ogata e9ad048677 spec: fix flakey groups_teacher_spec
refs DE-12

flag = none

Change-Id: Id8ef710f99786c23bed558c8f8006bac8ed6b8dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240316
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-16 16:40:38 +00:00
Ethan Vizitei 3b9c016576 resolve root_account_id for UserAccountAssociation
closes USERS-421
flag = none

when refreshing associations
query accounts once and set
root_account_id from that cache

TEST PLAN:
  1) refresh account associations for a user
  2) any new associations should get a
     root_accont_id

Change-Id: I221675bd8553f121afda23644dc7af7c25e4001e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240257
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-16 16:32:59 +00:00
Erin Hallmark dd28bf6330 update UI references of CSP whitelist
this commit doesn't affect actual code, but it does affect
inline comments in various files. also updated punctuation
in view violation log sidebar.

CLOSES: USERS-633
flag=none

Test plan:
- Enable Content Security Policy feature flag
- In Account Settings, view the Security tab
- View Content Security Policy page
- Notice there are no mentions of whitelist/whitelisting
- Enable Content Security Policy
- View a subaccount's Security tab
- View the information icon and notice that domain editing
is disabled when settings are inherited

Change-Id: If001eb7f368ccac62a90d771d68c00e0bcbfdc03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239808
Product-Review: Erin Hallmark <erin@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
2020-06-16 16:28:51 +00:00
Ethan Vizitei 267958745a populate root_account_id for asset_user_accesses
closes USERS-406
flag = none

TEST PLAN:
  1) log some asset accesses in a course
  2) confirm their root account id is
     populated in the DB

Change-Id: I50e2e81ad3ea44d9bfa180a325101c72377428a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240248
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-16 16:27:00 +00:00
Ethan Vizitei 7161f6599e populate root_account_id on account_users
closes USERS-405
flag = none

TEST PLAN:
  1) load and save some account users without
      root_account_id
  2) root_account_id should be persisted through
     the attached account

Change-Id: I264966a4c8bfdfb44306b8212e9fe8fa9fe4bfa0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240228
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-16 16:26:42 +00:00
Jacob Burroughs f0ebaedb0f Don't recompute the world if enrollments aren't visible
Change-Id: I888e21e8b79c6e84e7ced06a887fe369817dfd7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240301
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-16 16:09:44 +00:00
Ahmad Amireh f09d77863f resolve root_account_id for enrollment_state
fixes USERS-408
flag  = none

Change-Id: I4bcf2f4fd161e6f07402bc633c7df4f391bb186b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240220
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-16 16:07:42 +00:00
Derek Bender 2e09795910 Spec: Throw icu config errors in test
The issue with not throwing in our test env is that we
fall back to a naive collater and thus effectively ignore
any system configuration errors. Instead, we should
always throw in test if icu is misconfigured.

Change-Id: I5818a4d7fa9c1891d770e664fa3032d03e63d54b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240186
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-06-16 16:01:34 +00:00
Aaron Ogata c8164e7859 spec: general solution for ElementNotInteractableError / click
refs CCI-373

flag = none

Test Plan:
1. Ensure that the failure path retries only once
2. Ensure Jenkins passes

Change-Id: Ib933dccf01a6a623bceddf8601fc91348d8583ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240194
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-16 15:24:18 +00:00
James Williams 7b44b5f4ce port conditional release rules editor UI
test plan:
* enable native conditional release on the
 root account via the console by running:

Account.default.tap do |a|
  a.settings[:use_native_conditional_release] = true
  a.save!
end

* enable the "Mastery Paths" feature on the account
 or course if not already
* the "Mastery Paths" editor tab should be shown
 when editing an assignment
* the editor should load independent of the
 conditional release service
* it should allow selecting assignments and
 modifying scoring ranges
* it should save via the native rules API when
 the assignment is saved
* when the assignment is opened again for editing,
 it should pull the rules back from the native API
 and should appear as previously saved

closes #LA-1063

Change-Id: Iea3b2f8346b8989542010f9d571bf1eee5e03622
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239985
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-06-16 14:57:51 +00:00
Steve Kacsmark b2aa50d31f Support course copy to New Quizzes
refs QUIZ-7525
flags=none

Test Plan:
  - Ensure course copy works in the following scenarios.
  - New Quizzes migration disabled. (QO->QO)
  - New Quizzes migration enabled, and unchecked.  (QO->QO)
  - New Quizzes migration enabled, and checked (QO->NQ)
  - New Quizzes migration enabled by default, and checked (QO->NQ)
  - New Quizzes migratimon forced.

Change-Id: I64dfdbe1f4ef5d4b73f7b090d9365d0a0bb0ad6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233415
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Stephen Kacsmark <skacsmark@instructure.com>
Reviewed-by: Gabriel Brady <gbrady@instructure.com>
2020-06-16 14:35:16 +00:00
Derek Bender 8eac98ab2e Spec: add `init: true` to jenkins builds
This will allow use to rely upon builtin "tini" functionality
without needing to manually invoke it like before. This should
ensure that stopping containers is faster across the board.

Change-Id: I101770a6ddcf5cdc216b612bde83156d40198127
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240309
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-06-16 14:09:58 +00:00
Ed Schiebel 9f11af9b77 Give files in RCE's All files tray icons
The files need icons based on their type, especially for media
which display their title, and not filename so the user won't
know what it is.  Because the INSTUI TreeBrowser doesn't support
setting per-item icons (see INSTUI-2636), this change works around
that by creating data url with the correct icon's SVG, then using
that as the item's tnumbnail.

Because I edited FileBrowser.js, I had to fix eslint issues found,
and I took the opportunity to address React proptype warnings.

closes LA-1132
flag = rce_enhancements

test plan:
  - have a course+user with a variety of file types and
    at least 1 audio and 1 video media
  - open the content tray, and change to All
  - expand the folders
  > expect images to have their thumbnail
  > expect all other file types to have the appropriate icon
    (we distinguish between video, audio, Word, Powerpoint, Excel,
     and pdf. everything eles is a generic document icon)

Change-Id: Idbac9e17660b6ba863b589ace454ef6e2337df71
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240119
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-16 12:32:05 +00:00
Ed Schiebel a3219c3d60 Do not set RCE images to be so small
In the old RCE, images were added and let the prevailing CSS
constrain the width to 100%.  With COREFE-241, I incorrectly
thought that was poor UX and constrained the images to be 320px
on the long side when first embedded. Turns out I was wrong.
This change reverts that and lets the images be their natural size,
subject to the 100% max-width constraint, just like the old RCE

closes LA-1127
flag = rce_enhancements

test plan:
  - add a large photo to the RCE
  > expect it to be constrained in size only by the width of
    the RCE
  > expect the RCE's height to expand to the eventual rendered
    size of the image, and not the image's _real_ height
  - save
  > expect the same result
  - edit again
  - use the Image Options tray or drag handles to change
    its size
  > expect it to respect the new size
  - save
  > expect it to look like it did before

Change-Id: I9046f1fd2d9dd3af7435e75ff30bc1031e823f02
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239976
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-16 12:31:47 +00:00
Mysti Lilla bbc73d8fdd Add subscription_id to Lti::ToolProxy
refs PLAT-5765
flag=none

Test plan
- N/A

Change-Id: Ie00a8d0feaa1193ee2a4c46aa5c72c9b781fb45d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240278
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-15 23:09:46 +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
Caleb Guanzon 98fe7ad09c match announcment Formfield id with select id
fixes VICE-542

- also does the same for discussions

TEST Plan:
- visit course announcements page
- inspect filter dropdown
- verify select has id="announcement-filter"
- it matches parent FormField id

- repeat for discussions
- verify select has id="discussion-filter"
- it matches parent FormField id

Change-Id: I9660b607d6cce60b767942967bc30545005ba276
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240201
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-06-15 21:13:05 +00:00
Cody Cutrer 0cb97d1180 add stub view for plugins on dashboard
refs USERS-638

Change-Id: I22229cac3bfd8d2a026c5e3d2d2acb421b9d026f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240105
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-06-15 19:50:17 +00:00
Charley Kline 5524a76dd5 Pseudonym root_account_id *is* the account_id
Closes USERS-423
flag=none

In seeing if anything needed to be done for CD2 in the
pseudonym model, it looks like it's unnecessarily hitting
the account model to get the root account, when the account
of a pseudonym already MUST be a root account. So we get a
tiny optimization by ripping that extra table reference out.

Test plan:
* you agree

Change-Id: Icaabb9117fb1fc4f26699d9d4b1c5dba027debf9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240230
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-06-15 19:23:47 +00:00
Aaron Ogata cb2035e7b8 don’t rebuild images if already pulled
These images are currently pulled from the cache or built in docker-compose-pull.sh; and docker-compose-build-up.sh is rebuilding them. Fix this so that the cached image is used for our build files.

refs DE-3

Test Plan:
1. Ensure Jenkins passes

flag = none

Change-Id: Id8b4954ee452d2534b898f9d782b67b9730f542c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239644
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-15 19:11:12 +00:00
Michael Brewer-Davis 89fc71d6d3 set root_account_id on learning_outcome_results
closes OUT-3640, OUT-3639
flag=none

Test plan:
- create an assignment with rubric aligned
  to an outcome
- assess a student using the rubric
- create a question bank aligned to an outcome
- create a quiz using the question bank
- take the quiz
- verify in the console that the created results
  have root_account_id set
  > LearningOutcomeResult.last(2).map &:root_account_id
  > LearningOutcomeQuestionResult.last.root_account_id

Change-Id: I869b794c9d4859caabaf17717c8ac41f582847e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240010
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-06-15 17:33:07 +00:00
Jackson Howe 45cc7cbc18 Fix permissions issue when admins import course content
When an account or subaccount admin tried to copy a canvas course
into a course they taught, they were given a list of all courses in
the account, regardless of permissions. Now, only courses that the
admin has read access to can be copied.

The API call to get list of copiable courses now checks for
permissions read_as_admin and read, because these permissions are
required by the controller in
lib/canvas/migration/validators/course_copy_validator.rb when the
request to copy course content is made. Limit also lowered to 100 to
ensure performance.

Fixes LA-1110
flag=none

Test plan:
 - Create a subaccount, and create at least 2 courses in that
   subaccount
 - Create a user, and add them as instructor for 1 course
 - Create new admin role with all permissions as deny
 - Give user this admin role
 - As user, enter a course and attempt to copy the other course's
   content into this one. When the list is generated, it should
   only show courses that the user is an instructor for
 - Add user as instructor for other course, clear cache, and try
   copying content again. This time, both courses should appear in
   list

Change-Id: I4a3c6d3f52ed638e669e8464dec6214d58a3be8f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239962
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-06-15 16:22:53 +00:00
Alex Anderson 3d74bdc3e3 Exclude account JavaScript from media iframe
The Media Iframe page which the new RCE uses can be interfered with
by third-party JavaScript which has been loaded into the theme of an
account. In this case, the problem is specifically with Firefox, but other
JavaScript could affect other browsers in different ways.

Since there isn't really a good reason to load account JavaScript within
the media iframe, we should probably just disallow it altogether. This
patchset adds a flag to the iframe page which excludes the account
JavaScript only on that page; other pages are unaffected.

Test plan:
Before checking out this patchset, do the following to replicate the
issue.

Make sure you have some extra JavaScript included in your theme -
this one from Ashford makes Firefox not work properly:
https://instructure-uploads.s3.amazonaws.com/account_75490000000000001/attachments/12690750/ashford_js_20200420_edited.js

Navigate to a page that has the media iframe on it. This can be done
by uploading a video through the new RCE. On Chrome, it should load
fine; on Firefox, it perpetually say "Loading..."

Now checkout this patchset. That same media iframe should load
correctly on Firefox.

Verify that the JavaScript is still loading on other pages - it should be
loaded at the bottom of the #application element in the DOM.

flag = rce_enhancements

Closes LA-1088

Change-Id: Id6ad064ef7c07657c3dff55a9ee8f00282e1b891
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240037
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: Alex Anderson <raanderson@instructure.com>
2020-06-15 16:03:00 +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
Michael Brewer-Davis 1bbd60bd8c spec: compare live events contract with matching event
Change-Id: I004ee8556b13daa18572d0c1fbe32eb04d47fbc0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240112
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-06-15 15:38:38 +00:00
Jenkins 0618f25c6e [i18n] Update package translations
Change-Id: Id47b200bff9bdbe848fa6d96cc884d6e06b7da35
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240167
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-15 04:54:26 +00:00
Ethan Vizitei 0870ec913f auditors needs to use bookmarks
refs CNVS-48876
flag = none

bookmarks stored as strings
require parsing for use
and validation

TEST PLAN:
  1) read auditors from postgres
  2) choose a case with more than 10 records to view
  3) scrolling down loads more

Change-Id: If4d05e4ce5a8240757d6e07598da51bba197e6f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240146
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-06-13 12:38:56 +00:00
Jenkins eb4c6e2096 [i18n] Update package translations
Change-Id: I74a31b3aca549ff4434f31ec462acb9f9a1cebba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-13 04:56:15 +00:00
Ethan Vizitei 006589ac09 give DB auditors attribute manipulation
refs CNVS-48876
flag = none

and order records
in descending order just
like from cassandra

TEST PLAN:
  1) read auditors from postgres
  2) grade_changes records show up in auditors
      UI
  3) all auditors UI is ordered by created_at
    DESCENDING

Change-Id: Iceb862581453875d34810b3ccf9f8f3219a0c0e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240017
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-06-12 19:44:08 +00:00
Ed Schiebel e528f8893e Include media files in the rce tray's "All" option
closes LA-507
flag=rce_enhancements

test plan:
  - in the RCE, select Documents > Course Documents
  > expect the tray to open to course documents
  - change "Documents" to "All"
  > expect "Course Files" to change to "User Files"
  > expect the file browser to get populated with all your
    folders and files
  > expect a new "My Media" folder with all your media listed

  - from the "All" tray, click on an image file
  > expect it to be embedded, not linked
  - repeat for an audio or video
  > expect it to be embedded, not linked
  - repeat for some other file type
  > expect it to be linked

Change-Id: Ic0fb955dcd9924d0055826113eedeb4a8b519a19
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239202
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: Ed Schiebel <eschiebel@instructure.com>
2020-06-12 19:22:41 +00:00
Drake Harper 419e115063 Populate root account id for folders
Test plan:
-create a folder with context of a group, account, or course
-check that root_account_id on folder matches context
-should not set root_account_id if context is user

Closes VICE-344

flag=none

Change-Id: I82e4bf8d385b5197c2140094c71e1e7ac1ab00f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240021
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-06-12 19:22:22 +00:00
Drake Harper 68422b75aa Populate root account id for favorites
Test plan:
-specs should pass
-create a favorite
-inspect in rails console 
-verify root account id is set 

Fixes VICE-343

flag=none

Change-Id: Ib13b7db057bfe1fd7a1d78b30a5ed3a30ae85799
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239853
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Nelson <bnelson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-06-12 19:22:13 +00:00
Aaron Ogata fe42ebf736 spec: wait for option to become fully visible
refs DE-6

flag = none
Test Plan:
1. Jenkins passes specifically FSC build

Change-Id: I6b967ddc037a00b94bd19d4e65510e8dfb2dfa0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240027
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-12 17:26:04 +00:00
Xander Moffatt 95e1976ddd populate root_account on new ContentTag
refs PLAT-5516
flag=none

* removes usage of ContentTag from backfill spec
  and replaces with CalendarEvent

test plan:
* specs
* if you want, create a new ContentTag and note that its
`root_account` attribute is not nil

Change-Id: Iea91d958574341dea0ddfa8854c134b6d95bd8a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236479
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2020-06-12 17:17:59 +00:00
Adrian Packel aa88124a0b Set root_account_id for assignment score stats
closes TALLY-705
flag=none

Test plan:
- Create a course with some students and some assignments
- Assign some grades
- Check that the ScoreStatistic models for the affected assignments have
  their root account ID set to the course's root account ID

Change-Id: I12787d38f5016856f616084daef3086fe4ad8b26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239968
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-06-12 17:04:05 +00:00
Derek Bender 2cb9ab7446 Spec: Fix performance build
Fixes: CCI-395

Test Plan:
- Selenium Performance Build works

Change-Id: I2db7f320d33a24371d0619eb344c8cb5a56eafbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/237589
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-06-12 16:59:38 +00:00
Adrian Packel 624b06dbc8 Set root_account_id when saving custom columns
closes TALLY-697
flag=none

Test plan:
- Create a course
  - In Gradebook, show the "Notes" column via View -> Notes
    - This will create a custom "Notes" column for the course
  - In the console, create your own custom column
    > <course>.custom_gradebook_columns.create!(title: "hi")
  - For both the created columns, check that the root_account_id field
    matches the value of the course's root account ID

Change-Id: Ie1473d0944e1ccc7a2a20a20fb4510a4c425f4f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239261
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-06-12 15:58:17 +00:00
Adrian Packel 198ac13cd5 Save root account ID on submission versions
closes TALLY-708
flag=none

Test plan:
- Create an assignment requiring an online submission
- As a student, submit to the assignment
- Check the most recent SubmissionVersion object (using, e.g.,
  SubmissionVersion.last)
- It should have a root_account_id value corresponding to the course's
  root account

Change-Id: I1c332cd73add9811927d8a545ea0565ddc0cc53f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239565
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-06-12 15:31:28 +00:00
Caleb Guanzon a693d3ca31 add alt to CourseItemRow Avatar
fixes VICE-539
- using safari + voiceover,
- create a course announcement
- view course announcements page
- traverse the page using voiceover until focus
is on avatar
- verify that voiceover reads user's name

Change-Id: I8c19adb04a6cf1a965f48d29c15b3ee5d31296e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239975
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Davis Hyer <dhyer@instructure.com>
QA-Review: Davis Hyer <dhyer@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
2020-06-12 15:31:14 +00:00
Jenkins bb659c814f update hu translation
Change-Id: I61ec3a682fd63025a29e4afbbf82a5d56d1b236b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240058
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-06-12 05:54:30 +00:00