Commit Graph

2774 Commits

Author SHA1 Message Date
Cody Cutrer 934e10af14 rails 6: various fixes for controller specs
Change-Id: I93b6470bda86efc324d3fe0704d271813c49d6dc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250497
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-21 20:00:05 +00:00
Spencer Olson 93aee7f242 optimize grading period assignments fetching
closes EVAL-1246
flag=none

Test Plan:
1. Create a course that uses grading periods. Have at least 2 grading
   periods.
2. Create an assignment. Assign it to one student in the first grading
   period, and the rest of the students ("Everyone Else") in the second
   grading period.
3. Sign in as the "one student" from the previous step. Click on
   "Grades". Select the first grading period from the Grading Period
   dropdown and click "Apply". You should see the assignment show up.
   Then, select the second grading period from the Grading Period
   dropdown and click "Apply". You should no longer see the assignment
   listed.

Change-Id: I69d4b8369784086034a7883460e63f4f259a79ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248932
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Jody Sailor
2020-10-21 16:12:52 +00:00
Alex Slaughter 15a3ac9204 Set LiveEvents Spec test value to correct type
Test Plan:
 - Specs Pass

Refs: QUIZ-7810
flag = none

Change-Id: Ib9a86f34ee7e0d3880259d816e854511316b0afe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250486
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Bryan Petty <bpetty@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
2020-10-20 19:41:31 +00:00
Adrian Packel 7602037766 Respect final grade override course settings
fixes EVAL-1266
flag=final_grade_override_in_gradebook_history

Test plan:
- Enable the "Final Grade Override in Gradebook History" site admin flag
- Enable the "Final Grade Override" feature flag
- Have a course with Final Grade Override enabled and some override
  grades entered
- In the Gradebook settings panel, turn OFF "Allow Final Grade Override"
  for the course
- Open Gradebook history
  - Override grade changes should not appear in the results
  - The "show final grade override only" checkbox should not appear
  - Otherwise, the remaining filters should function as normal
- Re-enable the course "allow final grade override" setting and check
  that the checkbox and override grade changes appear again
- Try this with some other combinations (e.g., the site admin flag
  turned off but the course setting turned on); override grade changes
  should only appear if *both* the feature flags above are enabled and
  the course has the "allow final grade override" checkbox enabled

Change-Id: I4a9574423dea8b25092fed75885e405566e2ab95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250428
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Syed Hussain <shussain@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-10-20 16:07:39 +00:00
Cody Cutrer 114399a1d3 rails 6: fix overrides API to use SisPseudonym
Change-Id: I56d1d651293330b8a43b235e01b62cefd3f4e000
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224593
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-19 21:36:08 +00:00
wdransfield 8541ed668e read secure params in LTI 2 basic launch
fixes INTEROP-6229
flag=none

Test Plan:
- Install an LTI 2 tool in Canvas that
  uses the similarity_detection placement.
  This tool should also use an assignment
  variable expansion. For example,
  'Canvas.assignment.dueAt.iso8601'
- Create an assignment with type online upload
  and select the LTI 2 tool as the plagiarism
  detection provider
- Set a due date on the assignment (to test
  the example variable expansion)
- Save the assignment
- Edit the assignment and monitor the LTI launch
  made to the tool when the assignment edit page
  is loaded
- Verify this launch includes the expanded
  assignment variable you added

Change-Id: Ia57e0bc94889557c7dcdbd4ed864cbd8ce9b89eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249138
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2020-10-16 15:11:54 +00:00
wdransfield a0e230a850 Don't raise error when tool launched with duplicates in context
Fixes INTEROP-6260

Right now LTI 1.3 assignment launches will fail in the
following scenario:

There are duplicate LTI 1.3 tools in the context: Tools A and B

- An assignment was created with Tool A
- The assignment was modified to use Tool B

This scenario is a legitimate situation that could occur
when an institution is upgrading an installed tool and want
to test that things work before uinstalling the old tool.

The solution here was to remove the check that required the
tool on the resource link record to match the currently
configured tool (See g/170818).

Also note the message of that commit correctly indicated that
this check was "...almost certainly incorrect
long-term behavior" (although it made sense at the time
it was added)

Test Plan:
- Install an LTI 1.3 tool and configure it with an assignment
- Install a duplicate LTI 1.3 tool
- Edit the assignment to point to the duplicate tool
- Validate that the assignment still launches and that
  AGS can be used from the duplicate tool

Change-Id: If1be3894b26a7cb845a8f70ca5e030c917467f0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250017
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2020-10-15 23:16:29 +00:00
Matthew Lemon 074c4d72eb add setting for changing pronouns
This allows schools to lock down a user's ability to change their
pronoun within Canvas.

Fixes VICE-837
flag=none

TEST PLAN:
- As an admin navigate to the account settings
- Enable personal pronouns and note the additional check box to allow
  users to change their pronouns in Canvas
- With it enabled navigate to a users settings and attempt to edit their
  settings
