Commit Graph

1116 Commits

Author SHA1 Message Date
Cody Cutrer 3e27ddeae0 bundle update rubocop-performance, rubocop-rails
[skip-stages=Flakey]
[skip-crystalball]

99% of fixes are Performance/StringIdentifierArgument, but one or
two instances of each of Performance/Count, Performance/MapCompact,
Rails/Pluck in safe navigation chains

Change-Id: Ibd2292fb9e7c1e9162068021073c3c0f4b0d65df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-12-18 20:28:02 +00:00
Evan Battaglia 19423ae383 Add sessionless launch info to debug logging
Part I in tech plan.

Also add authredir=1 query param so we can see if launch has gone thru
redirect.

This will tell us if a launch came from a sessionless launch, and what
(i.e. Android app or iPhone app) generated that sessionless launch.

flag=none
closes INTEROP-8336

Test plan:
- as in test plan in 016a6263, set up debug logging with at least log
  level 3, and set up a server to receive the logs
- generate a sessionless launch, e.g.
    tok web.canvas-lms.docker/api/v1/courses/1/external_tools/sessionless_launch?id=123
  where id is a tool with course_navigation
- go to the URL to launch the tool
- look at the log received by your server. It should include
  sessionless_user_agent and sessionless_request_id.
- in the log, `path` should include authredir=1

Change-Id: Ic112b7d3890b635ea30bd92b885b757fe8e137b8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334243
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2023-12-07 23:34:49 +00:00
Cody Cutrer c32d30f662 bundle update rubocop
[skip-stages=Flakey]
[skip-crystalball]

and apply corrections from new/updated cops:

 * Layout
 * Lint/AmbiguousRange
 * Lint/RedundantSafeNavigation
 * Style/HashEachMethods
 * Style/HashSyntax
 * Style/InverseMethods
 * Style/RedundantLineContinuation
 * Style/RedundantParentheses
 * Style/RedundantReturn
 * Style/SuperWithArgsParentheses
 * Style/SymbolProc

Change-Id: I787e46f5b1c89e0fedebd5452ba74567d66954c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-12-06 14:25:02 +00:00
Spencer Olson e9d96e7e3e Introduce single table inheritance (STI) to the Assignment model
flag=discussion_checkpoints
closes VICE-3941

test plan:
 - Specs pass.
 - Cursory testing of everything related to assignments
   across Canvas LMS.
 - Create an assignment, old quiz, new quiz and graded discussion
   assigned to multiple students and ensure each can be submitted
   to by the assigned students.
 - Sanity check that the submissions can be viewed and graded
   within Speedgrader.

Change-Id: Ib31b8e604040b094381571b854ea3429ac10622a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334305
Tested-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Reviewed-by: Aaron Suggs <aaron.suggs@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-12-05 22:09:24 +00:00
Sarah Gerard f8b5fd0f8d Fix module item sequencing calls for duplicate pages
see ticket for a thorough explaination of the bug. This
bug was due to the page's url column being different than the
current lookup after editing

Fixes LF-1011
flag=none

