Commit Graph

1422 Commits

Author SHA1 Message Date
jake.oeding 8708e837b1 update requirements on submit
closes LF-613
flag=differentiated_modules
qa risk: low

test plan:
-have a module with some module items
-open the tray via assign to and switch to settings
-scroll down to requirements and change the count
 and some of the content settings
>click submit and confirm the page updates
>open the tray again and confirm it parses the
 requirements properly
-refresh the page
>make sure the requirements match what you had
 previously entered
-open the tray and clear our the requirements
>click submit and confirm the requirements are
 removed in the UI

Change-Id: I5e20eb430d250db00e1c9609e2dd4d51dbe25c3f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328736
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: Jake Oeding <jake.oeding@instructure.com>
2023-09-28 15:14:52 +00:00
Ed Schiebel 0bfff955dc Add content to the module item assign to tray
Does not implement responsive rendering. That is deferred
to LF-824

closes LF-748
flag=differenciated_modules

test plan:
  - on the modules page, with an assignment or quiz
  - click on the item's kabob menu
  > expect the tray to open
  > expect the tray to have 1 card
  > expect no trash can button
  > expect an Add button
  - click the Add button
  > expect a 2nd card to be added
  > expect the cards each to have a trash can button
  - add more if you want
  - click a trash can
  > expect the card to be deleted
    (you can confirm the correct card was deleted by
     keeping an eye on the cardId currently being
     shown in the UI)
  - delete cards until there's only 1 left
  > expect the remaining card not to have the trash can

Change-Id: Ide13c30cb82989a479ade1076b0f32bf3f8eb0b2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328719
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-09-27 21:38:59 +00:00
jonathan 1ec4fbb6de fix double scrolling issue on assign to tab
InstUI does not provide a way to handle the scrollbar behavior
on the Select component, this PS fixes the problem by finding the
scrollable wrapper and adding it the "overscroll-behavior-y: contain"
attribute. To do this, the way of showing/hiding options needs to be
managed by the selector since the listRef is removed every time the
Select hides the options.

fixes LF-799
flag= differentiated_modules

Test plan:

1-In a course with several sections, students and modules
2- Go to the course modules page.
3- Open the module menu.
4- Click on the “Assign to” option.
5- Click on the “Custom Access” option.
6- Scroll over the dropdown options.
7- Expect the scroll to only affect the "Assign to" dropdown
scrollbar and the external scrollbar not to move

Change-Id: Ia8c5313748e684b5a7d9704b7523f9d395bd765a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328754
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2023-09-27 20:21:03 +00:00
Ed Schiebel 18817bc0e2 Create the Assign To module item tray
Limited info in it so far

closes LF-747
flag=differentiated_modules

test plan:
  - on the modules page with some assignment and legacy quiz
    module items
  - from the kabob menu on an assignment or quiz item
    choose Assign To...
  > expect the tray to open
  > expect the tray heading to be the title of the item
  > expect the icon to correspond to the item type
  > expect the points value to be correct
  > expect the tray's footer to have Cancel and Save buttons
  - click "Cancel"
  > expect the tray to close
  - click the 'x' close button
  > expect the tray to close
  - create an assignment or quiz with no points (not 0, but none)
  > expect the tray not to show the "|" in the header

Change-Id: Icdab6c118f2e4416942e41768ce43e07345c7d90
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328385
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: Ed Schiebel <eschiebel@instructure.com>
2023-09-27 12:56:25 +00:00
Michael Hulse 41a90caebf persist date/time, role enrollment filters in localstorage
closes FOO-3335
flag=temporary_enrollments

test plan:
- enable temporary_enrollments feature flag on root account
- enable permissions: User - Temporary Enrollments
- create two users on account (user1/user2)
- create course add user1 as teacher
- add module/assignment and publish everything
- go to course/people page
- click the temporary enroll icon for user1
- search for user2
- go to last screen/page of temporary enroll modal
- change date/time and role filters
- save/close modal
- reopen modal
- go to last screen/page of temporary enroll modal
- expect date/time and role filters to be persisted

