Commit Graph

55538 Commits

Author SHA1 Message Date
jake.oeding d89aa33d8d swap out npn bin with npx
npm bin was removed from npm in v9.0.0

refs LF-279
flag=none

test plan:
-run 'yarn build:all' and confirm that it succeeds

qa risk: low

Change-Id: I1fad82fd33a321ea4408260ed6917fa6b6e1e2c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318487
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: Jake Oeding <jake.oeding@instructure.com>
2023-05-18 12:59:32 +00:00
Ed Schiebel af7ca2c318 Show NEW pill for unseen auto-sub'd acct calendars
closes LF-238
flag=auto_subscribe_account_calendars

test plan:
  - have a couple accounts with auto-subscribe calendars
  - have a student in courses is those sub-accounts
  - load /calendar as the student
  > expect a NEW pill next to the auto-subscribe calendars
    - if the NEW pill didn't show up, from a rails console
      student.set_preference(:viewed_auto_subscribed_account_calendars, [])
      and try again. This will happen if you tested LF-237
  - refresh
  > expect the NEW pills to be gone

Change-Id: I87fdf52de9205f585372ce284794ef4c5950b05e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318202
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: Allison Howell <allison.howell@instructure.com>
2023-05-18 12:13:53 +00:00
Cody Cutrer c5fb729287 rubocop: fix offenses that crept in
Change-Id: I667cca8c711e4e3ef3f9946bf66c9534bf73b3fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318433
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-05-18 01:19:24 +00:00
AJ Esa c3947f9d68 add last attended date parameter to API doc
Add documentation for last attended date parameter for last_attended
endpoint of the enrollments API.

closes FOO-3482
flag=none

test plan:
- generate API documentation
- go to enrollments API documentation
- make sure add last attended date endpoint has date parameter

Change-Id: Iccca9fbb1a72a6329073b20e19584b03d05d6bbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318174
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>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2023-05-17 22:27:02 +00:00
Matheus 1d0969af54 Fix temporary unavailable course on copy start
fixes LF-248
flag=none

test plan:
- Create a course with a past term
- Make it restricted to course dates
- Have the course be available by course dates
- Start a course copy of the created course
- Ensure you never see an unpublished error on redirect

Change-Id: I4ea83381cc6c1ba85b10963345420eec6c7b7194
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318345
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: Luis Oliveira <luis.oliveira@instructure.com>
2023-05-17 20:37:32 +00:00
Cody Cutrer f110c14922 use global_root_account_id for update_account_associations strand
so it doesn't conflict across shards

refs AE-288

Change-Id: I367709ff917af819318782c99c292b3e4ab91b42
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318431
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-17 19:42:16 +00:00
Jonathan Guardado adec94d8c4 Remove buttons_and_icons_cropper flag
closes LF-31
flag=none

test plan:
- Passes Jenkins
- Confirm that the Icon image cropper works as usual

Change-Id: Id8b0e814b2f077cf9fa168b88e5b7098fd5a23b8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318346
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
2023-05-17 19:37:24 +00:00
Maya Tyner 1a4327a06e stats page displays courses for current and sub accounts
fixed comment typo in ovverride
matched syntax in courses to above code

fixes FOO-2536
flag=none

test plan:
1. Created a root with sub-accounts who had sub-accounts
2. Added different courses in each account
3. Checked statistics before and after deleting courses
4. Subs cannot view parent or sibling sub account courses
5. Roots can view own courses and sub account courses

Change-Id: I31212fcbcc161a11c719c0b6c20f9dfdabef0bc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318094
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Maya Tyner <maya.tyner@instructure.com>
2023-05-17 19:27:26 +00:00
jake.oeding 177367dc88 bump RCE version
closes LF-279
flag=none

test plan:
-specs pass

qa risk: none

Change-Id: I94eeb215484013e3bea972366b86deac3bb7f810
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318411
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-05-17 19:15:10 +00:00
Chawn Neal 89c6e9d2aa Set compose_modal_context from course filter
fixes VICE-3409
flag=reat_inbox

Test Plan:
1) Should match parity & video in ticket.
2) set the context on the conversations filter.
3) open compose modal.
3a) It should match the context

Notes:
The added ? null check is because, beforehand we pass:
context = null; but the correct object is:
context: {contextId: null, ...}

Change-Id: I5e49703f1ef587ea38e2fe3b2de94f72d0a3e801
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317321
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jody Sailor
2023-05-17 19:02:17 +00:00
Jackson Howe 2e72237e75 Remove high_contrast_course_colors flag
closes LF-273
flag = none

