Commit Graph

53354 Commits

Author SHA1 Message Date
Sean Scally 4814f47619 Use AWS data instead of Salesforce territory to activate Heap
We discovered that we didn't need the Salesforce sales territory data to
determine if an account requires GDPR compliance or not. Instead, we can
use the existing billing code data plus the AWS regions.

This removes the previous dependency on Salesforce territory data, adds
the dependency on AWS region codes, and modifies specs and callsites
accordingly.

refs FOO-3253
flag=send_usage_metrics
test plan=specs pass

Change-Id: If8710ec59704eed6a5fbe8e7e007119842c47a11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306495
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-12-02 19:37:33 +00:00
Jon Scheiding 488496ca46 Fix inline preview to respect canvas origin
https://instructure.slack.com/archives/C02QHS4PWD8/p1669995264364199

test plan
- working nq setup
- working canvadocs setup
- create some content inside NQ that includes an inline link
- confirm that inline link renders correctly

Change-Id: I5099166065e5bc9e985b92dc1fbc9108ebe7be73
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306484
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-12-02 18:01:53 +00:00
Jonathan Guardado 4c02449058 Restore navigation flow when closing the pace modal
Fix focus loss when closing the pace modal, restoring the focus to
the element that opened the modal

closes LS-3625
flag=course_paces_redesign

Test plan:
- Go to the course pace landing page
- Open the default course pace modal
- Do some stuff and close it
- Expect the focus to come back to the Edit default pace button
- Repeat the process for section and student paces
- Make sure the focus gets restored when closing the modal using the X
, the Close button, or the Discard Changes button when attempting to
close the modal without saving

Change-Id: Ie3ee9374afecf813433495c1ef0fa313f8c4ec96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306475
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: Jonathan Guardado <jonathan.guardado@instructure.com>
2022-12-02 17:15:08 +00:00
Martin Yosifov 613f951bd6 Fix AS stats calculation for unpublished artifacts
closes OUT-5401
flag=outcome_alignment_summary

Test plan:
- Enable Improved Outcomes Management FF
- Enable Outcome Alignment Summary FF
- Go to Course > Outcomes and copy course id from URL
- Create an outcome and a rubric and align them
- Create a published assignment and align with the rubric
- Create a published graded discussion and align with the rubric
- Open in browser canvas.docker/graphiql
- Execute query below replacing course id
query MyQuery {
  course (id: 1) {
    outcomeAlignmentStats {
      totalOutcomes
      alignedOutcomes
      totalAlignments
      totalArtifacts
      alignedArtifacts
      artifactAlignments
    }
  }
}
- Verify that query returns the following data:
totalOutcomes: 1, alignedOutcomes: 1, totalAlignments: 3,
totalArtifacts: 2, alignedArtifacts: 2, artifactAlignments: 2
- Unpublish the assignment, rerun the query and verify that
it returns the same data
- Unpublish the graded discussion, rerun the query and verify
that it returns the same data

Change-Id: I72df933b94844e80925c8ad865ee95b67fd528e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305943
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Dave Wenzlick <david.wenzlick@instructure.com>
QA-Review: Dave Wenzlick <david.wenzlick@instructure.com>
2022-12-02 17:00:18 +00:00
Dave Wenzlick 43a80c77c1 Reduce the max allowable request size to Outcomes
refs OUT-5416
flag=outcome_service_results_to_canvas

Test Plan
- Test pass. We will test if this resolves user issue in beta

Change-Id: I4ccbc638010fb3667f70e2edd3d764788c732e7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306341
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2022-12-02 16:57:51 +00:00
Drake Harper 6ecfe3fa20 Add mail processor error metrics
closes VICE-3261
flag=none

Test Plan:
- verify metrics after merge

Change-Id: I864a2bd25580a62e25017bee920834bce2ed31f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306326
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2022-12-02 16:35:02 +00:00
Ed Schiebel e02f187394 Disable paste/dnd of media files if disabled
If the account-level setting
"Disable uploads to Canvas Media from the enhanced rich content editor"
is on, paste or dropping an audio or video file does nothing