Change-Id: I26a9f9f95983c8ed9bf15f0630ae83f475e659c2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327187
QA-Review: Michael Hulse <michael.hulse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
2023-09-26 17:43:06 +00:00
Drake Harper c8ba493d6a Add rubrics to react student grade summary page
refs VICE-3778
flag=student_grade_summary_upgrade

Test Plan:
- add a rubric to an assignment
- grade a student using the rubric
- as a student go to the grades page
- should be able to view rubric

Change-Id: I58c79504750927a273133924ad5e2ca1ccb57e47
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327659
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-09-26 16:29:50 +00:00
jake.oeding f161bd0de1 add requirements UI
this patch adds all the components and interactions.
it stops short of integrating into the api call and
ui update callback. that will be addressed in the
next patch

refs LF-613
flag=differentiated_modules
qa risk: low

test plan:
-pre-req: module(s) with many different types of
 resource type items with various requirements
-navigate to the modules page
-open the assign to tray and switch to the settings
 panel
>confirm the UI reflects the state of your module
-click the add button
>confirm it adds a new requirement that defaults to
 the first module item in your module, and has a
 requirement type of view
>change the type and confirm in react dev tools
 the reducer's state updates
-click the delete button on a requirement
>confirm it removes the items
>make sure the checkbox only shows if you have
'complete all' selected

Change-Id: I1011d2291865262a103b815ad0ffe0516e928c9e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328116
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-09-25 23:44:39 +00:00
Aaron Shafovaloff 68b621566d Begin SideNav implementation
Test plan:
  - localStorage.instui_nav_dev = 'true'
   - visit /accounts/
   - click on an account
   - the SideBar component should show

flag=none

refs FOO-3868

Change-Id: I0528dc0411a63d700905c7f8780e214585f0397a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328629
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-25 22:29:48 +00:00
Aaron Shafovaloff df495acd92 Load front-end router in initializer
flag=none

test plan:
  - verify that teachers can switch between student groups
  - verify that a teacher can masquerade as another user

closes FOO-3856

Change-Id: I008496ac60ee0fcf512ba9aa31472afe25065f17
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327937
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-22 19:04:57 +00:00
jonathan 3aedd3ea4b Show default values in the “Custom Access” tab
closes LF-645
flag= differentiated_modules

Test plan:

1- In a course with several sections and students, create a module.
2- Create some assignment overrides for the created module ( see
module_assignment_overrides_controller_spec lines 29-34)
3- Go to the course modules page.
4- Open the module menu.
5- Click on the “Assign to” option.
6- Click on the “Custom Access” option.
7- Expect the assignment overrides you added in step 2 to be selected
as default values on the Assign to selector

Change-Id: I1cd6e59dc922f2fc79efb01e9c4bc021cc52ce58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328449
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2023-09-22 17:25:33 +00:00
Ed Schiebel 8c17b0b9ce Add Assign to to the module item kabob menu
closes LF-695
flag=differentiated_modules

test plan:
  - have a module with a variety of module item types
  - click on the kabob menu for each module item
  > expect to never see "Assign To..."

  - turn on the site admin differentiated_modules flag
  - repeat
  > expect to see Assign To... only for assignments and
    legacy quizzes
  - add a new module item from the Modules page
  > expect assignments and quizzes to get the
    Assign To... menu item. Others do not.

  - repeat as a user in a role w/o manage_assignments_edit
    permission (Assignmens and Quizzes - add/edit/delete)
  > expecte Assign To... not to be in any module item menu

Change-Id: I967cc152479b5d28a75528461d3c775cc82584d0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328267
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: Ed Schiebel <eschiebel@instructure.com>
2023-09-22 16:03:54 +00:00
Charley Kline 3c5e316883 Revert "Upgrade Canvas to InstUI version 8 (frd)"
Refs FOO-3862
flag=none
[pin-commit-multiple_root_accounts=9d1698853e352f7e023e196e80cc195215a2b98c]

