Commit Graph

43668 Commits

Author SHA1 Message Date
Jeremy Stanley bb70052cd1 blueprint: fix syncing files when folders deleted downstream
test plan:
 1. Create a blueprint course with a folder and a file, sync
    to an associated course
 2. Delete the folder in the associated course
 3. Rename the folder in the parent, add a new file, sync it
 4. The sync should succeed
 5. The folder should be recreated in the associated course
    containing only the newly added file from step 3

flag = none

fixes LS-2047

Change-Id: I7753f2459e90bf5e1be47313157824513d7de4d9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261070
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-03-18 21:41:40 +00:00
August Thornton 6820d429cc spec: fix flaky courses api test with files granular on
flag = none

test plan:
 * specs pass
 * splunk logs indicate 100% passing rate after merge

Change-Id: I559d7e58e017eb5e7064ee3f5755969505c1a99b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261048
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2021-03-18 20:38:27 +00:00
Manoel Quirino Neto 9605fc30f6 Fix focus when using new Webcam Submission
closes OUT-4245
flag=enable_webcam_submission

test plan:
  - Enable enable_webcam_submission ff
  - create an assignment with submission type "file uploads"
  - as a student, open the assignment > submit assignment
  - Click on Use Webcam Button
  - Assert "Take Photo" is focused
  - Click on "Take Photo"
  - Assert "Use This Photo" is focused
  - Click on "Try Again"
  - Assert "Take Photo" is focused
  - Complete the "Take Photo" process
  - Assert the trash icon button is focused
  - Please test this with a screenreader, too.

Change-Id: Iaa5474e0803bfdb52c554012b9652c7448c84a55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258360
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Augusto Callejas <acallejas@instructure.com>
Product-Review: Jody Sailor
2021-03-18 19:53:49 +00:00
Syed Hussain d67808ea3a Show long words properly in comments
fixes EVAL-1346
flag=none

Test plan:
- Goto speedgrader
- Add a comment, using the example string in the ticket
Make sure that the comment does not overflow and is broken up in
multiple lines.

Change-Id: I0f00b635602f48dec96e1df1b7e7c34ea30d66fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261005
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Jody Sailor
2021-03-18 19:32:49 +00:00
Weston Dransfield 51dd48ebcc Add very general notes on implementation
Also added shell files that I needed to
link to. I'll be filling out those files
in detail in later commits.

flag=none

TODO: add ticket
Change-Id: I44580b0734a63c93c54f5526770523639124de77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260860
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2021-03-18 19:26:42 +00:00
Chawn Neal 52d90b2237 Implement Alert Component
fixes VICE-935
flag=none

Create Flex based alert component

TEST PLAN:
 1) yarn jest Alert tests the props
 2) Run yarn storybook.
  Go to Discussion Posts > Alert > default .
  Match the component to the one in the ticket.
  Should match the figma file.

Change-Id: I0e43d9affce573b8424d51bee9258bff6540e6a9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260783
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>
2021-03-18 18:58:11 +00:00
Matthew Lemon 2f61cd253a load association for group membership on group type
This was causing an n+1 query on group memberships because
we were not using association loading.

fixes VICE-1224
flag=none

Test Plan:
- Create two users
- Create a group
- Add only one of the users to the group
- As the user in the group navigate to /graphiql and run the
  following query

```
query MyQuery {
  legacyNode(_id: <group_id>, type: Group) {
    ... on Group {
      id
      name
      member(userId: <user_id>) {
        createdAt
        state
        user {
          name
        }
      }
      membersConnection {
        nodes {
          user {
            name
          }
        }
      }
    }
  }
}
```

- The query should return all memberships in the group
  as well as the specific membership associated with the
  user id passed into the query
- Use the user id of the user not in the group in the query
- The result should be null for the specific member but the
  membersConnection should still return all users in the
  group