closes MAT-1136
flag=rce_better_paste

test plan:
  - in the rce, paste or drop an audio or video file
  > expect to be uploaded and display in the rce
  - go to /accounts/:id/settings#tab-settings
  - check
    "Disable uploads to Canvas Media from the enhanced rich content editor"
  - in the rce, paste or drop an audio or video file
  > expect nothing to happen

Change-Id: Iec25718a0f9a43b88b51317e94c2f7c40f44cadb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306478
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Joe Hernandez <joe.hernandez@instructure.com>
QA-Review: Joe Hernandez <joe.hernandez@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
2022-12-02 16:28:14 +00:00
Jenkins 484b372749 update hu translation
Change-Id: I9aba1e007a94b0b22fd2b5af7195e34562d08a00
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306448
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-12-02 05:48:10 +00:00
Jenkins da15ce6c35 [i18n] Update canvas-media translations.
Change-Id: If5898965080b828b04e7725a2e62cb5668eeba13
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306447
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-12-02 04:51:02 +00:00
Jenkins d1ded4141d [i18n] Update package translations
Change-Id: Ibb95021f84982d7915e911b9b7dcaf08d62bf1ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306446
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-12-02 04:50:53 +00:00
Eduardo Escobar fa4924dd53 display unavailable peer review for reviewer
closes EVAL-2752
flag=assignments_2_student
flag=peer_reviews_for_a2

test plan:
- enable the FF "Assignment Enhancements - Student".
- enable the FF "Peer Review Support in Assignment
  Enhancements".
- have a published course.
- have a course with a teacher and 2 students (S1
  and S2).
- create an assignment with "Peer Reviews"
  enabled.
- assign some peer reviews to the students for
  the assignment.
- as the student S1 click on the assigned peer
  review.
- check that the empty state is visible with the
  following text "There are no submissions available
  to review just yet".
- create submissions for both students.
- as the student S1 click on the assigned peer
  review again.
- this time the reviewer is able to see the
  submission, and the empty state is not present.

Change-Id: I46822024a577befa484c83501edd7f5c7a04e20c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305245
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Deborah Kwak <deborah.kwak@instructure.com>
2022-12-01 22:12:46 +00:00
Xander Moffatt b858537bac fix: reference metrics flag at root account level
why:
* this flag is set at the RootAccount level, but
the code that queries flags for window.ENV use
thinks that it's at the SiteAdmin level, and so
does not find it properly

refs FOO-3212
flag=none

test plan:
* enable the send_usage metrics flag, which will
require setting `enable_usage_metrics: true` in
your root account's settings attribute first
* check canvas.docker/api/v1/features/environment.json
* it should include send_usage_metrics: true

Change-Id: Ia9606df3a6169519874a898f09d193768287e42b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306415
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2022-12-01 20:34:57 +00:00
Eduardo Escobar 4cb368bbae change flash message in the comments tray
closes EVAL-2764
flag=assignments_2_student
flag=peer_reviews_for_a2

test plan:
- enable the FF "Assignment Enhancements - Student".
- enable the FF "Peer Review Support in Assignment
  Enhancements".
- have a published course.
- have a course with a teacher and 2 students (S1
  and S2).
- create an assignment with "Peer Reviews"
  enabled.
- assign a peer review to the student S1.
- create submissions for the assignment to both
  students.
- as the student S1 click on the "Required Peer
  Review 1" for the assignment.
- as the student S1 check that when there is at least
  one comment, an alert with the text "Your peer
  review is complete!" becomes visible.

Change-Id: I95c9eda08ade6cba68bb26bf0629d1b64ea2e327
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306254
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Deborah Kwak <deborah.kwak@instructure.com>
2022-12-01 18:49:39 +00:00
Dave Wenzlick 5400c72570 Update canvas to expect json metadata
closes OUT-5405
flag=outcome_service_results_to_canvas

Test plan:
- Jenkins pass