Test plan:
 - Turn on high contrast mode (click "Account" in the global nav)
 - Go to the dashboard
 - Change a course card's color to something like #F06291
 - Reload the page
 - Expect the color to be much darker (more contrast!!)

Change-Id: Ie4a51591e15ba85dc0900bc3acbf5e0e4485db18
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318420
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: Jackson Howe <jackson.howe@instructure.com>
2023-05-17 18:50:13 +00:00
jake.oeding 847963a93a make media placeholders use the correct file name
closes LF-270
flag=rce_improved_placeholders

test plan:
-make sure the flag is on
-upload some media in the RCE
-change the title in the upload modal before
 you hit 'submit'
>submit and then observe the placeholder uses
 the name that you changed to

Change-Id: I9da31f3a9692825b1812375918280e64da34af54
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318322
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-17 18:49:30 +00:00
Martin Yosifov 910a92b6f2 Update Alignment Summary to show new quizzes with aligned items
closes OUT-5470, OUT-5598
flag=outcome_alignment_summary_with_new_quizzes

Test plan:
- Enable Improved Outcomes Management FF
- Enable New Quizzes Included on Outcome Alignment Summary Tab FF
- Download g/316783 in Outcomes-Service
- Start Canvas, Quiz API, Quiz LTI and Outcomes-Service
- Go to Account > Courses and create course with outcome
- Create a new quiz and align the outcome to that quiz
- Go to Alignment Tab and expand the aligned outcome
- Verify that new quiz alignments for that outcome match the
desktop design referenced in the ticket
- Open devtools and enable responsive mode
- Resize browser window and expand the aligned outcome
- Verify that new quiz alinments for that outcome match the
responsive design referenced in the ticket

Change-Id: I7f2c5f29aad4440691d6ca6a7d0cc813dc09c64e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317210
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Wilmer Corrales <wilmer.corrales@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-05-17 18:04:09 +00:00
Omar Gerardo Soto-Fortuño 60646a0f22 Converts GradesSummary grade to Letter Grade when RQD
closes VICE-3515
flag=restrict_quantitative_data

test plan:
  - Specs pass.
  - Have a setup with Canvas for Elementary.
  - Have a student with a few graded assignments.
  - Visit the Dashboard -> Grades tab.
      Or navigate to /#grades.
  - Progress Bar should be gone and percentage should
      be shown as Letter Grade if RQD.

qa risk: low

Change-Id: I3a750f8082c8f77ce3d91c1d52f59426e79ee0bc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318397
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jody Sailor
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-17 18:00:18 +00:00
Mysti Lilla f7d8a8a661 Fix restrict media object to original media tracks
refs MAT-1204
flag=none

Test plan
- Make a couple of copies of media tracks
  for a particular media object that have
  the same locale (you'll have to use
  multiple different attachments for this,
  probably with a course copy)
- View the original video in the original
  course and make sure you only see one
  caption option for that language

Change-Id: I73ecd59bd55bf7fe414082422aa20037863076cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316320
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@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-17 17:23:27 +00:00
Jason Gillett 3f65804eda Stop React dicsussions from crashing at 767px in windows 11
flag=react_discussions_post
closes VICE-3484

Test Plan
1. have a windows 11 computer on network
2. run rails server on work laptop
2a. bundle exec rails s -b 0.0.0.0
3. On windows 11 computer set width to 767px
4. Page won't crash.

Change-Id: Ia58059912aa10f74d0766f0db078aa5918864bf7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318412
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
2023-05-17 17:15:43 +00:00
Chris Soto aca8e7fd3e enhance individual gradebook student section
this is an iterative commit for the enhanced individual gradebook work
currently under feature flag. this commit modifies the graphql queries
and sets the template for the student section for the rework

refs EVAL-3127
flag=individual_gradebook_enhancements

test plan:
- none

Change-Id: I09afeecbf1ed7d3091f63ce84946ccea41382bbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318319
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-05-17 16:58:26 +00:00
Cody Cutrer 7746f95086 calculate gemfile and lockfile locations relative to Bundler.root
so that you can run things from other working directories

Change-Id: Ifb01d4fdb70cfb6c4e14943963cabaaabe9f6893
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318396
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-05-17 15:33:42 +00:00
Cody Cutrer ee7c5ab592 revert to default spring binstub
we no longer need to play lockfile games