Change-Id: I684e74c6fc0fc6a443497fe1b680ea10440e11d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261028
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: Rob Orton <rob@instructure.com>
2021-03-18 18:31:10 +00:00
Charley Kline 6b6705bacb Remove (vacuous) use of InstUI <Select> in RoleTray
Closes FOO-1573
flag = none

The Permissions RoleTray includes a call to a function which
renders the old <Select> component. This is a pretty trivial
invocation which was easy enough to swap out with the new
<SimpleSelect>.

This is just kind of a formality though, to get rid of the
old InstUI 6 deps... because the function that renders the
Select is short-circuited (line 447).

Test plan:
* none (component is currently short-circuited, the next
  person who enables that select box, if anyone ever does,
  can worry about any issues that there may be with this)

Change-Id: I830434c6f3c6fb0dfc8fd67a8c2db5e6bfd93689
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261030
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-18 18:21:07 +00:00
Aaron Ogata 28454e524d work around flakey starlord token issue
refs DE-579

Change-Id: I0889b9e34c27a667ffa0573982bb77a37f103dc3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261023
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-18 18:20:52 +00:00
Eric Saupe 0d208724f3 Remove easy_student_view flag
This feature is considered on for all users so the flag is no longer
required.

fixes LS-1971
flag=none

test plan:
- Verify all Easy Toggle Student View features are all present
- Verify the flag is no longer present in configurations

Change-Id: Idd68de429df31f356e0d3388b1fc08dc960dee0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260952
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: Eric Saupe <eric.saupe@instructure.com>
2021-03-18 17:37:27 +00:00
Jonathan Guardado 69934d22a9 Formula alignment gets ignored when Math: Updated Equation flag is on
When replacing the image for the math_equation_latex wrapper, the
style from the image is copied to the wrapper before removing the
Image from the DOM, with this the new wrapper will keep the style
including the alignment.

fixes LS-1941
flag=none

Test Plan:
- Enable the feature flag Math: Updated equation handling on the
account level
- Edit or create a page in a course to see the RCE
- Use the "insert math equation" button on the toolbar to insert an
equation image
- Use the "Align" button on the toolbar to center the image on the
page and save the content
- Notice the formula gets rendered in the expected position keeping
the alignment.

Change-Id: Ie2a90dc4b24236dacb34d8183b7c0066eaa8b196
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260985
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: Jonathan Guardado <jonathan.guardado@instructure.com>
2021-03-18 17:32:17 +00:00
Jeremy Stanley db04ff762e remove uxs_4_omg_a_scary_blueprint_checkbox feature flag
test plan: the auto-publish checkbox should appear in
blueprint course association

flag = none
closes LS-1979

Change-Id: I3ce2279e1b2cf23fc954b62978703958c4355793
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260932
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: Jeremy Stanley <jeremy@instructure.com>
2021-03-18 17:18:12 +00:00
Aaron Ogata 85f3a9018d increase priority of pre-merge cache build
refs DE-338

In order to remove the nospot label, we have to prevent wrapping all of the stages within a single node. This requires us to move all of the Build Image stages sequential to each other. This change is likely to increase the post-merge times by an insignificant amount because most images are already cached and pulled from their previous patchset build. Pre-merge times are likely to decrease by a measurable amount due to the cache being available earlier.

Test Plan
1. Ensure post-merge build without pre-merge build behaves reasonably. (uncommon case)
2. Ensure post-merge build with pre-merge build behaves reasonably. (common case)

[build-registry-path=jenkins/canvas-lms/de-338-pre-merge-2]
[change-merged]

Change-Id: Iec38f413896fe7a6d8b6d5cf5b443a3634dff301
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261009
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-03-18 17:07:01 +00:00
Chawn Neal 424c6d596b bugfix calling first on nil membership
fixes VICE-1191
flag=none

safe nav if we call first on empty membership return

TEST PLAN:
 1) Using graphiql:
 Query an existing group with an member id not in the group.
 It will return a null as opposed to an exception.

