flag=react_discussions_post
fixes VICE-3422
notes:
- no need to test graded discussions and mentioning,
those cannot exist with discussion anonymity
- author_name already accounts for full and partial
anonymity
TEST PLAN:
- existing tests pass
- must have Discussions/Announcements Redesign ON
- must have a teacher and 2 students in a course
- these users must have their "New Reply" notification
set to immediately
- as a teacher, create a fully anonymous discussion
- as student 1, reply to the discussion
- as student 2 reply as well
- bundle exec rails c
- verify Message.last.from_name is anonymized
- verify Message.last.reply_to_namee is anonymized
Change-Id: Iab86bf8bcba2ca15b17b7aa2e69a757035fe6519
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317682
Product-Review: Allison Pittler <allison.pittler@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
The assignments API index and users_index endpoints allow for a 'bucket'
param to be passed that filters assignments based on certain criteria.
This commit fixes inconsitencies with bucket filtering and makes bucket
filtering predictable for teachers, admins, and observers.
Teachers & Admins
- An assignment is included in a 'bucket' if at least one assigned student
meets the bucket criteria, e.g. for the 'past' bucket, an assignment will
be returned if any assigned student has that assignment due in the past
for them.
Observers
- An asignment is included in a 'bucket' if at least one assigned observed
student meets the bucket criteria, .e.g. for the 'past' bucket, an
assignment will be returned if any assigned observed student has that
assignment due in the past for them.
closes EVAL-2894
flag=none
[fsc-timeout=60]
[fsc-max-nodes=20]
Test Plan:
For an admin, teacher, observer, and student, verify the `bucket` param
passed to the api/v1/courses/:id/assignments endpoint behaves in the
following ways:
For the steps below, replace APPLICABLE_STUDENTS with:
- "at least one assigned student" if the current_user is a teacher or admin
- "at least one assigned observed student" if the current_user is an
observer
- "themselves" if the current_user is a student
`past` bucket
- assignment is included if the assignment is due in the past for
APPLICABLE_STUDENTS.
`overdue` bucket
- assignment is included if the assignment is due in the past, expects a
submission, has not been submitted or graded, and is able to be submitted
to by APPLICABLE_STUDENTS.
`undated` bucket
- assignment is included if the assignment is due without a due date for
APPLICABLE_STUDENTS.
`ungraded` bucket
- assignment is included if the assignment expects a submission, the
student has turned in work but has not been graded for
APPLICABLE_STUDENTS.
`unsubmitted` bucket
- assignment is included if the assignment expects a submission and the
student has not turned in work for APPLICABLE_STUDENTS.
`upcoming` bucket
- assignment is included if the assignment has a due date that is due in
the next 10 days for APPLICABLE_STUDENTS.
`future` bucket
- assignment is included if the assignment is due without a due date or
is due in the future for APPLICABLE_STUDENTS.
Change-Id: I3255674cd32373bca36943030c35eaa9d15055b5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312938
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Updates the new external tool dialog to handle unexpected shapes
of INST editorButtons
Fixes MAT-1354
flag=rce_new_external_tool_dialog_in_canvas
QA Risk low:
- behind feature flag
- well unit tested
Test plan:
- Navigate to a page with an RCE
- Put a breakpoint where ENV is defined in the page, and add
an offending editorButton to INST. See ticket for details.
- Ensure the RCE loads without error
Change-Id: I747555f38774d6978ea0666ef0d38bd8a0aaf89c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317810
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes EVAL-3077
flag=assignments_2_student
test plan:
- set up a peer review assignment
- successfully submit a Peer Review Comment
- verify the panda image in the success modal is hidden from screen
reader
Change-Id: If9bd4f28a662e7c02fd881375dccecb0131b5ef5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317457
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
test plan:
Make sure assignments edit page still works
Launch the 1.3 test tool via the `assignment_selection` placement
(Course -> Assignments -> +Assignment -> Submission Type -> External
Tool -> Find).
Change the values in the "Title, Text (description), LineItem (JSON)."
Make sure these values are pre-filled in the assignment form, according
to the `lti_deep_linking_line_items` flag configuration.
With the `lti_deep_linking_line_items` flag off, the values will only
pre-fill if they haven't been changed from their original values. With
the `lti_deep_linking_line_items` flag on, the values will always
pre-fill over any of the values already present in the form. The form
shouldn't prefill with any blank values.
The `resourceId` and `tag` fields of the line item claim can be checked
after the assignment is successfully created, via rails console:
```
Assignment.last.line_items
```
flag=lti_assignment_page_line_items
fixes INTEROP-8003
Change-Id: I2d71097f953f72d96c53cb9b2cd2cbbf13e32fe6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317125
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs INTEROP-8003
fixes INTEROP-8038
flag = none
Test plan:
Launch the LTI 1.3 test tool, and return content items in the assignment
selection, and editor placements.
Change-Id: Ifaf98a4a6fc76a987c43cc1240e45d85ca02afda
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314865
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
set as a postdeploy since I'm not aware of any operation of canvas
proper that needs the index; however, the user scrubber has to do
sequential scans though the users table to check the fk constraint
when hard-deleting users. in an EXPLAIN ANALYZE of a hard-delete
of 100 spam users, I found this:
...
Trigger for constraint fk_rails_69200ebc90: time=2.682 calls=100
Trigger for constraint fk_rails_406668e8c1: time=2.609 calls=100
Trigger for constraint fk_rails_a47cd9d666: time=114608.650 calls=100
Trigger for constraint fk_rails_1b711e94aa: time=5.172 calls=100
Trigger for constraint fk_rails_195cffa827: time=3.599 calls=100
Trigger for constraint fk_rails_dbff8d102b: time=2.466 calls=100
...
Execution Time: 115345.613 ms
and structure.sql contains this:
ALTER TABLE ONLY public.users
ADD CONSTRAINT fk_rails_a47cd9d666 FOREIGN KEY (merged_into_user_id) REFERENCES public.users(id);
to make this check fast, we need to help postgres quickly find whether
a user it's about to delete is referenced in another row's
merged_into_user_id column
fixes FOO-3500
Change-Id: I376ea268a3ad75dbaee37991a647bddb5287585b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317440
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes MAT-1355
flag=rce_show_studio_media_options
test plan:
*pre-req: have your dev setup working with my studio
beta instance
*make sure you disable the new external tool plugin
-test that adding videos with 'display media tabs'
de-selected enables you to open the SMO tray and
do all the things
-test that adding videos with 'display media tabs'
selected doesn't allow you to open the SMO tray
-maybe try using some other lti tools and confirm
you don't see anything out of the ordinary
Change-Id: Iae2767015742bbfb0eb7b07ae87dc922e979d98f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317818
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
flag=restrict_quantitative_data
fixes VICE-3498
test plan:
- have a student be graded on a
points assignment, a percentage assignment,
a letter-grade assignment, and a complete-incomplete
assignment
- make sure that student is quantitative data restricted
- as the student visit your home page
- verify that recent feedback on the right
converts points and percent grades to letter-grade,
while leaving complete-incomplete and letter-grade grades
alone
Change-Id: Ic8961976c89bcb112dd65575c6e235f80be19baf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317789
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
flag=none
fixes VICE-3439
test plan:
- new test passes
- follow the steps in the ticket
- verify the ticket's expected behavior is met
Change-Id: I1c5ebcfd887c0eae06e6c8b407f8ad601b82107e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317716
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
why
This commit adds metric collection to help determine who is using a
grading progress of 'Pending' when submitting scores via ags.
test plan
Add the following configuration to config/dynamic_settings.yml:
```
development:
private:
canvas:
frontend_data_collection_endpoint:
'https://canvas-frontend-data-edge.inseng.net/submit'
```
Launch an AGS assignment via the LTI 1.3 Test tool, and submit a score
for a student with a grading progress. Check the appropriate bucket in
s3 to make sure the grading progress metric was persisted.
flag=none
refs INTEROP-8016
Change-Id: Ib733d756295a31c4046712f6041d1588d6e23f99
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317217
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
closes EVAL-3028
flag=visibility_feedback_student_grades_page
flag=assignments_2_student
[fsc-max-nodes=20] [fsc-timeout=60]
Test Plan:
Prerequisites:
Enable Assignment Enhancements.
Enable 'Improve Feedback on Students Grade Page'
1. Create an assignment
2. As a teacher, in speed grader, add a submission
comment to this assignment for a student
3. As a teacher, delete the newly created comment
4. As the student from step 3, observe that there
is no grade badge or assignment badge indicating
an unread comment
Change-Id: I5974f42e4d76ebff326bda10b3686f98dc8f870c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316925
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
Actually use Bundler to write them out. this ensure that all
constraints are checked with the gem's Gemfile. Had to resolve
several issues with gems along the way.
also removed RedCloth from canvas_stringex, because it's never
used
Change-Id: I614be19e147bdfd3e351e7f032fd6f9b0c1926be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
closes VICE-3486
flag=restrict_quantitative_data
Test Plan
1. Create an assignment as a teacher
2. As a student enable "send scores in notification"
3. As a student create the communication channels you want to test
4. As student, create a submission
5. As a teacher grade the submission
6. Check the students messages to verify submission graded message
7. in the console change the submission graded_at
7a. submission.graded_at = Time.zone.parse("Jan 1 2000")
7. as a teacher change the grade
8. verify that the grade changed notification respects lgo
Change-Id: Iceed6caebead2c69df6ff320d5839944d66d4c14
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317562
Product-Review: Jody Sailor
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Test plan:
- Enable the enhanced_gradebook_filters feature flag
- Create a student group with a name containing special characters
- Go to the gradebook
- Click "Apply Filters"
- The student group name should be displayed correctly in the
filter dropdown
flag=enhanced_gradebook_filters
Fixes EVAL-2936 (again)
Change-Id: I8d0ac8fa5f3326e7b108562d1376b923f391b115
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317563
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
the regex expression which found the file id
was not accounting for the possibility of a
global id, causing some document previews to fail
fixes MAT-1345
flag=none
test plan:
- this bug is hard to recreate in local, so I think the
test proves that it works, you can also do the following:
- go to an rce and add a user file using the document tray
- in html mode, change the href of the file to have a global id
as the file id
- ex. href="https://canvas.docker/users/1/files/12~34560?..."
- make sure the file link is set to overlay and save
- open developer tools and go to network
- click on the file to preview it in overlay
- look for a network request resembling this:
12~34560?include[]=enhanced_preview_url&verifier=ag… etc
- request will fail unless you have an attachment with that id
(120000000034560) but that's ok
- ensure no other overlay file links are broken
qa risk: low
Change-Id: I4df7977ba711f4a13916a0e6d6bfbf4ab4f825eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317718
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
fixes VICE-3497
flag=restrict_quantitative_data
test plan:
- Specs pass.
- As a teacher, create an assignment with due date.
- As a student of the course, go to the dashboard.
- Points shouldn't be shown.
qa risk: low
Change-Id: Ie7605ea080c76e52b33d7410070900e4dfc3e589
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317708
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
closes LS-3995
flag = module_publish_menu
Test plan:
- Open the modules page with the flag enabled
- Using a SR, focus on an individual module's publish menu
- Expect to hear '[module name] Module publish options'
Change-Id: Ibd12dd5f9d34f03107ad6777e32fc9e7d8bca035
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317664
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: Jackson Howe <jackson.howe@instructure.com>
closes LS-3986
flag=auto_subscribe_account_calendars
test plan:
- have a student in a couple courses in different sub-accounts
- have one sub-acccount's calendar auto-subscribe (by setting
account_calendar_subscription_type="auto" on the account)
- open the calendar as the student
> expect to see the auto-subscribed calendar in the sidebar
- hover over that calendar
> expect no 'x' to remove the calendar
- click the + to add other calendar to open the Select Calendars
modal
> expect the auto-subscribed calendar's checkbox to be disabled
- check the other account calendar's checkbox and Save Changes
> expect both calendars in the sidebar
- hover over each of them
> expect an 'x' to delete the non-auto-subscribed calendar and
no 'x' on the auto-subscribed calendar
Change-Id: I7c22eb3a20f3cbfb0dbe04d540e31d585c0a111a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317430
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
flag=restrict_quantitative_data
fixes VICE-3487
test plan:
- must have a quantitative data restricted student
- must have an assignment
test plan:
- submit the assignment as a student
- as an admin, grade the student on the submission
- as an admin, visit /users/:id_of_student/messages
- verify you no longer see score: in the plain text
and html versions of the submission_graded notification
- verify you now see grade: #{the letter grade equivalent}
instead
Change-Id: I0ab636368f01402ff08f275a123e29ed3973034d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317560
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jody Sailor
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
This is not part of the spec; the user will get the
registration URL from our OIDC endpoint.
flag = lti_dynamic_registration
test plan:
- specs pass
Change-Id: I0e23183dfe3d74cc6cba0e31276cd869f3fe6d26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317506
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Product-Review: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
fixes VICE-3399
flag=react_discussions_post
test plan:
- Specs pass.
- Create a topic as a teacher.
- Visit that topic as a student.
- Create an entry.
- As a teacher, visit /courses/[Course ID]/users/[Student ID]/usage.
- Times Participated column should show 1 (or more) for the topic.
qa risk: low
Change-Id: Idd38c7474c1708fcbb6ec0c5465960bea9fb3329
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317653
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Allison Pittler <allison.pittler@instructure.com>
Balsamiq Sans has non-standard glyphs for some unicode code points
related to some math symbols. Exclude these code points from
our @font-face definition for Balsamic Sans
Closes MAT-1341
flag=none
QA Risk Low:
- While this touches fonts, any issue should be very obvious during
QA.
Test plan:
- Test text: 'Balsamiq Sans - ❨❩❪❫❬❭❮❯❰❱❲❳❴❵'
- Insert the text into an RCE and ensure it displays correctly
in Balsamiq Sans and several other fonts.
- Save the RCE and ensure it still displays correctly.
Change-Id: I77b5bed591a4061fe49f88b58522bc3e0fb4252a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317465
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Allison Howell <allison.howell@instructure.com>
Previously, if just a single attribute was included in the payload,
the missing attributes would default to false (which is not how the
API is documented to work).
refs LS-3982
flag = none
Test plan:
- PUT /api/v1/account_calendars/<account_id> with a payload like:
[{"id": 1, "visible": true }]
on an account where account_calendar_subscription_type is "auto"
- Expect account_calendar_visible to be true and
account_calender_subscription_type to still be "auto"
Change-Id: I38d7c06518c5374101821602c3aed496c4e756ae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317675
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
closes LS-3996
flag = module_publish_menu
Test plan:
- Open bulk publish modal
- Click 'continue'
- Expect focus to be on the close 'x' in modal header
Change-Id: Ib66cd4dff1bd4701c69083fab2c5f1bcbb5a846e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317444
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
depending on if it's use separately from bin/rubocop, or as part of the
overall Gemfile
Change-Id: I03edbb1a92793fe5ee333a9b32a03e0297616ffd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317578
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
flag=none
This is generally useful for providing friendly text
for relative time distances such as "yesterday" or
"in 4 hours" and leverages native browser Intl functions
instead of dependencies. It was buried in the QR mobile
login code because that's currently the only usage, but
it should be more generally available.
Test plan:
* Visit the "QR Mobile Login" in dev (it's under the
"Account" tab on the left nav)
* Bring up a QR code and watch the "This code expires
in ..." text at the bottom for a couple minutes and
make sure it decrements the amount of time in a
correct way
Change-Id: I51aef1eedc37a35b1e6c44e734c751d0b8fd015d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317199
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>