This reverts commit 448f1eebef.

Reason for revert: downgrade to InstUI 7 per engineering leadership

Change-Id: I89c607d09c29885da77b4474b757c7f205e51f01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328102
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-22 01:35:06 +00:00
Charley Kline eed5ce6216 Revert "InstUI 8 upgrade post-work: theme -> themeOverride"
This reverts commit cedcf898c0.

Reason for revert: downgrade to InstUI 7 per engineering leadership

Change-Id: Iba9002c54977ee76079b9c45dedef4fa04f46fc2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328101
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-20 20:53:51 +00:00
Ed Schiebel 688c10a1c0 Make the missing item dot in the student planner invisible
The design says to remove the missing item dot, since we already
have a missing badge in the item's entry, but that also removes
the screenreader message at the beginning of the course's day's
items. I solved this by continuing to render the Incidator, but
not rendering the instui Badge that draws the dot.

closes LF-711
flag=none

test plan:
  - have a student with some new activity in the past
    and some missing items
    - create a couple assignments due in the past
    - have the student submit one, and the teacher grade
      and comment on it
 - as the student load the planner
 > expect the submitted late assignment to have the new activity
   dot in the theme's primary color (default is blue)
 > expect the unsubmitted assignment to have no red dot, but still
   have the Missing badge
 > if you uss a screenreader to read the planner, expect to hear
   that there are missing item(s) when you get to the course on
   the day with the missing assignment.
 - scroll the new item off the top of the page, then click
   the New Activity button
 > expect the new activity item to scroll into view

Change-Id: Ibf406c62880fe03af92233622b97e7e7c171ef9c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328255
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: Ed Schiebel <eschiebel@instructure.com>
2023-09-20 20:22:28 +00:00
Charley Kline 3b4a3f56ed Revert "Fix student planner css"
This reverts commit 2f6da101eb.

Reason for revert: downgrade to InstUI 7 per engineering leadership

Change-Id: Ic74aff06f55b30e0a98166a2ac068665caa8928d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328099
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-20 19:56:28 +00:00
jonathan fe82042d5e Support fetching sections and students
Fetch sections and students and display them as options when choosing
Custom access.

closes LF-641, LF-642
flag= differentiated_modules

Test plan
- In a course with several sections and students, go to the modules
page.
- Open the module menu.
- Click on the “Assign to” option.
- Click on the “Custom Access” option.
- Click on the “Assign to” multi-select.
- Expect to see course sections and students as available options.
- Try to filter options that are not listed.
- Expect the results to be searched in both endpoints (sections
and students)
- Select some options.
- Expect multiple selection to be allowed without duplicate values.
- Click on “Clear All”.
- Expect the selection to reset.

Change-Id: I285d2b9159878544764da783aed803c633122328
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327852
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2023-09-20 16:07:14 +00:00
Tucker McKnight b816477a3b Remove developer_key_page_checkboxes feature flag
The flag has been on for all accounts for a few weeks now.

fixes INTEROP-8138

test plan:
- tests pass

Change-Id: Ibe4e2b0257f8274bdf7f92bb78460ebb5e959d83
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327727
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Tucker Mcknight <tmcknight@instructure.com>
2023-09-19 22:13:17 +00:00
jake.oeding 959ed6c2af prep for adding requirements
refs LF-613
flag=differentiated_modules
qa risk: none

test plan:
-go to the modules page
-launch the assign to tray and switch to settings
>use react devtools component inspector to view the
 props and confirm the parsed values that are passed
 in match the state of your module
 *alternatively, you could set a breakpoint at the
  first line inside SettingsPanel component and
  inspect the prop values there