- Note that you should be able to change the user's pronoun
- Disable the setting on the account attempt to edit a users settings
  again
- Note that the dropdown should be disabled and you shouldn't be able to
  change the user's pronoun

Change-Id: I7d7d454e1b5df9a0afa2b39768159a86910cb7d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249883
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-10-14 22:12:17 +00:00
Rob Orton eeee18f16a allow groups and group_categories to be restored
test plan
 - delete a course group_category
 - go to /courses/:id/undelete
 - it should have the group_category listed
 - hit undelete to the group_category
 - it should restore the group_category
 - repeat for an individual group

fixes VICE-901
flag=none

Change-Id: Ia47ac829d2227bbb4c26f34c3f3cd6aa2c1638c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250061
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
2020-10-14 21:57:39 +00:00
Xander Moffatt 00a2df171e migrate line items from 1.1 to 1.3 on AGS create
* this only occurs if the AGS is used before a tool is launched
* and uses the same just-in-time fixup from the assignment
* another commit will address this same issue but for the index action
* no other actions need this fixup, since they all require a line item

closes INTEROP-6163
flag=none

test plan:
* install a new configuration of the LTI 1.3 test tool locally, with
  the assignment_selection placement included
* copy that ContextExternalTool using `tool.clone` in a Rails console
* rename that tool to something like `Fake 1.1 tool`, and edit the text
  in the assignment_selection placement to match
* create an assignment that launches that fake 1.1 tool
* in a Rails console, edit that fake 1.1 tool:
  * `tool.settings[:use_1_3] = false`
  * `tool.developer_key_id = nil`
* and remove the line item and resource link created:
  * `Lti::LineItem.last.delete`
  * `Lti::ResourceLink.last.delete`
* edit the assignment to now launch the new 1.3 tool from the first step
* DO NOT LET THE ASSIGNMENT LOAD OR LAUNCH THE TOOL!!
  * once you click save immediately click to a different page
* get an LTI access token
  * in the `lti-1.3-test-tool` repo, run:
  * dcr web rake jwt:access_token['https://canvas.instructure.com',3,5,'all']
  * where 3 is the credential id, and 5 is the platform id (these are
    models from the tool itself)
  * the token is the JWT returned
* make a request to the LineItemsController in the AGS
  * get the Assignment's lti_context_id
```
curl -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"scoreMaximum":2, "label":"test","resourceLinkId":"<lti_id>"}' \
  http://canvas.docker/api/lti/courses/1/line_items
```
* this call should not error
* once it completes, there should be a new Lti::LineItem with a matching
  assignment_id
* and a new Lti::ResourceLink with a resource_link_id that matches the
  assignment's lti_context_id
* the assignment should launch properly

Change-Id: I0315dc5b1ede7ad3c37c81ec1b75cad1db693657
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248329
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
2020-10-13 17:00:02 +00:00
Ben Nelson c72950bbe2 allow observers to message their linked students
Resolves a bug where observers were getting an error when trying to send
a conversation message to one of their linked students.

Test Plan:
 Have an observer and student who are paired to each other and have the
     student enrolled in a course
 - As the observer go to the inbox
 - Create a new message where:
 -- The course the student is in is selected
 -- The recipient is the linked student
 - Verify that you are able to send the message

fixes VICE-271

Change-Id: I2bcdf4d371bb93b64ed9877e08e6110bafed2006
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249657
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2020-10-12 18:47:37 +00:00
Adrian Packel 07391ca949 Store SRGB view ungraded in GB user preferences
closes EVAL-624
flag=view_ungraded_as_zero

Test plan:
- Enable the "View Ungraded as Zero View in Gradebook" feature
- Open the Network tab in your browser's developer tools
- Open Individual Gradebook for a course
  - Check that enabling/disabling the "Treat Ungraded as 0" checkbox
    sends a request to the gradebook_settings URL for the course
    containing the corresponding true/false value
  - Check that your changes to the setting persist between reloads of
    the page
  - In a Rails console, check that the preference value for that
    user/course is set appropriately:
    > UserPreferenceValue.find_by(
        user_id: <user ID>,
        key: "gradebook_settings",
        sub_key: Shard.global_id_for(<course ID>)
      )
    should return a hash including the correct value for
    "view_ungraded_as_zero"
- Check that the setting is synced between New Gradebook and Individual
  Gradebook when you switch between them (note that any already-open
  windows will need to be reloaded to pick up the changes)

- Disable the "View Ungraded as Zero View in Gradebook" feature
  - Open Individual Gradebook and check that toggling the setting does
    *not* send a request to the server, but the value persists between
    reloads of that particular browser

- Check that an old IG setting is honored when enabling the feature and
  immediately opening IG:
  - Disable the feature flag
  - Create a new course, or use one for which you've never set the
    preference
  - Open Individual Gradebook and enable the setting
  - Enable the feature flag
  - Open New Gradebook for the course and verify that the "View Ungraded
    as 0" menu item is *not* checked (do not enable it yet!)
  - Open Individual Gradebook and verify that the setting *is* checked
  - From this point on, any change in either of the gradebooks should
    update the value for both of them