Change-Id: I430a9901859adb340dbf171f5efdc10b0961845f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305945
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2022-12-01 16:24:33 +00:00
Aaron Shafovaloff f35fcd84bb Extract SIS overrides data loading
Test plan:
  - Existing tests should pass

flag=none

Refs EVAL-1934

Change-Id: Icff61b7c377029d649bdb62e3d967d465e3e08f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306177
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2022-12-01 00:15:42 +00:00
Kai Bjorkman 9ea4548a69 hide assessor identity on peer rubric assessments
flag=none
closes EVAL-2740

Test Plan:
    - Create an assignment set up with anonymous peer reviews
    - Attach a rubric to the assignment
    - Assign peer reviews between students
    - Act as a student to be reviewed and submit
    - Act as that student’s assigned reviewer fill out the rubric
    - Act as the teacher and fill out the rubric for the submission
    - Act as the original student and view the submission,
    open DevTools, and use the ENV.rubricAssessments and ensure
    the assessor is available for the teacher's assessment, but is nil
    for the peer's assessment

Change-Id: Ifdedff5939d4243307bb857d94d9460ce85368dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305858
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Deborah Kwak <deborah.kwak@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-30 23:08:37 +00:00
jake.oeding 9b93866679 IM: fix editing styled icons issue
fixes MAT-1120
flag=buttons_and_icons_root_account

test plan:
-must use chrome, styled images aren't
 supported in firefox
-navigate to a page with an RCE
-insert an icon
-center the icon
-edit the icon and confirm that you can
 insert the edited icon without issue

Change-Id: Ia68844d4dcd3598c2112a8c4feda83970d74c1d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306306
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: Jake Oeding <jake.oeding@instructure.com>
2022-11-30 22:37:34 +00:00
Derek Williams ca6c89a456 add permission for proxy submissions on teachers and TAs
closes EVAL-2684
flag=proxy_file_uploads

test plan:
- turn on proxy_file_uploads FF
- ensure proxy_assignment_submission permission is visible and
toggleable for teachers and TAs

Change-Id: Ibe650d7f135d99e9a203dd3c666156a814fb0f08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304023
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Deborah Kwak <deborah.kwak@instructure.com>
2022-11-30 21:14:46 +00:00
Evan Battaglia f58237d341 amend CSP header to allow LTIs embedded in LTIs
This lets the retrieve and resource_selection endpoints embed inside
an iframe inside of New Quizzes.

closes INTEROP-7752
closes INTEROP-7742

Test plan:
- if you have New Quizzes set up, and they are embedding tools from
  within their tool, you might be able to test with that. Otherwise, you
  can test with LTI 1.3 test tool as mentioned below.
- modify the LTI 1.3 test tool dev key to have internal_service=true
- in the LTI 1.3 test tool's app/views/launch/launch.html.erb add an
  iframe pointing to resource_selection like this:
    <iframe
      src="http://web.canvas-lms.docker/courses/66/external_tools/181/resource_selection?parent_frame_context=155&editor=1"
      style="width: 600px; height: 400px" ></iframe>
  The parent_frame_context parameter should be your LTI 1.3 test tool
  ID. The first tool ID can be any LTI 1.1 tool (LTI 1.3 currently needs
  an additional change -- to the LTI 1.3 'authorize' endpoint -- to
  work)
- Launch the LTI 1.3 tool. Your LTI 1.1 tool should successfully launch
- Change the iframe you added above to a retrieve URL, e.g.:
    http://web.canvas-lms.docker/courses/66/external_tools/retrieve?url=http%3A%2F%2Fmylti1tool.example.com%2F&parent_frame_context=155"
- Where the URL is a URL for an LTI 1.1 tool available in the course,
  and 155 is your LTI 1.3 test tool ID

Change-Id: Ie27c030bbd95b85af60e391c14bf6c52aad087be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306023
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2022-11-30 20:06:28 +00:00
Jackson Howe e06724f8d1 Update duration inputs on pace reset
Pace duration input values are stored in AssignmentRow's local state to
allow debouncing changes before committing to the app's redux state.
When clicking 'Reset All', the onResetPace action resets the durations
in the redux state, but the AssignmentRow local state needs to also be
recondiled in order for the input values to reset.