Change-Id: I94c59d420599a7d85f0ad8069902ff511b3e9c7d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327766
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-09-19 19:18:52 +00:00
August Thornton d3829c3a67 present toast message on successful temp enrollment creation
fixes FOO-3849
flag=temporary_enrollments

test plan:
- create a temp enrollment
- verify toast message appears

Change-Id: I3c4fe2c71a420e4d0bc8f0ea9e8ee46cf1802f32
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328061
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2023-09-19 18:47:25 +00:00
Jason Anderson f587677d78 Create Outcome Details Modal in LMGB
closes OUT-5859
flag=improved_lmgb

This ticket creates a modal that contains detailed
information for an outcome. This information includes
 - Outcome Title
 - Outcome Display Name
 - Outcome Friendly Description (If FF is enabled)
 - Outcome Description

The modal is accessed by selecting the dropdown
menu in the outcome column header and selecting the
"Outcome Description" option

Test Plan:
 - Automatic: Test are sufficient and pass in Jenkins
 - Manual:
   - Enable Improved LMGB FF
   - Enable Outcome Friendly Description FF (in Site Admin)
   - Create an outcome with title, display name, friendly
     name, and friendly description
   - Create an outcome with a title, but no display name,
     friendly name, or friendly description
   - Navigate to Improved LMGB and open the description modal
   - Check that all information is rendered correctly
     according to the screenshots given in the JIRA ticket
   - Check that the empty outcome displays the default modal
     information with a working link to the Outcomes
     Management page for the course
   - Disable Outcome Friendly Description FF
   - Check that "Friendly Description" is not rendered in the
     outcome description modal

Change-Id: Ibf452c5da510211fe390e48e792c37f4c872b46b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326939
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com>
QA-Review: Martin Yosifov <martin.yosifov@instructure.com>
2023-09-19 17:30:42 +00:00
Sarah Gerard 2f2b79602a Open tray when clicking "View Assign To"
closes LF-647
flag=differentiated_modules

test plan:
- turn the flag on
- have a module with an assignment override:
  in a rails console, find a module and run
  context_module.assignment_overrides.create!
- go to that module's course's module page
- that module should have the 'View Assign To' link in
  the module header
- click the 'View Assign To' link
- expect the new differentiated modules tray to open
- should open with the 'Assign To' tab selected
- tray should behave the same as it currently does when accessing it
  via the the module menu

Change-Id: Ide2eb6427d40451a0c8cc77403c6b9f223b35777
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328090
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-09-19 14:14:14 +00:00
Aaron Shafovaloff 65e4d01faa Stop intercepting early clicks
test plan:
  - build passes

flag=none

Change-Id: I57b81d77f2167b6c953a215b5e52d4625b6ee407
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327934
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-15 22:34:40 +00:00
Ed Schiebel e89983962c Remove ':' from labels in the edit calendar event page
also removed getByRole calls in CalnderEventDetailsForm.test.jsx
to resolve test timeouts

closes LF-735
flag=none

test plan:
  - click on a date in the calendar
  > expect the edit event modal's labels to have no colons
  - choose More Options
  > expect no colons after any of the field labels on the page

Change-Id: I24aab45052bf389a834daa626d01e8a182722a6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327208
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-09-15 18:21:37 +00:00
Ed Schiebel 2f6da101eb Fix student planner css
broken by instui8

closes LF-778
flag=none

test plan: the planner looks like it should

Change-Id: Ifff7c1c91d7f2f5884a3eacd2ae826655daa3052
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327910
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
2023-09-15 17:16:26 +00:00
Jackson Howe 3dd2854f1a Load correct default RCE font with canvas_k6_theme
When canvas_k6_theme and k5+lato are both enabled, show lato in the
RCE. The features aren't intended to be used together, but when
simultaneously enabled, everywhere else defaults to lato instead of
balsamiq, so do the same in the RCE.

fixes LF-708
flag = none