Change-Id: I0f0ca636e97873d8129ae459adc888b278358ed1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318398
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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-05-17 15:33:18 +00:00
Jackson Howe e64128165e Remove more_immersive_reader flag
closes LF-274
flag = none

Test plan:
 - Enable the immersive_reader_wiki_pages RootAccount flag or enable the
   user_immersive_reader_wiki_pages User flag on your user
 - On the following pages, expect to see an immersive reader button in
   the top-right corner:
   - assignment show page
   - course home page (when course home is set to syllabus or pages
     front page)
   - syllabus
   - pages (the front page and other pages)

Change-Id: I39f9d554f34baeb48cbb904c4490046e1f7f4c00
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318348
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-17 14:44:03 +00:00
Isaac Moore e4ffbd54ee Don't allow access to arbitrary media tracks by ID
This resolves an issue raised via Bugcrowd that allows a user who has
access to a MediaObject to retrieve any MediaTrack by ID, not just
MediaTracks belonging to the MediaObject specified in the path.

flag=none

test plan:
- create a media object (ID 1)
- create another media object (ID 2)
- create a track on the second media object (ID 1)
- attempt to access it by GETing `/media_objects/1/media_tracks/1`
  - expect to receive a 404
- attempt to access it by GETing `/media_objects/2/media_tracks/1`
  - expect to receive a 200

Change-Id: I5e846b41a2731771a6a477df91cec13666080be5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318351
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2023-05-17 14:06:43 +00:00
Aaron Ogata 5a861ca0d9 fix spec for ruby 3.x
refs AE-187

Change-Id: I607d715e17035752272e54f3ce8db012c9d0bd2d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318382
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-05-17 13:48:09 +00:00
Ed Schiebel 2802448321 Track which auto-sub'd acct calendar the user has seen
closes LF-237
flag=auto_subscribe_account_calendars

test plan:
  - have a couple account calendars with auto-subscribe on
  - have a student in a course in each of the accounts
  - load the /calendar page as the student
  - inspect ENV.CALENDAR.CONTEXTS.filter(c => c.type === 'account')
  > expect viewed_auto_subscribed_account_calendars to be false
    for the account calendars
  - refresh the page
  > expect viewed_auto_subscribed_account_calendars to be true
    for the account calendars now

Change-Id: Ibdd3b53d8464dd5055e2da36dc2802923912afcb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318201
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-17 12:06:36 +00:00
Charley Kline 3deed93ea7 Exclude node_modules from RCE tsconfig (for VS Code)
VS Code complains that the RCE is "a large project" and that
excludes should be configured. This just explicitly excludes
node_modules and dot-files in the RCE tsconfig.

Test plan:
* VS Code no longer whines about the project being large when
  opening a TS file in packages/canvas-rce/src

Change-Id: I99d1a766632aebbed1cac02fbf35f25fc838d04b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318340
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-05-16 23:32:12 +00:00
Jacob Burroughs df8069603b Fix refresh_if_necessary on ruby 3
fixes CANVAS-KC6Z

Change-Id: I8695f0a0a505bc21550ff3ce89e020775ed785f1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318341
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-16 23:26:46 +00:00
Jeremy Stanley ff532018e6 preserve submissions folders in user merge
previously, files moved in a user merge kept the same path
as before, which would *generally* do the right thing but
would end up moving submitted files outside submissions folders
if, for example, the target user doesn't have a Submissions folder
yet, or the target user's locale is different (so the folder
isn't named "Submissions")

test plan:
 - have a user who has submitted a file to an assignment
 - ensure it appears in their special Submissions folder
   (which is read-only and does not count against quota)
 - merge the user into a new user that has not submitted any
   assignments yet and doesn't have a submissions folder yet
 - as the destination user, submit a file to an assignment
 - both the pre-merge and post-merge submission files should
   exist in the same Submissions folder tree and should be
   an actual Submissions folder

extra credit:
 - in a target user who doesn't have a submissions folder yet,
   create a folder named "Submissions"
 - merge a user who has submitted files into this user
 - the target user should get a "Submissions 2" or somesuch
   that is the actual submissions folder, and the file should
   go in there
 - reverse the above situation: merge a user containing a file
   that is in a folder that is _not_ a submissions folder but
   is named the same as a submissions folder in the destination
   user, and ensure the file goes into a new folder

flag=none
fixes FOO-3487