Change-Id: I867e3dd05e1ea1491405c8516261295838c4e359
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261020
QA-Review: Rob Orton <rob@instructure.com>
QA-Review: Matthew Lemon <mlemon@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Matthew Lemon <mlemon@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2021-03-18 17:05:27 +00:00
Cody Cutrer b83ebeacff log error reports on the shard that was active
when the exception was thrown

Change-Id: I6cda8d863d4fc39125ccc062a58a62fe95d55d75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258942
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-03-18 16:58:48 +00:00
Jeremy Stanley c30c759fa6 remove assignment_bulk_edit feature flag
test plan:
 - bulk date edit feature should function for assignments

flag = none
closes LS-1975

Change-Id: Ib7360c57baf8cbaf0a740ce477730150242f4691
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260930
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-03-18 16:39:26 +00:00
Jeremy Stanley 30f4423c29 remove bounced_emails_admin_tool feature flag
test plan: bounced emails tab appears in account admin tools

flag = none
closes LS-1989

Change-Id: Iafd44bb6e5f98f0c2e8381dbe27cb57a40ec306d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260926
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2021-03-18 16:39:08 +00:00
Jeremy Stanley 70cce327be remove syllabus_course_summary_option feature flag
test plan:
 - the "show course summary" checkbox should appear on
   course syllabus pages, and function as expected

flag = none
closes LS-1978

Change-Id: Ic5aff59ee1a1c118a6f62db42811548c43da8546
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260935
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: Jeremy Stanley <jeremy@instructure.com>
2021-03-18 16:38:19 +00:00
Simon Williams c7224cf89f improve user merge for user observer links
fixes FOO-1591
flag = none

test plan:
- have two users observing the same student
- remove user 1 as an observer
- merge user 2 into user 1
- it should work

Change-Id: Ic7cecc446e88a62916329d0411fa49d0787f89a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258572
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: Simon Williams <simon@instructure.com>
2021-03-18 16:34:40 +00:00
Nate Armstrong d97a457542 spec: unskip courses_controller specs
I can't for the life of me get these to flake locally.  I suspect
something has changed elsewhere.  Going to enable to see how things go.

test plan: builds pass

Change-Id: I0bdcaabaf8126a12533fe26f02cee96e03d50edc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260977
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-18 16:33:01 +00:00
Mauricio Salles a4ee9e90be fix no method error on DelayedNotification job
no method error was throwed when a unexpected context was passed
thru a polymorphic_url for a Message object

Test Plan:
   - Monitor the sentry logs to check if theres no new occurencies

fixes VICE-1190

flag = none

qa risk=medium: It may causes unexpected behavior when anchor media
links aren't proccessed as expected due to this unexpected parameter
bug

Change-Id: I0477e0337682f99c84575fb1245bc19a58604cf8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260911
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>
2021-03-18 16:17:27 +00:00
Robin Kuss 3f5a5b8809 rm rcs directory and files under selenium quizzes
Close LS-2043

Test Plan: runs appropriate tests and passes jenkins

Change-Id: I9d2827cc50070986d0818f115a1c6921602ed21f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260887
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
Reviewed-by: Mark McDermott <mmcdermott@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2021-03-18 15:08:23 +00:00
Jenkins c7bbb0424b update nn translation
Change-Id: Ic999365ebf7536991ff3fd9337c54692d7a47260
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260992
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-18 05:54:42 +00:00
Weston Dransfield 0bd2223bea Use secure launch URL when present on link import
Fixes INTEROP-6627
flag=none

Test Plan:
- Install an LTI 1.3 tool that uses
  custom params + deep linking + https
- Embed a link from that tool in an RCE
  or assignment
- Attempt to copy the course and verify
  the resource link is copied to the source
  course

Change-Id: If521039d30a9be33a8b6fb3688790f4013a2135d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260972
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2021-03-17 23:06:21 +00:00
Ethan Vizitei 293d657ef0 unit test to cover hotfix on EventStream::Logger namespacing
Change-Id: Ib15160c120a18aadc7040809e9eec62b4b5e5eb1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260960
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-17 22:36:34 +00:00
James Butters 4cdc289622 source common.sh only once
multiple bash scripts need to source common.sh but we only
want to do this once. Check if an env var exists, if so just return
if not than source common.sh

