Commit Graph

47883 Commits

Author SHA1 Message Date
Cody Cutrer a0a399136a RuboCop: Lint/UnusedBlockArgument config,doc,gems,lib
all manual

Change-Id: I8bb9c11634b0e2b2c8a79dd6f8f2cb71eaa90450
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276628
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>
2021-10-27 22:30:15 +00:00
Mysti Lilla 38427e3e3e Allow originality reports API to change workflow state
fixes INTEROP-7040
flag=none

Test Plan
- Create an assignment and associate it with the
  plagiarism platform test tool
- Submit to the assignment as a student
- Use the test tool to create an error message
  on the originality report for the submission
- Use the test tool to update the originality
  report to pending
- Verify that it gets set to pending

Change-Id: I2d59fa91580bbaf958e09d9557280445c5501b28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276322
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-10-27 21:38:16 +00:00
Cody Cutrer 6434cb4b80 spec: isolate custom selenium rspec matchers to only selenium specs
so they don't interfere with like-named matchers that other specs may rely on

Change-Id: Ic08a22309209a9aec0fd778dcdf52ad1c8ff2867
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276954
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-27 21:35:43 +00:00
Sean Scally 7aa5ab381b Convert developerKeysActions to Typescript
Adds some additonal typings for `flashError` to ui/imports.d.ts

flag = none

test plan = no functional changes; all tests still pass

Change-Id: I9eacc845b2999f6a3d7319b35f89a6859db1c62b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276869
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Sean Scally <sean.scally@instructure.com>
QA-Review: Sean Scally <sean.scally@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-10-27 21:34:31 +00:00
Ethan Vizitei df8851251d Revert "Revert "Add a jenkins stage to enforce zeitwerk compliance""
This reverts commit 9c5244ca5b.

Reason for revert: Time to reapply

Change-Id: I63aafdd3056f26423e510560e76b1f6d0fca4c52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276733
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-27 21:01:43 +00:00
August Thornton ada07e0d8e don't rely on translated key for filtering permission groups
added a new key to the account permission grouping hash
that we can rely on not changing

fixes FOO-2527
flag = none

Test plan:
  • Have a group of granular permissions intermingled with
    course and account only permissions
  • Load up the permissions index page and verify Course Roles
    tab is selected
  • Navigate to the granular permission grouping from above
  • Verify the permission button for said group is editable
    given all the course granular permissions are allowed,
    regardless of the state of the account granular permission
  • Verify the permission button state theming is of the state:
    IconPublishSolid, and not of the state: IconOvalHalfSolid

Change-Id: I95d839f56591c53ba112260ec08e8ea631ce9f6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276906
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-10-27 20:49:30 +00:00
Ethan Vizitei c0243465c7 consistently preload QuizQuestions
closes FOO-2530
flag=none

TEST PLAN:
  1) specs should pass
  2) eager load boot should work

Change-Id: I24f62b2937208a4e26b9c19e24ba063321bdf346
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-10-27 20:42:06 +00:00
Spencer Olson ddf3c49bdc fix assignments api permissions bug
closes EVAL-2011
flag=none

Test Plan:
1. Create a Role that doesn't have 'Grades - edit' permissions, but has
   permissions to create and edit assignments
2. As that role create an assignment
3. As that role edit the assignment you just created
4. Notice everything works
5. As the teacher give a student a score for the assignment
6. As the role try to edit the assignment again
7. Notice it saves without errors

Change-Id: Ia452548532671c1abd1fd38b28905f146a357915
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275498
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-10-27 19:56:37 +00:00
Ed Schiebel 0adbcf5059 Add the calendar_series flag
closes LS-2760
flag=none

test plan:
  - the flag shows up on the site admin feature flag page

Change-Id: I58c3624e20d36d8b2d2684c3c2db0c9f7b08bfb1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276815
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: Ed Schiebel <eschiebel@instructure.com>
2021-10-27 18:11:14 +00:00
Marcus Vinicius Pompeu d97ffa57a8 Make outcome_imports endpoint aware of the parent group
closes OUT-4768
flag=improved-outcomes-management

Test plan:

  - Jenkins verifies this (API change only)

Change-Id: Ib41277d66c1e81b9d7ff7c1b94fe5a521b2552d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274606
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-10-27 15:57:14 +00:00
Cody Cutrer aee91b708e RuboCop: Lint/UnusedMethodArgument app/models
all manual

several instances I noticed that the entire method was unused, so removed it