Change-Id: I2f2921f1ded63a2daa7c83b30d8b879b86fd1a28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248896
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2020-10-12 16:22:39 +00:00
Manoel Quirino Neto dc68ff2f37 add locked view for mastery scales and proficiency calculation
Add read-only view of mastery scale and of proficiency calculation

closes OUT-3767
flag=account_level_mastery_scales

test plan:
- as Admin, enable "Account-level Mastery Scales"
- log in using an account with permissions
  "Outcome Proficiency Calculations - add / edit" and
  "Outcome Proficiency Scales - add / edit" disabled
- Go to outcomes, Mastery tab, you should not see a form, only the data
- Go to outcomes, Calculation tab, you should not see a form, only the data

Change-Id: I3d6e7fefcd56ceb567dc59c3238ce8cc27553054
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248943
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Product-Review: Jody Sailor
2020-10-08 16:11:59 +00:00
Augusto Callejas 59a5fb70e3 Enable usage rights on discussion topic files
closes OUT-3933

flag=usage_rights_discussion_topics

If a course has usage rights enabled, then discussion topics
and announcements will require usage rights set when a file
is attached. If a user does not have manage_files permission,
then the usage rights indicator won't appear, but a default
set of usage rights will be applied.

prerequisites:
  - in a course, enable copyright and license information
    on files under course settings
  - create teacher and student accounts
  - create a group in the course, and add the student

test plan (before enabling feature flag):
  - confirm that when creating course discussions
    with file attachments as a teacher and student,
    copyright information is not set in the Files
    section
  - confirm the same with group discussions

test plan:
  - enable the feature flag
  - for course discussions:
    - as a teacher, confirm that when creating
      a discussion, usage rights are required
      when attaching a file. confirm the usage
      rights settings are set by re-editing
      the discussion and viewing the file in
      the Files section
    - as a student, confirm that when creating
      a discussion, usage rights are not required
      when attaching a file, but when the topic
      is created, the file appears with a copyright
      setting in the Files section
  - for group discussions:
    - as a teacher and student, confirm that when
      creating a discussion, usage rights are
      required when attaching a file. confirm the usage
      rights settings are set by re-editing
      the discussion and viewing the file in
      the Files section

Change-Id: I0dc6532f7d8188cf4f623275fcf8562f19585f1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248211
Reviewed-by: Pat Renner <prenner@instructure.com>
QA-Review: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jody Sailor
2020-10-07 22:40:04 +00:00
Matthew Lemon 2218a88303 add api for group category import
fixes VICE-814
flag=none

TEST PLAN
- make sure your jobs are running
  script/delayed_job run (run this in your canvas-lms repo)
- Create a csv as per the specifications in
  doc/api/group_category_csv.md
- As a teacher in a course navigate to the groups page and create a new
  group set
- In the group set use the import option to upload the csv
- Behold the wonder that is creating groups through csv upload

- Optionally you can also just use the API to create the groups by doing
  something like the following:
  curl -F attachment=@<filename> -H "Authorization: Bearer <token>" \
         'https://<canvas>/api/v1/group_categories/<category_id>/import'

Change-Id: I47a364c1f0132aef59dd61a815142f94d9cce4f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248580
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2020-10-07 18:21:45 +00:00
wdransfield d265a9e7fe LTI 1.1 -> 1.3 migration (assignments round two)
Closes INTEROP-6101
flag=none

Test Plan:
- Install an LTI 1.3 tool in Canvas
- Once installed, change the LTI 1.3
  tool to LTI 1.1 via a Rails console:
    tool.use_1_3 = false
    tool.save!
- Create an assignment with submission
  type external tool that uses the tool
- Install a second copy of the LTI 1.3
  tool. This tool represents the LTI 1.3
  tool replacing the LTI 1.1 tool created
  earlier
- Launch the assignment
- Verify the LTI 1.3 tool is launched
- Verify the LTI 1.3 tool can use the
  AGS scores endpoint
- Verify the LTI 1.3 tool can use the
  AGS Line Item endpoints
- Verify the LTI 1.3 tool can use the
  AGS results endpoint

- Configure an assignment with an LTI 1.3 tool
- Install an LTI 1.1 tool with duplicate URL
  and domain properties
- Launch the assignment and verify the LTI 1.3
  tool is launched

- Configure an assignment with an LTI 1.3 tool
- Install an exact duplicate of that tool
- Verify that the assignment launches without
  error

Change-Id: I6c56c0bfd9de215824bb57e34e77320bbadbc06a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248518
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-10-07 16:08:22 +00:00
Pat Renner f78b75d22d add default proficiency and calculation_method
flag=account_level_mastery_scales
closes OUT-3922
test-plan:
- delete your account proficiency and calculation method
for Account.default (if they exist)
- Open up the outcome proficiency page
- Then, open the calculation tab
- Confirm via rails console that no outcome proficiency
or calculation method was created when you accessed the page
- Enable the FF
- access the two pages again
- Verify via the rails console that an OutcomeProficiency
and OutcomeCalculationMethod were created

