Commit Graph

4934 Commits

Author SHA1 Message Date
Aaron Shafovaloff 69b2162d67 move SG2 submission query fields
Change-Id: Id49a2d984493f2cfc05c8914f196723047dea462
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342252
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-03-06 21:29:45 +00:00
Charley Kline e2488e04c7 Make DatetimeField loading more bulletproof
Refs FOO-2801
flag=none

Dynamic loading of locale JSONs leaves open the possibility
that a locale might load that is mis-configured, missing
some of our standard translation keys. This can create
seemingly-unrelated breakage.

In particular, DatetimeField (which is how <input> elements
magically become jQuery datepickers) was not populating its
own data structures in a very resilient way. It assumed that
the I18n strings for things like month names and weekday
names are "of course" present in the loaded locale. But if
for some reason a key was missing, DatetimeField's startup
would throw an error, resulting in a blank UI page at worst
and at least malfunctioning datepickers at best.

This wraps the critical I18n lookups in a try/catch, so that
a fallback to US English can be loaded as a last resort if
nothing is available in the selected user's language.

Test plan:
* Datepickers in DatetimeFields should load and work as
  normal
* Contrive to temporarily break a locale file by removing one
  of the important keys (such as date.month_names), and
  restart your instance
* Go to your user settings page (/profile/settings) with your
  JavaScript console open and set your own language to the one
  whose locale file you have just corrupted
* Reload; the settings page should load normally
* The console should print a warning saying that US English
  will be used for the datepicker, but the page should otherwise
  come up and function normally

Change-Id: I8b38eaa8983a4500a144781672dccdfeafd942e6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342075
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Perry <jason.perry@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2024-03-06 20:42:23 +00:00
Spencer Olson 9f22b0aff5 change info text when posting anonymous assignments
closes EVAL-3980
flag=none

Test Plan:
Prereq: Have a course with ‘Anonymous Grading’ feature turned on and that
has student enrollments.

1. Create a graded Assignment that has ‘Graders cannot view student names’
   applied and save.
2. Go into SpeedGrader and give a student a score
3. Notice that the eye icon in the top left shows grades as hidden,
   click this icon and click ‘Post Grades’
4. Now see the right panel open and verify the message says, "When posting
   grades for this anonymous assignment, grades will be posted for
   everyone assigned this item. Anonymity will be removed."

Change-Id: If6f4c28eaae4eaddfaade5881dde70c3ebd6fe93
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341688
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-03-06 20:28:53 +00:00
Chris Soto e2cf3c59bd enhance rubrics assessment tray preview mode
this commit adds the new rubric assessment tray for all 3 view modes:
traditional, vertical, and horizontal. It adds full functionality to
select a rating from the list of rubric criteria and switch between the
different views. It also adds a preview mode that allows for more
limited functionality.

closes EVAL-3978
closes EVAL-3988
closes EVAL-3989
closes EVAL-3990
closes EVAL-3991
closes EVAL-3992
flag=enhanced_rubrics

test plan:
- navigate to the rubric builder (edit page)
- with a rubric that has criteria, click on the "Preview" button
- If any of the rubric criteria ratings have a length of > 5, you will
  be defaulted to the vertical view with traditional view disabled,
  otherwise the default should be the traditional view
- Click on the ratings and verify:
  - the rating is selected
  - the rating is highlighted
  - the instructor score is updated
  - clicking between ratings in the same criteria will remove the
    previous rating
- Flip through the other views and repeat the above steps. While
  changing views, the selected ratings should be maintained
- Have a criteria with > 5 ratings. Preview and click on "Horizontal"
  view. Verify that the horizontal view is displayed for any criteria
  where the ratings length is < 5, but that it displays the vertical
  view for any criteria where the ratings length is > 5

Change-Id: I0341840a0522ed0713bea82edb6e69261db9c4c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341853
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-03-06 20:26:21 +00:00
alvaro.talavera 07968db29a Update 'Export Course Content' Button
closes LF-1337

flag=instui-header