flag = none
closes: DE-576

Test Plan:
-Jenkins passes
-Run docker_dev_setup with -o errtrace -o xtrace
  -verify common.sh was only sourced once

Change-Id: I9c44208df2e8718124e6944911d514e291398f03
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260912
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-03-17 21:32:01 +00:00
Ethan Vizitei 207af72f16 de-namespace pageview event_stream logging
PageView names it's event_stream instantiation
the constant "EventStream" which shadows the gem
"EventStream", which is not ideal.  This makes sure
we're looking for the logger in the right place.

TEST PLAN:
  1) with pageviews going to cassandra, on write
     failure, we can log the error to actual logs.

Change-Id: I043d7b59bf0eeb187c1eb8c19059b566605211da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260958
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-17 21:10:42 +00:00
Eric Saupe f646b51bf4 Remove recent_history flag
This feature is considered on for all users so the flag is no longer
required

fixes LS-1970
flag=none

test plan:
- Verify all recent history features are enabled
- Verify the flag is no longer present in configurations

Change-Id: Iad2817e4a5699b35fc991f8f5045b452c1fcfbfd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260949
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2021-03-17 21:01:27 +00:00
James Butters 2b45e82021 abstract canvas build steps into separate script
closes: DE-567
flag = none

Test Plan:
-Jenkins passes
-docker_dev_setup.sh still works
-docker_dev_update.sh still works
-rebase_canvas_and_plugins.sh still works

Change-Id: I044ba0d3d8539a1e87bb0fef67f3b82855f4ab2c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260842
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-03-17 20:19:41 +00:00
Caleb Guanzon 74c0017035 spec: create selenium collaborations folder
- uses require_relative
- moves collaborations tests to the folder

TEST PLAN:
- none

Change-Id: I4f6a6dfeb58726f3130ca9774427f47a7de97b0f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260904
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: Rob Orton <rob@instructure.com>
2021-03-17 20:02:34 +00:00
Eduardo Escobar 750c7847da fix grade to score wrong calculations bug
Math operations between float and bigdecimal can get
wrong results so the grade_to_score and score_to_grade
calculations were changed to use only bigdecimal
instead of multiplications and divitions by float

fixes EVAL-1491
flag=none

test plan:

- Create a course with at least one student enrolled.
- Create a grading scheme that has a variable grade
  with a range of 1% so that if the variable grade is given,
  the score will default to the lowest possible
  percentage for that range.
- Create an assignment and set "Display Grade as"
  to GPA Scale or Letter Grade, then choose the
  grading scheme that you just created.
- Set the point value for the assignment that corresponds
  with the grading scheme chosen so that when the variable
  grade is given for the 1% range, the score will have
  more than three decimals.
- Save the assignment and navigate to Speedgrader.
- Give the variable grade for the 1% range to the student
  and notice that the variable grade changes in Speedgrader
  and in the Submissions API. Notice in the Submissions API
  that the score has more than three decimal places
  and is repeating.

Change-Id: Id216698e72c58c4fc46301c48f2f504b4b2a1ef8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260503
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
2021-03-17 19:11:30 +00:00
Juan Chavez 96cbaac6a7 Fixes unposted message for unpublished assignments
Only published assignments with hidden grades should display the message

fixes EVAL-1328

test plan:
- Publish the assignment
- Set the assignment post policy to Manual
- View the students grades page to verify you see an "unposted message" for the assignment
- Unpublish the assignment
- View the students grades page to verify you don't see an "unposted message" for the assignment

flag=none

Change-Id: I63c7e08bbbcd62a3efba28645aefb46c041f01e5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260323
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@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-03-17 18:55:16 +00:00
Gary Mei 67b93cb9a7 persist annotated attachment selection
closes EVAL-1536
flag=annotated_document_submissions