Change-Id: I1bf767b825e50741bd5df75a1b691419b9989c58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248834
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Evan Francis <efrancis@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
2020-10-05 20:24:57 +00:00
wdransfield 9cbe4450fb only check active tools for oembed auth
also adds some helpful logging to help
debug auth issues

Closes INTEROP-6225
flag=none

Test plan:
Attempt to use oembed with an oembed token
that points to a disabled tool.

Validate the response is a 404

Change-Id: I9d982e8e33ec279947ce1fabe8bb47881ff63ee1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249115
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2020-10-05 19:05:02 +00:00
Caleb Guanzon d7eb022ab8 renders blank discussions create page when ff is on
fixes VICE-825

flag = react_announcement_discussion_edit

test plan:

do the following for the following pages:
[new discussion, new announcment, edit discussion, edit announcment]

- visit /accounts/site_admin/settings
- set Update announcement/discussion edit page to use react/instui to Allow
- visit /accounts/self/settings
- set Update announcement/discussion edit page to use react/instui to ON
- visit one of the pages in the array above
- verify text: page is coming soon

- now visit /accounts/self/settings
- turn feature flag off
- visit the pages in the arrays
- verify they display the complete old UI again

Change-Id: Ibf701a60d97c63b364303373c607d81f8afd2118
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249055
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2020-10-02 19:30:05 +00:00
Jeremy Stanley 66c4a1356c multi-parameter search in grade change audit log
test plan:
 - enable the Enhanced grade change auditing feature in site admin
 - have multiple students, assignments, courses, and submissions
 - grade assignments with multiple different graders
 - go to account settings / Admin Tools / Logging /
   Grade Change Activity
 - search by grader, student, course id, and assignment id,
   and ensure each additional field narrows the search results
   correctly
 - also make sure the audit page works (like it did before)
   when the feature is off (searching by one criterion works;
   enter multiple criteria and it'll ignore all but one.
   OSS users still depend on this until they migrate auditors
   away from cassandra)

flag = enhanced_grade_change_query
closes LS-1474

Change-Id: I9c46f5818ab5cb5d8e0eccfa4c5866a54f981c9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248141
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-09-30 21:03:56 +00:00
Gary Mei 1adcb0bc1e add View Ungraded as 0 view option to Gradebook
closes EVAL-622

Test Plan
- Enable the Feature Flag as a site admin.
- Verify that the Gradebook View menu includes "View Ungraded as 0".
- Select "View Ungraded as 0". Verify that this selection persists
  across page reloads of Gradebook.
- De-select "View Ungraded as 0". Verify that this selection persists
  across page reloads of Gradebook.
- Disable the Feature Flag as a site admin. Verify that the Gradebook
  View menu no longer includes "View Ungraded as 0".

Change-Id: I49792de1408a428955f42f272604a87b42d6d8d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248205
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
2020-09-30 18:47:39 +00:00
Jackson Howe ff92ddcdcd Allow direct share for teachers in concluded term
Previously, direct share options appeared for users with
manage_content rights in a course. This commit gives direct share
options to users with read_as_admin rights, so any teacher, TA, or
designer can direct share content, even if a course is concluded.

flag=none
Fixes LS-1409

Test plan:
 - Enable direct share on account
 - Create a term where "teachers can access from" is concluded
 - Add course to term
 - In the course as a teacher, verify that direct share functions from
   the following locations (also expect most other menu items to not
   appear):
   - Modules
   - Pages index and individual
   - Discussions index and individual
   - Assignments index and individual
   - Quizzes index and individual
 - Modify term settings to allow access for teachers always
 - Teachers should now see all menu items in above locations, including
   direct share
 - Students should never see any menu options in above locations
 - Disable direct share for account; verify that menus in above
   locations still function

Change-Id: I53b09ed0c535079ab4e811d58de18ab1ef7f6d3a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248214
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-09-29 15:21:21 +00:00
James Williams a6afb7bc43 create hidden attachment on uploading media from rce
mostly unreverting g/221422

test plan:
  - in the rce, upload a video
  > expect it to show up in the rce
  - from the toolbar, select Media > Course Media
  > expect it to be in the list
  - go to /course/:course_id/files
  > expect it to be in the uploaded media folder
  > expect it to be hidden to students

flag=autocreate_attachment_from_media_object
closes #LS-1476

Change-Id: Ice0e4ec7baa27083092a1f0dd2fa0d7287ef7e87
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248067
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-09-28 21:17:34 +00:00
Pat Renner 50f11b48fa use outcome proficiency ratings in SLMGB
closes OUT-3772
flag=account_level_mastery_scales