fixes LS-3627
flag = none

Test plan:
 - Open a published pace
 - Change one of the durations
 - Click "1 unpublished change", then "Reset all", then confirm
 - Expect the input's value to revert to the previous duration

Change-Id: Ib37f218d35a6643fa84df0dd2ce29b5b15750fec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306250
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-30 19:58:05 +00:00
Jackson Howe 13477af706 Update Course Pacing copy
closes LS-3615
flag = course_paces_redesign

Test plan: ensure copy in Course Pacing matches the copy doc

Change-Id: I31eeab081c47353689d39e684a27f680a252df5b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306170
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2022-11-30 18:14:43 +00:00
Jason Gillett df39489e1e Prevent all users from creating new conversations in soft-concluded courses
Exclusion: As the AC for this ticket states, this only works in redesign

flag = react_inbox
fixes VICE-3210
Test Plan
1.  Create/have a course with a student,Teacher, and an observer
2.  Make sure each user in the course has a "registered" workflow_state
3.  soft_conclude the course
3a. Go to course settings
3b. set participation to course
3c. restrict students form viewing course past and future
3d. set the start and end date to a time in the past
3e. Save
4.  an observer, student, and teacher try to send a message
4a. Make sure that the soft-concluded course is the course context
5. an error should appear for each user

Change-Id: Ic8f7279deb1d82282c241752adb5de691371c3ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306251
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-30 17:42:29 +00:00
Tucker McKnight b8d7260f97 Look for the redirect form in LTI controller specs
fixes INTEROP-7788

test plan:
- specs pass

Change-Id: Ibb9029118bbdd020bd2f2695613c26aee93c0c96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305703
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark Starkman <mark.starkman@instructure.com>
QA-Review: Mark Starkman <mark.starkman@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2022-11-30 16:55:54 +00:00
Jackson Howe d885de7d03 Include a tooltip with time zone notice
When hovering over 'Due Date' column header, show a tooltip indicating
the course time zone. Also move the 'Days' column header tooltip from
an info icon to the header text for consistency. Leaves the compression
icon/tooltip as-is.

closes LS-3616
flag = none

Test plan:
 - Open a course pace
 - Hover over Days and Due Date column headings and expect to see the
   tooltips
 - Make sure these are readable with KO navigation and with a SR

Change-Id: I3e1873fc01051c2730d3fffd5a1462519b68e0f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306267
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: Jackson Howe <jackson.howe@instructure.com>
2022-11-30 16:54:19 +00:00
Jared Crystal feb7d6b4ac prevent sizing canvas media players which are not visible
fixes QO-918
flag=none

test plan:
 - create a classic quiz with at least one multiple choice question
 - embed videos in each answer, setting the size to "Large"
   (you can set them all to different values, but at least one should
    be set to "Medium" or "Large")
   (it will be easiest to verify if the original video content is
    much larger (width & height) than the size specified on the embed)
 - save the question/quiz and refresh the page
 - once the page has had plenty of time to load (stops spinning)
   view the question details or edit the question
 - ensure the video sizes are all respecting the originally specified
   sizes
 - make sure we have not regressed on LA-1100. See test plan on:
   https://gerrit.instructure.com/c/canvas-lms/+/239267

Change-Id: I8c9d2cfc44d1216cdfc15b6e27ebf48bdc20eb6a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304840
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Dustin Cowles <dustin.cowles@instructure.com>
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Dustin Cowles <dustin.cowles@instructure.com>
2022-11-30 16:38:26 +00:00
Steve McGee 0f1b7658c9 parent_frame_context to external_content#success
closes: INTEROP-7744
flag=none

test plan:
- Add this to ui/shared/tinymce-external-tools/react/components/ExternalToolDialog.js (after line 180)
   `<input type="hidden" name="parent_frame_context" value="{id of tool}" />`