Test Plan
- Create an assignment of type Annotated Document.
- Verify that saving, and reloading, displays the same attachment.
- Verify that this works for multiple combinations of Annotated Document
  and other types of Assignments.
- Verify that uploading an attachment from the FileBrowser works with the
  above steps as well.
- Verify that removing the attachment prompts for another attachment to
  be selected.

Change-Id: Ib9f7825ab4b94a6ccc04462022531fbd40bafdfb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260590
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
2021-03-17 18:45:15 +00:00
Jeff Largent c5be04ea1d Re-skin K-5 Dashboard schedule tab
This change slightly updates the look of the "classic" planner on the
Dashboard, and makes bigger changes to the planner in the schedule tab
of the K-5 Dashboard when the canvas_for_elementary flag is enabled.
Changes to the "classic" planner are not feature flagged.

Classic planner changes:
  - The dates for each day are bolded and no longer uppercase
  - All dates are inline except for Today, which spans 2 lines
  - The dates for each day no longer show the year (e.g. Wednesday,
    March 3), unless they are for a date not in the current year (e.g.
    it shows Wednesday, December 23, 2020 if the current year is 2021)
  - The course title is top-aligned instead of centered over course
    image

K-5 schedule tab changes:
  - Thicker borders (2px instead of 1px)
  - PlannerItem controls and icons are black or gray instead of using
    the course's color
  - Points and due date are black instead of gray
  - The notification / activity dot on the left is hidden
  - The gray detail summary at the top (e.g. "Math Assignment") is
    hidden

closes LS-1763
flag = canvas_for_elementary

Test plan:
  - Verify that nothing has changed in the "classic" planner when the
    K-5 dashboard is disabled for a user
  - Verify that the K-5 schedule tab changes listed above are present
    when the K-5 dashboard is enabled for a user

Change-Id: I38154f33ee0d83f2816416f10c25d8812bdd00f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259929
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: Peyton Craighill <pcraighill@instructure.com>
2021-03-17 18:27:28 +00:00
Rob Orton 7baa9ded91 mark announcements as read on correct shard
stream item instances are all stored on the users shard, so we need to
update them on the users shard.

spec covers case

test plan
 - have course with announcement on shard 1
 - enroll user as student from shard 2
 - create course announcement
 - user dashboard should show as unread
 - read announcement as student
 - it should be marked as read on dashboard

fixes VICE-1197
flag=none

Change-Id: I4e103b79992c084d3a383587d420d6a5e95db33b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260577
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>
2021-03-17 17:02:42 +00:00
Pablo Marti-Gomez 4c65f3f583 Add cache to Outcomes::LearningOutcomeGroupChildren
Updates Outcomes::LearningOutcomeGroupChildren by adding cache
at the queries for getting the total subgroups and outcomes.

closes OUT-4148
flag=improved_outcomes_management

Test plan:
- Create nested learning outcome groups
- For each nested learning outcome group create learning outcomes
> With FF improved_outcomes_management: OFF
- On Rails console: calls to Outcomes::LearningOutcomeGroupChildren
methods should return a default value
- On web: when generating actions over ContentTag, LearningOutcome
and LearningOutcomeGroup it should not lead to clear any cache
> With FF improved_outcomes_management: ON
- On Rails console: call Outcomes::LearningOutcomeGroupChildren
methods for getting total subgroups and outcomes, queries to the
DB should be made (it will need the root context)
- Call again the same methods, it should return the values from
cache
- Create a new instance of the class and call the same methods,
it should return the values from cache
- Clear the cache with `Rails.cache.clear`
- On web (or through GraphiQL) get the total subgroups and total
outcomes multiple times; it should cache the data and should not
run additional queries
- On web: clear the cache by executing the following actions:
  - Add a Learning Outcome Group
  - Adopt a Learning Outcome Group
  - Copy a Learning Outcome Group from global
  - Remove a Learning Outcome Group
  - Add an Outcome
  - Remove an Outcome