Test-plan:
- Ensure the FF is disabled
- Create a course with one student, an outcome,
and an assignment with a rubric aligned to that outcome
- Ensure the rubric is used for assignment grading
- Enable the LMGB under course settings
- Give the student a grade for the outcome (can use speedgrader)
The rest of the test plan assumes I gave the student a 3/5. Feel
free to use another scale and adjust later values
- Click on the student via the student’s name in the LMGB
(this will open up the SLMGB page)
- Note the score (3/5)
- At the account level, enable the FF
- Create an outcome proficiency with 20x the outcome
ratings (100, 60, 0)
- Go back to the SLMGB within the course
- Ensure ratings scaled - if the student previously
had a score of 3, they should now have a score of 60
(20 * 3)
- Grade the same student with another assignment
- Hop in the rails console and verify that the
LearningOutcomeResult associated with the old grade uses
the old outcome scale (specifically, look at `possible`
and `score`). Ensure the newest result uses the scaled
outcome proficiency values for those same fields
- Delete your proficiency and calculation method for the account
via the rails console. Verify that the SLMGB reverts to
using the original outcome values
(this will be fixed after OUT-3922)

Change-Id: Iac888e6eeb929c031559456e2edb9f3bfce4c611
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248109
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
2020-09-28 20:49:07 +00:00
Cody Cutrer 4211945c1f use shard settings, not Setting, for common core group id
Change-Id: I3324d727ea16760c4b28a0b8d0d3cbea676948a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248463
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-28 17:22:17 +00:00
Pablo Marti 5b7df5a164 remove outcome results of test student on reset
on reset test student it removes the outcome results just
for the test student and with that it will remove a
warning message when editing the related outcome

fixes OUT-69
flag=none

test plan:
- Create a rubric and link it to an outcome
- Create an assignment and set the rubric previously created
- Enter Student View
- Send a submission to the assignment
- Exit Student View
- Give an assessment to the student (to the rubric and outcome)
- Enter Student View
- Reset Test Student
- When editing the Outcome no warning message should be
displayed with the message 'This outcome has been used
to assess a student and some edits will affect students results'

Change-Id: I42a4393cfdb1bca623cc609ae58a87385a1ee12c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248441
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Michael Brewer-Davis <mbd@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2020-09-25 21:06:29 +00:00
Mysti Lilla bf747e5d8a Revert "LTI 1.1 -> 1.3 migration (assignments)"
This reverts commit 3ea7825cf5.

closes INTEROP-6199
flag=none

Reason for revert: Current configuration is ignoring the correct LTI 1.3 tool in favor of a non-preferred LTI 1.1 tool, because it has a matching domain, and the LTI 1.3 tool doesn't have a domain (which should NOT be required).

Change-Id: I9492a661b62a788927eaef47bf734ec9d8ac3785
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247358
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
2020-09-24 20:54:54 +00:00
Ed Schiebel a204b384dc Add group files to the rce
closes: LS-1392
flag=rce_enhancements

test plan:
  prereqs:
  1) if you plan on testing group media, you'll need g/247879 built into
        your RCS when testing this.
  2)rce in a group in a course
      - /course/:id/groups
      - +Group Set
      - +Group
      - add student(s)
      - from the group's kabob menu, select "Visit Group Home Page"
      - +Announcement
      - +Announcement again
      - TADA, you're in an RCE in a group context

  - on the toolbar, Images > Upload Image and upload an image
  - on the toolbar, Images > Group Images
  > expect the image you just uploaded to be listed
  - click it
  > expect it to be embedded in the RCE
  - repeat for Documents
  - repeat for Media

Change-Id: I686fe4c42df32cb7e767fe2e277530cb472b2fd6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247738
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-09-22 15:29:42 +00:00
Adrian Packel 8ce7c50719 Add override grade filter to GB history
Add a checkbox to the gradebook history filters to enable returning only
override grades. (The actual functionality associated with the checkbox
will be added in a subsequent commit.)

refs EVAL-1070
flag=final_grade_override_in_gradebook_history

Test plan:
- Enable the "Final Gradebook Override in Gradebook History" flag
- Open Gradebook History for a course
- There should be a "Show final grade overrides only" checkbox just
  below the rest of the filters
  - Checking it should not actually do anything at this point
  - At smaller window widths, the components of the search form should
    gracefully switch to occupying multiple lines
  - The checkbox, however, should always occupy its own line
- Disable the flag and reload the page
  - The checkbox should no longer be there

Change-Id: I3e0628fdf258a1cb16150e290576aff20e730744
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/248071
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Jody Sailor
2020-09-22 14:42:26 +00:00
Davis Hyer 858531c5be handle empty users for discussion topics
fixes VICE-806
flag=none

it turns out, :disable_keyboard_shortcuts already
  existed in the js env which included
  logic that we wanted.

this commit removes DISABLE_KEYBOARD_SHORTCUTS
  in favor of disable_keyboard_shortcuts