Change-Id: I14ffe7d4b6966ee790e32410f1dbaf5b26ea7f21
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276513
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-27 15:55:26 +00:00
Cody Cutrer 61e5b3a6dc RuboCop: Lint/UnusedMethodArgument lib
all manual

Change-Id: I0db0dbf9ffec3ac6675f6d159f8d038fe2f09256
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-27 15:54:27 +00:00
James Butters d9213a8e41 improve queue_empty logic
sometimes the queueUnprocessed will happen so fast rspecq
hasn't had a chance to populate so now we'll also check
queueProcessed to see if any tests have been ran and if
there are any more.

Test Plan:
-Normal Jenkins build passes
-Add a sleep to make node wait for empty queue
  -node will release

Change-Id: I2f18b6dd4011c2a331e675ff02672cc8bf95a74e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276872
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-10-27 15:51:30 +00:00
Cody Cutrer 44614b47d7 RuboCop: Lint/UselessAssignment app, config, doc, gems, lib
(everything except spec)

all manual

Change-Id: I6c49a3139efb0f0802ba63a15cab4d4d2cd0b8dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276310
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-27 15:36:29 +00:00
Keith T. Garner 19d9329411 add prioritizeNonToolGrade extension to grade passback
This flag is useful for if an LTI tool needs to provide a grade
passback, but would prefer to use the grade in canvas already if a
teacher graded via the gradebook instead of the tool.

An example of where this comes into play is if an LTI tool's grade
passback is delayed, during the delay a teacher manually grades in
canvas's gradebook, and then later the grade passback happens. We know
that certain institutions would prefer the teacher grade stay. (Why the
teacher is giving a different grade than the LTI tool? No idea.)

test plan:
 - specs pass

Change-Id: I2b166f892cc11bfc64522a850944a91aa4d94a96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274389
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2021-10-27 15:03:43 +00:00
Robin Kuss 6344818e15 Add pace plan duration selenium tests
Closes LS-2769

Test Plan:  passes Jenkins

Change-Id: I25e2df3d8c1b4d948d9f47747eb1c951d3e34e43
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276802
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2021-10-27 12:45:56 +00:00
Xander Moffatt 0a5c90cff2 process content items with line items
closes INTEROP-7069
flag=lti_deep_linking_line_items,lti_deep_linking_module_index_menu

why:
* a new addition to the IMS LTI spec is to accept line items as part of
a deep link response, and the Canvas way of handling line items is to
create an assignment

test plan:
* with a 1.3 test tool set up, launch the tool from either the modules
or assignment index menu (3-dot button in top right of page)
* fill in the line item box in the test tool with:
```
{"scoreMaximum":10,"label":"line item test","resourceId":"id","tag":"test"}
```
* fill in the available box in the test tool with:
```
{"startDateTime":"2021-10-18T14:32:07Z","endDateTime":"2021-11-18T14:32:07Z"}
```
* fill in the submission box in the test tool with:
```
{"endDateTime":"2021-11-18T14:32:07Z"}
```
* send the content items back to Canvas
* the page should reload
* you should have one new assignment, titled "line item test"
* it should be worth 10 points, and launch the test tool when opened
* it should unlock on Oct 18 and lock on Nov 18, and be due on Nov 18
* launch the tool from the index menu again and this time fill in the
line item box with:
```
{"label":"this should do nothing"}
```
* submit the content items back to Canvas
* the page should reload
* you should not have any new assignments, since scoreMaximum is a
required field and was not present

Change-Id: I5a7cd02f20da23f162efc7705ac1d98cf1bffe8b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272069
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alexandre Trindade <alexandre.trindade@instructure.com>
QA-Review: Alexandre Trindade <alexandre.trindade@instructure.com>
2021-10-26 23:18:51 +00:00
Martin Yosifov c2bc9edf35 Emit outcome_friendly_description_updated on outcome delete
closes OUT-4740
flag=outcomes_friendly_description

Test plan:
- Enable Friendly Outcome Description FF and Improved
Outcomes Management FF
- Enable live events in canvas, create kinesis stream
and tail it (see live_events.md)
- Go to Account > Outcomes
- Get context_id from the URL (e.g. if URL is
canvas.docker/accounts/1/outcomes then context_id is 1)
- Create an outcome with a friendly description
- Delete the outcome with friendly description
- Verify that after outcome deletion, local canvas emits
event "outcome_friendly_description_updated" with:
1) workflow_state "deleted", 2) context_type "Account",
3) same context_id as that for the Account
- Go to Course > Outcomes, repeat the above tests, and
verify that results are the same except that context_type
should be "Course"