test plan:
- when LTI tools and Export Content are allowed,
both should be in the more menu
- when only LTI tools are enabled,
should appear in the more menu
- if only export content is enabled,
should display between View progress and Publish all button

Change-Id: Ibc679a39053dd2df320f4f004a35446baa5c11bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342132
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Alvaro Talavera <alvaro.talavera@instructure.com>
2024-03-06 17:16:51 +00:00
Samuel Lee 8d3eac6c3a fix showing resend invite based on permissions
fix issue where when additional granular permissions for adding
individual course roles are not enabled, a 403 error will appear
when resending invites in the roster page

fixes VICE-3902
flag=none

Test Plan:
- pick a role for testing. Example TA role.
- have the Users - manage students in courses permission turned on
- have all the individual granular add permissions turned off except
  the Users - Students option.
- note that permissions take a while to take into effect. A trick
  is to change timezones for the account with the role that you want
  to test. I tested using a TA role and changing the timezone to Tokyo
  and then changing back to central time in the TA account
  helped speed up the permissions change.
- have a student and teacher in the course
- log in to the account with the testing role and go to the roster page
- go the student and click on the three dots
- confirm that resend invitation option is shown
- go to the teacher and click on the three dots
- confirm that resend invitation option is not shown
- add a teacher role using the same student email
- view that the resend option is still in the dropdown for the student
- click resend and confirm that the invitation is sent and no 403 error
  appears
- confirm that only one api call is made in the network tab for
  the student role

Change-Id: I979274bc74078036bc2cbf69171c288bc876c331
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341881
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
2024-03-06 17:03:17 +00:00
Caleb Guanzon f4fb0836c4 account for ModalSpinners closing before updating states
flag=react_inbox
fixes VICE-4106

note: i deleted a few container tests because the added setTimout
is now making it flaky. i checked selenium and there are
tests for successful creation

i strengthened error tests that need strengthening

test plan:
- visit inbox
- compose a message either from top menu, or
by replying
- cancel
- verify focus is on button you clicked to
open menu
- verify pressing tab sends focus to the next interactive element

- repeat but this time send
- verify focus and tab just like earlier

going the extra mile testing (optional)
- replace the whole setTimeout block in my change
into setModalError(I18n.t('Error creating Submission Comment'))
and reload the page
- send a message
- verify the compose modal does not close
- verify you see an error message flash
- verify you can tab around

Change-Id: I04ab2be887c875e41473794ee2c5c326547cffae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342184
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-03-06 16:18:52 +00:00
Drake Harper 476526572f Add wordCount to graphql submission type
ref EVAL-3848
flag=platform_service_speedgrader

Test Plan:
- as a student submit a text entry assignment
- in graphiql query the submission with word count attribute
- should give the correct word count

Sample Query:
query MyQuery {
  legacyNode(_id: "4", type: Assignment) {
    ... on Assignment {
      id
      name
      submissionsConnection {
        nodes {
          _id
          userId
          body
          wordCount
        }
      }
    }
  }
}

Change-Id: I224fd01ba4a5f31d9ceffadefcd2b00db30f5035
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342138
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2024-03-06 15:32:44 +00:00
Omar Gerardo Soto-Fortuño 3a590cfa5c Set correct context for files from graded discussions
closes VICE-4126
flag=react_discussions_post

test plan:
 - Specs pass
 - As a teacher create a Group Discussion Topic
     and assign a group to it.
 - Login as Student 1 and upload a file.
 - Login as Student 2 and upload the same file.
 - Both files should be able to be open without issue.

Change-Id: I73636a4461410796538f5a4f10afb5bc9f5232a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341585
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-03-06 15:32:32 +00:00
Michael Hulse c9da139a86 fix .context.defaultValue in rubric tests
.context was removed in jQuery 3.0

https://api.jquery.com/context/

unblocking jquery upgrade path

refs FOO-4260
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: Ic63631d888107aafdb0fac92cde0324e13bc3402
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342189
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
2024-03-06 14:46:08 +00:00
Aaron Shafovaloff 04a3d7c3fc add _id, late, submissionStatuses to SG2 submission query
Change-Id: I7fc08bc867912dd93a38a08c0ded9751792c4362
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342140
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-03-06 05:36:30 +00:00
Jen Smith 8fe7ad08fb fix bugs in old analytics caused by invalid HTML
analytics is the only identified consumer of combo-box.
this bug caused the 'next' button to disappear.