test plan:
  - create a public course, publish it
  - create a published discussion
  - as someone who is NOT logged in,
    visit /courses/:course_id]/discussion_topics/[:discussion_topic_id]
  - verify that you are sent to the login page
    (the bug was that instead of being sent to the log in page,
     you see a page error page)

regression test plan:
  - create a course and publish
  - add a discussion
  - as a student with Disable Keyboard Shortcuts disabled,
    - visit the discusson's page
    - verify that you see keyboard shortcuts modal
    - verify that those keyboard shortcuts work
  - as a student with Disable Keyboard Shortcuts enabled
    - verify that you do not see keyboard shortcuts modal
    - verify that those shortcuts do not work

qa risk: medium

Change-Id: I72e4e808ceec5716b6d8b9b42e69ceb281d579f4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247999
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-18 19:50:37 +00:00
Jared Crystal ff96eadadb prevent updating quiz scores for unassigned students
fixes QO-660
flag = none

test plan:
 (be sure to test with all quiz types: graded/ungraded/practice)
 - create a quiz and take it as 2 students
 - edit the quiz to be assigned to only one of the students
 - go to "Moderate this quiz"
 - attempt to "Update Scores" for both students
 - you should be able to for the student still assigned
 - you should not be able to for the unassigned student

Change-Id: Iea06b5b2a9c29817aae743945acc144563fe3c6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247406
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Jared Crystal <jcrystal@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
2020-09-18 16:24:38 +00:00
Augusto Callejas b4bf5427e2 Display roles that can edit proficencies
closes OUT-3945

flag=account_level_mastery_scales

test plan:
  - enable account levels mastery scales flag
  - create custom roles that have different
    outcome proficiency permissions
    (scales & calculation methods)
  - confirm the mastery and calculation tabs
    on an account outcomes page display the
    roles that have the respective permissions

Change-Id: Ic677ca651c1825629609f00532598532313e002a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247692
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
2020-09-17 23:11:37 +00:00
Cody Cutrer f106c87a68 pass through delegated auth redirect _after_ login, not before
refs FOO-639

this also makes login trailer partials unnecessary

Change-Id: I93a1b04addb0d1d355661fd589fb43d5e374b7a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247509
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-09-15 21:50:45 +00:00
Kai Bjorkman 48f72f6a6f remove new post policy icons flag
fixes EVAL-643
flag=new_post_policy_icons

test plan:
- specs pass

Change-Id: Ib255df4e5f9b7074ab4af090b3bc1a583f4c1568
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246862
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2020-09-15 16:53:28 +00:00
Adrian Packel bd2760f6da Add API endpoints for override grades
closes EVAL-1071
flag=final_grade_override_in_gradebook_history

Test plan:
- Have a course with some assignments and students
  - Dish out some assignment grades and override grades
  - Take note of at least one actual assignment with some grades that
    you can check below

- Enable the "Final Grade Override in Gradebook History" flag
- Logged in to Canvas as a teacher in the course, access the following
  API endpoints directly:
  - /api/v1/audit/grade_change/courses/71
    - This should return both assignment and override grades for the
      course
  - /api/v1/audit/grade_change/courses/71/assignments/override
    - This should return only override grades for the course
  - /api/v1/audit/grade_change/courses/71/assignments/<assignment_id>
    - This should return only grades for the assignment assignment_id
  - Visit the above endpoints with ?include[]=current_grade appended
    - This should include the "grade_current" field for each record
      returned above

- Disable the flag
- Visit the above endpoints again:
  - /api/v1/audit/grade_change/courses/71
    - This should only return assignment grades
  - /api/v1/audit/grade_change/courses/71/assignments/override
    - This should return an empty list of results

Change-Id: I70f93b81a61ea9675d56b8d14bbaed028a1827ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247014
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
2020-09-14 19:09:10 +00:00
Jackson Howe 24a7345c85 Set Unsplash content_filter param to high
Makes it less likely that inappropriate images are returned from the
Unsplash API.

Note: a change in rcs is necessary to implement this feature for
unsplash searches inside the rce (see LS-1458).

flag=none
Fixes LS-1428

Test plan:
 - Enable unsplash locally by going to /plugins/unsplash and adding
   dev credentials
 - Go to an unsplash modal in Canvas (like changing course image,
   not in the rce)
 - Make sure unsplash functionality still works
 - Compare searches in local to current searches in prod; searches
   in local should be slightly more restrictive for questionable
   queries

Change-Id: I692dbd43b411d157028aec79d11ec7b4319578b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247494
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-09-14 16:47:11 +00:00
Rob Orton 31957106b8 make notification endpoints multi-shard
test plan
 - have user on shard1 with push notifications
 - merge into user on shard2
 - push should work
 - deleting push channel should work

fixes VICE-790
flag=none

Change-Id: Ib98b907017bb8d5dcee18d0346c4240d8381cfaf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247468
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2020-09-14 16:24:40 +00:00
James Williams 85c73f1488 fix podcast feeds for media objects on user context
test plan:
* create a discussion with podcast feed enabled
 and student posts added to feed