Change-Id: I7d8ef3131035a87fef4b4a5bc07c8132664f4eeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276444
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Manoel Quirino <manoel.quirino@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-10-26 21:56:48 +00:00
Xander Moffatt c54e07a762 put response postMessages behind FF
why:
* includes unsupported_subject, all errors, and general success
* some tools do not yet respond well to new postMessages and break
* these response messages are part of the lti platform storage spec,
which is still under development

refs INTEROP-7087
flag=lti_platform_storage

test plan:
* with the lti_platform_storage feature flag disabled:
* use the 1.3 test tool to send a postMessage with an invalid subject:
`{"subject":"fake"}`
* no response message will be received
* enable the feature flag:
* send the same postMessage
* an unsupported_subject response message should be received

Change-Id: I0c43ca722e99dfc118f875c1fef70f1a2987ac2e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276859
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-10-26 21:44:17 +00:00
Xander Moffatt 35eb5fb3fb messages: restructure response message building
refs INTEROP-7087
flag=none

why:
* the previous commit's way of building stateless messages quickly got
unwieldy, passing around many attributes just
to use them to build a response
* because closures are Good!

test plan:
* specs still pass
* sending a postMessage to canvas still always prompts a response,
whether that is a success or an error
* and only one response, not two

Change-Id: I9c334bc90f0a4e5f32bdfc7d5f4012f4524ababb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274078
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-10-26 21:43:57 +00:00
Xander Moffatt f5f1f22c94 add lti_platform_storage feature flag
why:
* some changes to Canvas postMessage handling aren't necessary or
helpful yet, so put them behind a feature flag

refs INTEROP-7086
flag=none

test plan
* flag should be disabled and not present in js ENV.FEATURES
* enabling the flag should mean it's present in js ENV.FEATURES

Change-Id: I548fd6ed38dc50f2ca27d23664f2a086517c075a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276858
Reviewed-by: Sean Scally <sean.scally@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-10-26 21:20:25 +00:00
Robin Kuss 4cb27a2896 add pace plan data generation to generate_data.rb
Closes LS-2794

Test Plan:

Run:

 bin/rails runner spec/fixtures/data_generation/generate_data.rb --pace_plan

Should get a course with a module that has two assignments, one
discussion, and one quiz, with Pace Plans turned on and availble on
course navigation.

 bin/rails runner spec/fixtures/data_generation/generate_data.rb
--mastery_path

Should get a course with Mastery Paths set up. Verify Discussion is in
the mix.

Change-Id: Id15f999c65af7a4f5b937bc08a3467c16f383efc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276851
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2021-10-26 21:16:19 +00:00
Adrian Packel 2457020ab3 Make "View Options" panel settings update, again
closes EVAL-1840
flag=enhanced_gradebook_filters

Test plan:
- Turn on the Enhanced Gradebook Filters feature
  - In the Gradebook, open the settings modal and test making changes to
    the items in the "View Options" tab
    - Check that your changes are reflected in the Gradebook once you
      close the modal
  - Test updating multiple items in the View Options tab at once (e.g.,
    colors and "show notes", or all the options at the same time)
  - Test updating settings in other tabs and settings in the View
    Options tab in the same request, and make sure all the changes go
    through
  - Note that the old View menu still has the options that have been
    moved to this panel; they'll be remove in a subsequent commit
- Turn off the Enhanced Gradebook Filters feature
  - Make sure the individual settings in the View Options menu still
    work as before

Change-Id: I633cc17f95e967e1deedefb4b42af4b582b3967a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276052
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-10-26 21:06:40 +00:00
James Butters 0df511b6a7 use docker-with-flakey-network-protection
Change-Id: I3428fe1de818813aad448a631e16fb5d08d30475
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276855
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-10-26 20:58:44 +00:00
Cody Cutrer ff416aeb59 RuboCop: Lint/UnusedBlockArgument spec
[skip-stages=Flakey]

all manual

Change-Id: I7137e91c6b576fe29bfe8d8cb4cde343fe3df3a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276621
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 20:41:00 +00:00
Cody Cutrer 06a2c9df42 spec: remove manual requires of spec_helper
[skip-stages=Flakey]

Change-Id: Id65c835b72e1c0a4bb825b58490ce0ff7c8d9873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276829
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 20:38:27 +00:00
Evan Battaglia 4644fdecb6 Fix broken "View App Configurations" link
Also fully remove `alreadyRendered`, which was added in 309e5fd9 but saw
its usage removed in 0bf0399c.