Test plan:
 - On an account, enable Canvas for Elementary and select the lato font
 - In a course in that account, enable the canvas_k6_theme flag
 - Create a new page in the course
 - Expect the default font in the RCE to be lato
 - Save the page
 - Expect the font on the page to be lato

Change-Id: Ifa4748fca7fa9cf54fffffb30bee2baec9414d91
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327823
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>
2023-09-15 15:47:52 +00:00
Ed Schiebel a1ea5055e3 Update CanvasDateInput error handling
CanvasDateInput has a new property that controls its behavior.
If defaultToToday is true, it changes such that:
- If the user enters an unparsable string, leave it in the UI
  and show an error
- If the user blurs the input while it's empty (or only spaces)
  set to today's date

It turned out that the new behavior was easy to implement, but
putting that behavior behind a flag was the hard part. Getting
existing specs to pass took some time.

closes LF-763
flag=none

test plan:
  - run storybook
  - Shared/Date and Time Helpers/CanvasDateInput/Default
  - or -
  - find a canvas page with CanvasDateInput
    (Assignment bulk edit, Course Settings, ...)

  - enter valid dates or pick from the calendar

  - set the defaultToToday toggle to false
    (which is anywhere in canvas for now)
  - pick a date from the calendar and tab out
  > expect to see the date reflected below
  - type jibberish in the textbox and tab out
  > expect the textbox to be cleared
    and have ** no date** displayed below
  - clear the textbox and tab out
  > expect the textbox to remain empty

  - set the defaultToToday toggle to true
    (only in storybook)
  - pick a date from the calendar and tab out
  > expect the date reflected below
  - enter jibberish in the text box
  > expect an error message and the input to remain in place
  > expect ** no date ** and an error message below
  - delete what's in the text box and tab out
  > expect it to be replaced with today's date

Change-Id: Ib16a2bb0c56f44b817d9a26270979feef9e7dac4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327448
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-09-14 21:02:08 +00:00
Ed Schiebel c5735ef301 Fix placement of CanvasModal's Close button
closes LF-769
flag=none

test plan:
  - open a CanvasModal
    - calendar, click on a date, from Frequency dropdown pick
      Custom
    - courses/:id/assignments, choose Edit Assignment Dates
      from the kabob menu, select assignment(s), click the
      Bulk Edit button
    - if you have some LTI tools installed, go somewhere with
      an RCE, click on the external tools button, then View All
  > expect the 'x' close button to be in the upper-right corner
    of the modal
  - put your user in a rtl language
  > expect the close button to be in the upper-left corner

Change-Id: Ieb314304bb159b1c2192a00b2fa126153bfe8c22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327812
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2023-09-14 21:01:48 +00:00
Jacob DeWar e69f04c14d Add aria-expanded to info button when previewing file
fixes LF-732
flag=none

Test Plan:
-Go to files, preview media
-Verify Info button has aria-expanded false
-Open info button (mouse, keyboard, screenreader)
-Verify Info button has aria-expanded true

Change-Id: I0d283192acaf96dc8da3ffa65d26fa1c3dbd6177
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327821
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
2023-09-14 19:52:02 +00:00
Charley Kline cedcf898c0 InstUI 8 upgrade post-work: theme -> themeOverride
Closes FOO-3190
Closes FOO-3192
flag=none

After the upgrade of canvas-lms to InstUI version 8, this list
bit of work (neither forward nor backward-compatible) needs
to get done. On components (not InstUISettingsProvider) if a
local theme override happens, the name of the prop to do that
changed from `theme` to `themeOverride`. This takes care of
that everywhere that wasn't mopped up in the "mega commit."

Also fixed up some Typescript here and there where it made
sense. (usually related to the other stuff touched)

Test plan:
* Manually inspect the UI on some feature bundles touched by
  this and make sure they look correct and per design