- add a debugger statement to ui/features/external_content_success/index.js just before line 64
- Launch a 1.1 tool from RCE
- choose "return link content item to Canvas"
- when the debugger stops in the browser inspect the window of the frame, and `window.ENV.DEEP_LINKING_POST_MESSAGE_ORIGIN` should be the origin of the tool

Change-Id: Ifd281c75b259c5617cb3275f928e179ae091ae98
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306014
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2022-11-30 16:10:22 +00:00
Aaron Ogata a5d18d91db split vendor overrides into own file
refs DE-1465

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

Change-Id: I12e7883091614883b724e4a50164aa5abf4f5cca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306294
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bobby Buten <bobby.buten@instructure.com>
Build-Review: Bobby Buten <bobby.buten@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-11-30 15:22:04 +00:00
Dave Wenzlick 227e5ac3d2 Check for outcome_service_results_to_canvas FF before exec SQL
closes OUT-5414
flag=outcome_service_results_to_canvas

Test Plan
- Jenkins pass

Change-Id: I2e18dc52ff47a549131c73cf2c0694063d2fb1e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306249
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-29 22:47:57 +00:00
Aaron Ogata 9713403131 fix eslint slowness
refs DE-1446

Change-Id: Id25e72c78703177b2692f62267c8d910b0dfb8d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304798
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-29 20:53:21 +00:00
Aaron Ogata 807fab3aee try to fix bundle install intermittent failure
Change-Id: I8472dac5a07aabfcc31b647ff665375e428b1329
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306246
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-29 19:34:37 +00:00
Jason Gillett 42dfa7ee6a Fix react inbox when a hard-deleted user is present
fixes VICE-3246
flag=react_inbox

Exclusion: Reply in threads with hard deleted users is broken
Will get fixed in VICE-3251

Test Plan
1.  Create a user
2.  Create a conversation with that user
3.  Reply with a different user
4.  Hard Delete the user
4a. Hard delete script will be placed below
5.  Open the inbox with the user that recieved the message
6.  Verify that no errors are thrown and that messages are visible

Hard delete:

userToDelete = User.find(ID)
userToDeleteId = userToDelete.id

CommunicationChannel.where(user_id:userToDeleteId).map {|mem| mem.destroy_permanently!}
Enrollment.where(user_id:userToDeleteId).map do |enrollment|
  Score.where(enrollment_id:enrollment.id).map { |participant| participant.destroy_permanently! }
  enrollment.destroy_permanently!
end
Pseudonym.where(user_id:userToDeleteId).map { |participant| participant.destroy_permanently! }
Submission.where(user_id:userToDeleteId).map { |participant| participant.destroy! }
UserAccountAssociation.where(user_id:userToDeleteId).map { |participant| participant.destroy_permanently! }
UserNote.where(user_id:userToDeleteId).map { |participant| participant.destroy_permanently! }

userToDelete.destroy_permanently!

Change-Id: Ia42cccb580f26de0579e510749ada1f539220637
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305937
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
2022-11-29 19:00:14 +00:00
August Thornton 5998a826f8 improve eportfolio performance on category render
fixes FOO-3217
flag = none

test plan:
 • create a user with at least 1000+ submissions
 • create an eportfolio as that user
 • create several eportoflio sections
 • verify page load times are sub 1 second when navigating
   those sections (I was shooting for ~ 500ms)
 • verify adding recent assignment submissions works as it
   did before (we now only query the last 20 most recent and
   active user submissions)

Change-Id: Iaeddc766864449c9186a3e9fb595bf910da3f0e1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305910
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: Jeremy Stanley <jeremy@instructure.com>
2022-11-29 18:01:34 +00:00
Chawn Neal 1c07956794 implement SplitScreen toggle via user_setting
With the split screen ff on, you will be able to
use the SplitScreen button, to toggle the user preference.
Thereby, you can toggle between
inline or switch screen view.

If the user mutation fails, it will still toggle
the view, just no db change.

flag=split_screen_view
fixes VICE-3116