test plan:
- have two courses
- in the first course, create two pages with the same title
  (ex. 'page'
- navigate to the duplicate page (the one with page-2 as the url)
- copy the page into the second course, adding it to a module
- use the get module item sequence call in the second course,
  /api/v1/courses/:course_id/module_item_sequence?asset_type
  =page&asset_id=page-2
- you should see the page data
- edit and save the page, and use the same call again. You
  should still be able to see the same results.

Change-Id: I96a39ae0985c9a8986242aeb663a2b35d456682b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334424
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-12-05 18:26:26 +00:00
Evan Battaglia 033aff904a Include debugging information when starting launch
flag=none
refs INTEROP-8335

Test plan:
- Turn on the setting with:
    acct = Account.default
    Lti::LaunchDebugLogger.enable!(acct, 1)
- In authorize add:
in app/controllers/lti/ims/authentication_controller.rb, in the
authorize method right before "render" (line 92 for me), add:
    puts "DebugMe"
    puts Lti::LaunchDebugLogger.decode_debug_trace(decoded_jwt["debug_trace"]).to_json
- Go thru an LTI 1.3 launch
- find the log line, e.g.:
    containerid=$(docker ps|grep canvas.*web|awk '{print $1}')
    docker logs $containerid | grep -A1 DebugMe
  check that it has all the fields we log in the code, except for the
  following which may be empty (not included):
    set_cookie_session
    set_cookie_leg_session
    (possibly) context_enrollment
    (possibly) referer
- bonus: try with a sessionless launch (you need to make a request to
  e.g.
   /courses/1/external_tools/generate_sessionless_launch?launch_type=assessment&assignment_id=1
  with an API token)

Change-Id: I9097fada33ed62d999e44c42a06b8ef3cb85949c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333173
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-12-01 15:13:50 +00:00
Aaron Suggs 40dd9d4b8c Add Hotjar JS for Learner Passport
This is only for alpha customers in the US, in non-prod envs.

refs VICE-3932
flag=learner_passport

test plan:
1. in a non-prod env, load LearnerPassport. Notice that the Hotjar JS is in the <head> tag.
2. in non-prod, load any other controller. Notice the lack of HotJar JS in the <head>.

Change-Id: Iae4bb85f4f9b6d7852f27aa94d5e32ce01934eab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333954
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: Ed Schiebel <eschiebel@instructure.com>
2023-12-01 13:24:07 +00:00
Samuel Lee 7d2fd49d9a modify gradebook pages as part of ICE initiative
modify gradebook pages as part of the ICE initiative. This commit
fixes the headers for the Enhanced Individual Gradebook page,
the Gradebook History page, and the Traditional Gradebook page.

closes EVAL-3558
flag=enhanced_gradebook_filters
flag=instui_nav

test plan:
- tests pass
- Acceptance Criteria
    - gradebook title is changed to h1 tag and font weight of 700
    - gradebook dropdown icon is changed to IconOpenArrowDown, which
      changes to a IconOpenArrowUp when the menu is open
    - new keyboard shortcut button opens the shortcuts modal when clicked
    - main body padding is 48px on right and left, and 36px on top and
      bottom
    - 36px margin between header and content
    - 12px margin between header buttons

Change-Id: Icc0f8bc4f8bd6d2696573ae97b02869cc0ae89fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329673
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Melissa Kruger <melissa.kruger@instructure.com>
Product-Review: Melissa Kruger <melissa.kruger@instructure.com>
2023-11-22 20:54:16 +00:00
Chrystal Langston 3de311214e Update get_lmgb_results to include default artifact_type
When pulling authoritative results from outcomes service to
display in (s)LMGB & admin outcome results reports (aka OSSOT),
the endpoint should include the arifact type of 'quizzes.quiz'
to ensure only New Quiz AR will be returned.

closes OUT-5951
flag=none

test plan:
- tests are sufficient & jenkins passes
- This relies on https://gerrit.instructure.com/c/outcomes-service/+/331398
- Before adding these patch sets to your workspace
  - ensure you have some new quizzes that are aligned with
    account & course outcomes and students have taken them.
  - Load the LMGB in the course where there are student
    outcome results
  - Generate the csv report and ensure that there are new
	quiz results.
- Add these two patch sets to your workspace
  - tail the api logs in OS
    dc logs -f api
  - Reload the LMGB
  - The scores reported in LMGB should be exactly the same.
  - In OS api logs, verify that artifact_type=quizzes.quiz
    is included as a parameter on the api url
  - Generate the csv report and ensure that there are new
	quiz results again.
  - Verify the results are the same.

Change-Id: I897c995fff9af6c261f0226cd6b00a07b7f13366
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/332587
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-11-16 22:10:46 +00:00
Angela Gomba f601ab072b Block outcome deletion if there are OS alignments
Note: This PS is dependent on g/331563 in OS

closes OUT-5978
flag=none

Test Plan:
- Download g/331563 PS in your local OS
- Enable the Improved Outcome Management FF
- Create an account-level outcome and align it to an item from
  an Item Bank
- In the account Outcome Management, open the kebab menu for the
  outcome and observe the Remove button is disabled
- Create a blueprint course and an outcome and import the
  account-level outcome into the course
- Open the kebab menu for the account-level outcome and observe
  the Remove button is enabled
- Create another course and associated it with the blueprint
  course you created. Then sync the courses.
- In the associated course, create a New Quiz and align the
  course-level outcome and import the item that is aligned to the
  account-level outcome
- In the associated course Outcome Management, open the kebab
  menu for both outcomes and observe that the Remove button is
  disabled
- Disable the Improved Outcome Management FF and check the
  same outcomes above and observe there is no Remove button
- In the blueprint course, remove both outcomes then sync the
  changes
- Observe in the associated course that both outcomes are still
  present

Change-Id: If1526191276aa36cafde3f2b2b4e88bc42f5fdbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330788
QA-Review: Jason Anderson <jason.anderson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
2023-11-16 21:02:05 +00:00
Eric Saupe 771a9e41d0 Revert "Proxy iframe content through media_objects_controller"
This reverts commit 7c55d04c94.

fixes LF-617

Change-Id: I54986edffc6b181a9ac6a146dc11478434be1d89
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331338
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: Eric Saupe <eric.saupe@instructure.com>
2023-10-26 15:30:04 +00:00
Spencer Olson 686701f8d6 display minus instead of en-dash
Changes the display of letter grades (e.g. "A-") to use the unicode
minus character (U+2212) instead of en-dash, so that screenreaders properly
read the grade (e.g. "A minus" instead of "A (pause)").

flag=none
closes EVAL-3344

Test Plan:
- On the following pages, verify displayed minus letter grades use the
  unicode minus character and are announced by screenreaders as
  "<the grade> minus":
  - global student grades page (/grades when a student is enrolled in more
    than one course)
  - student grades page
  - new student grades page (student_grade_summary_upgrade FF enabled)
  - A2 assignment page
  - SpeedGrader
  - Default Gradebook
  - Enhanced Individual Gradebook (individual_gradebook_enhancements
    enabled)
- On pages where letter grades can be input to grade a student (e.g.
  Gradebook + SpeedGrader), verify both types of input are accepted:
  - "<the grade><en-dash>" e.g. "B-"
  - "<the grade><minus>" e.g. "B−"

Change-Id: I3b8c4b48f198966d492900edbe6265cd98f311f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327945
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-10-09 16:24:10 +00:00
jonathan 25f5b58c92 Replace helper links by buttons in course settings
fixes LF-727
flag=none

Test plan:

- Go to the Course Details tab in the course settings page.
- Using voiceover, navigate over the License and visibility helper
icons.
- Expect Voiceover to announce them as buttons instead of links.

Change-Id: I05e30a025079504250c57b6075d65370410cc642
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328069
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>
2023-09-19 14:10:52 +00:00
Martin Yosifov 44dcc1ed30 Add Pagination Support for Alignment Summary calls to OS API
closes OUT-5873
flag=outcome_alignment_summary_with_new_quizzes

Test plan:
- Start Canvas, Outcomes-Service, Quiz LTI and Quiz API
- Create course and enable "New Quizzes included on
Outcome Alignment Summary Tab FF"
- Add or Create at least 26 outcomes in the course
- Create new quiz and align all outcomes to the quiz
- Select Alignment Summary Tab and verify that that it
displays all aligned outcomes (scroll down until all
outcomes are loaded)
- Expand the outcome description of random set of aligned
outcomes and verify that it displays the new quiz alignment
- Filter outcomes "With Alignments", search for outcomes,
expand the descriptions of a random set of outcomes returned
from search and verify that it displays the new quiz alignment

Note: OS API returns up to 25 results per page; that's why
we need 26 outcomes to verify that AS supports pagination

Change-Id: I80d8bb5c173eae0be986b4aae1d82aa056775b04
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326973
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-09-11 18:07:59 +00:00
Ed Schiebel 3ebcb96a72 Update calendar series natural language to handle leap day
closes LF-721
flag=calendar_series

test plan:
  - click the + to create a new event
  - set the date to a leap day (e.g. Feb 29, 2024
  - open the frequency picker
  > expect to see "Annually on Feb 29"
  - click on custom  and save
  > expect to see "Annually on Feb 29, 5 times"
  - submit
  - when the api completes, click on one of the events
    you just created
  > expect the natural lang description to be correct
  - click on one of the events and edit
  - change the title and save
  > expect the title to change on all events
    (you can click on the month-year link at the top
    of the calendar and type in a month-year
    (eg. February 2028) to go there)

Change-Id: Ibd184e10597cf014ffa0ee877ae1911250330923
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327007
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-09-06 13:31:00 +00:00
Steve Kacsmark 2e4272aba1 Deprecate third part imports feature flag for now
flags = new_quizzes_third_party_imports

Test Plan:
  - Flag no longer appears.

Change-Id: I978c6872cd5f91b4b35e6cbf30b9f1a2e00b6d08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326456
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ferenc Marcsó <ferenc.marcso@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
2023-09-05 15:11:50 +00:00
Cody Cutrer e1a6ca4982 bundle update rubocop
no new cops, but a few fixes to existing cops (notably
Style/RedundantReturn)

Change-Id: I64a744c3d81e25329c1612e4622ca96783b0801d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324942
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-14 16:32:06 +00:00
Hitesh Rawal 33d01dcde9 New decaying_average calculation
Existing decaying_average method
is renamed as weighted_average
and added new standard_decaying_average method
for standard decay calculation.

These changes will be reflected only
if outcomes_new_decaying_average_calculation,
feature_flag is turned on

refs: PFS-21869, PFS-21871

Test Plan
* Create outcome
* it should have default calculation method weighted_average
* Mastery calculation dropdown should show weighted_average
and decaying_average

flag=none

Change-Id: I84a90a58c1b5d311564921af78729480141744ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321346
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Mark Valentine <mvalentine@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-07-31 15:06:45 +00:00
Ed Schiebel 2092460599 Fix typo causing i18n extract key collision
closes LF-492
flag=none

test plan: passes jenkins

Change-Id: I84a8c3889c9257496ddddcd54dc2715e240fe606
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322785
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-07-14 16:46:57 +00:00
Ed Schiebel 9bcea1f53c add all the custom recurrence UI
closes LF-356
flag=none

test plan:
  - yarn storybook
  - play with all the stuff under Calendar > RecurringEvents
  - especially play with CustomRecurrenceModal, since that's
    what will go into Canvas
  > expect it to spit out correct RRULEs

  - in CustomRecurrenceModal story
  - change repeat every to Month
  - open the Select
  > expect "Monthly on day 7" and "Monthly on the first Monday"
    as the 2 options
  - in the form at the bottom of the page, change the eventStart
    string so the day of the week is the last one of the month
  > expect the Select to have 3 options for the date,
    the nth day of the week, and the last day of the week

Change-Id: Id68645399880c97d86a67fd974d06eabf58f674c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321191
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-07-14 12:55:32 +00:00
Cody Cutrer 09a6b94036 add reasonable failsafes for several usages of Consul
refs AE-380

a lot of these are APM style settings that would be okay to just turn
off while Consul is down. others are things that should just silently
not have any data, instead of failing the request

Change-Id: I34c553b089197f85b2d46029e5079851227090b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/322239
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-07-12 14:51:15 +00:00
Cody Cutrer aa7041d2c1 update rubocop, and apply new cops
[skip-stages=Flakey]

Change-Id: I2d3ffbeb652a6668941125a8a2afe87f104c8d0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321953
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-07-03 22:11:42 +00:00
Eric Saupe 7c55d04c94 Proxy iframe content through media_objects_controller
This changes the returned URL used in the content iframes to proxy
through canvas and not return the underlying file URL. This allows us
to better wrap permissions around file access.

fixes LF-310
flag=authenticated_iframe_content

test plan:
- With the flag off
- Have a course with some RCE video content
- Verify the iframe is using a direct notirious file link
- Verify that going directly to that link renders the file directly
- Turn the flag on
- Refresh the page with RCE content
- Verify the iframe is using a canvas url
- Verify the content is still visible and working as intended
- Verify that going directly to the canvas link will download the file
and that the underlying file URL is not exposed

Change-Id: I76010e32a68fdcfcaebe925f690fe373abe22157
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/321280
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-06-26 17:49:21 +00:00
Matheus afac17ac2b Hide CC upload button for locked media
closes LF-368

flag=media_links_use_attachment_id

Test plan
- Create a BP course and link a child course
- Upload a media file and lock it in the parent
- Sync the courses
- Check the child course files
- Preview the locked file and check that there is
  no CC upload option when clicking the CC button
  (There will be no CC button if there are no tracks)

Change-Id: I29f4e6b13196b6d906ff04f206c1d2d909450c65
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320660
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-06-21 16:38:33 +00:00
Angela Gomba cfe210a974 Skip Deletion for Outcomes with Alignments in Blueprint sync
closes OUT-5666
flag=none

Test Plan:
- Create an account-level outcome
- Create three courses
- In the first course:
  - Create a course-level outcome
  - Import the account-level outcome
  - Go to Settings and Enable the course as a Blueprint Course
  - Using the Blueprint manager (click icon in top-right corner)
    associate the second course
  - Perform the initial sync
- In the second course:
  - Create a rubric and align both outcomes
- In the third course:
  - Create a New quiz and align both outcomes
- Go back to the Blueprint course and delete both outcomes
- Sync the changes
- Observe the sync completes successfully
- Observe that both outcomes were not deleted in the associated
  courses

Change-Id: Ie0a9577da97e23447260ac2feb28b06068227548
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319461
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
QA-Review: Wilmer Corrales <wilmer.corrales@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-06-14 02:48:32 +00:00
Mysti Lilla 5573c1d2fc Ensure BP downstream changes and re-locking works
fixes LF-288
flag=media_links_use_attachment_id
QA-risk:low

Test plan
- Set up a BluePrint course
- Upload a media file and add some captions
- Sync the BP file
- Change the captions in the child course
- Sync the BP file and make sure the child
  captions are still there
- Lock attachment content on the BP parent
- Sync the BP file and make sure you see
  the parent captions

Change-Id: I7d844822c68168bcecf7e9bf24e6241fbb8ee421
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319814
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2023-06-13 23:51:21 +00:00
Matheus d2e0ef5ac3 Alter canvas media player failure feedback for attachment media
This should be JS tested, but LF-59 kinda got in the way, so it
would be good to figure that out, we're skipping a bunch of stuff...

closes LF-300
refs LF-59

flag=media_links_use_attachment_id

Test plan
1. Upload a media file in a course
2. Link to the media file in the RCE
3. Keep the RCE page somewhere accessible.
4. go to the files section and replace that
5. Reload the RCE page and check that you won't
see the old errors while @media_object is nil
(for me this window was like a minute)
6. Check that what you do see is a friendly
message directing the user to wai

Change-Id: I1eb4e7abeca6bb2dd430a575db787ee888c8c1c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320424
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-06-13 23:14:59 +00:00
Ryan Hawkins cca5445f46 fix: Allow blob downloads for New Analytics
why:
- New Analytics AKA Pandalytics fetches some data, turns that into a
  blob, then downloads that blob client-side
- If a school has enabled CSP, then reports cannot be downloaded. This
  issue only appears in Firefox, not Chrome, so it would appear they
  have different interpretations of CSP for iframes. After lots of
  experimentation, the only policy that seemed to allow for this style
  of file download was allowing blobs as a frame-src

test-plan:
- Before checking this commit out, run the following inside of Firefox:
- Install New Analytics (message me for help with this, it's rather
  annoying)
- Enable CSP by turning on the Content Security Policy Account-level
  Feature Flag
- Modify `app/helpers/application_helper.rb#add_csp_for_root` to allow http
  in iframes. The final line in the method should look like:
`headers[csp_header] = "frame-src 'self' blob: http: #{domains}#{csp_report_uri}; "`
  This is required because modern browsers (rightly) assume that if you don't
  specify a protocol in your CSP, you must only want traffic over HTTPS. This change
  is only required for local dev to work properly.
- Launch New Analytics from inside a course, then go to the reports
  tab. Try and run any report and notice the alert warning you about a
  CSP violation.
- Now reset your repo, check this commit out, add the same http: line to the CSP,
  and try to do the same thing. You should be able to download the report now.

flag=none

closes INTEROP-8088

Change-Id: I79b75ace9a2b3f3e1d2f923424f8b70eea928add
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319565
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-06-07 22:33:50 +00:00
Mysti Lilla 4f2bd204e2 Prevent caption updates on BP locked files
refs LF-361
flag=media_links_use_attachment_id
QA-risk:low

Test plan
- With the feature flag set up a
  BluePrint course and mark
  attachments as locked
- Have a media attachment and add
  captions
- Sync to a child course
- After the sync, try to add captions
  to the file that you copied
- Try to delete captions
- Both should result in an error

Change-Id: Ia54e52c656f4fbf79d5f6334bd4c1a63913f6343
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319610
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2023-06-07 21:58:08 +00:00
Jacob Burroughs 7dcc507d0a Rubocop for ruby 3.1
[skip-stages=Flakey]

Change-Id: I6abefdfa9fed6dd4525c8786e93efa548b3710f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-06-06 16:44:26 +00:00
Matheus 57f00bb3f2 Use new media attachment route on upload
closes LF-328
flag=media_links_use_attachment_id

Test plan:
1. In the files area in a course (or user)
2. Open the preview for a video file
   (upload one if needed).
3. Try to upload a CC via the CC menu and
   check that the correct media_attachments/
   route was used and not media_objects/

Change-Id: I55e1c2fffe44de089c39b5eb96c4ba634198d242
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319253
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: Luis Oliveira <luis.oliveira@instructure.com>
2023-06-01 21:12:34 +00:00
Juan Chavez 7134bc2169 Create new media track routes based on attachment ID
closes LF-213

flag=none

pre-requisites:
- A course with media uploaded.
- Find the attachment id of some media.

test plan:
> Test the following routes (same params as media_objects routes):
GET "<canvas>/api/v1/media_attachments/:attachment_id/media_tracks"
PUT "<canvas>/api/v1/media_attachments/:attachment_id/media_tracks"
POST "<canvas>/media_attachments/:attachment_id/media_tracks"
GET "<canvas>/media_attachments/:attachment_id/media_tracks/:id"
DELETE "<canvas>/media_attachments/:attachment_id/media_tracks/:id"
> Make sure media_objects routes are still working as expected.

qa risk: medium

Change-Id: I97f18b652cd50a4ba2c95563f59e437e0e62493c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315029
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: Juan Chavez <juan.chavez@instructure.com>
2023-05-24 18:03:46 +00:00
Jackson Howe 57f9d39129 Remove new_quizzes_skip_to_build_module_button flag
closes LF-291
flag = none

Test plan:
 (Requires a NQ connection to test)
 - Go to a course with at least 1 NQ and 1 CQ
 - On each of the quizzes, assignments, and modules index pages:
   - Click the kebab menu icon next to the NQ
   - Expect a "Build" option that takes you directly to NQ build page
   - Click the kebab menu icon next to the CQ
   - Expect no "Build" button

Change-Id: Ie88e4acc37ad4b9f5695a8214d002892770e2542
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318780
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>
2023-05-23 16:44:12 +00:00
Mysti Lilla 0d87ad214c Allow replaced media files to be viewed
fixes LF-166
flag=media_links_use_attachment_id
QA-risk: low, ff in place, only new code

Test plan
- Have a course with a media file
- Embed the media file into an RCE somewhere
- Go to course files and replace the file
  by uploading a different media file with
  the same name
- Go back to the RCE where you linked the
  media
- The new file should play and not error

Change-Id: I5840063db755a5c7c1574b201891f791e9e29dc6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318584
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
2023-05-20 01:05:47 +00:00
Weston Dransfield 8794f1ce1d Don't pass array as argument in heap app ID fetch
flag=none

Test Plan:
- Validate DynamicSettings.find(tree: :private)&.fetch(:heap_app_id)
  returns the heap app ID in production environments
- Validate DynamicSettings.find(tree: :private)&.fetch(:heap_app_id)
  returns the heap app ID set locally in dynamic_settings.yml

Change-Id: Ia82c895120042933786edbe4ecf916f0e0cd1e08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318019
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-11 21:36:17 +00:00
Mysti Lilla 0c82d07b21 Change media attachment permission to "download"
fixes MAT-1335
flag=media_links_use_attachment_id

QA-risk low

Test plan
- Have a course with a media object
- Link to the media attachment in the RCE
  using the media_links_use_attachment_id
  feature flag
- Unpublish the attachment
- Verify that students do not have access
  to the file

Change-Id: Id250e3c28be4f9b197c73c698bc77661388dad28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317577
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>
2023-05-11 17:26:31 +00:00
Mysti Lilla e860a4bb13 Move media object loader to helper
refs MAT-1335
flag=media_links_use_attachment_id

QA-risk low
Test plan
- Check media object controllers to make sure
  permissions look ok still

Change-Id: Ib0a6e4ae326a81e57c1209abaa4ab772f32ee4a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317576
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2023-05-10 20:37:48 +00:00
Cody Cutrer 502aa068da rubocop: Layout/Multiline*LineBreaks
[skip-stages=Flakey]

Change-Id: I24912809267088bc19a4082c49bc5f78ca7b76bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317302
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-01 19:31:42 +00:00
Rajmund Csehil 3b1ceec840 Keep rich content as-is during classic to new quiz migration
NQ can render and edit content made in Classic.
Simplest way to move CQ rich content to NQ is to
not touch rich content wwhen content stays in course.

closes QUIZ-11030
flag=new_quizzes_migrate_without_content_rewrite

test plan:
- create CQ
- add 1 question
- add rich content: images, videos, links, docs
- click on kebab, click Migrate
- wait, until migration is done
- check the NQ and validate that content is unchanged

2
- export CQ from the course export content menu
- check zip, html fields should contain palceholders

3
- do a course copy
- ContentExport.last
- find the download url
- unzip file and check that placeholders are in content
- check target course and verify links are replaced

4
- do a copy to with the CQ
- go to target course
- check that links are replaced

5
- create a blueprint course
- create a CQ with content
- create a new course
- sync bp into new course
- ensure CQ has updated links

Change-Id: I6ea48e78c2fd1e30c45b7639ba243b3f0d29e039
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315752
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Viktor Szpisják <viktor.szpisjak@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
Product-Review: Tamas Balogh <tamas.balogh@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-25 11:42:41 +00:00
Aaron Shafovaloff c33d6b9e07 updated .coffee-related comments
Change-Id: I3057ac993ca5e846deae98c8a3e29b2609c07231
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315700
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: Drake Harper <drake.harper@instructure.com>
2023-04-20 17:39:28 +00:00
Eric Saupe d52cc9a058 Remove added space between LTI icon and label
Rendering external_tools/helpers/icon includes the new lines and spaces
that are present in the partial. Calling #squish on the output of that
partial in this helper will remove all the new lines and spaces but this
removes the html_safe flag on the out. Wrapping that entire thing in
the icon correctly and without spaces.

fixes LS-3926
flag=none

test plan:
- Create an LTI in a course with an icon
- Go to the course settings and verify the LTI is rendered with the icon
- Hover over the button and verify there isn't an extra space before
the label
- Inspect the HTML and verify there isn't an extra space or new line
between the icon and label

Change-Id: I954b65d5a6e2d2e2a6354235679d12023f15240c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316073
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: Eric Saupe <eric.saupe@instructure.com>
2023-04-14 20:24:31 +00:00
Cody Cutrer 7c37aa5f64 rubocop: prep for updating rubocop-rails
auto-correctable cops applied

[skip-stages=Flakey]

Change-Id: Ie80bdfd170d9233d4a750edce6be467c93f3493f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315835
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-14 14:07:22 +00:00
Cody Cutrer 1d3d9ed499 rubocop: fix miscelleneuos violations in prep of bumping rubocop
Change-Id: I9d37303737f00d6e022cb8fc08726e293a7336ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315166
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-12 19:26:13 +00:00
James Logan 3fa8ec3567 Modules page doesn't show duplicating/failed_to_duplicate assignments
Launching duplicating/failed_to_duplicate new quizzes assignments
provides no value as the assignments do not yet exist, and is actually
destructive as it will create a blank assignment on the new quizzes
side with no connection to its parent assignment.

closes QUIZ-10828
flag=none

Test Plan:
- Create a BP parent course with a new quizzes assignment.
- ADD THE NQ ASSIGNMENT TO A MODULE.
- Create a child course.
- Ensure your live events are turned off and/or quiz lti is turned off.
- In the canvas rails console run this:
    Setting.set("quizzes_next_timeout_minutes", "1")
- Run a BPS.
- Check the child course.
  1. The Assignments/Quizzes list should have a spinner for the quiz.
  2. The modules list should have no entries.
- Wait 1 minute, then in the Canvas rails console run:
    Assignment.clean_up_duplicating_assignments
- Check the child course.
  1. The assignments/quizzes list should have an 'Oops!' entry for the quiz.
  2. The modules list should have no entries.
- Turn on quiz lti and your canvas live event streams.
- Run another BPS.
- Check the child course.
  1. The assignments/quizzes list should have a valid entry for the quiz.
  2. The modules list should have a valid entry for the quiz.

Change-Id: I971173ebca77e9ecfb152677092bd7f48f789d2b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311411
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
2023-04-12 16:48:04 +00:00
Cody Cutrer e99e8c0049 remove unnecessary line continuations
many can be converted to heredocs, and most the rest can be simply
re-arranged to chained method calls without line continuations

[skip-stages=Flakey]

Change-Id: Ib96722c0d8108ed2783129fb909bff7a18617ffd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315684
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-12 14:57:18 +00:00
Cody Cutrer b2b0bff902 rubocop: Style/TernaryParentheses, Style/RedundantParentheses
[skip-stages=Flakey]

Change-Id: I8d860eedd8b199ed3adf0e2bf9162b43096c5347
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-04-12 14:56:48 +00:00
Cody Cutrer f46fef5599 rubocop: Style/MapToHash, Style/MapToSet
Change-Id: I75a78a3d86d5875b450d4f32c2f71d8a44a735f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315125
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-11 14:41:55 +00:00
Cody Cutrer 99de4c3bdd rubocop: Style/SafeNavigation
Change-Id: I8e563a80cfd5df985fad024bfbf260ff457f8972
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315163
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-10 20:57:10 +00:00
Martin Yosifov abe3c66ca4 Integrate OSA helper with Course Alignment Stats loader
closes OUT-5466
flag=outcome_alignment_summary_with_new_quizzes

Test plan:
- Enable Improved Outcomes Management FF
- Enable New Quizzes Included on Outcome Alignment Summary Tab FF
- Start Canvas, Quiz API, Quiz LTI and Outcomes-Service
- Go to Account > Courses and create course with two outcomes
- Create an assignment and a rubric, align one of the outcomes
to the rubric and align the rubric to the assignment
- Create a new quiz and align the other outcome to
the new quiz at the quiz level
- Open in browser canvas.docker/graphiql
- Execute query below replacing course id as needed
query MyQuery {
  course (id: 1) {
    outcomeAlignmentStats {
      totalOutcomes
      alignedOutcomes
      totalAlignments
      totalArtifacts
      alignedArtifacts
      artifactAlignments
    }
  }
}
- Verify that query returns the following data
totalOutcomes: 2, alignedOutcomes: 2, totalAlignments: 3,
totalArtifacts: 2, alignedArtifacts: 2, artifactAlignments: 2
- Align both outcomes to the new quiz at the quiz level,
wait for 1 min for cache to clear then rerun query
- Verify that query returns the following data
totalOutcomes: 2, alignedOutcomes: 2, totalAlignments: 4,
totalArtifacts: 2, alignedArtifacts: 2, artifactAlignments: 3
- Stop sqs2outcomes container in Outcomes-Service, delete the
outcome that is aligned only to the new quiz, wait for 1 min
for cache to clear then rerun query
- Verify that query returns the following data
totalOutcomes: 1, alignedOutcomes: 1, totalAlignments: 3,
totalArtifacts: 2, alignedArtifacts: 2, artifactAlignments: 2

Change-Id: I5f6199c29b8cfbb9603d3927742fd8b30dd1ebd0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314862
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Dave Wenzlick <david.wenzlick@instructure.com>
QA-Review: Dave Wenzlick <david.wenzlick@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-04-07 15:47:25 +00:00
Matt Petro cf29d19f31 Use SHA256 for cache keys
This is part of the FIPS compliance project

Changing the hashing algorithm for cache keys should not affect site operation

Test plan:
- specs pass

Change-Id: I253821ec5a34fe69496a5690d11d735eeb001ae5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266082
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-05 17:57:09 +00:00