Change-Id: Ibc5ae6d65912f0eabd8c174390c9cf0e2ad2e53d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327772
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2023-09-14 15:21:27 +00:00
Aaron Shafovaloff 448f1eebef Upgrade Canvas to InstUI version 8 (frd)
Refs FOO-3190
Refs FOO-3708
flag=none
[fsc-max-nodes=30] [fsc-timeout=60]
[pin-commit-multiple_root_accounts=03b5f961bbaa28af3d43b0a6a2ab072654cc6468]

Uprevs InstUI and addresses all post-uprev tasks. Also now that
InstUI is fully TypeScript, a bunch of type errors appeared
which needed to be addressed.

NOTE:

This is an amalgam of g/314136 and g/326557 which will get abandoned
once this passes Jenkins and is merged.

It builds against the commit of MRA that will have to merge
concurrently with this.

Still to do: theme -> themeOverride which is a separate commit
off of this one that is ready to go.

Test plan:
* cross your fingers
* (this will need some extensive review before merging)

Change-Id: I860c3dc04d34237e32aeaa138f6c377a016ceeae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327683
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-14 14:34:45 +00:00
Aaron Shafovaloff c82dfc2387 TypeScriptify ui/index.ts
test plan:
  - build passes

flag=none

Change-Id: I6c459e401cd425b5512740213d515624887cf24b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327667
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-09-13 21:04:51 +00:00
Aaron Shafovaloff ca8b08737c TypeScriptify GroupNavigationSelector
test plan:
  - build passes

flag=none

Change-Id: I07dc34e1414dfba247600f2a52047063e5625032
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327663
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-13 19:42:57 +00:00
jake.oeding 5c5dfdf211 add prerequitites to module settings
closes LF-612
flag=differentiated_modules
qa risk: low

test plan:
-go to modules, launch the tray from the first
 module on the page
>expect to not see the prerequisite form
-launch the tray form a subsequent module
>expect to see the prerequisite form
-click on the drop down
>expect to see the module(s) that preceed the
 current module
-choose one and click update module
>confirm the UI updates to show the pre-req in the
 module's header
-launch the tray for that module again
>confirm the form reflects the current pre-req you
 added upon opening the tray
-click the 'x' next to the selector
>confirm it removes your pre-req
-click update module
>confirm the UI removes your pre-req indicator

Change-Id: I3c74d1b609c2d49421d4a7b5fcc4552f5bd6a05b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327248
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-09-13 18:58:20 +00:00
Sarah Gerard 0a15290373 Update ui-media-player
this should fix issues with the media player in safari

closes LF-662
flag=none

test plan:
- in a Safari browser, add some media to a page using the rce
- ensure that you can pause/play/pause again the video/audio
  as expected, both in the rce and after saving the page
- ensure otherwise that the media player is still working normally

Change-Id: I7431924592b5ae2d7c33e308673a6ca7466aacc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327631
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: Sarah Gerard <sarah.gerard@instructure.com>
2023-09-13 17:29:18 +00:00
Michael Hulse 1a943d11be add api call to complete add temp enroll workflow WIP
Added temp enrollment functionality and updated Jest tests

closes FOO-3714
flag=temporary_enrollments

test plan:
- one and more enrollments are created with source_user_id
- the courses and section ids match the UI
- error shows if API call fails
- modal closes after success
- tests pass

Change-Id: Iec49176fe06520e9952254c8212462fb2a9d8f7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325354
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
2023-09-13 16:12:07 +00:00
Aaron Shafovaloff f96b5e683d Harden date input instrumentation; remove it from front-end boot
Test plan:
  - build passes

flag=none

Change-Id: I2130999fc5e762aff704095ea7446bdfc4313c0b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327520
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-13 15:49:41 +00:00
Matheus 775abb7659 Update CreateCourseModal state with default homeroom
fixes LF-734
flag=none

Test Plan:
- Create a sub-account (a)
- Create another sub-account (b)
- Enable C4E on both sub-accounts
- Add one course to each sub-account
- Add the same teacher to both courses
- Make both courses homerooms
- From the home tab, create a subject
- In the account selection drop-down,
  select account (b)