- Get the total subgroups and total outcomes, it should run new
queries
- Run the same tests for global context, it should generate and
clear the cache in the same way

Change-Id: I9b0bfc68b84b3e36869d69a926ef84d9989ea96d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257257
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2021-03-17 16:49:37 +00:00
Pablo Marti-Gomez eca632b70c Add Edit Group Modal
closes OUT-4003
flag=improved_outcomes_management

Test Plan:
- With Improved Outcomes Management flag ON
> Account level
- Access to Outcomes
- Select a group from the tree browser
- Click the kebab menu at the selected group name and
click: Edit
- The Edit Group modal should be displayed with the
data of the group
- Delete the name, an error should be
displayed with the message: "Missing required title"
- Edit the title and the description and click: Save,
the Save button should become disabled when processing
the request, then the modal should be closed, no
changes should be displayed on the group at the tree
browser, and a toast with the name of the group should
be displayed
- Reload the page, the group should display the updated
name
- Open the Edit Group modal for the same group, the
description should display the new content
- Click on Cancel and on the X (close), the modal
should be closed
- Open the Edit Group modal again, stop the Docker
container, make changes on the group information, and
click: Save, an error should be displayed with the
request that failed
> Course level: repeat the same steps

Change-Id: I0eacabf8b351ccc9ad0a90b8f6f93a1d328efa18
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258777
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Jody Sailor
2021-03-17 16:46:33 +00:00
Rob Orton 5cffab2bd1 clean up stream items more efficiently
this consolidates four after saves into one and does it more efficiently

test plan
 - existing specs should pass

fixes VICE-1218
flag=none

Change-Id: I974b38711b0146e3f916dd5f48fa52bbfe26ae41
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260579
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>
2021-03-17 16:38:48 +00:00
Adrian Packel 2627cb94d6 Round grade summary score stats to 2 places
fixes EVAL-1320
flag=none

Test plan:
- Have a course with at least 5 students so stats get generated
- As a teacher:
  - Create an assignment with some number of points possible
  - Give a grade to each student; make sure the lowest and highest
    scores have 2 or more decimal places
- As a student:
  - Open the grade summary page and click the icon to show statistics
    for a given assignment
  - Observe that the lowest and highest score you gave appear rounded to
    2 decimal places
- Test that scores with fewer than 2 decimal places are shown as-is
  without any extra zeroes added

Change-Id: I3864fe796c159cd77523c360de15495bbc85d22f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260213
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
2021-03-17 14:57:20 +00:00
Jenkins 4ff8732639 update nn translation
Change-Id: I1715d96361bc7fbf60d6ea18cbeda8b16137b696
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260873
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-17 05:55:10 +00:00
Jenkins 20b6df2418 update mi translation
Change-Id: I51677028d25c16d84b307859d00b3b7e17d606c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260872
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-17 05:51:57 +00:00
Aaron Ogata e8b0c12ad4 better approach to allow-stages directive
refs DE-561

[canvas-builds-refspec=23aaf39eef7c6df9ba39d87a8eea4ae63b683672]

Change-Id: Ia338f72d2792b28a16119db409dbb9ad9e5db389
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260825
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-16 22:18:24 +00:00
Weston Dransfield 1ce0ad390b MSFT sync group create endpoint
Closes INTEROP-6561
flag=none

Test Plan:
- Identify a course with no MSFT sync group
  associated with it
- Make a request to create a MSFT sync group
  for that course
- Verify a MSFT sync group record is created
  and returned with the correct default values.
  Note the ID of the group
- Via a rails Console, update that group to
  have a workflow_state of 'errored', a
  last_error set, and a job state set
- Soft delete the group
- Attempt to create a group for the same
  course. Verify the ID of the returned group
  is the same as the group previously noted.
- Verify the returned group has a workflow state
  of "pending" and that both job_state and last_error
  have been set to nil
- Make the exact same request and verify Canvas
  responds with 409 Conflict
- Attempt to create a MSFT sync group via the
  new API as a student. Verify the request fails
  with 401