fixes problems blocking jquery 3.5 upgrade caused
by using self closing elements in backbone handlebars
files (they are not valid HTML5).  With jQuery 3.5,
the selector + backbone are interacting together
to remove later (sibling) elements in an unexpected
way.

also, make some more of the selenium tests run locally
by fixing React js logging failures

refs FOO-4260
flag=none

Test Plan:
- Jenkins Passes

Change-Id: Ib3281c0cdac2de78e7c68e5d450f918d6bddf98a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342186
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-03-06 05:05:41 +00:00
Angela Gomba 88d58544c5 Fix account settings tab navigation
This fixes some failing tests when upgrading to jQuery 3.5.

refs FOO-4260
flag=none

Test Plan:
- Jenkins Passes

[skip-crystalball]

Change-Id: I40f34b20795786058c8932b129feb72ec49e81a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341898
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
2024-03-06 00:42:38 +00:00
Kai Bjorkman 067ebc1a56 disable rubric delete button when rubric is in use
closes EVAL-3965
flag=enhanced_rubrics

Test Plan:
- create a rubric and associate it to an
assignment
-create another rubric and do not associate it to
anything
- navigate to the rubrics index page
- verify that the delete button is disabled for
the rubric that is in use
- verify that the delete button is enabled for the
rubric that is not in use

Change-Id: I6aa7360c8809ef5b264701af00c17f73955c99cb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341768
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-03-05 20:08:39 +00:00
alvaro.talavera ff1d6676f8 Module Header 'Publish All' button disable/enable
closes LF-1342

flag=instui_header

test plan:
- create or open an existing course
- go to the modules page and create modules
- Publish All should be enabled
- delete all modules
- Publish All should be disabled

Change-Id: Ia77216bb1125500f8d4702d6c902e5f84e70d910
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342067
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Alvaro Talavera <alvaro.talavera@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-03-05 17:26:31 +00:00
Jason Anderson a0a474a730 Fix flaky test in CreateOutcomeModal.test.jsx
closes OUT-6152
flag=none

This test failed periodically under the default timeout interval
of 5 seconds. To mitigate this, the timeout has been increased
to 7.5 seconds for this test only.

Test Plan:
- Tests Pass in Jenkins
  - This included passing the flaky test catcher too

Change-Id: Idc77eecd9fa0bc48647eb88e605e97c44733bf7b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341596
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
QA-Review: Wilmer Corrales <wilmer.corrales@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2024-03-05 16:56:16 +00:00
Samuel Lee 4af5d93ff8 add alert after editing profile
fixes VICE-4122
flag=none

Test Plan:
- enable profiles
- go to the user profile and edit the profile
- do not edit any of the fields and press save
- confirm that there is an alert with a save successful text and
  the screen reader reads the alert text
- edit the profile again and enter an extremely long name in the input
  field
- press save and confirm that there is an alert with a save failed
  text and the screen reader reads the alert text

Change-Id: Id23352084bea41b9fac5b829ddb029805b597e04
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341744
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Samuel Lee <samuel.lee@instructure.com>
2024-03-04 20:22:40 +00:00
alvaro.talavera 83c6496f35 Fix Module Header when there are no modules
closes LF-1331

flag=instui_header

test plan:
- go to the modules page
- test with a course with no modules
- test with a course with modules
- button expand/collapse should not appear when no modules

Change-Id: I43410c6978d6fbc4156b4154a0e092dff52678f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341790
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Alvaro Talavera <alvaro.talavera@instructure.com>
2024-03-04 18:49:10 +00:00
Jen Smith fb070a6c40 spec: Wait until view is fully init'd before testing
This fixes some failing tests when upgrading to jQuery 3.5.

refs FOO-4260
flag=none

Test Plan:
- Jenkins Passes

[skip-crystalball]