- Check the box to sync enrollments
- Don't touch the homeroom Select, leave
  the B course there
- Give the subject a name
- Click create
- Ensure the enrollments option is correct
  (with B)

fixes

Change-Id: Iac379f2e60fb12cc6a712f680dcf23c5f6cd6984
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327498
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
2023-09-13 13:08:25 +00:00
Jacob DeWar 47262d620c Make inherited tooltip focusable with keyboard
fixes LF-621
flag=none

Test Plan:
- Have a media file with inherited captions
- Go to files and preview the media
- Use keyboard only to navigate
- Inherited tooltip is focusable with keyboard
- Screenreader reads out tooltip

Change-Id: Id4e01bfcff440bf9708e288ac0371a5a59998877
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327103
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
2023-09-12 20:49:40 +00:00
Martin Yosifov 852f0be081 Make Sequential GraphQL Calls in Alignment Summary
closes OUT-5860
flag=outcome_alignment_summary_with_new_quizzes

Test plan:
- Start Canvas, Outcomes-Service, Quiz LTI and Quiz API
- Create course with few outcomes and enable "New Quizzes
included on Outcome Alignment Summary Tab FF"
- Open in browser devtools -> network
- Click on Alignments tab and watch the devtools->network
for the last two calls to graphql endpoints
- Verify in the waterfall column that the calls are
made sequentially

Change-Id: Ia9d452586fa7f9eadb83169c0a9c09e754a8dc69
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327067
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
Reviewed-by: Jason Anderson <jason.anderson@instructure.com>
QA-Review: Wilmer Corrales <wilmer.corrales@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2023-09-12 17:14:05 +00:00
Chris Soto 74c6eee7b5 disable edit & delete grading scheme buttons
currently when in the context of course settings, the edit and delete
buttons are enabled and functional for account level grading schemes.
this change will disable the buttons for admin grading schemes if the
admin is in the context of course settings.

fixes EVAL-3427
flag=none

test plan:
- create an account level grading scheme and a course level grading
  scheme
- open http://canvas.docker/accounts/<id>/grading_settings/schemes and
  verify that the edit/delete buttons for the account level grading
  schemes are NOT disabled
- go to the course settings for the course that the course level grading
  scheme is in and verify that the edit/delete buttons for the account
  level grading schemes are disabled while the course level grading
  scheme buttons are NOT disabled
  http://canvas.docker/courses/<id>/settings#tab-details
- within the same page, select both a course and an account level
  grading scheme from the dropdown & verify that when the modal opens,
  the buttons are disabled for the account grading scheme and enabled
  for the course grading scheme.
- create an assignment and change the "Display Grade As" option to
  "Letter Grade"
- The same grading scheme components should be displayed
- Verify the steps again where course level grading scheme buttons are
  NOT disabled while the account level grading scheme buttons are
  disabled.

Change-Id: I1a82ddb56df6eb10539809fe924e1657627201ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327025
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-09-12 17:08:37 +00:00
Aaron Shafovaloff 29ad03c5fe Harden SpeedGrader with TypeScript
Test plan:
  - Build passes

flag=none

Change-Id: Ic3ad7b7d27659741197e37169158ff4806a1dbeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327246
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-12 16:07:52 +00:00
Sarah Gerard 93579d0628 Add "Course" set_type to assignment overrides
closes LF-666
flag=none

test plan:
- in a rails console, find an assignment
- ensure that when the set_type is "Course", unassign_item
  cannot be true
- run assignment.assignment_overrides.
  create!(set: assignment.context, unassign_item: "true")
- the override should fail to create
- ensure that the "Course" set_type can otherwise be created
- assignment.assignment_overrides.create!(set: assignment.context)

Change-Id: Ica363c4ee387bc383d61ab882d6bd5ac7e26d4bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327131
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
2023-09-12 15:44:33 +00:00
Aaron Shafovaloff 937bd24c81 use window.scrollY instead of $.windowScrollTop
flag=none

