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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>