Change-Id: I5add66518a721ced9fc822ea39ae14ebda49a612
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341952
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
2024-03-02 02:42:37 +00:00
Jen Smith 3b46a38c38 spec: Wait until view is fully init'd before testing
This fixes some failing tests when upgrading to jQuery 3.5.

refs FOO-4260
flag=none

Test Plan:
- Jenkins Passes

[skip-crystalball]

Change-Id: I3b67d79c1754ef0ed897cdb0df8b269e37613304
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341951
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-03-02 01:40:34 +00:00
Michael Hulse 6f155a7abb fix malformed textarea HTML tag
This commit fixes spec(s) failing in:

calendar2_agenda_spec.rb

unblocking jquery upgrade path

refs FOO-4260
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: Ib5362eaacebcde0dba4e50f7158a0ca5ccedf4db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341950
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
2024-03-02 01:28:22 +00:00
Angela Gomba 4cc94da70c Add missing import to enableHelpDialog
This fixes some failing tests when upgrading to jQuery 3.5.

refs FOO-4260
flag=none

Test Plan:
- Jenkins Passes

[skip-crystalball]

Change-Id: I5ccb11f20afa5ba0c4673c0eaf71db7a69244ade
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341892
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
2024-03-01 23:08:17 +00:00
Chris Soto 5bee58bc2e add rubric save as draft button
this commit adds a save as draft button to the rubric form. This button
is only displayed when a rubric has no current associations. When
clicked, the rubric is saved with a new workflow_state value of "draft".

closes EVAL-3637
flag=enhanced_rubrics

test plan:
- make sure graphql is updated
- create a rubric. you should see the "Save as Draft" button
- add a title and save as draft. you should be navigated back to the
  rubric list and see the rubric with a draft status
- edit the rubric and the click the "Save" button. you should be
  navigated back to the rubric list and the rubric should no longer have
  the draft status.
- edit the rubric. you should see the "Save as Draft" button still
  available.
- add that same rubric to an assignment.
- navigate back to the edit rubric page. you should no longer see the
  "Save as Draft" button.

Change-Id: Id1e68f1432cd17fab618b2c8dd0350acf0408e12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341595
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-03-01 21:42:58 +00:00
jonathan f205d13080 A11y adjustments for module Assign To Tray
closes LF-1214
flag=differentiated_modules

Test plan:
- Go to the module page
- Open the assign to tray
- Enable voiceover
- Remove an assignee from the assignee selector
- Expect VO to announce the option was removed
- Click on the Clear All option
- Expect VO to announce, “All assignees removed”

Side issue fix:
- Using keyboard navigation
- Go to the assignee selector and press the down arrow key
- Expect to be able to navigate through the options using the arrow
keys

Change-Id: I789a21cefe7deea9aa32266b2967545eb5f38d77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341816
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>
2024-03-01 15:21:07 +00:00
Angela Gomba 58d933334e spec: Add timers to specs
This fixes some failing tests when upgrading to jQuery 3.5.

refs FOO-4260
flag=none

Test Plan:
- Jenkins Passes

[skip-crystalball]

Change-Id: I74e8f5227b7f73c8283180517fdc18793f2de1de
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341387
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
2024-02-29 23:32:49 +00:00
Aaron Shafovaloff 37c0119d31 include dueAt and previewUrl in submission query for SpeedGrader 2
Change-Id: If6a178fdae573e67b787f06dabf89823235c74f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341791
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-02-29 21:18:56 +00:00
Sarah Gerard 1770f42186 Fix calendar event edit styling
after the jquery upgrade, there was extra padding
on the calendar event edit dialog and the background
color only appeared on focus/hover

fixes LF-1320
flag=none

test plan:
- navigate to the calendar and add or edit an existing event
- expect the modal to appear and have the correct styling
- there should be no extra padding or border around the modal
  and the background color of the tabs should appear

Change-Id: I9f289ef82fad65c46d652c875909aa2eb7d31d8e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341773
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: Sarah Gerard <sarah.gerard@instructure.com>
2024-02-29 20:40:56 +00:00
Angela Gomba 0c91f87859 spec: Add timers to RequestDispatch spec
This fixes some failing tests when upgrading to jQuery 3.5.