Test Plan:
 Setup:
  0a. Start with user preference ss off.
  0b. Go to a Discussion.
  0c. Have 1 root entry and one sub entry on it.
 Plan:
 1. Verify you see SS button.
 2. Click View replies on entry.
 3. Verify it's inline.
 4. Click SS button.
 5. SS button Text should change.
 6. inline should close.
 7. click view replies on entry.
 8. SS should open and you can see replies.
 9. click SS button.
 10. SS button Text should change.
 11. Inline should be active.

 12. Check that if you change to SS mode,
 then page refresh that it persists.
 13. Test with multiple open root entries,
 that after clicking SS button, they all close.
 14. If SS ff is off, SS button should not show.

Notes:
Test plan assumes SS preference is initially off.
This did not need to be the case, the Testing would just
be in reverse.

Change-Id: Ica846e922a4549022f72872e22173164cd4d4b8e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305857
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
2022-11-29 17:54:35 +00:00
AJ Esa 8abef3d627 Timestamps for delayed jobs not null
Make the timestamps for delayed jobs not nullable. Fixes schema
inconsistency.

fixes FOO-3107
flag=none

Change-Id: I97050eb78fcfa4bd3989c120ee1736efa8abd879
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305918
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ajmal Esa <ajmal.esa@instructure.com>
Product-Review: Ajmal Esa <ajmal.esa@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-11-29 16:55:55 +00:00
Chris Soto 30ba119c0b assignment enhancements print urls
fix issue where when assignment enhancements flag
is on, when trying to print grades from student
grade page, it shows the speed grader url

fixes EVAL-2679
flag=assignments_2_student

test plan:
- have a course with a text assignment that is due
- with assignments_2_student flag on, navigate to
  individual student grade page as a teacher
- for the text assignment, verify the url of the
  assignment title navigates to speed grader page
- from the student grade page, right click and go
  to print the page
- verify in the pdf preview that the url for the
  assignment doesn't exist
- before the fix, the url would be displayed

Change-Id: I1bd3e059cc7f73dab932ecc2d32e3d58bb654d73
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Deborah Kwak <deborah.kwak@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2022-11-29 16:46:50 +00:00
Mysti Lilla 0cafb06dd9 Make folder deletion faster
closes MAT-919
flag=none

Test plan
- Upload a zip file with a LOT of files/folders
  and expand it into a folder
- Delete the folder you expanded it into and
  verify it takes less time (and SQL queries)
  than the previous version of this code
- Verify that single file deletion
  works as expected
- Check caching and make sure nothing looks
  weird like the cache should've cleared and
  didn't

Change-Id: I6798dbaf95018f967c68c5b409a1f2c64c5e5004
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305353
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2022-11-29 16:30:43 +00:00
Aaron Ogata 3d227eb825 fail jenkins-cache if tar fails
Change-Id: I6f1cd8001649ad7a01c52ef40b3f3810705c271a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306174
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Build-Review: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-29 03:05:56 +00:00
Aaron Shafovaloff 4ac41dda0a Extract final grade override data loading
Test plan:
  - Open gradebook settings and enable final grade override
    - Open gradebook and verify that final grade override is visible
    - Override final grade for a student
  - Open gradebook settings and disable final grade override
    - Verify that final grade override is not visible

Refs EVAL-1934

flag=none

Change-Id: If3a5c26275c4d237fbccf8b924e49025b795f06e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305599
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2022-11-28 21:28:51 +00:00
Aaron Ogata b1f865bd0e also serialize shard in attachments martial functions
refs AE-1

Change-Id: I18e7a57ce71620645f185ca74b3da71e3cecd041
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306154
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-11-28 19:49:14 +00:00
Juan Chavez 7af845d8a4 IM: Clean image settings if icon doens't have icon/image
closes MAT-960

flag=buttons_and_icons_root_account
flag=buttons_and_icons_cropper

test plan:
- Navigate to a RCE instance.
- Edit an old icon (icon created before this change
that has imageSettings or cropperSettings set but without
an icon or image assigned).
> Verify that the icon is loaded with no problems.
- Save the icon and download it.
> Verify that the icon metadata was updated removing
unused keys.