Test plan
  - create an assignment in a course and add a rubric
  - make the browser window small enough that you can scroll down
    vertically
  - wait a few seconds
    - expect the window to stay still

refs FOO-87

Change-Id: I929d674fd9dd8bb8d9db8e07f7ae4a609a85f6e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327405
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-12 14:25:29 +00:00
Eric Saupe 8c4a497928 Add publish status to module publish button
fixes LF-690
flag=module_publish_menu

test plan:
- Using voiceover, highlight the publish icon on a module
- Verify the publish status is included in the message
- Publish and unpublish the module
- Verify the publish status is correct at each stage

Change-Id: Iabd914b7d69f7896cad2b3ce3f7f56e6abac36ec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2023-09-11 23:25:49 +00:00
jonathan b53f16dd1f Assignee selector for custom access
Add a multi-select component for the custom assignee selection

closes LF-640
flag= differentiated_modules

Test plan

- With the differentiated_modules FF on.
- Go to the modules page of a course.
- Open the module menu.
- Click on the “Assign to” option.
- Click on the “Custom Access” option.
- Expect to see the new multi-select component.
- Select some options.
- Expect multiple selection to be allowed without duplicate values.
- Click on “Clear All”.
- Expect the selection to reset.

Change-Id: Ib27715822439f76767431bae1d216d0051ab3331
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327271
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
2023-09-11 18:20:14 +00:00
Chawn Neal c42517b74a Increase discussion per_page and fix pagination
flag=none
fixes VICE-3690

Test Plan:
- Create a course.
- Create 1000 discussion topics for it.
- go to the discussion topics index.
-- look at the network request.
-- you should see 10.
in a request it will have 100.

Notes:
- increase discussion per page from 50 to 100.
- now per page propogates on BE and FE.

Change-Id: Ib018a9b0652839f2b7a7dc93a48b015852185b28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327189
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-09-11 15:35:59 +00:00
Aaron Shafovaloff d5ea6fa3d7 TypeScript cleanup
flag=none

Test plan:
  - build passes

Change-Id: I1b16b9e065d5834fd48e3560f3da48310dbd63ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327205
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-09-08 22:29:07 +00:00
jake.oeding 3cc6e3462c mutate UI on update
closes LF-611
flag=differentiated_modules
qa risk: low

test plan:
-go to modules, open the tray, switch to settings
-perform a module name upate
>confirm that the UI updates and reflects the current
 name of the module
-change the unlock date to a time in the future
>make sure that the 'will unlock at ...' text appears
-change the unlock date to a time in the past
>make sure the 'will unlock at ...' text disappears

Change-Id: I1796e6e46aa90bc324d01dff466d3b39ddd34002
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327062
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
2023-09-08 18:10:44 +00:00
Ed Schiebel da7aa173bf Permit events at midnight less than 30 minutes long
When an event started at midnight the calendar code
moved the start time to 00:30 without adjusting the
end time. I simply changed this to advance the start
time to 00:02. Since the time select dropdown is in
increments of 5 minutes, this should handle all but
the most ridiculous of cases.

closes LF-715
flag=none

test plan:
  - create an event starting at midnight and 10
    minutes long
  - edit the event
  > expect the edit to succeed
  - create an event starting after 11:30 PM
  - edit the event
  > expect the edit to succeed

Change-Id: I44cee291a3ecb2a7ca3a7416d0c1ee4669f1e362
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327173
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: Ed Schiebel <eschiebel@instructure.com>
2023-09-08 17:59:53 +00:00
Aaron Shafovaloff b8b77a2638 Prepare for InstUI 8 upgrade
refs FOO-3190

flag=none

Test plan:
  build passes

Change-Id: I565239c71d769a3b8359221422a972780306c04c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327200
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-09-08 15:56:48 +00:00