Change-Id: I82adca1ac67d440ce49d3bd7f865c522a8db81bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317282
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-05-16 23:05:15 +00:00
Cody Cutrer 5f632c66a2 fix gem overrides with eval_gemfile
Change-Id: I90a4f358df6a2c116367ab72df2c8357ae2c1773
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318331
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-05-16 22:45:50 +00:00
Cody Cutrer fb3981b9f6 fix explicit lockfile selection
depending on order, the default gemfile might not be set properly because it
was still doing its regular selection logic

Change-Id: I425bd529526e43c5cd752c2570f554638b9524dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318329
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-05-16 22:45:22 +00:00
Chris Soto a889a051f5 simplifies types for fe grade calculators
AssignmentGroupGradeCalculator and CourseGradeCalculator were using
types for full submission and assignment when only using a few props
from each type. this commit simplifies the types to only include the
needed props.

test plan:
- all tests passing

Change-Id: Ib3a1335eb8db0975c8198feb9bd5edf72e10a585
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318324
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-05-16 21:34:44 +00:00
Omar Gerardo Soto-Fortuño abcdbf22b0 Hide points from GradeRow when RQD is on
closes VICE-3514
flag=restrict_quantitative_data

test plan:
  - Specs pass.
  - Have a sub account with a C4E enabled.
  - Have all the setup for RQD on a C4E course.
  - As a teacher, create an assignment with 10 points.
  - As a student, visit /courses/[Course ID]#grades.
  - It will normally show Out of 10 points.
  - With this PS it shouldn't show it.

qa risk: low

Change-Id: I51edb8909f4a3ce4492af8beb950834cde75c242
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318200
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jody Sailor
2023-05-16 21:02:22 +00:00
Chris Soto 1f5901032d enhance individual gradebook graphql setup
setup enhanced individual gradebook to use graphql to fetch data for
the Content Selection components and display in the dropdowns. Add
functionality to get correct student/assignment via query params and
update the query params when student/assignment changes. Also wire up
some of the other components needed for enhanced individual gradebook
with placeholder text

closes EVAL-3115
flag=individual_gradebook_enhancements

test plan:
- this change is still a work in progress, but you should be able to
  see the dropdowns in the enhanced individual gradebook and select a
  student and assignment. The student and assignment should be reflected
  in the url query params. The dropdowns should be populated with the
  correct data from the graphql queries

Change-Id: Iefeaaae1c314bd098f0ba9197c8523605cfe78b3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318311
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-05-16 20:45:22 +00:00
Isaac Moore 978d6ec5f1 Make CanvasSecurity secrets defaulted in example config
refs AE-45
flag=none

Change-Id: I8170e73690724cf726a6a6124d3312e1d3b5ac1b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318306
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
2023-05-16 20:14:10 +00:00
Cody Cutrer 66927aaf85 raise more helpful exception if API docs can't be generated
Change-Id: Ia25a63fb54943f5b7e1986fa9761cf2979f91c53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318304
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-16 20:01:21 +00:00
jake.oeding 144014c86f add `current_lookup_id` to WikiPages
closes LF-254
flag=none

test plan:
-run the migration, check that you have the new
 column in a rails console
-check that canvas still boots correctly
-rollback the migration and make sure this
 succeeds

qa risk: low

Change-Id: I8cc924b7119613355f0f4ed6f115fa6e82564dc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318085
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>
Migration-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-05-16 19:43:52 +00:00
Jeremy Stanley 9d84294a08 avoid recalculating enrollment states due to truncation
if SIS CSV sets course or section dates with more than 6 digits
of precision, the sub-microsecond part will be truncated by
the database.

when a subsequent SIS import runs and includes the same
timestamp in the CSV as before, ActiveRecord compares the
value in the database to the one set from the CSV and
concludes the timestamp has changed by a fraction of a
microsecond. if the course restricts student activity to
course dates, this will cause enrollment states to be
recalculated. with a large import, this may clog up the
job servers with tens of thousands of unnecessary jobs.

update the logic so we don't recalculate enrollment states
for course or section date changes under one second

test plan:
 - set up a course with restrict_enrollments_to_course_dates
 - change its conclude_at date by more than a second
   and ensure enrollment states are recalculated
 - change its conclude_at date by less than a second
   and ensure enrollment states are not recalculated

flag=none
fixes FOO-3511

Change-Id: I1b668e1654574b6bc964989ff25715fd1aa71607
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318095
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-05-16 19:36:36 +00:00
Cody Cutrer a6321b0dbf bump git gem
Change-Id: Icdb66312768a342f2d3715df7addaaa0a317f63f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318301
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-16 19:15:49 +00:00
Evan Battaglia 433483aba0 Flag to disable oembed_retrieve
closes INTEROP-7991
flag=disable_oembed_retrieve