* as a student, use rce enhancements to upload a media
 object (to the student's own context directly) and
 add it to a discussion entry post
* it should show up in the podcast feed

closes #LS-1411

Change-Id: I17c8944921a5170be2d47c30062c0361e896fb25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247247
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2020-09-11 19:41:10 +00:00
Jared Crystal b4aba0e032 Revert "prevent updating quiz scores for unassigned students"
This reverts commit cc226760b8.

fixes QO-666
opens QO-660

Reason for revert:
The fix was not compatible with practice quizzes or ungraded
surveys since they do not have an associated assignment.


Change-Id: Ife9c3d46c978ef2fc0cec620a0d77102d211836d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247344
Reviewed-by: Jacob Burroughs <jburroughs@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>
2020-09-10 19:18:32 +00:00
Michael Guymon 40d8fc5df9 Only allow authenticated users to GraphQL
fixes INTEROP-6074
flag=disable_graphql_authentication

Test plan
- Log into Canvas
- In a new tab, go to /graphiql
- Run query
    query MyQuery {
      account(id: "1") {
        id
      }
    }
- Get query results
- Log out of Canvas
- Run the query in Graphiql again
- Get a 401 unauthorized response in results
- Disable Feature Flag
- Run the query in Graphiql again
- Get query results

Change-Id: I5015687d0019cf0405a3772a47fb897493c8e73f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244995
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
2020-09-10 16:03:50 +00:00
Nate Armstrong 636bcefd3f Add self_registration_type to terms of service api
fixes MBL-14696
flag = none

test plan:
- disable self registration for an account
- hit /api/v1/accounts/:accountID/terms_of_service
  - self_registration_type should be 'none'
- allow self registration for All account types
- hit /api/v1/accounts/:accountID/terms_of_service
  - self_registration_type should be 'all'
- allow self registration for Observer accounts only
- hit /api/v1/accounts/:accountID/terms_of_service
  - self_registration_type should be 'observer'

Change-Id: I68007f96b5e53da31cd6c9951d968a8156d2c4e9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2020-09-10 15:59:23 +00:00
Brian Watson b02d569900 Remove Granular Permissions Wiki Pages FF
closes OUT-3890
flag=none

Test-plan:
 - Verify that user interactions behave as expected
   when testing with various different permissions
   turned on/off when using various different user
   roles
 - Granular pages permissions can be found under
   /accounts/self/permissions > Manage Pages

Change-Id: I0718a781991bf66fd90a14489710f0a68a4e4cb9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245714
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
2020-09-10 04:43:12 +00:00
Jackson Howe 0f86a1f7ac Disable keyboard shortcuts on modules if flag enabled
If the user FF created in FOO-871 is enabled, keyboard shortcuts
are disabled on the modules index, including the Shift+? shortcuts
modal.

flag=disable_keyboard_shortcuts
fixes LS-1381

Test plan:
 - Go to modules index
 - All the keyboard shortcuts, like (up, down, Shift+?, d) should
   function
 - In user settings, enable the 'disable keyboard shortcuts' FF
 - Back in modules, expect none of the shortcuts to work

Change-Id: Ic89e05503b8fe4ed406f1a987c9d5234a390a446
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246815
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-09-09 18:04:03 +00:00
Jackson Howe 3d03debbd5 Fix wiki pages default permissions setting checkbox
If a course's default_wiki_editing_roles was nil (i.e. the course is
new or the default permissions have never been changed), checking
the 'change pages currently editable by x to y' checkbox in course
settings did not do anything.

fixes LS-1415
flag=none

Test plan:
 - Create a new course
 - Create a page and change editing roles for that page
 - Go to course settings, click 'more options' at bottom
 - Change 'can create, rename, and edit pages' dropdown
 - Check the checkbox that appears
 - Save
 - Go to the page, make sure it's editing permissions
   are updated
 - Create a new page, expect the default editing role to
   match the course default just set

Change-Id: Ib1a95094a33ec3510219af87b8889c618ca701cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2020-09-08 18:40:20 +00:00
Adrian Packel f7d1ae25b6 Return override grade changes in results
Update the grade change audit API controller to return override grade
changes if the FGOGH feature flag is enabled, rather than always
excluding them.

flag=final_grade_override_in_gradebook_history
closes EVAL-1068

Test plan:

Take care to test that this works both when reading data from
ActiveRecord and when reading data from Cassandra. Note that a bug
currently exists (separate from this patchset) where grade change data
*written* will only be properly indexed in Cassandra if Cassandra is
also set as the active read_path. In other words, if you have
active_record as the read_path and assign some grades, those grades will
not appear when you view the results using Cassandra.

- Have auditors set up for both ActiveRecord and Cassandra
- Have a course with some assignments and students
  - Issue some assignment grades and some course override grades