refs FOO-4260
flag=none

Test Plan:
- Jenkins Passes

[skip-crystalball]

Change-Id: I15f5aa6192456adb5bbb233eb3ba4763c42b6ad4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341385
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
2024-02-29 17:31:38 +00:00
James Logan ac009979d3 Fix XSS vulnerability with Save on Quiz Edit
closes QO-1042
flag=none

Test plan:
- automated tests pass
- Open a CQ edit view. Add this to the end of the url and hit enter
   ?_=1&return_to=javascript:alert(`sadness`)
- Note, you NEED a parameter BEFORE the return_to param to test correctly
- Note, you NEED to load the page with that in the url (editing the url
  after loading will not work)
- Hit save.
- Observe no alert appears.

Change-Id: I883a9a39d69b399c887a44e443f36140052f85b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341686
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jared Crystal <jcrystal@instructure.com>
QA-Review: Jared Crystal <jcrystal@instructure.com>
Product-Review: James Logan <james.logan@instructure.com>
2024-02-29 17:26:03 +00:00
Jeremy Stanley 6f7fbd8b68 ensure moment locale chunk names match include_head_js
refs FOO-4299

Change-Id: I75b914f9243f347cd16ca233867ed89b14190007
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341765
Reviewed-by: Aaron Shafovaloff <ashafovaloff@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>
2024-02-29 16:55:18 +00:00
Aaron Shafovaloff 04d2ab8ac7 use webpackChunkName in loadLocale.ts
Change-Id: Icb365f9a52fb65cf5add3489a2cb62034784c167
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341735
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-02-29 16:14:06 +00:00
juan.chavez 399e5ea8cb Change recurring event to single event
fixes LF-1244

flag=none

test plan:
- Create an event with a frequency (not select "not repeat").
- Select an event from the series.
- Edit it using the Edit page or the form modal.
- Select "Does not repeat".
- Submit it.
> Verify that the "All", "This and following" and "This" modal
is not displayed.
> Verify that all the events in the series were removed except
the selected event.
> Verify that the previous behavior of event is working as
expected.

Change-Id: Ibc95d6fcd5e4f67536c2d09a172bf44241ee455a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341606
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-29 14:07:18 +00:00
Aaron Shafovaloff 2023e03c50 add queries for SG2 submissions and assignment
Change-Id: I7ccc5e7a121d054590788d1c7d22ca28e2329feb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341691
Reviewed-by: Spencer Olson <solson@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>
2024-02-29 10:28:34 +00:00
Charley Kline bb0730a5d1 Fix webpackIgnore directives in IntlPolyfills
Refs FOO-2929
flag=none

The switch from webpack to rspack has introduced
loading errors for the parts of formatjs's polyfills
of missing browser locales. I'm unclear on why some
dynamic imports are failing, but the fix seems to be
to remove the /* webpackIgnore: true */ directive
which rspack does not recognize. I also went straight
into formatjs rather than our own dist directory for
anything other than the locale files themselves.

Test plan:
* Be in Google Chrome
* Change your locale to Welsh (Cymraeg)
* Reload your browser and watch the JS console
* You should see success messages for the polyfills
  of locale "cy" and no error messages.

Change-Id: If9b92ed9a51dd5ceeeb4fd8d6535fa2dae710f1c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341695
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>
2024-02-28 21:34:17 +00:00
Michael Hulse efb0b2c363 add and enable jQuery migrate mute to index.ts
This commit adds and enables migrate mute option to
jquery.instructure_jquery_patches.js which is loaded first in
ui/index.ts. This change will disable jQuery migrate console
warnings so that they do not appear on a prod build.

unblocking jquery upgrade path

refs FOO-4260
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I3449a2547c8c1129878654ba020531ba94a8c629
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341684
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-28 20:44:00 +00:00
Aaron Shafovaloff a4fcbcb0c1 load real submission data in SpeedGrader 2
Change-Id: Ia6dc004ded373037fa2eabd405b43523cb36e84a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341562
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-02-28 19:58:00 +00:00
Caleb Guanzon 0be125beaf remove href to avatar link in discussion#show
flag=none
fixes VICE-4108