Test plan:
* with FF off, go to external_content/retrieve/oembed
* you should get some kind of error, but not the 410
* with FF on, go to external_content/retrieve/oembed
* you should get a 410

Change-Id: I834d159c5d7e1461b5128a2cb9be10602412d224
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317879
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Steve Mcgee <steve.mcgee@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-05-16 18:50:40 +00:00
Cody Cutrer 1c15214a63 keep lockfiles in sync as part of `bundle` commands
closes AE-283

this eliminates script/sync_lockfiles.rb and integrates its
functionality directly into `bundle install`, `bundle check`, etc.
it also generalizes a few pieces so that the same approach is used
for all use cases:
 * syncing versions between the main Gemfile and gems in gems/
 * maintaining separate lockfiles for no plugins/including
   private plugins
 * maintaining separate lockfiles for multiple Rails versions
   (crossed with the previous bullet)

The differences between them are just small variations on how strict
versions must match between lockfiles, and requiring pinning of
versions not in the default lockfile.

For full details, checks the docs on BundlerLockfileExtensions

This does change the strategy for filtering private plugin dependencies
out of the committed lockfile(s) - instead of filtering based on hash
of source, simply don't even include private plugin gems in the gemfile
when building the filtered lockfile (i.e. dynamic Gemfile, rather than
monkeypatching bundler to filter out -- semi-succesfully -- private
plugins from the Definition).

It also changes the "default" lockfile for Canvas that gets checked
in to be Gemfile.lock, so that other tools that are not
multi-lockfile aware can find it (such as rubocop, dependabot, and
others). This will be the lockfile corresponding to the current
default rails version for Canvas, and without private plugins.

Change-Id: I7ba398381974acbc4445f34fa3b788e8a07c5ce6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317888
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-05-16 18:39:21 +00:00
Aaron Shafovaloff 53012299d0 Make Gradebook selector more consistent
Also: adds view / JS feature for enhanced individual gradebook

Test plan:
  - with individual_gradebook_enhancements feature flag off
    - go to the gradebook
    - click on the gradebook selector
    - change between the various gradebook variants
  - with individual_gradebook_enhancements feature flag on
    - go to the gradebook
    - click on the gradebook selector
    - change between the various gradebook variants
    - verify that one can select the enhanced invididual gradebook
      (this will be blank)

flag=individual_gradebook_enhancements

Closes EVAL-3107

Change-Id: I1da357577a43ce178326ed422d0baeb2fa578982
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317696
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-05-16 18:13:50 +00:00
Drake Harper ba9bb1c467 Render react student grades page
refs VICE-3474
refs VICE-3471
refs VICE-3472
refs VICE-3473

flag=restrict_quantitative_data

Test Plan:
- with “Update grade summary table to use a modern framework”
    turned on
- go to the student grade summary page
- table should calculate grades correctly according to
   - assignment group weights
   - grading period weights
- turn RQD ff on
- students grade table should show correct letter grades

Change-Id: I5685a2db505734c8b4cea3592de66802456e9426
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318040
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2023-05-16 16:46:24 +00:00
Drake Harper 4377d3c7e3 create components for new student grade table
refs VICE-3474
refs VICE-3471
refs VICE-3472
refs VICE-3473

flag=restrict_quantitative_data

Test Plan:
- run `yarn storybook .`
- view the student grade summary folder
- all components should render properly

Change-Id: I60f67b293e80c4d4d3648b57ebb080c3f0550005
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317803
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jody Sailor
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2023-05-16 16:32:10 +00:00
Caleb Guanzon 80d0310aa2 bounce incoming mail when user is suspended
flag=none
fixes VICE-3506

each notification message that we care about processing
replies from have their context's model come with their
own definition of reply_from

this commit will prevent reply_from from being called
by raising an error if user is suspended

the raised error is then processed by the bouncer
the boucer will send the sender a message saying:

"The message you sent with the subject line "some subject"
was not delivered because your account has been suspended."

test plan:
- hard to test locally. you will need MRA set-up,
and then you are only limited to rails console
manipulation, so really, you will test the same way
the new rspec tests it
- to truly test end-to-end, we will need to wait until
this gets deployed to an environment with outgoing and
incoming mail handling set-up.