Change-Id: Ic94af37db3a378ecbd0da3d55f652793802d8863
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306072
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Deyvison Penha <deyvison.penha@instructure.com>
QA-Review: Deyvison Penha <deyvison.penha@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
2022-11-28 19:33:07 +00:00
Jacob Burroughs 66861d86c9 Fix the last failing rails 7.0 spec
Change-Id: I25f8ebef7b1c23cdb489f12bdf6c5e9b118fa814
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306149
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-11-28 18:27:05 +00:00
Jacob Burroughs ab450f64c5 Eliminate tableless jankiness
Also move some files used in initializers

Change-Id: Ieb4ea21b0c1888361f4b1dd227fa6db12eed453f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304381
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-11-28 17:50:51 +00:00
Aaron Ogata 3dcf6425d8 use nicer language in specs
Change-Id: I7ab827d040de38726800e252ee24482769c3e42d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306139
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-11-28 17:50:48 +00:00
Joe Hernandez 36cbb49c33 Prevent pending audio files from being embedded
When audio file uploaded and being processed by notorious, prevent
embedding it from side tray > All Files while it is in pending state.

fixes MAT-959
flag=none

Prerequisites
* You'll need a large-ish audio file to upload to your local canvas.
I attached one (10MB) to the JIRA ticket that you can use
* You need to have notorious running locally
* You need the corresponding changes from the canvas-rce-api repo
https://gerrit.instructure.com/c/canvas-rce-api/+/305519

Test Plan
- Go to RCE and from Tools menu: Insert > Document > Course Documents.
-- Leave this side tray open.
- Open another tab to Files page in canvas
** The next steps need to be done in quick succession
- In Files, click the Upload button and upload the test audio file
- Quickly go back to the RCE with the side tray open. Switch dropdown
that says "Documents" to "All"
- Click on the "Course Files" icon
VERIFY:
1. the uploaded file name is not used; it instead says:
"Media file is processing. Please try again later."
2. Clicking on the file does not embed it in the RCE
3. Clicking on any other file does embed it in the RCE
- Close the side tray, wait a short while (~1 min?)
- Re-open the side tray and switch to "All" again
VERIFY
1. The uploaded audio file name is now displayed
2. Clicking on the uploaded audio file embeds it in the RCE

Change-Id: I9418692de0bcf64c31d802487eaf6503a341c3d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305518
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: David Lyons <lyons@instructure.com>
2022-11-28 17:34:12 +00:00
Martin Yosifov 3c949b432d Update question bank alignment title when bank name is updated
closes OUT-5381
flag=outcome_alignment_summary

Test plan:
- Enable Improved Outcomes Management FF
- Enable Outcome Alignment Summary FF
- Go to Course > Outcomes and get course id from URL
- Open devtools > network tab
- Create an outcome then retrieve its id from the
graphql query response in network tab
- Create a question bank and align it with the outcome
- Open in browser canvas.docker/graphiql
- Execute query below replacing outcome and course ids
query MyQuery {
  learningOutcome(id: "1") {
    alignments(contextId: "2", contextType: "Course") {
      title
    }
  }
}
- Verify that the alignment title is the question bank name
- Go to http://canvas.docker/courses/{id}/question_banks,
replace id with course id, select the question bank and
update its name
- Rerun query and verify that alignment title is
the updated question bank name

Change-Id: Ic192bd0d32abbd35e7bdaaa669451f40e01fcbcc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305611
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
2022-11-28 17:00:21 +00:00
Angela Gomba 86eb63be00 Update course created/updated live event to include account uuid
closes OUT-5313
flag=none

Test Plan:
- You will need Canvas and Live Events up and running
- Tail the logs in Canvas:
    docker-compose run --rm web script/tail_kinesis
      http://kinesis.docker canvas-live-events
- Go to canvas.docker/api/v1/accounts/self and note the
  uuid listed. This is your account uuid
- Create a course and make sure it is under the correct
  account
- Observe in the Canvas logs that the
  course_created live event includes the
  account_uuid, and that it matches the account uuid