Added PropType `baseUrl` to ensure that is sent; Gergich then required my
to add a PropType for `app`.

fixes INTEROP-7118
flag=none

The value of page.js's "pathname" is dependent on whether there is a
hash symbol (anchor) in the current URL. If there is no anchor, the
pathname contains (starts with) the base URL (e.g.
"/accounts/self/settings"). If there is an anchor, it does not contain
it. The problem is that sometimes, the clicking the Apps tab changed the
web browser's current URL to "/accounts/self/settings#tab-tools". As a
result, pathname was "", and the configurations URL, which is normally
"/accounts/self/settings/configurations", was then just
"/configurations". I have filed a bug report on page.js, but the project
doesn't seem terribly active.
https://github.com/visionmedia/page.js/issues/589

This bug apparently cropped up with d07531a5, before which we never
added a anchor onto the settings URL. This commit was never in prod, but
my guess is that the times we seen it in prod were when we first went to
beta to repro it, then simply got rid of the "beta." from the URL,
leaving canvas.instructure.com/accounts/self/setting#tab-tools, from
which we could repro the issue.

For the fix, "baseUrl" is already used successfully in AppDetails to
construct URLs.  I can't find any reason to rely on pathname, and
pathname is not used for any other purpose.

6e31dcf1 fixed a similar (same?) issue, but that was on an older version
of path.js which did not overwrite pathname if there was a hash symbol.
In the old version of path.js, "/accounts/self/settings#tab-tools" would
yield a pathname of "/accounts/self/settings#tab-tools" so we needed to
cut off the "#tab-tools". In the current version, it yields a pathname
of "".

Test plan:
- go to /accounts/self/settings
- click various tabs and try setting a couple options to make sure
  nothing is broken there.
- click the Apps tab. Note whether or not the browser's URL has changed
  to add "#tab-tools" or not. Within the Apps tab, click "View App
  Configurations", then back to "View App Center", then click
  a particular app (which adds "app/abcdef123-..." to the browser
  location) and click both "View App Configurations" and "View App
  Center" from there. Make sure all the links work.
- If your browser did add "#tab-tools" which clicking the tab, try
  disabling the "remember_settings_tab" feature flag and repeat the tests.
  If it didn't, check that that flag is on.
- go to "/accounts/self/settings#tab-tools". It should jump to the Apps
  tab. Check out that links again and make sure they all work. In
  particular make sure the "View App Configurations" button works when
  the browser URL has "#tab-tools"
- Try editing tools, clicking the info icon or disabling/enabling
  placements. Try to break stuff.
- The test plan from 6e31dcf1 says to use the keyboard, but that didn't
  do anything different for me. You can try it.
- Run all the above steps for the course settings page.
- Run all the above steps for the course details page
  (/courses/123/details).

Change-Id: I2d5cfdcbbb8f0cfd2d43b61b2b5eebf034c77062
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276597
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
2021-10-26 20:15:34 +00:00
Luis Oliveira 3aec488ad7 Update text for "Join this course" button
closes: LS-2735
flag=none

test plan:
- Enable K5 mode
- Create a public self-enrollment enabled course
- Visit that course
- Check that the buttons for joining (in the confirmation and auth screens too)
  all refer to the subject as such, and not as course.
  E.g: Join this Subject instead of Join this Course

Change-Id: I3f81e86cf9b7720006d9e9a74b5281c246295ad2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276568
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-10-26 20:11:12 +00:00
Matthew Lemon 741ae8d333 display media attachments on conversation messages
fixes VICE-2172
flag=react_inbox

Test Plan:
- Enable the react inbox FF
- Setup Kaltura (confluence docs are updated to help you know
  how to do this)
- Create a conversation message and add a media comment to it
- The message should appear with the media comment
- Clicking the title of the media comment should expand the
  media player
- Note that if the media was still being processed by kaltura
  the media player will just render a spinner. Refreshing the
  page after a moment should give you a media player with your
  video in it.

Change-Id: Ifa81cc5981bb37f6ac4cb3eab3a802cf04f1c6ea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276510
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2021-10-26 19:54:21 +00:00
Matthew Lemon 6b9cdb0daa implement reply all for react inbox
fixes VICE-2142
flag=react_inbox

Test Plan:
- Enable the react inbox FF
- Navigate to inbox
- Select a conversation and attempt to reply all to a conversation
  message
- It should work =)