- With the Final Grade Override in Gradebook History feature flag ON:
  - Gradebook history for a course should include override grades in the
    results
    - The "Before" and "After" columns should display the override
      grade values before and after that change
    - The "Current" column should display the current override grade if
      there is one (or score if no grading scheme exists)
    - Note that the above two columns should always show the override
      grade, never the *computed* grade (even if there is no current
      value for the override grade)
    - The assignment name will display as "Not available"--for now, this
      is fine
  - Filtering by a specific assignment should not include override
    grades in the results
  - Filtering by other parameters, however (e.g., student/grader) should
    include override grades where appropriate
- With the feature flag OFF:
  - Gradebook history should not show override grades
- Test the above with both ActiveRecord and Cassandra set as the auditor
  read_path (but see the preliminary note)

Change-Id: I90768edfb512774eed7c4c87c76e1df93955511b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246383
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2020-09-04 16:06:17 +00:00
Matthew Lemon 5a9db26306 populate calendar event root account ids correctly
fixes VICE-772
flag=none

TEST PLAN
- specs pass

Change-Id: Ib24c9a2a17e739b7ee326fdc6b45538ddbf34f59
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246927
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Matthew Lemon <mlemon@instructure.com>
2020-09-03 22:25:56 +00:00
Evan Battaglia 101e020938 Fix AssetUserAccess root_account_id on new records
flag=none
fixes INTEROP-6126

Test plan:
- run `Setting.set('enable_page_views', 'db')` to enable AUA creation
- trigger AUA creation for context=not user (Course, Account, Group)
  (e.g. go to a course)
- trigger AUA creation for context=User, asset=not User (going to
  http://web.canvas-lms.docker/calendar and clicking "Calendar feed" and
  "view Calendar feed" seemed to do it for me)
- trigger AUA creation for context=User, asset=User
  (http://web.canvas-lms.docker/files worked for me)
- make sure all AUAs have a root_account_id. The last will have a
  root_account_id=0

Change-Id: I9f82f6edac5ccf71478844df392fcdd2762ffd1b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/246706
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
2020-09-03 19:55:49 +00:00
James Williams a6e6fd0670 split built-in role rows by root account
test plan:
* a multi-tenant shard should still work
 creating enrollments and account admins before and after
 running postdeploy migrations
* the postdeploy should successfully run a datafixup
 to split up build-in role rows and reassign the role_id on
 other tables (account_notification_roles, account_users,
 enrollments, and role_overrides) accordingly

closes #INTEROP-6045

Change-Id: I8325acb635397ac1b008b9d09788595da597cec7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243906
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2020-09-01 19:21:27 +00:00
wdransfield 3ea7825cf5 LTI 1.1 -> 1.3 migration (assignments)
Closes INTEROP-6101
flag=none

Test Plan:
- Install an LTI 1.3 tool in Canvas
- Once installed, change the LTI 1.3
  tool to LTI 1.1 via a Rails console:
    tool.use_1_3 = false
    tool.save!
- Create an assignment with submission
  type external tool that uses the tool
- Install a second copy of the LTI 1.3
  tool. This tool represents the LTI 1.3
  tool replacing the LTI 1.1 tool created
  earlier
- Launch the assignment
- Verify the LTI 1.3 tool is launched
- Verify the LTI 1.3 tool can use the
  AGS scores endpoint
- Verify the LTI 1.3 tool can use the
  AGS Line Item endpoints
- Verify the LTI 1.3 tool can use the
  AGS results endpoint

Change-Id: I38c8ff443239862414d62e1babf9dfae2b2277b1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244422
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
2020-08-31 18:40:04 +00:00
Spencer Olson c600282ae6 assignment page: upload submissions without timing out
Changes the 'Re-upload Submissions' functionality on the assignment
page to use Inst-FS for uploads, which should fix a bug with uploads
for large files timing out.

closes EVAL-1098
flag=none

Test Plan:
Pre-reqs:
- Have a course with a student and a file upload assignment.
- Have Inst-FS configured locally.

1. As a student, upload to the assignment using a large file
   (for my test, I uploaded two 42.7 MB PDFs).
2. In teacher/admin view, download the submissions from the assignment
   page.
3. Re-upload the submissions and verify the upload succeeds. Check
   network traffic to verify that calls are being made to Inst-FS to
   complete the upload.

Edge case testing:
- Verify validation messages are shown if no file is picked and 'Upload'
  is clicked
- Verify validation messages are shown if a file is picked that does
  not end in '.zip'
- Verify the upload button is disabled while the upload is in progress.
- Verify the upload button text changes to 'uploading' while the upload
  is in progress.
- Verify if something goes wrong during the upload (I tested this by
  killing Inst-FS locally), a friendly error message shows up.
- Verify you can still perform submission reuploads in the Gradebook (
  those uploads won't use Inst-FS, but we want to make sure my changes
  here didn't break uploads there).

Change-Id: Ic11dd7a20ee513089f05d3841038fc26bd6f58f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245631
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jody Sailor
2020-08-28 21:03:21 +00:00