- Attept to create a MSFT sync group for a course
  that does not exist. Verify the request fails with
  404

Change-Id: Iaa8900575a189c4d5d1d25042a29a4a22ac9954a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260411
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2021-03-16 20:36:57 +00:00
Weston Dransfield ede23743d3 MSFT sync group delete endpoint
Also make MSFT sync group records
soft-deletable

Closes INTEROP-6562
flag=none

Test Plan:
- Create a MicrosoftSync::Group associated with a
  course
- Make a delete request to the new endpoint providing
  the course ID of the course associated to the group
- Verify Canvas responds with "no content"
- Verify the group associated with the course is now
  in a deleted state
- Make the group "pending" again via a Rails console
- As a user who does not have the manage users course
  permission, attempt the same delete request
- Verify Canvas responds with unauthorized
- Experiment with making the delete request for
  courses that do not exist or do not have msft
  groups. Verify Canvas responds with "not found"

Change-Id: I642f5df659abc1b045339318e2c108c4df285e93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260310
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
2021-03-16 20:23:54 +00:00
Michael Ziwisky a437e76654 Set up replica identity index for EnrollmentDatesOverride
refs FOO-1171
flag=none

[pin-commit-instructure_misc_plugin=2a355a61125e91cccf377984902b3a15921e525d]

test plan:
 - migration works up and down
 - tests pass

Change-Id: I30820fda78adc1b2844a31be42eca88b02aefd60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260525
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2021-03-16 20:19:36 +00:00
Alex Slaughter ec1e6384fa Remove ability to look user up by id - hash is now needed
Test plan:
 - Specs pass
 - Test emails
 - Test discussion boards
 - Test LTI integration urls
 - Test conversations
 - Test different hosts, 127.0.0.1, localhost, canvas.docker, etc.

flag=none

Change-Id: I827c94501c9174ff8ca44aa362c686e198a9869b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258290
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Ziwisky <mziwisky@instructure.com>
QA-Review: Michael Ziwisky <mziwisky@instructure.com>
Product-Review: Michael Ziwisky <mziwisky@instructure.com>
2021-03-16 20:16:16 +00:00
Michael Ziwisky 7ab57265c9 Set up replica identity index for UserAccountAssociation
refs FOO-1171
flag=none

test plan:
 - migration works up and down
 - tests pass

Change-Id: I027da73a5ff87226206e3ba7b06618c0919ad8d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260531
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-03-16 20:01:43 +00:00
Michael Ziwisky 2ac314bdfa Set up replica identity index for CourseAccountAssociation
refs FOO-1171
flag=none

test plan:
 - migration works up and down
 - tests pass

Change-Id: Ib1e7f0cd2398c56fff8ec0208ace8a69a180a393
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260522
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-03-16 20:01:35 +00:00
Michael Ziwisky ca41fd8a4f Set up replica identity index for AccessToken
refs FOO-1171
flag=none

also don't backfill nulls if the column is already non-nullable

test plan:
 - migration works up and down
 - tests pass

Change-Id: I5009a2f31249643738f69a6b0d765daf89276165
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260519
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-03-16 20:00:56 +00:00
Ethan Vizitei c5988b8cc5 Initial work on getting zeitwerk loader running
refs FOO-1712
flag=none

 - drop bad directories from autoloading (jsx)
 - re-inflect some things that zeitwerk doesn't
   know by default (InstFS, etc)
 - add environment variable trigger for enabling
   zeitwerk loading
 - move samesite transition cookie to app middleware
   so we don't try to reload middleware
 - use zeitwerk.rb shim to pre-load things
   that are not correctly loaded by their own
   gems

TEST PLAN:
  1) everything continues to work fine
  2) for local development, if you use the
     CANVAS_ZEITWERK env var, you get zeitwerk
     autoloading (which is probably still broken)

Change-Id: I55a0db84034133240698bf4ff0cc8d225ec181a6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260674
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-03-16 19:55:12 +00:00