for discussion entries, the avatar
will no longer have an href, since it does
not have an href, it will now render
as a span insted of an a

test plan:
- turn discussion redesign off
- visit a discussion
- verify avatar in both discussion topic
and discission entries no longer links
to its author's profile page

Change-Id: Idf71510c7337cac71a9aa9dcea739785822e5ce1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341563
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2024-02-28 19:42:00 +00:00
Samuel Lee 6f34876083 fix date display for discussion redesign
fix issue where dates in discussion redesign were displayed
using the course setting timezone instead of the user setting
timezone

fixes VICE-4087
flag=discussion_react

Test Plan:
- have a user setting timezone that differs from the course setting
  timezone, such as having the user setting timezone as tokyo while
  the course setting timezone is local
- create a discussion with varying dates such as due date, unlock, and
  until
- confirm that the dates set in the date time inputs match the date
  in the discussion topic itself and the discussion index page
- play around with other dates such as in a graded discussion and
  confirm the dates set in the date time inputs match whatever is shown
  in the discussion topic
- confirm that discussion replies and posts are displayed using the
  user setting timezone instead of the course setting timezone
    - this includes split screen view threads and normal view threads
    - this also includes when editing a discussion reply and post

Change-Id: I0b5582328ed671b513de2ffccbc6ed1d65602d2d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341553
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>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-28 18:18:26 +00:00
Kai Bjorkman 64103c3112 delete and duplicate for enhanced rubrics
flag=enhanced_rubrics
closes EVAL-3942

Test Plan:
- repeat this test plan at the course and account
level
- create a rubric
- click the kebab menu
- click duplicate
- click the submit button on the modal
- verify the rubric is duplicated with a name
formatted as "[original rubric name] Copy"
- verify the rubric is duplicated with the same
criteria, ratings, points, and descriptions
- click the kebab menu
- click delete
- click the delete button on the modal
- verify the rubric is deleted
- verify the rubric is no longer in the list

Change-Id: I6f27295a3e76cb8725b1c618be69cd9326e742f6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339988
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-02-28 17:53:17 +00:00
alvaro.talavera cebd11c074 Update Module Index Page Header
closes LF-1221

flag=instui_header

test plan:
- goto modules page for a course
- check that new header match specifications

Change-Id: Idd77b2fb01778d337207c4dedb4aeefb18ac5d45
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341101
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Alvaro Talavera <alvaro.talavera@instructure.com>
2024-02-28 17:07:50 +00:00
jonathan da03838133 Fix the cancel action in the "assign to" tray
closes LF-1258
flag=differentiated_modules

Test plan:
1-Go to the edit assignment page
2-Open the assign to tray
3-Do some changes
4-Click on cancel
5-Expect the tray to be closed
6-Expect not to see the pending changes pill
7-Open the tray again
8-Expect not to see the changes you made

Change-Id: I3dd33cb29a2e9c4a1994b75bb03295b42f7a67ba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340834
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>
2024-02-28 14:48:56 +00:00
ferenc.marcso b29860faef change classic quizzes description at Quiz Engine Chooser.
flag=none

closes: QUIZ-13348

test plan:
-- preparation: new quizzes provisoned
- visit `/courses/#{course_id}/quizzes`
- click on `+ Quiz` labeled button
- Inside the pop up window the Classic Quizzes
  description updated

Change-Id: Ib7d63b46f72b06d9fc8e7534d9e57946c87086d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341391
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Endre Berki <endre.berki@instructure.com>
QA-Review: Roland Beres <roland.beres@instructure.com>
Product-Review: Tamas Balogh <tamas.balogh@instructure.com>
2024-02-28 09:56:47 +00:00
Michael Hulse 91ecfdc452 fix htmlEscape and update tests
Updated htmlEscape to no-op if object is passed to htmlEscape

This will fix recursive error on quizzes.js

Additionally, gradebook calls to htmlEscape had to be modified
to escape each key in order to get the existing tests to pass

