Commit Graph

1770 Commits

Author SHA1 Message Date
Aaron Shafovaloff 4b66bcae5c remove CoffeeScript checking from gems/tatl_tael
test plan:
  - existing tests pass

flag=none

refs EVAL-3055

Change-Id: I80bebc17e49473d9bb9a8b94ce55f9047b1b3f6f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316537
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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>
2023-04-20 18:10:52 +00:00
Cody Cutrer 25461d73b8 bump inst-jobs
[skip-crystalball]

Change-Id: I42f3748bbde72653d242bf7815f9fb31576e8c7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316253
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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: Aaron Ogata <aogata@instructure.com>
2023-04-19 15:36:04 +00:00
Cody Cutrer dc4bdcccc0 bump rubocop and rubocop-rails
minor bugfix releases

Change-Id: I4543d90776855c2c53a79c3d9db9f9b8d522c4df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316044
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-18 17:48:46 +00:00
Cody Cutrer 64c4308714 commit lockfiles for sub-gems
still need to ensure gem dependencies are consistent, but this should
prevent unexpected breakage during tests

Change-Id: I39420479fd3fe4f7e49a12a418eca033fcdc7564
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314979
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-04-14 14:07:43 +00:00
Cody Cutrer 7144f0c66a bump rubocop-rails
I was able to replace one of our custom cops with a built in one
(just had to make it ignore older migrations).

Then I had to manually fix a couple of (important!) offenses

Change-Id: I000310bb6b065034384ba3a33ef5e37e22b9be5a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315855
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>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-14 14:07:34 +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 62fc5c033d rubocop: prep for updating rubocop-rspec
auto-correctable cops applied

[skip-stages=Flakey]

Change-Id: I17e18e2e1a230ef7b27f01ddb7e587045eabf97f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315809
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:30:10 +00:00
Cody Cutrer 480e29c4d5 bump rubocop-performance
and apply new fixes

[skip-stages=Flakey]

Change-Id: Ie2f9057a435076c4b872175651cedf737b2c5696
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315800
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-04-12 19:29:39 +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
Cody Cutrer dbfff50c2d rubocop: Layout
addresses minor changes in cops in rubocop 1.49

[skip-stages=Flakey]

Change-Id: I79503c905f59752d67391e70909e73441323faee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315160
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:56 +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 76d29f5b2d rubocop: automatically ignore BookmarkedCollection.concat for Style/ConcatArrayLiterals
Change-Id: I6bbee140a20ab8bfe356a4cbbc5aa21deac913c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315647
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 18:36:09 +00:00
Cody Cutrer 14f5fa1fdf remove unused i18n utils
Change-Id: I4db721d7e80adbe04c90f4a9a0548d268e607ca7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315541
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 18:35:57 +00:00
Cody Cutrer 828149374d rubocop: fix Migration/Execute for the common case of interpolation
Change-Id: I06e2335a5a099fb85767d41f6136d13206301a7e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315656
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-11 16:30:15 +00:00
Cody Cutrer d5fc701582 rubocop: add helper to easily silence all legacy migrations for any given cop
Change-Id: I076e5e7dd6abad9f3755f05a21c98a0c11a42111
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315652
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-11 16:14:37 +00:00
Cody Cutrer 1a8e56680c fix a couple crashes in rubocop-canvas
Change-Id: I0d4b603fef51d967ae457d1be2a68f7e91f10865
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315118
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 15:05:32 +00:00
Cody Cutrer fcd804d7fe rubocop: Lint/NonAtomicFileOperation
Change-Id: I161aeada3a9dcbbcc0042c94c97e0f2da1871f71
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315162
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:48:13 +00:00
Cody Cutrer 7c2814caf2 rubocop: Style/ConcatArrayLiterals
Change-Id: I19d66081860377a01fc4c60a947a05765b19ec14
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315164
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:48:01 +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 a5ed8666f4 rubocop: Style/FileRead, Style/FileWrite
Change-Id: I9b8196a100f3b10f9146cdd18fa0a859ea665cb0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315161
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-04-10 20:57:32 +00:00
Cody Cutrer c101827780 rubocop: Style/RedundantConstantBase
[skip-stages=Flakey]

Change-Id: Ie18389de5b45f433aa82a13f62daa2a5a9d44b80
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315120
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:56:27 +00:00
Cody Cutrer c1a8612e12 rubocop: Style/RedundantRegexpEscape
Change-Id: Idf4e1cee69240eebcbeab56f909c7aa21eea6f62
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315122
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-10 14:12:01 +00:00
Jacob Burroughs 0934e30455 Fix vendored gems
Change-Id: Iff3b5b8275989863fd35f94fbb5d18ef97fd84be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314969
Reviewed-by: Cody Cutrer <cody@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-04-03 17:11:23 +00:00
Jacob Burroughs 9a9fdf3a65 Remove auditor cassandra support
Also remove the engine experiment, because that never really went
anywhere for canvas and was just one more "different" thing

[fsc-max-nodes=15]
[fsc-timeout=45]

Change-Id: Ib990deb94bf5e25d587d554f64c535c9b96cce26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314469
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@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: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-04-03 15:40:22 +00:00
Mysti Lilla 7ec33fe67b Lint function creation with weird space
flag=none

Test plan
- Make sure function linting still
  works with weird white space