Change-Id: Ie930e2557118047129790717e1cd0c33d4f8badf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276784
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2021-10-26 19:54:03 +00:00
Cody Cutrer fb6e83d719 RuboCop: Lint/UnusedBlockArgument app
all manual

Change-Id: Ia093d2fcc95f9f32c44e73c382a0701e012dae18
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276606
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 18:56:51 +00:00
Martin Yosifov a7892e6c79 Add Individual Outcome Calculation & Rating Options FF to js_env
closes OUT-4830
flag=individual_outcome_rating_and_calculation

Test plan:
- Go to Account > Settings > Feature Previews and enable
Individual Outcome Rating and Calculation Method Options FF
- Go to Account > Outcomes
- Open dev > console and verify that command below returns true
ENV.INDIVIDUAL_OUTCOME_RATING_AND_CALCULATION
- Go to Account > Settings > Feature Previews and disable
Individual Outcome Rating and Calculation Method Options FF
- Restart local canvas to clear cache
- Open dev > console and verify that command below returns false
ENV.INDIVIDUAL_OUTCOME_RATING_AND_CALCULATION
- Go to Course > Outcomes, repeat the above tests and
verify that results are the same

Change-Id: I865340213ee60a28eec28fac04f3e49b2aeac121
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276643
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Manoel Quirino <manoel.quirino@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Ben Friedman <ben.friedman@instructure.com>
2021-10-26 18:56:35 +00:00
Cody Cutrer 2ed15f8d05 spec: automatically require spec_helper
[skip-stages=Flakey]

so we don't have to manually do it, especially with increasingly
complicated relative paths.

and stop manually requiring it in plugins, and also convert any other
require File.expand_path to require_relative

Change-Id: Ifc07149372fe09bcc146ac1b980feb3a9fd62865
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276816
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 17:39:19 +00:00
James Butters 22cebefa58 rspecq on or off, no percentage
Change-Id: Idaecd8bcb1542d2e3624b4d8c7e8420bf6cdad79
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276818
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-10-26 17:19:15 +00:00
Cody Cutrer 08b6fdeb64 add terminate_sessions API for users
closes FOO-2416

test plan:
 * login as a user
 * create an access token
 * as an admin, use DELETE /api/v1/users/:id/sessions of the first user
   (from a different session, or the command line with the admin's
   access token)
 * refresh as the first user
 * you should have to login again
 * look at your profile, and your access token should be expired now

Change-Id: I264de8591324c1ceb0e19c7b2ad62b16a8667bbb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276759
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2021-10-26 17:10:03 +00:00
Ethan Vizitei 9c5244ca5b Revert "Add a jenkins stage to enforce zeitwerk compliance"
This reverts commit fc538f4336.

Reason for revert: unblock existing builds

Change-Id: I68e254fee49d0305b43e6f489e3ed88f52b3167e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276731
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-26 17:05:33 +00:00
Jeremy Stanley 4a6509edf9 switch to primary to mark submission annotations unread
test plan:
POST to /api/v1/courses/X/assignments/Y/submissions/Z/annotation_notification?author_id=W
should not fail when a read-only secondary DB is configured

flag = submission_feedback_indicators

fixes LS-2795

Change-Id: I181adfc485412ad16add00f0c097d77f5b5e99fd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276825
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
2021-10-26 17:00:30 +00:00
Gonzalo Penaranda bfcdf55451 Include underlining for links on RCE editing
Fixes MAT-481
flag=none

Test Plan:

- Make sure High Contrast UI toggle is disabled
on the Account sidebar option
- Open a RCE instance
- Add a link to any URL with any text
- After adding, the underlining for links shows

Change-Id: I82913aad3687d16d3ce90ad394ce35c9c2a17117
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276652
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
2021-10-26 16:51:45 +00:00
Cody Cutrer 814149ddb8 rubocop: add some cops to the low-SnR group
there are too many existing offenses for these cops (thousands), that
means they are just an annoyance until we can address them in bulk

Change-Id: Ia1388d41659cdb10aa9a78bf827ee5fc7384704b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276824
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 16:33:04 +00:00
Ethan Vizitei 8aafc7d464 unconfuse OAuth::Helper references
refs FOO-2529
flag=none

TEST PLAN:
  1) sentry error goes away

Change-Id: I32305a316832fa21bd1edb8550cba309a3222c35
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276823
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-10-26 16:18:22 +00:00
Caleb Guanzon eec5d783e4 spec: add selenium test for reporting a reply
flag = react_discussions_post
fixes VICE-2159