e2e test plan(on environments where email processing
is completely set-up):
- must have a student with a verified email address set up
- as a student, set your new conversation, new conversation
message, new discussion entry, new dicussion topic, and
new submission comment notification preferences to be sent
immediately

- as a teacher, create a new conversation with the student
- then reply to that conversation

- as a student, go to your email, and reply to the conversation
- verify the reply via email shows as a new message to the conversation

- as a teacher, create a discussion and publish
- as a student, go to your email, and reply to the discussion
- verify the reply via email shows as a new entry to the discussion

- as a teacher, create and publish an assignment, grade the student,
and write a submission comment
- as a student, go to your email, and reply to the submission comment
- verify the reply via email shows as a new entry to the submission
comments thread of that submission

- now suspend the student
- as the student, try replying again to the emails above
- verify no new entries are created for your replies
- verify you get a reply saying your message was not
processed because your account has been suspended.

Change-Id: I94979b60334ff1660c4dd7d0b4daaa59936df618
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318176
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: Jason Gillett <jason.gillett@instructure.com>
2023-05-16 15:36:06 +00:00
Sarah Gerard 60490c4263 media_attachments index route
with the old routes, if a course was copied (aka
if a media_object had more than 1 attachment)
then index would return nothing for the
media objects.

closes MAT-1336
flag=media_links_use_attachment_id

test plan:
- have a course/group/user with media files
- have the feature flag on
- with the flag on, media_attachment routes and
  media_object routes for index will work the same
- try out new index routes:
- api/v1/media_attachments
- api/v1/courses/{course_id}/media_attachments
- api/v1/groups/{group_id}/media_attachments
- try copying a course and make sure routes still work
- try acting as a user (such as a student in a course)
  and ensure they're not seeing media_objects they don't have
  access to when using the routes

qa risk: low

Change-Id: I446ca1fb0b558f471dde64c4600c75f8cef71b3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316692
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-05-16 15:10:55 +00:00
Jason Gillett e5953dd679 Update submission posted notification
flag=restrict_quantitative_data
closes VICE-3489

Test Plan
1. Create an assignment
2. go to gradebook
3. click grade Posting policy
4. Select "Manually" for posting policy
5. As a student submit to the assignment
6. grade the assignment as a teacher
7. then post the grade
8. Verify that the notification message respects LGO

Change-Id: If66bff79bff1b50e9bcc25a93691ed58a881ab53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317565
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
2023-05-16 14:10:58 +00:00
Aaron Ogata 07d659d53b remove vault_credential_path before constructing SQS client
refs AE-53
fixes CANVAS-KC4N, CANVAS-KC4M

Change-Id: I525fd2d505fa950b271ae5a398aab51e5bcf9f83
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318248
Reviewed-by: Isaac Moore <isaac.moore@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>
2023-05-16 13:46:50 +00:00
Robin Kuss 29817df954 spec: add account calendar auto subscribe tests
This is one of a series of test patchsets to augment the unit tests
for validating new UI for auto-subscription of accound calendars.

Closes LF-257

Test Plan:

Passes Jenkins

Change-Id: I8950c6cef803e455cff5d353d0260b6807b80bab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318193
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: Robin Kuss <rkuss@instructure.com>
2023-05-16 11:50:56 +00:00
Jenkins 8804722a70 update is translation
Change-Id: I7f8a513c5d10cdc998c29fdd7efec258444641c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318219
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-16 05:40:41 +00:00
Jacob Burroughs e34ecff983 Don't mutate delayed::cli config
Change-Id: Ib787e8cf4fdb6b3a79ddb82c5566db0467018854
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318199
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-05-15 20:46:17 +00:00
Aaron Ogata 3a76f6d3c4 use vault for notification service creds
refs AE-53

Change-Id: I8e9b4d062f1b9bbe595ef3c4de4fa241e61ded4d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318169
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-05-15 19:52:28 +00:00
Matheus 638901cd13 Handle line item downstream changes in BP syncs
closes LS-3941
flag=blueprint_line_item_support
[fsc-max-nodes=18] [fsc-timeout=40]

Test-plan:
- Set up an LTI tool
- Create a BP course with an assignment
- Add a line item to the assignemnt
- Run a BP Sync
- Alter the line item in the child course
- Alter the line item in the master course
- Run a BP Sync
- Check the downstream changes to the downstream
  line item remain

Change-Id: Idd456753173ee86e9c9b20d9bd99dd9832ffb173
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317932
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: Luis Oliveira <luis.oliveira@instructure.com>
2023-05-15 19:38:27 +00:00