Change-Id: If6e8ca7781075c2411fbc06938de72b3f1fdec2b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314625
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-03-30 23:29:55 +00:00
Xander Moffatt b28b5bf4d4 add canvas_environment to LTI 1.3 login request
why:
* so that LTI 1.3 tools can redirect to different domain or launch url
if desired

closes INTEROP-8009
flag=none

test plan:
* launch the lti 1.3 test tool
* find the /login request or install the LTI debugger Firefox extension
* the login request should contain canvas_environment: prod
* add a new `testcluster.yml` file to the `config` directory
* add `test_cluster_name: 'beta'` to that file
* in a rails console, run ` Setting.set('allow_tc_access_', 'true')
* restart the canvas web container
* relaunch the tool
* the login request should contain canvas_environment: beta

Change-Id: Ic58b6c5ba56a1da7f71bd202afff0c12aed9a70c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314295
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-03-30 22:45:17 +00:00
Mysti Lilla 2fdbddd365 Add linter for function with schema qualified table
flag=none

Test plan
- Make a commit with wrong code in it
- Ensure the commit hook shows you
  the appropriate error in it
- See g/305351 for an example of the
  bad code we're working to prevent

Change-Id: I3e3b318ede5bdf56bf9d2180c47dd96a55c9a04e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314611
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-03-30 21:06:12 +00:00
jake.oeding 6b00141b0e add support for iWork files in RCE and files UI
closes MAT-1269
flag=none

test plan:
*pre-req: might be helpful to have .docx, .pptx, and
.xlsx files also uploaded for referencing the icons
1. Files UI
    -navigate to the files interface and upload a
     .pages, .key, and .numbers file
    >look at the icons they receive in the file UI
     and confirm that you get a doc, ppt, and xls
     icon respectively
    -for each of those, launch the previewer and then
     click on the info button
    >confirm that 'Kind' aligns with the file type
2. Attachments model
    -open up a rails console
    -find the attachments corresponding to the files
     you uploaded
    >check the content_type on each and confirm it is
     the corresponding 'application/vnd.apple.*' type
3. RCE
     -find a page with an RCE
     -open the file upload modal
     >for a .pages, .key, and .numbers file, choose the
      file for upload and confirm it shows the correct
      icon type
     -now go to the course document insertion tray
     >confirm the files you've uploaded have the proper
      icon
     -switch from 'documents' to 'all'
     -navigate to the folder where you uploaded the files
      in the tree browser
     >confirm they have the appropriate icon

qa risk: low

Change-Id: Ie39b0070398982e10e7ef47d7b395450c0af2bc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313247
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: Allison Howell <allison.howell@instructure.com>
2023-03-21 15:46:27 +00:00
Xander Moffatt 1da551863f send deployment_id in LTI login request
why:
* parity; all other major platforms send it already
* convenience; many tools use this as a key for platform info

closes INTEROP-8004
flag=none

test plan:
* with the network tab of the dev tools open, or Paul's LTI launch
inspector extension installed
* launch an LTI 1.3 tool
* view the initial login request
* the deployment_id should be included in there

Change-Id: Ifc9e7cb2920c43fabff2340cef9f5127784d8fbd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313732
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-03-20 21:37:48 +00:00
Jacob Burroughs 35c56fb9b9 Revert "Revert "Introduce guardrails for excessive db modifications""
This reverts commit d2f0962da9.

Fixed now to not break jenkins

[build-registry-path=jenkins/canvas-lms/jburroughs-test]
[change-merged]

Change-Id: I9e55a234000043dce4e296952279e275bbb281a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312747
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>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-03-08 15:00:09 +00:00
Aaron Ogata d2f0962da9 Revert "Introduce guardrails for excessive db modifications"
This reverts commit 8bc4a9e6a3.

Reason for revert: broke jenkins

Change-Id: I4beb70f18707d52665ed489b31f513c4165bf51c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311360
Tested-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
2023-02-24 19:02:04 +00:00
Jacob Burroughs 8bc4a9e6a3 Introduce guardrails for excessive db modifications
For now warn so we can measure and make necesssary changes; will
allow opting in to hard fialures per database server

fixes AE-149

Change-Id: I4588ccbda726ea0b9fdf4eb9fe15246388ac0478
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311729
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Hubert Lubaczewski <hlubaczewski@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
2023-02-24 15:51:35 +00:00
Jonathan Guardado f3c85b13f7 Add PATCH support to CanvasHttp
closes LS-3818
flag=none

test plan
passes Jenkins

Change-Id: Ic00df2a15a2a54983896cdc6e5fb6659accab9fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311752
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>
2023-02-23 16:57:48 +00:00
Jeremy Stanley d4c5f5c54d remove "LiveEvent context is empty" backtrace from logs
it's quite noisy when running in the Rails console and the
production error it was intended to help trace has not been
an issue for a long time

test plan: specs
flag=none

Change-Id: Ib589737cfa62345d8c009c7eb1325b76bc786594
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311641
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-02-22 22:29:57 +00:00
Aaron Ogata 688398d446 remove spammy log
Change-Id: Idc98e6f21bb333147da7b9c20b2e6c4a010324af
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311696
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-02-22 15:47:34 +00:00
Charley Kline 8da54ca754 Arrange for AccountReports to run in the right locale
Closes FOO-3354
flag=none

Test plan:
* Change your language to something significant (hopefully
  something you speak at least a little!)
* In that language, run a report in that language
  (/accounts/1/settings#tab-reports) that contributes the
  "extra text" into the "Last Run" column. Try the "Provisioning"
  report, which will save the term and files.
* When that report is done, reload the page and scroll back
  down to that report.
* The "last run" for that report should be fully reported in
  your chosen language.
* (Note that if you now change your language back to your
  native speech, that does not retranslate that text, it will
  remain in the locale in effect when the report was launched.
  There's nothing to be done about this unfortunately as a
  report will persist its completion text in whatever locale
  it executed in, and that's what gets displayed on the list
  of reports regardless of the language of who's viewing it.)

Change-Id: I47f1e0de2ee75ef8adc2d53bc573c55b69692d1d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/311160
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
2023-02-21 16:49:53 +00:00
Jacob Burroughs d166798ef9 Drop rails 6.1 support
Change-Id: I25be73991a0542755579de897b98561ded3cd0c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310452
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>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-02-14 21:47:03 +00:00
Caleb Guanzon 1582f99d7a handle masqueradors in /collaborations
fixes VICE-3314
flag=none
test plan:
- set up google drive plugin locally
- as a student create a google doc collab
- as an admin, create a google doc collab

- this way, the student, and the admin have both
authenticated google

- now log in as the admin again, this time,
masquerade as the student
- visit the course collaborations page
- create a google doc collaboration
- do not invite anyone
- save
- verify that in the auto-opened
google doc tab, that it is logged
in as your own (masquerador's)
google account
- verify that back in the collaborations
tab in canvas, the collaboration you
created while masquerading shows that
you (the masquerador, is the author)

- now click to view a collaboration while
still masquerading
- verify that you are not able to view the document
and that you are sent back to the collaborations page with
a flash error stating that you need to stop masquerading

- stop masquerading
- verify you can visit a collaboration as yourself (admin)

Change-Id: I85704c3a1cdad89cca57b8aee2133ff11af1cd67
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310803
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2023-02-13 17:15:27 +00:00
Mysti Lilla 56480b76a1 Add usdz mime types
fixes MAT-290
flag=none

Test plan
- Upload a usdz file and
  verify that it has a content_type
  that is not "unknown/unknown"

Change-Id: Ia979db164b865f2afd86dafbd5de59941207f8ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310602
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: Mysti Lilla <mysti@instructure.com>
2023-02-09 23:57:43 +00:00
Andrea Cirulli 1e3550df44 Revert "pin rubocop to 1.44.1 in rubocop-canvas gem"
This reverts commit 85949ed13c.

Reason for revert: the bug in rubocop gem has been resolved in version 1.45.1

Change-Id: Icb1876d3c2627dbe2785ff7b49335619d42bf6da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310312
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-02-08 18:24:28 +00:00
Andrea Cirulli 85949ed13c pin rubocop to 1.44.1 in rubocop-canvas gem
this is a temporary version lock to avoid a bug in rubocop 1.45.0
https://github.com/rubocop/rubocop/issues/11549

Change-Id: Ibc0f90c6d3ebaaa0857e2e8b265d2a6585e9fe17
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310676
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-02-08 16:46:35 +00:00
Aaron Ogata 8f467c7b42 prove that filtered dependencies are pinned
refs DE-1492

Change-Id: I80273feee0451f198bfa4a9af283549dc224b394
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
2023-02-06 20:04:47 +00:00
Aaron Ogata 39e0d58329 validate specs for additional lockfiles
refs DE-1492

Change-Id: I6420fcd3656201d0ed745c857a00c0bc9960c83c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310351
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-02-03 19:11:46 +00:00
Aaron Shafovaloff 9665762078 Use Gergich output for TypeScript errors
Test plan:
  - See that TypeScript errors are reported in Gergich for prior
    failing build
  - Tests pass for latest build for this commit

flag=none

Refs DE-1519

Change-Id: I3cd7e8fc43d24932fdd60b296e9015d76d3671ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310278
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-02-02 23:34:05 +00:00
Jacob Burroughs a0ca9d7c12 Ensure live_events always passes on newer rubies
Change-Id: I0cead58106db90f1f957341d0d727273cdc9b032
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310235
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-02-02 15:36:00 +00:00
Aaron Ogata 3255700831 fix issue with lockfile generation and removing private sources
refs DE-1492

steps to reproduce original issue:
1. add “dummy” gem to a private plugin
2. run “bundle install” to get the Gemfile.lock changes
3. remove all private plugins
4. run “bundle install”
5. observe that the gem isn’t removed from the lockfile, because the source isn’t included in the partial lockfile, bundler will think nothing has changed

test plan
1. ensure that nothing_changed? returns the right value when things have / haven’t changed

Change-Id: I47b532d65e6b81626a6af224ac16fd67b6476729
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310186
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-02-02 01:59:07 +00:00
Aaron Ogata 4342281949 add specs around bundler_lockfile_extensions
refs DE-1492

Change-Id: Ie7711e7cfb47643970a398a4c2ac8c4cdbca6a19
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/310004
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-02-01 15:14:05 +00:00
Evan Battaglia 3d8f90e9d8 better errors / stats for Turnitin errors
This will help us what the story is with the sudden uptick in these
errors, and replace the "private method select for NilClass" errors with
a less-generic error

flag=none
refs INTEROP-7919

Test plan:
- add some debugging to the statsd code, e.g. add to
  initializers/inst_statsd.rb:
    class << InstStatsd::Statsd
      def increment(*args)
        puts "DEBUG STATSD increment: #{args.to_json}"
      end
    end
- get the contents of a failed job from prod from an employee sandbox.
  puts the `job.handler`. From this you will need:
  - get the referenced tool and copy the key and secret
  - copy the outcomes_response_json
- In a rails console you can then run
    Turnitin::OutcomeResponseProcessor.new(
      ContextExternalTool.new(key: KEY, secret: SECRET),
      Assignment.find(ANY_EXISTING_ASSIGNMENT), # Assignment.new might also work
      User.find(ANY_EXISTING_USER),
      OUTCOMES_RESPONSE_JSON_HASH
    ).update_originality_data(
      ANY_EXISTING_SUBMISSION, # Submission.new might also work
      "attachment_1234"
    )
- run the job and watch it increment the correct statsd counter and
  check /error_reports to check that the error is accurate. Both the
  stastsd counter and the error in error_reports identifies the message
  body as one of the known error messages

Change-Id: Ic73cd590de7ae0c304d6c4cc12b707692e9685dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309945
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
2023-02-01 15:01:04 +00:00
Mysti Lilla 36cb569bb7 Files mimetype clean up
refs MAT-1091
flag=none

[fsc-timeout=30]

Test plan
- Specs pass

Change-Id: Iac01fda45b271340fed69c57b9647a1240367171
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309298
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2023-01-27 22:12:15 +00:00
Aaron Ogata bbcaa7d738 use full lockfile in deployment mode
refs DE-1492

Change-Id: Ie565ad1c77ad3c8ff2d7dadf0ac7f1d0d88fa864
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309634
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-01-26 15:42:59 +00:00
Aaron Ogata 0ba85efda0 fix various bundle issues for deployment
refs DE-1492

Change-Id: I154e43040b368ff5129e2604fe0921beea9d339a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
2023-01-25 19:21:18 +00:00
Aaron Ogata f3469cd16f commit partial lockfiles
refs AE-1492

Test Plan:
1. Ensure that all appropriate gem versions are installed for CANVAS_RAILS=6.1 with plugins enabled
2. Ensure that all appropriate gem versions are installed for CANVAS_RAILS=7.0 with plugins enabled
3. Ensure that removing Gemfile.rails*.lock and running “bundle install” produces both 6.1 & 7.0 lockfiles with no overwrites to the partial files
4. Ensure that all lockfiles update when using “bundle update” in both versions and there are changes to commit
5. Ensure that removing plugins and running “bundle install” produces no changes to commit
6. Ensure that “bundle exec rails c” with CANVAS_RAILS=6.1 runs the right version
7. Ensure that “bundle exec rails c” with CANVAS_RAILS=7.0 runs the right version
8. Ensure that the Gemfile.*.lock.partial does not contain any secrets or private plugin names

NOTE: “vcr” gem is intentionally pinned to an old version (6.0.0) for testing

Change-Id: Id8e449466ec7839b3b71f2430256c0e8d0967775
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309093
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Build-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-01-25 15:32:17 +00:00
Dave Wenzlick eef742d5e6 Fix missing records in outcomes report
closes OUT-5418
flag=outcome_service_results_to_canvas

Test plan
- Find an authoritative result that appears in the csv report.
- Using the outcomes service rails console, delete the corresponding
  attempt record.
- Regenerate the outcomes csv report and verify that the record is
  still there. Note if the result was for an outcome that was aligned
  with a question, the report will now be missing the question id
  and question title because that info is stored on the metadata
  of the attempt.

Change-Id: If1d1fa5ba7c434e23215e41e8aa6ef86b6cd199a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308391
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>
2023-01-17 17:02:19 +00:00
Aaron Ogata ac2a5d74a5 remove unused i18n import tasks
refs AE-101

Change-Id: Ie7542f5d734e1fd65972b04262f05d618a95d77e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308700
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2023-01-12 18:20:19 +00:00
Ethan Knapp d2196b69ee improve InstFS error handling when uploading reports
Test Plan:
1. Validate that reports can be generated as usual

flag=none
refs PFS-21068, PFS-21064

Change-Id: I0be559dd3fefc9b4f4e7f26919d0614a86c11ca4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306962
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Mark Valentine <mvalentine@instructure.com>
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
QA-Review: Trevor Byington <tbyington@instructure.com>
2023-01-11 17:03:16 +00:00
Jeremy Stanley 2502fd32ce rubocop_canvas: fix add_reference non-transactional logic
we don't need to suggest `disable_ddl_transaction!` when adding
a non-indexed reference

fixes FOO-3298
test plan: specs

Change-Id: I33ca47954e5760bf3f14d8b240891713f735eeda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308301
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-01-06 18:14:08 +00:00
Dave Wenzlick 5722177937 Break outcome report query up into smaller queries.
refs OUT-5415
flag=outcome_service_results_to_canvas

Test plan
- This relies on https://gerrit.instructure.com/c/outcomes-service/+/307601
- Before adding these patch sets to your workspace
  - ensure you have some new quizzes that are aligned with account
    level outcomes and students have taken them.
  - Generate the csv report and ensure that there are new
    quiz results.
- Add these two patch sets to your workspace
  - Generate the report again
  - Diff this reprot with the one previously generated. There
    should be no differences. (use the CLI diff tool)

Change-Id: Id637622b2f04df884bd3ab91554079c32bafd0c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307578
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>
2023-01-05 21:15:27 +00:00
Isaac Moore d6584b490a Remove unnecessary require statements
closes AE-30

flag=none

test plan:
- verify Canvas boots in CD
- verify no influx of new errors in CD

[fsc-timeout=30]

Change-Id: Ifa04bebe1b09f01c6d3b8b2d8f3bb424759730f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/308067
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>
Build-Review: James Butters <jbutters@instructure.com>
2023-01-04 21:38:21 +00:00
Jacob Burroughs cd8305d633 Downgrade mail gem
Change-Id: I885f4ab5f8362314b74a366ce76225b585aef554
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307862
Reviewed-by: Aaron Ogata <aogata@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>
2022-12-21 20:08:15 +00:00
Jacob Burroughs 881e1b98d9 Fix specs for ruby 3.1
Change-Id: Id369e06932ce1d8f63ffd228aa3a9577dfb1b61f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307833
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-12-21 16:30:15 +00:00
Jacob Burroughs 23655bb7df Bump gems for ruby 3.1
Change-Id: I761b73d17e67f7ee230221ce13b893325089ce0e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307832
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-12-21 16:01:27 +00:00
Jacob Burroughs b48f69f216 Drop support for classic autoloading
Change-Id: I99875135a37cfc302897ce6ffebbe6dee9a4a610
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307802
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-12-21 15:19:59 +00:00
Aaron Ogata 6545c41462 stop using deprecated URI.* methods
refs AE-92

These deprecated methods were previously a wrapper around URI::DEFAULT_PARSER.*. Just convert them to the underlying method for the least risk.

Change-Id: I2d7e24e61fca15346c2c9d7254ad4f3eff0cbae2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307348
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2022-12-14 15:18:20 +00:00
Aaron Ogata 3e02f54279 fix incoming_mail_processor gem specs
refs AE-92

Change-Id: Ifcc02e18079e62ac68eb92dcc96dc4414c893727
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307352
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2022-12-14 15:17:44 +00:00
Aaron Ogata d942569348 fix dynamic_settings gem spec
refs AE-92

Change-Id: Icd09f8ecf4492c4c9df8a932371732c69775374c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307349
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2022-12-14 15:17:39 +00:00
Aaron Ogata c0d85dd957 fix qti_exporter specs
refs AE-92

Change-Id: Ic96df9c81a35da64d8c916ea60fefec3718b188e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307249
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-12-13 14:33:42 +00:00
Aaron Ogata 51edc4b9af fix canvas_security for ruby 3.x
refs AE-92

Change-Id: I387339094a37b9d30762bf33914484c7b9448931
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307185
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2022-12-12 16:59:18 +00:00
Aaron Ogata a7551281f7 fix canvas_partman for ruby 3.x
refs AE-92

Change-Id: I8ff11a585c55db190d9a436646d8fb570edde516
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307186
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-12-12 16:58:09 +00:00
Aaron Ogata 3205554b31 fix csv_diff specs for ruby 3.x
refs AE-92

Change-Id: Ib9fdfc1d6cf09a5cd6508633c471f59524b87c7e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307184
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-12-12 16:58:02 +00:00
Luis Oliveira 6b03944721 Correct answer id handling on export for multiple choice questions
Alphanumeric ids for answers on multiple choice assesment question
would cause errors due to an integer typecast during conversion.

fixes LS-3598
flag=none

test plan:
- Create a imscc file with a question bank
- Set a response_label ident of alphanumeric values that
  would be integer cast to the same value
- Make a quiz set to pull this question from the bank.
- Take the quiz as a student and check the student results API
- Ensure the choices have different answer IDs

Change-Id: I6a87f0a1f21754f55284748b71bef9764b87fe9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306407
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: Luis Oliveira <luis.oliveira@instructure.com>
2022-12-12 16:52:03 +00:00
Jacob Burroughs f47293eee9 Stop net/http retrying internally
Change-Id: Ibf04a5556a17af0fb03e73aff16ac1c8a03487c7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306905
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-12-08 20:31:07 +00:00
Jon Scheiding c179dc2d0f Use the right port for notorious when HTTP
flag=none
test plan
- set up your notorious to use http
- make sure you can upload a video

Change-Id: I537c92c9abf0bca43484db27e191f60343243cdd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306722
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: Jon Scheiding <jon.scheiding@instructure.com>
2022-12-07 16:42:37 +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
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
Jeremy Stanley 658bedfc9f support bbultra "Presentation Only" questions
test plan:
 - text-only questions in the BB Ultra test package
   should import properly (and not as "Error" questions)

flag=none
closes LS-3596

Change-Id: I2cb93c5735704e6cd04dd66d432f49504e0985ae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304326
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: Jeremy Stanley <jeremy@instructure.com>
2022-11-18 15:24:12 +00:00
Jeremy Stanley 576df22fae fix BB Ultra multiple-choice imports
the answer and response ids don't match in BB Ultra, but they
do seem to appear in the same relative order in the XML, so
match them by position

test plan:
 - the test BB Ultra package should import multiple-choice
   quiz questions properly

flag=none
closes LS-3594

Change-Id: Ia30095b8fbcf162b13d3a13e95987779183b5f11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304245
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: Jeremy Stanley <jeremy@instructure.com>
2022-11-18 15:23:58 +00:00
Danail Kozhuharov 2a12b050aa Fix faulty Redis-based cache cleanup
During test execution a sequence of tests fail with:
"Only Redis glob strings are supported: /^dynamic_settings\//"

This is because Redis does not support regular expressions
as parameters for "cache.delete_matched(...)"

The accepted format is glob
(see https://redis.io/commands/keys/)

fixes DE-1463
flag=none

test plan:
- existing tests pass and the above error is not found in the flaky failures

Change-Id: I411faef90bb4b0f7b7e3e3ff948453cac23e5a19
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305400
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-11-16 16:40:53 +00:00
Chrystal Langston 136c8fe930 Add threading for OS API calls
This also includes handling pagination for results
that contains more than 1 page of data.

closes OUT-5387

flag=outcome_service_results_to_canvas

test plan:
- Jenkins passes
- Since this requires a large number of outcomes,
  assignments, and users in a Course with new quiz results
  this PS will be tested in Beta in the next Bug Bash.

Change-Id: I33a3d502bb1a1412d2120d7c676789316707418c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305274
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2022-11-15 22:49:16 +00:00
Jon Scheiding 984cadbc66 Log errors in Kaltura client
Mainly for troubleshooting local Notorious setup

flag=none
test plan
- do something that makes your Notorious return HTTP errors
  (e.g. change the client ID or secret in plugin settings)
- find an RCE
- try to embed a video
* expect that your web container logs show "Error from Kaltura service"
  and some error information

Change-Id: Ic79856b8957336054f1d4c2ab6e13cc6053c0f0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/305132
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: Jon Scheiding <jon.scheiding@instructure.com>
2022-11-14 15:56:27 +00:00
Dave Wenzlick b30247557f Add retry when calling OS
closes OUT-5227
closes OUT-5391
flag=outcome_service_results_to_canvas

Test Plan
- dc down on outcome service
- In canvas, navigate to account settings
- ensure you have outcome_service_results_to_canvas flag enabled
- go to reports and generate the Outcome Results report
- it will error out because it cannot communicate with OS
- Bring OS back up
- generate the report again and verify it didn't fail

Change-Id: I9ee6ea5220fc458e1dd374bf5def092085403e4b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304019
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
2022-11-11 20:00:24 +00:00
Jon Scheiding 521f7b403a Allow specifying notorious protocol for local dev
Adds a plugin option in development environments to specify whether to
talk to Notorious over HTTP or HTTPS. In production environments, this
option will not be available. If option is nil, will default to still
using HTTPS.

flag=none

test plan prerequisites
- Working Notorious setup that is using HTTP
  - make sure PROTOCOL env var in your Notorious override file is set
    to HTTP
  - make sure there is no cert for Notorious in `~/.dinghy/certs`

test plan
- Go to http://canvas.docker/plugins/kaltura?all=1
- Change the "Protocol" setting to "http" and click Apply
- Find an RCE
- Try to upload a video
- Find an Assignment submission
- Try to add a media comment

Change-Id: If18015d7b6b401db56d320d168f753a1e40e9868
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300494
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-11-10 20:18:32 +00:00
Jacob Burroughs 803e7b4930 Misc rails 7.0 spec fixes
Change-Id: I38480368611e4b4166ee2a262038c6a1319f2f58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304807
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>
2022-11-08 00:52:31 +00:00
Joe Hernandez ff352e892f Prevent data-method partial CSRF
Remove data-method when present in html element when RCE is saved.

fixes MAT-1045
flag=none

Test Plan
- Need a course with at least one student
- Steps outlined below taken from SEC-6537
** The steps in that ticket seem to rely on a tool called "burp". I
instead switched the RCE to Raw HTML edit before saving.
- As a teacher or admin (victim), create a new assignment in the course
-- 10 possible points
-- Use appropriate dates to make it available
-- Click on "Save & Publish"
-- Copy the course_id and assignment_id from the URL & keep them handy
-- e.g. * http://canvas.docker/courses/1/assignments/3

- As a student, navigate to /dashboard/eportfolios
-- I went to the course > People > select student > Act as user
-- Copy the student's user_id from the URL & keep it handy
- Click on "Create an ePortfolio", name it, make it public
- Click on the "Welcome" link on right side of page
- Click on "Edit this page"
- Put the RCE in Raw HTML Edit mode
- Add HTML similar to the one in my recent comment MAT-1045:
- Click on "Save Page"
- Copy the URL after the ePortfolio save page
- Log back in as the teacher or admin (victim)
- Paste the copied url and navigate to it
- Click on the "check out my resume" link
* Verify:
1. Bad URL error in canvas
2. Navigate to Course > Grades and verify student's grade was not
updated.

Change-Id: I4a9fc50baa00ff998bda1f344036479390b18eac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304040
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-10-27 15:33:30 +00:00
Dave Wenzlick 999152496b Use submitted_at date if present
closes OUT-5339
flag=outcome_service_results_to_canvas

Test plan
- Jenkins build passes

Change-Id: I2ce0334b5aaa65ec8329b7398c8f251749d2d9cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304037
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: Chrystal Langston <chrystal.langston@instructure.com>
2022-10-25 19:29:18 +00:00
Chrystal Langston c3eff1e944 exclude muted assocations from OS results in sLMGB
closes OUT-5299

flag=outcome_service_results_to_canvas

test plan:
- tests pass in Jenkins: please pay extra attention
to the test plan.  These tests should line up with
the tests in learning_outcome_result_spec.rb to
ensure all assignments that are classified as muted
are removed from the OS results.
- For testing in the UI:
- In a course with outcomes, create 2 New Quizzes
  - Each quiz should be aligned to a different outcome
- Turn on LMGB, sLMGB, and Outcome Service Results to
  Canvas FF on.
- Take each quiz as a student
- As a teacher, confirm:
  - both outcomes have results in the LMGB
  - both outcomes have results in the sLMGB
    - results will be identified as a mastered/unmaster
      pill.  The list of assignments & its aligning
      mastery in PS OUT-5297 & OUT-5298
- As a student, confirm:
  - both outcomes has results in the sLMGB
- As a teacher, mute 1 quiz in the gradebook:
https://community.canvaslms.com/docs/DOC-12961-4152724339
- As a teacher, confirm:
  - both outcomes are displaying in the LMGB & sLMGB
- As a student, confirm:
  - Only 1 outcome results is displaying in the sLMGB
- As a teacher, mute the 2 quiz in the gradebook and
  confirm:
  - both outcomes are displaying in the LMGB & sLMGB
- As a student, confirm:
  - 0 outcome results is displaying in the sLMGB
- As a teacher, unmute both quizzes & confirm:
  - both outcomes has results in the LMGB & sLMGB
- As a student, confirm:
  - both outcomes has results in the sLMGB

Change-Id: I21e085b3e856410cfe89ce57db2271f05858c097
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302565
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: Chrystal Langston <chrystal.langston@instructure.com>
2022-10-19 15:37:54 +00:00
jake.oeding b87c556c54 sanitize area tag's href attribute
also add safety net for similar potential
issues

fixes MAT-1046
flag=none

test plan:
-follow the steps outlined in SEC-6558
>notice that after navigating back to the page
 you entered what was previously an XSS issue,
 you'll see that it does not appear anymore

Change-Id: I90057aaa9322ebaf434b6f9cc2154b54a36bee13
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302966
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>
2022-10-18 17:01:22 +00:00
Dave Wenzlick 68562033f1 Merge OS data with Canvas Data in admin report
closes OUT-5167
flag=outcome_service_results_to_canvas

Test plan
- create an outcome at the account level and import it into a course
- create a classic quiz and align the outcome with it
- create a new quiz and align the outcome with it
- create a 2nd  new quiz and align the outcome with multiple questions
- Go to account settings, reports, and generate the
  "Outcome Results" report.
  - Verify that the report is empty because no one has taken the
    quizzes yet.
- log in as a student and take all three quizzes
- log in as an admin and go to account settings, reports, and
  generate the "Outcome Results" report.
- download the report and verify
    - Report has 1 row for the classic quiz
    - Report has 1 row for first new quiz
    - Report has 1 row for each question of 2nd new quiz
    - Default ordering is by user id, outcome id, course id
    - Canvas data appears first in the report followed by os data
      (this happens because if user, outcome, and course are all
       equal, we put canvas data first)

Change-Id: I3dd86d72c3e26061f9e3cd77beec1a5458e99501
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300790
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
2022-10-10 22:16:17 +00:00
Aaron Ogata 97dffd25ee introduce bootsnap
refs DE-1383

Change-Id: I6ab3efff2328717a74626a4fc2b4e171e41bcb06
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293150
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: Aaron Ogata <aogata@instructure.com>
2022-10-04 13:18:03 +00:00
miles.nerenberg b421a1bf37 amend write_outcomes_report config
Refactoring the write_outcomes_report method to
help Learning Outcomes team avoid merge conflicts and
accommodate future enhancements more easily. Arg for
custom message when report scope is empty has been
replaced with a config_options hash, and that hash
has its default empty scope message set if one isn't
provided via the hash passed by the caller.

Test plan:
1. Make sure outcome reports and GSD student
   outcomes report specs still pass, functionality
   should not have changed.

* Note: also fixed one minor comment in application
  controller that had inaccurate path information,
  unrelated to this specific project

flag=none
refs: PFS-20577

Change-Id: I2eb76f71136489eabaf519ee6bb5de7a36f2e68e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark Valentine <mvalentine@instructure.com>
QA-Review: Miles Nerenberg <miles.nerenberg@instructure.com>
Product-Review: Miles Nerenberg <miles.nerenberg@instructure.com>
2022-10-03 19:59:08 +00:00
Angela Gomba dcec20c951 Remove old outcome assessments for an alignment
closes OUT-5202
flag=none

Test Plan:
- Launch the rails console
- Make note of the number of LearningOutcomeResults you have:
  LearningOutcomeResult.count
- If you don't have any LearningOutcomeResults, you can create
  one in Canvas:
  - Create an outcome
  - Create a rubric and align the outcome to the rubric
  - Create an assignment and align the rubric to the assignment
  - Act as a student and take the assignment
  - Stop acting as the student and grade the student using the
    rubric in SpeedGrader
  - Verify that a LearningOutcomeResult exists in the rails
    console for that student, outcome, and alignment
- Find any LearningOutcomeResult and save it to a variable:
  res = LearningOutcomeResult.first # or whichever result
- Save a copy of that result with a different score:
  same_res = res.clone
  same_res.score = 1 # or some score that is different
  same_res.save!
- Observe that the LearningOutcomeResult.count has gone up by
  one
- Observe the LOR clone has workflow_state = "deleted"
- Observe the original LOR has workflow_state = "active" and
  the score is set to the score we set for the clone
- In Canvas, open the student's assignment in SpeedGrader
  - Note: You will see that the rubric grade is different
    than the current LOR score. This is fine because of how
    we simulated a clone LOR being created. In real life,
    these duplicate LORs would be created by the rubric
    assessment and the score would stay consistent between
    the assessed rubric and LOR.
- Change the rubric score to 4 (or something different from
  the LOR score)
- Observe in the rails console that the LOR was updated with
  the score from the rubric and that no other LORs for that
  student, outcome, and assignment are active

Change-Id: I14780f1be36cb50075d09704abcba227ecc0bc79
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299263
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-09-20 21:02:50 +00:00
miles.nerenberg 59794ecffe custom message on outcome results reports w/ no results
these changes don't change the current functionality of any
pre-existing outcome reports at all, however new reports
inheriting from the base outcome reports can now customize
the text that appears in the csv file if no results are found

Test Plan:
1. Make sure you have the corresponding patchsets
   from custom_reports and professional_services.
2. Run an outcomes report w/ parameters that would
   return no results.
3. Download the resulting CSV and it should say
   'No outcomes found' by default.

flag = none
refs: PFS-20577

Change-Id: If39252b3f734c593823c20d1d4b428616647c1cd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/301229
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Mikkelsen <smikkelsen@instructure.com>
QA-Review: Mark Valentine <mvalentine@instructure.com>
Product-Review: Mark Valentine <mvalentine@instructure.com>
2022-09-19 19:23:30 +00:00
Aaron Ogata c9c0dd3d95 make extract_js task optional
refs DE-1379

Change-Id: I89b3598e1e6154bc4165e0b9999cb31860df7177
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/301331
Reviewed-by: Andrea Cirulli <andrea.cirulli@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-09-19 17:59:41 +00:00
Aaron Ogata 27eea9334c allow reusing previously compiled JS translations
refs DE-1336

Change-Id: I98e1e61e8a2f4796a2c76b8725c964ff4616987f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300907
Reviewed-by: Andrea Cirulli <andrea.cirulli@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-09-13 20:32:09 +00:00
Jacob Burroughs 620de1b8c0 Drop explicitly empty community translations
fixes FOO-2999

Change-Id: Idd0362bb41f27a68951a7b5cc77a1719d9c8d6ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300655
Reviewed-by: August Thornton <august@instructure.com>
Reviewed-by: Charley Kline <ckline@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>
2022-09-09 15:30:41 +00:00
Dave Wenzlick c4d39e1ccf Query canvas for newQuiz assignments and call OS with results
refs OUT-5150
flag=outcome_service_results_to_canvas

Test Plan:
- Tests pass since this code is not used yet

Change-Id: Ia08ab5b7edadfcabcb8bbdeb4ce6f7e1f0b23434
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299528
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-09-06 19:50:57 +00:00
Jacob Burroughs ae51c95095 Safer jobs moves
only clear the shard cache from multicache, and therefore
support distributed `delete_matched`

Change-Id: Iebda2e8b2df0a1aa85997c2ede47b113f0fadc15
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/300099
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-09-01 19:29:17 +00:00
ferenc.marcso 62283a3085 fix plurazitation of translations
flag = none

fixes: QO-895
fixes: QO-896

test plan:
- delete translation files in web conatiner
  rm -rf public/javascripts/translations/*
- stop your docker environment
  docker-compose down
- run update script
  script/docker_dev_update.sh
- change your profile settings to another language
  for example catalan ca
- visit /courses/1/quizzes
- you should see points and number of questions in the
  selected language

Change-Id: I1ce3c79145dba71e2d4f5e2e2b7d7ea8fca1b025
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/298756
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Endre Berki <endre.berki@instructure.com>
Product-Review: Endre Berki <endre.berki@instructure.com>
2022-08-22 15:17:27 +00:00
Jacob Burroughs 53953aaf4b Replace our homegrown link finder with twitter-text
While I am at it, decaffinate and typescriptify TextHelper

fixes FOO-2987

Change-Id: I0b8f33a610bee737ea79ad24d8aec8f8e8051c49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/299013
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Bobby Buten <bobby.buten@instructure.com>
2022-08-19 17:01:10 +00:00
Isaac Elliott d1aa3366ef raise error when QTI Migration Tool is missing
On a system where the QTI Migration Tool is not installed, Canvas still
tries to run it.

In this situation `@migration_executable` is `nil`, so
`Qti.get_conversion_command` returns a bogus command string. This leads to
unhelpful error messages in `run_qti_converter`. The error cases in said
function assume that a *valid* command failed (and therefore look to the
command's standard output for information about the failure).

When `@migration_executable` is `nil`, raising the error in
`Qti.get_conversion_command` tells user that they haven't installed the tool.

closes: gh-2057

Change-Id: I03a332897966acbf6e302353f33ea61751021cfa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294672
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2022-08-19 08:37:43 +00:00