test plan:
code review

Change-Id: I1bc9f19e72357b7ffaa75d0fc494be949b826b91
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276767
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2021-10-26 15:56:27 +00:00
Weston Dransfield 04bdbb9fdb Update canvas-rce translations
flag=none

Test Plan:
new strings are available in canvas-rce

Change-Id: I637892ba3c46c990ca1d9220758a38248def7013
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276817
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2021-10-26 15:56:24 +00:00
Cody Cutrer 3b38d39572 support suspending users via SIS import
closes FOO-2414

test plan:
 * create a user via SIS
 * run another SIS import with the user's status set to "suspended"
 * that use should no longer be able to login

Change-Id: I31b177ee797b3dd8962112960bda11c5c4fa575a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276557
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 15:26:11 +00:00
Cody Cutrer 099f2f63f9 spec: ensure sis export report includes suspended users
closes FOO-2415

Change-Id: Ibc277a371d0acde1b10de9d4601294d700be5505
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276562
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 15:25:53 +00:00
Ethan Vizitei fc538f4336 Add a jenkins stage to enforce zeitwerk compliance
refs FOO-2439
flag=none

TEST PLAN:
  1) build passes
  2) introduce a non-zeitwerk-compatible constant
  3) next build fails

Change-Id: Ib4594b056ffb222f5217f7df8c50abd289872c93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276279
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-26 15:03:08 +00:00
Ethan Vizitei c656c0d60e make globalLookups a module to extend, not a stub
refs FOO-2498
flag=none
[pin-commit-multiple_root_accounts=5bd07698db01843f784622d0a99277bbd7be0dc1]

the stub pattern won't work with zeitwerk

TEST PLAN:
  1) specs pass with plugins migrated to autoextension of GL

Change-Id: I29c7249e38d06e54d4fc111f8a845d4e94ea70f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276301
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-26 14:58:27 +00:00
Jon Scheiding fdc3b44241 Add Content-Security-Policy for vanity domain iframing
flag=none
fixes MAT-439

Test plan
- Set up MRA / vanity domains
- Create a vanity domain for your Canvas (e.g. vanity.canvas.docker)
- Using your primary domain (e.g. canvas.docker), create a wiki page and
  embed a media file in it
- Using your vanity domain, browse to the wiki page you created and
  ensure the media file renders correctly

Change-Id: I2ccb6731d872ca6a6d79fb7d005655ae6b7ce852
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274794
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
2021-10-26 14:09:57 +00:00
Michael Ziwisky 7bf1fbf53e don't publicly expose subgraph introspection query in prod
refs INTEROP-6995

we'll use Apollo Studio or some similar schema registry in production
environments.  public exposure is just a convenience for local dev -- it
allows you to run the API Gateway without needing an Apollo Studio graph
set up for it.

Change-Id: I3c996c76b985e81671d49b25d24db6ed2bfaf674
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271283
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
2021-10-26 01:32:54 +00:00
Xander Moffatt 83946e2d4e fix: only listen for deep linking after tool open
why:
* as part of an ongoing project behind a feature flag, I added
deep linking to the module_index_menu placement, launched
from this file
* the correct response for a deep link at this placement is to
reload the page, since the module items were created on the
backend
* the listener was added at the top level (so on page load), which
conflicts with an existing listener added when a single module
item is added, meaning that before a user gets a chance to save
that single module item, the page reloads
* this means that no single module items returned from 1.3 tools
can be added right now

closes INTEROP-7114
flag=none

test plan
* with a 1.3 tool installed, that has the link_selection placment configured
* with an existing module
* without this code checked out, run webpack
* add an item to this module of type External Tool and select the
1.3 tool
* try to return a content item by clicking Send Deep Link to Platform,
and notice the page will reload before you can click save
* you may also be prompted to Leave Page with unsaved work
* with this code checked out, run webpack again
* add an item of External Tool type to this module, and select
the 1.3 test tool
* you should be able to edit and save the link returned, and
create a module item

Change-Id: I94b48cabc385a9b44e2d34c967080ace57fff278
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276194
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alexandre Trindade <alexandre.trindade@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Alexandre Trindade <alexandre.trindade@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2021-10-26 01:11:41 +00:00
Ethan Vizitei 7954f51512 bump canvas_webex
refs FOO-2434
flag=none

TEST PLAN:
  1) specs pass

Change-Id: Ice36e2bea7a0188356def1c40c21369b1ef74b40
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276771
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2021-10-25 22:46:26 +00:00