unblocking jquery upgrade path

refs FOO-4260
refs FOO-4317
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: Id959c267765e38ba8a469a890c3468bfd1bc77f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341598
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-28 03:49:19 +00:00
Charley Kline 264b538259 Remove deprecated delegate() method from more jQuery code
Refs FOO-4224
flag=none

The .delegate() way of installing event handlers has been
deprecated and there are easy ways to avoid using it.

Canvas uses this in a bunch of places but we can eat away at
it a little at a time.

Test plan:
* automated tests pass

Change-Id: I6699b74595f5e9bdfa5fc08c5146b6225f845679
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341462
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2024-02-28 03:48:43 +00:00
Chawn Neal bf5503d6f7 fixes autoread count with deleted entries
fixes VICE-3913
flag = none

Test Plan:
Create root entry.
Create sub entry.
Delete sub entry.

- On a second user, read all entries.
- Should mark as read with:
blue notification and unread count correct.

Change-Id: I76deb923427cde8d6f3cb5963c4414e538bcf9a2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341556
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
2024-02-28 00:06:49 +00:00
Chris Soto e7cafa957e add rubric edit limited mode
with enhanced rubrics, we will only allow limited edited for rubrics
that have been assessed.

closes EVAL-3971
flag=enhanced_rubrics

test plan:
- Create a Rubric & assess it
- Edit the rubric and verify that the rubric is in limited mode
- You should only be allowed to edit the rubric name and description
- For the criteria, you should only be allowed to edit the
  name and description of the criteria and it's ratings.
- Other actions such as drag and drop, adding new criteria,
  deleting criteria, etc should be disabled.

Change-Id: Ie8c2dd7c938058d2ff58d4a1d480568c5a9da908
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340971
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-02-27 21:43:13 +00:00
Mysti Lilla ea63e78414 Override right click for media player
closes LF-1206
flags=none

Test plan
- Add a video/audio file to rich content
  in a Canvas course
- Right click on the video and ensure
  you don't get options to download
  the media, open it in a new tab,
  or copy the media address
- Note: there is a media preview
  in files that is jQuery code
  that this doesn't fix

Change-Id: I015a73cbabbc533ce3c2ed7c88d8b51e019ed2a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341465
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2024-02-27 20:37:11 +00:00
Matheus 246bdbf439 Add Blueprint Settings import in the new UI
closes LF-1072
flag=instui_for_import_page

Test Plan:
- Open the import content page on a fresh course
- Select course copy and a BP course to be copied
- Check the "Import Blueprint Settings" shows up
- Select a non-BP course to be copied
- Check the "Import Blueprint Settings" vanishes
- Add students to your fresh course
- Select course copy and a BP course to be copied
- Check the "Import Blueprint Settings" does not
  show up

Change-Id: I28824e72cf3d2b7f144cb4e04123e1d6ba117169
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341102
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: Luis Oliveira <luis.oliveira@instructure.com>
2024-02-27 19:39:07 +00:00
Matheus fbc0469a72 Add progressbar to file upload on appropriate forms
closes LF-1073
flag=instui_for_import_page

Test Plan:
- Go to the content migration page
- Choose one of the migratiors other than course copy
- Upload a file of some 100MB for an easier testing
- Check that the there is a progress bar showing the
  file upload progress before the form vanishes
- Check that the submit button shows a spinner during
  the file upload, along with the message "Adding..."

Change-Id: I9cafedcdca9add4f9a7f130c47beb46e969610c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341188
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: Luis Oliveira <luis.oliveira@instructure.com>
2024-02-27 17:41:24 +00:00
Matheus 51911e173a Make top folder outline visible on unzip type migration UI
closes LF-1203
flag=instui_for_import_page

Test plan:
- Open the import page and select the "unzip into" migrator
- On the tree browser for folders click the top one and check
  the outline can be clearly seen

Change-Id: Ie2e94766d68f58fc9cd5665c49dea81ed612921b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341527
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: Luis Oliveira <luis.oliveira@instructure.com>
2024-02-27 17:41:18 +00:00