- Edit the course (i.e., edit the course name)
- Observe in the Canvas logs that the
  course_updated live event includes the
  account_uuid, and that it matches the account uuid

Change-Id: I9c16456284ff333b21a66af31db8372f4ec2abf8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305829
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: Kyle Rosenbaum <krosenbaum@instructure.com>
2022-11-28 16:59:49 +00:00
Juan Chavez b847688825 Fix assignment enhancements duplicated LTI text entry
fixes MAT-872

flag=assignments_2_student

prerequisites:
- Studio LTI installed

test plan:
- Enroll a student in the course
- Create an assignment with text entry as a submission option
- As the student, access the assignment
- Use the text entry submission type
- Embed video from Studio (you can use a youtube video)
> Verify that after pressing "Embed" button in modal, it should close.
> Verify that only one instance of Studio was added to the RCE.

Change-Id: Ibb6d9a34dddfb181beba9042f2fdd4d9bcdd1501
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305277
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
2022-11-28 16:20:10 +00:00
Jonathan Guardado b1aae94477 Fix: not specified end dates for student course paces
Shows the last module item due date If the student pace does not have
an end date set

closes LS-3581
flag=course_paces_redesign

Test plan:
- In a course with student paces enable
- Go to the course pace page and select the students tab
- Click on any student to open the pace modal
- Expect not to see the “Not specified” text
- Do some changes in the item due dates
- Expect the end date to reflect the changes

Change-Id: I92e69c260358035988daef3bcc9a1e662b337957
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305949
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: Jonathan Guardado <jonathan.guardado@instructure.com>
2022-11-28 15:27:50 +00:00
Ed Schiebel 32a063b526 [i18n] Update canvas-media translations.
Change-Id: I2e75509d130c7b6aa4fafd51740241811e180880
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306134
Reviewed-by: Jon Scheiding <jon.scheiding@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2022-11-28 15:16:02 +00:00
Eduardo Escobar b806c62f58 add counter of available peer reviews in modal
closes EVAL-2751
flag=assignments_2_student
flag=peer_reviews_for_a2

test plan:
- enable the FF "Assignment Enhancements - Student".
- enable the FF "Peer Review Support in Assignment
  Enhancements".
- have a published course.
- have a course with a teacher and 2 students (S1
  and S2).
- create an assignment A1 with "Peer Reviews"
  enabled and the "Peer Reviews Appear Anonymously"
  disabled.
- create an assignment A2 with "Peer Reviews"
  enabled and the "Peer Reviews Appear Anonymously"
  enabled.
- assign some peer reviews to the students for
  both assignments.

with anonymous PR disabled
- as the student S1 create a submission
  for the assignment A1.
- notice a modal is present just after hitting
  the submit button.
- check that the number of peer reviews to complete
  in the modal should match with the number of
  peer reviews associated to the assignment.
- check that the number of available peer reviews
  is zero and the "Peer Review" button is disabled.
- as the student S2 create a submission for the
  assignment A1.
- as the student S1 create a new submission for
  the assignment A1.
- notice a modal is present just after hitting
  the submit button.
- check that the number of available peer reviews
  is one and the "Peer Review" button is enabled.
- check that clicking the "Peer Review" button
  redirects you to the available submission
  to review.

with anonymous PR enabled
- as the student S1 create a submission
  for the assignment A2.
- notice a modal is present just after hitting
  the submit button.
- check that the number of peer reviews to complete
  in the modal should match with the number of
  peer reviews associated to the assignment.
- check that the number of available peer reviews
  is zero and the "Peer Review" button is disabled.
- as the student S2 create a submission for the
  assignment A2.
- as the student S1 create a new submission for
  the assignment A2.
- notice a modal is present just after hitting
  the submit button.
- check that the number of available peer reviews
  is one and the "Peer Review" button is enabled.
- check that clicking the "Peer Review" button
  redirects you to the available submission
  to review.

Change-Id: I4bf6be9c499484d225d7d91c90b11695f7a58bc3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305174
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2022-11-28 15:09:46 +00:00