Commit Graph

1938 Commits

Author SHA1 Message Date
Jen Smith f0d8a58556 jquery 1.9.0 update
with jquery-migrate 1.4.1 on QUnit specs and on
runOnEveryPageButDontBlockAnythingElse.jsx

flag=none

refs FOO-4258

[skip-crystalball]

Change-Id: I46606a064237b79a7f9b608ce0e3a93ff8c386d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340741
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-21 19:18:32 +00:00
Angela Gomba f9797db055 spec: Use jqueryui Autocomplete namespace
This is to fix a failing test when upgrading to
jquery 2.0.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: I5bc73cf10342a769ece5d1d94d146487f5b84d10
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340803
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-21 18:17:49 +00:00
Angela Gomba 8b8e5c3cce spec: Move page_focused set up outside of test module
This is to fix some of the failing tests when upgrading to
jquery 1.9. The fix is to move the set up outside of the
test module because setting up the event listeners on
the window between each test causes failures in
jQuery 1.9.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: If8b9fce0e4a5bf38f86a0ed65cba4aa137afa3b9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340800
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
2024-02-21 02:02:32 +00:00
Steve McGee d62ab2d238 remove assignment_edit plcmnt from announcements
flag=assignment_edit_placement_not_on_announcements
closes INTEROP-8430

why: The assignment_edit placement displays content on gradeable content
types (assignments, discussions, quizzes). It looks like it is currently
displaying on the create/edit announcement page and it should be removed.

test plan:
- create an announcement in a course
- with flag on, assignment_edit placement is not displayed (check
  edit page as well)
- with flag off, assignment_edit placement is displayed (check
  edit page as well)

Change-Id: Ie46b12f1cf93f2f27cf3b6ef220b940187298fd9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340289
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>
2024-02-20 23:50:03 +00:00
Jen Smith 6640ffa9cb upgrade to jqueryui 1.9.2
refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I3c0c962fc4ad1f5821f45a7f6a6210a45acbd89f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340322
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>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
2024-02-16 20:51:53 +00:00
Michael Hulse 313655e387 add jquery ui dialog options to each instance
Each instance of the jQuery UI dialog will now incorporate
specific options that were previously implemented through
custom modifications to the source code. This update aims
to streamline our codebase by directly applying critical
customizations, such as z-index and modal type, to the
instantiation calls themselves. By doing so, we eliminate
the need to maintain separate versions of the library
source code with one-off modifications.

This commit adds z-index and modal type that were missed
in a previous commit 240e7d7314

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I6bfc4db349ee21874db86c69064c5fc4862338fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340547
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: Angela Gomba <angela.gomba@instructure.com>
2024-02-16 18:19:02 +00:00
Michael Hulse afacafc983 fix tabs data calls to use widget namespace
.data('tabs') was deprecated in 1.9 and removed in 1.10.

Replaced call with namespace, e.g. .data('ui-tabs')

Relevant links to jQuery UI upgrade docs:

https://jqueryui.com/upgrade-guide/1.10/
#removed-data-fallbacks-for-widget-names

https://jqueryui.com/upgrade-guide/1.9/
#changed-naming-convention-for-data-keys

Also fixed qunit/resolve-async error in spec:
“Async callback "done" is not called”
(fixed via a refactor)

unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: Ibdfe87e6611e07afeffad88d8c34eea9a347ead4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340662
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-02-16 18:17:23 +00:00
Michael Hulse 4c35d47dad spec: revert fix tooltip hides on mouseleave
unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I7d3bbe7fac6bb2b8a1ef4ad2a70c1e9c7537d295
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340618
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-02-16 09:47:55 +00:00
Michael Hulse d9c025f1be spec: fix tooltip hides on mouseleave
unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I9387ecde1b4f4c917419df2763e9ebb1641128ec
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340535
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-02-14 22:05:36 +00:00
Omar Gerardo Soto-Fortuño ebf77baa1c Remove and replace KyleMenu from groupUser.handlebars
closes VICE-4117
flag=none

test plan:
 - Navigate to /courses/[Course ID]/groups
 - Cursory testing of what was the Kyle Menu, that
     is the kebab options for each user in a group.
 - The menu has 4 main options:
     a. Remove
     b. Set as leader
     c. Remove as leader
     d. Move to...
 - Make sure that when having the menu open, and you start
     dragging the user to another group, the menu closes.
     There were not tests for that and I needed to implement
     logic to make that happen.
 - Do a quick accessibility testing of the menu:
     a. How the screen reader recognizes the elements of the menu.
     b. Keyboard navigation.

Change-Id: If70ad99a850b09490aabb6a09c2f3fa2962a8c07
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340139
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2024-02-14 03:19:41 +00:00
Jen Smith e3692e8f35 upgrade jquery-ui tooltip to unpatched 1.9.0-beta.1
Part of unblocking the jQuery 2.x upgrade.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: I6a5d125a9944af1528a0f70fbcccba5efc06abf6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340321
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-02-13 03:56:15 +00:00
Jen Smith c59b72393c upgrade jquery-ui dialog to unpatched 1.9.0-beta.1
Part of unblocking the jQuery 2.x upgrade.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: Ic72c27b471951387434f94a5532116826a85b288
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340320
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>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
2024-02-13 03:56:02 +00:00
Angela Gomba b48e97ccea upgrade jquery-ui autocomplete to unpatched 1.9.0-beta.1
Part of unblocking the jQuery 2.x upgrade.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: Id40b6cffa0c339993431c70739c3360a92089c5a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340214
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
2024-02-12 20:07:35 +00:00
Angela Gomba 91eab6b835 upgrade jquery-ui menu to unpatched 1.9.0-beta.1
Part of unblcoking the jQuery 2.x upgrade.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: Iabb280bdea3214947a2e6c3d1d952359de420c64
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339901
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
2024-02-12 14:47:25 +00:00
Michael Hulse 16131f3c90 upgrade jquery-ui droppable to unpatched 1.9.0-beta.1
unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I15974ddce875943ff03598e3ee4efb2fa4102916
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340159
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
2024-02-09 23:03:58 +00:00
Michael Hulse e27c6f5039 upgrade jquery-ui datepicker to unpatched 1.9.0-beta.1
unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I1a8d176bd802905b77b0ee45acb96a5c33f3f254
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340025
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
2024-02-09 23:01:50 +00:00
Kai Bjorkman be7f8ec5a9 spec: remove and fix edit view specs failing locally
The two tests removed were looking for text that is no longer shown and
the other test was not disabling any fields because the current user was
an admin.

flag=none
closes EVAL-3952

Test Plan:
- specs pass

Change-Id: I56dea911fa6b23e94ef7550c2d02de9717a312a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340154
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Kai Bjorkman <kbjorkman@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-02-09 18:44:00 +00:00
Angela Gomba ad15681d03 upgrade jquery-ui progressbar to unpatched 1.9.0-beta.1
Part of unblcoking the jQuery 2.x upgrade.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: I7443318d900a9c99452c71e7e4d7de2b163bc84c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339899
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-02-08 23:27:51 +00:00
Angela Gomba d88dde9b3b upgrade jquery-ui sortable to unpatched 1.9.0-beta.1
Part of unblcoking the jQuery 2.x upgrade.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

[skip-crystalball]

Change-Id: I2acbc80dee978eaa5c0a70fe859053ceb79226bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339898
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-02-08 23:27:44 +00:00
Michael Hulse 4360440a23 upgrade jquery-ui tabs to unpatched 1.9.0-beta.1
unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: If881ebbf0bfee8def1c7f8ee621681f57baa3000
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339984
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
2024-02-08 20:58:21 +00:00
Jen Smith 2d8dbd9202 upgrade jquery-ui draggable to unpatched 1.9.0-beta.1
unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: If6ec6157e156478fbe11502b6fa78d6d8d56dd66
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340001
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>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
2024-02-08 20:51:12 +00:00
Jen Smith c5f1f3bf47 upgrade jquery-ui resizable to unpatched 1.9.0-beta.1
unblocking jquery upgrade path

refs FOO-4258
flag=none

test plan: tests pass

[skip-crystalball]

Change-Id: I7800211141e798a86cc1a93f4a3b51bd89ed1a3b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339990
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>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
2024-02-08 03:42:44 +00:00
Angela Gomba 82e4724c1f upgrade jquery-ui position to unpatched 1.9.0-beta.1
Part of unblcoking the jQuery 2.x upgrade.

refs FOO-4258
flag=none

Test Plan:
- Jenkins passes

Change-Id: I6560518f7d84faf67b7a7a76037ea3948c9229a4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339894
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
2024-02-08 02:47:04 +00:00
Jen Smith 475f19b84a upgrade jquery-ui mouse to unpatched 1.9.0-beta.1
unblocking jquery upgrade path

flag = none

Test Plan: tests pass

refs FOO-4258

Change-Id: I370d52726a8395bcb727a8737f0b59f0c6cb40bc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339970
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-02-07 21:42:56 +00:00
Jen Smith 484c57565e upgrade jquery-ui button to unpatched 1.9.0-beta.1
unblocking jquery upgrade path

flag = none

Test Plan: tests pass

refs FOO-4258

Change-Id: If147beec23f18e4db148e31128052f816bc7ac3c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339884
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-02-07 21:39:20 +00:00
Aaron Shafovaloff 27c4493ee2 remove custom loading of jquery.simulate from custom_selenium_actions
Change-Id: I41eb7eb8085bcad91c144f8873a64303c6b34c34
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339951
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Build-Review: Isaac Moore <isaac.moore@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-07 19:17:41 +00:00
Jen Smith 02efc29597 spec: fix tests that have whitespace in selectors
whitespace is no longer allowed in selectors in jquery 2.0

flag = none

Test Plan: tests pass

refs FOO-4258

Change-Id: I7fdc99f89ad1306a7e486c80c429d397a57e9da4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339603
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@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-02-05 16:56:17 +00:00
Aaron Shafovaloff 2abcb1c5a2 use @instructure/ready instead of jquery wrapper
also remove wrapper in slickgrid

Change-Id: I8d96234d6971cdf2ede3dd6caa03cc5b1f6f0ac0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339563
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-02-02 11:33:14 +00:00
Jen Smith 2a49aff673 spec: fix bad jquery selector
this selector syntax finds a submit button in jquery 1.7
but incorrectly finds the button's type in jquery 1.8

flag = none

Test Plan: tests pass

refs FOO-4220

Change-Id: I074a4688036fc08891f25fa8d16d4d6ed9a4118d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/339184
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-01-30 02:06:37 +00:00
Samuel Lee 10c1a56c44 modify assignment index page for desktop - ICE
modify the desktop view for the assignment index page as
part of the ICE initiative

fixes EVAL-3594
flag=instui_nav

Test Plan:
- tests pass
- Acceptance Criteria
    - 2.25rem from the header to the content
    - primary title is changed to h1 tag and font weight of 700
    - search bar and grading period filter are moved to the content
    - confirm that the search bar and grading period filters still work
    - 12px between the create assignment, create quiz, create group,
      and settings buttons on the teacher account
    - confirm that the buttons still work as intended since they were
      modified to using instui buttons
    - on the student side confirm that the show by button filters work
      by toggling the type and date.
    - refresh the page and confirm that the previously selected filter
      for type and date still applies on refresh

Change-Id: Ib2dab9c337dc9f505a04b0783b2e9bb94504a962
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334354
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Melissa Kruger <melissa.kruger@instructure.com>
Product-Review: Melissa Kruger <melissa.kruger@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
2024-01-29 22:18:45 +00:00
Michael Hulse 928f576284 spec: fix TimeBlockList should add rows correctly
The test was failing with jQuery's $.contains(), which suggested a
compatibility or functionality problem with this method in the
given test context. Converting to native Node.contains() and
unwrapping the jQuery elements to do the comparison fixed the test.

refs FOO-4220

test plan: tests pass

Change-Id: I55b393f46337c1d21733429c838aefc60e0ff66a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338933
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-01-29 17:09:51 +00:00
Michael Hulse 8b7d1eeeb7 spec: fix datepicker where field and suggest are siblings
Upgrading jQuery 1.7.2 to 1.8.3 introduced an undocumented (I think) bug
where `.insertAfter()` and `.next()` were not working as expected. these
tests were modified with a wrapping div to make them pass. I suspect the bug
(or feature?) is related to not having a parent element to insert into.

This also fixes an issue with our specific jQuery datetime plugins not being
defined; I added the import statement to make them available to the test.

refs FOO-4220

test plan: tests pass

Change-Id: Icbfea5ede78b5e66c487e9893058c4d7b01d5e53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338778
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: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
2024-01-26 17:31:55 +00:00
Aaron Shafovaloff 65affd8b61 allow thrown error upon XSS test
jquery 1.7 results in absence of img
jquery 1.8 throws error

both are acceptable

refs FOO-3741

Change-Id: Ife1648fb46cf9292efe849f8272e3354ced6ef9f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338457
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-23 16:28:00 +00:00
Jen Smith d2b8f14719 spec: fix bad syntax in jquery selectors
this selector syntax is allowed in jqery 1.7 but
fails to parse with a syntax error in jqery 1.8

flag = none

Test Plan: tests pass

refs FOO-4220

Change-Id: Iccecbdbb64e02127a7b34ff098bad0ea2056995d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338194
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>
2024-01-22 16:54:56 +00:00
Jen Smith c63109efb8 spec: fix logic error in test
this test was checking for the wrong value using the
wrong function. and that wrong function changed its
response type in a breaking fashion between jquery
1.7 and jquery 1.8.

test claimed to be checking if due date element was
disabled, but it was actually checking if the due
date element was *not* disabled.  Also the due date
enable/disable code path wasn't even exercised by
the test, which is why the incorrectly negated check
was passing on jquery 1.7

flag = none

Test Plan: tests pass

refs FOO-4220

Change-Id: I878f7514e96ee6cc62ba0c3f7b0f95550cb70d25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338205
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
2024-01-22 16:54:34 +00:00
Jen Smith e17e5ea3c4 stop using deprecated isResolved on jquery.Deferred
this method has been removed in jquery 1.8 and its
usage is blocking the jquery 1.7 -> 1.8 upgrade. the method
was replaced with deferred.state() === 'resolved'.

flag = none
Test plan = tests pass

refs FOO-4220

Change-Id: I6d76a862bda3062a59366bebc0ec6f0cd55d04ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/338093
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-01-19 05:04:57 +00:00
Jacob DeWar 3eca14cbfe Escape target when loading new editor
flag=none
refs LF-1043

Test Plan:
 - Execute steps in SEC-8286
 - Verify XSS does not execute

Change-Id: I6f6ca2a28cfa2a5038f4e8542c5376d124fb2a5d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337057
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
2024-01-18 20:30:40 +00:00
Aaron Shafovaloff f2ca536232 remove unused isAssignment
closes EVAL-3817

Change-Id: I80b6437d3212a7b7adc052f537fb9d3c02927a5e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337954
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-01-17 21:29:33 +00:00
Kai Bjorkman d8f76f3b13 handle ab_guid postMessage from MC
This PS sets up a handler for the assignment_edit page for ab_guid
coming from mastery connect. The handler saves the ab_guid to the
assignment model if the guid is formatted correctly.

flag=none
closes EVAL-3552

Test Plan:
- create/edit an assignment
- on the assignment edit page open the dev tools console
- in the console type:
window.parent.postMessage({"subject":"assignment.set_ab_guid",
"data":"1E20776E-7053-11DF-8EBF-BE719DFF4B22"}, "*")
- save the assignment
- find the assignment in a rails console or check the assignment API
and ensure the ab_guid field and ensure it is set to the value you
passed in the postMessage
- Repeat those steps but this time use this post message:
window.parent.postMessage({"subject":"assignment.set_ab_guid",
"data":"not formatted correctly"}, "*")
- save the assignment and ensure the ab_guid was not changed from the
previous value on the assignment object.
- Repeat this entire process for a graded discussion topic as well

Change-Id: I20b83785d128090d18da3f3caf07a03e7bfc97a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336183
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2024-01-16 18:11:34 +00:00
Aaron Shafovaloff 755bb7cdf2 typescriptify speed_grader_select_menu
Change-Id: Ie4272e030a29ead8975f1b766a3eec7817033d57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337538
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-14 02:44:56 +00:00
Aaron Shafovaloff bd5cb3df8c use .state() on jQuery deferreds instead of .isResolved()
refs FOO-3741

Change-Id: I6a14942edc39920f196d3a6df5a10e5997d92121
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337484
Reviewed-by: Jen Smith <jen.smith@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-01-12 16:15:47 +00:00
Mysti Lilla 553615b18f Admin tool to restore deleted users
closes LF-1101
flag=none

Test plan
- Test with g/336629
- Without the feature flag on
  verify the admin tools still just
  shows course restore
- Turn on the deleted_user_tools
  feature flag
- Set up a user with a login,
  email, some courses, etc
- Delete the user
- Go to /accounts/:account_id/admin_tools
  to the restore content tab
- Try to restore the user
- Most recent associated login should be restored
- Ensure delete_me_frd users are not visible

Change-Id: I7c105e537df73f8aae859aa50fb43f0e2bbbe5fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335347
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Jeremy Perkins <jperkins@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2024-01-11 21:05:18 +00:00
Jared Crystal 2727a1d539 fix isImporting logic for New Quizzes to show spinner
fixes QUIZ-12856
flag=none

test plan:
 - create a course with at least one classic quiz in it
 - do a course copy, making sure to select the option to
   import quizzes as New Quizzes
 - as soon as the course copy completes, quickly navigate
   to the Quizzes index page to see the New Quiz shell
 - it should display as "importing" with a spinner
 - you should not be able to click it to launch the quiz
 - it should be polling so that once the import finishes,
   the quiz should change to "unpublished" and be interactable
 - note: if the imports are finishing too quickly to view them
   in the "importing" state, you can stop the quiz_api and
   quiz_lti work containers before you start the course copy

Change-Id: Ic659be033fedafe2fb7fe9027bc129c99a1bfa57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336339
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: James Logan <james.logan@instructure.com>
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
2024-01-11 16:15:08 +00:00
Aaron Shafovaloff e0b90383b9 upgrade prettier
Change-Id: I9a0fd5a82163462822bec33fc5e39261e6adcd22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337220
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-10 18:11:55 +00:00
Aaron Shafovaloff 940e45f2bc remove use of underscore shim in coffeescripts/helpers/assertions.js
refs CFA-33

flag=none

Change-Id: I4b073c71f41a07b718a1a22ea23fdc3032f7bf37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337042
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@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-01-08 19:21:02 +00:00
Aaron Shafovaloff d0b9a6beb3 remove debounce hack from specs
we were swapping out old and new debounce for tests only

unsustainable with CJS to ESM migration

affects tests only

flag=none

Change-Id: Id606f56fcce01e4e538a0579a7c163a98ee7c8d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336693
Reviewed-by: Drake Harper <drake.harper@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-01-08 17:01:31 +00:00
Aaron Shafovaloff b980ed6839 move $.raw to independent function
also adds jsdoc comments to @instructure/html-escape

closes FOO-4193

flag=none

Change-Id: Iff1779c18320d84f43d39c0bca5f91410c77ec0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336857
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-06 05:43:58 +00:00
Sarah Gerard b9738b84fc Add assign to item tray to quizzes index
closes LF-701
flag=differentiated_modules

test plan:
- have the flag on and a course with some quizzes in it
- go to the quizzes index page,
- click on the kebab menu next to one of the assignments
- expect the 'Assign to...' button to appear as per the design
  in the ticket
- click the assign to option and expect the tray to open and
  close properly and for any due dates/overrides to be present
- ensure the assign to option does not appear in student view
  or if the flag is off

Change-Id: If59b72181d7dece20a2fbbc5c9ae570cfa1f7be5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336620
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>
2024-01-04 21:28:36 +00:00
Aaron Shafovaloff 230289ec45 replace misc use of underscore shim with lodash (3)
refs CFA-33

flag=none

Change-Id: Ic1482e4fd26f505343c5c5454713a8c30f67f93b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/336568
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2024-01-03 19:50:03 +00:00
Sarah Gerard d6ec035713 Add assign to item tray to assignment index
closes LF-698
flag=differentiated_modules

test plan:
- have the flag on and some courses with some assignments in it
- go to the assignments index page,
- click on the kebab menu next to one of the assignments
- expect the 'Assign to...' button to appear as per the design
  in the ticket
- click the assign to button and expect the tray to open and
  close properly and for any due dates/overrides to be present
- ensure the assign to button does not appear in student view
  or if the flag is off

Change-Id: Ifd4cf996c3e7c328323c07a62379bda3bd19b796
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335752
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: Sarah Gerard <sarah.gerard@instructure.com>
2024-01-02 20:23:21 +00:00
Aaron Shafovaloff 8b50a205ee Resolve final circular package dependencies
Refs CFA-27

flag=none

Change-Id: I9787633a7deef3206f1462e8f65936dc51f1af3d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335951
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-24 19:37:09 +00:00
Aaron Shafovaloff ede5253e70 move @canvas/serialize-form
Change-Id: Id819473a6574e431dfa95a44821b65d4f6ba186a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335938
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-24 11:50:13 +00:00
Aaron Shafovaloff ddc4465585 move datetime into ui/shared
Change-Id: I141da8bb5a8b1b2e52cce821466c3b8265782d72
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335919
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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: James Butters <jbutters@instructure.com>
2023-12-23 17:50:24 +00:00
Aaron Shafovaloff b108ed4113 move keycodes
This is part of a larger effort to remove
cyclical dependencies.

Refs CFA-27

flag=none

Change-Id: I320d8ed7dcfcc25fa80ad4f7c55a89d45b442f41
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335854
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
2023-12-22 00:48:55 +00:00
Jackson Howe 0a60fff133 Allow observers in appointment groups
When the observer_appointment_groups feature flag is enabled, add
a checkbox to account settings. This setting is inheritable but
not lockable (lower accounts inherit but can change a parent's
setting). When enabled, it will add a checkbox to the appointment
group creation workflow. If this is selected, observers in the course
can reserve an appointment slot. If the appointment group belongs to
multiple contexts, all the contexts' accounts must allow observers
to reserve appointment groups. If an account later disables the
setting, existing appointment groups that support observer reservation
are unaffected, but teachers cannot create new appointment groups for
observers. However, if an appointment group that supports observer
sign-up is amended to include a context that does not allow observer
sign-up, then observers will no longer be able to make reservations
on that group (existing reservations are unaffected).

closes LF-588
flag = observer_appointment_groups
[fsc-max-nodes=30]
[fsc-timeout=60]

Test plan:
With the observer_appointment_groups flag disabled:
 - Before enabling the feature flag, validate that the existing
   appointment group creation and reservation workflow still works
 - Expect to not see the "Allow observers to sign-up..." setting in
   account settings
 - Expect to not see the "Allow observers to sign-up" checkbox when
   creating an appointment group

With the observer_appointment_groups flag enabled:
 - Go to root account settings
 - Enable the "Allow observers to sign-up..." setting and save
 - Expect the setting to be persisted
 - Go to a subaccount's settings
 - Expect the setting to be enabled
 - Uncheck the setting and save

 - Go to the calendar as a teacher
 - Create an appointment group
 - When selecting only contexts that have the setting enabled,
   expect to see the "Allow observers to sign-up" checkbox
 - When selecting any context that doesn't have the setting enabled,
   or if group sign-up is enabled, expect to not see the observer
   checkbox
 - Save the appointment group
 - Click the appointment group in the calendar and select "Group
   Details"
 - Expect that changing contexts here affects the observer sign-up
   checkbox in the same way as above

 - Go to the calendar as an observer
 - If the observer is enrolled in a course with an appointment
   group with observer sign-up enabled, expect for the observer
   to see the "Find Appointment" button
 - Expect for the observer to be able to reserve only appointment
   groups with observer sign-up enabled

 - Disable the account setting
 - Expect observers to be able to sign up for existing appointment
   groups with observer sign-up enabled
 - Expect teachers to not see the observer sign-up checkbox anymore

Change-Id: I26c9e2f4f9139558be477eabc3a1357ec97b3738
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335115
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-12-21 18:40:06 +00:00
Aaron Shafovaloff 82dae148af remove ui/shared/tinymce-external-tools
No longer used.

This is part of a larger effort to remove
cyclical dependencies.

This is based on a draft commit of Yona Appletree.

Refs CFA-27

flag=none

Change-Id: Ia3fcf0d2ff46ae3828375acf03219b4858bff3f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335838
Reviewed-by: Cameron Ray <cameron.ray@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-12-21 17:52:14 +00:00
Aaron Shafovaloff 6ae76ccc28 move ui/shared/timezone to reduce cyclical deps
Change-Id: I083b1e1aeafe611fcef1e963a81181cead6a1318
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335748
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-20 21:04:18 +00:00
Aaron Shafovaloff f56735663d move serializeForm and toJSON to reduce circular deps
Part of larger effort to remove cyclical dependencies

Refs CFA-27

Change-Id: I414115c0709663a6fa2e1759467e5fb69865d0ae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335745
Reviewed-by: Michael Hulse <michael.hulse@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-12-20 20:15:35 +00:00
Aaron Shafovaloff 3642820da7 move createStore to reduce cyclical deps
Change-Id: I182c74f82a0f60d5cc933f8ef3490a71262679d5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335749
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-12-20 20:09:48 +00:00
Aaron Shafovaloff 627ed1ac74 move outcome-content-view into outcomes
Change-Id: Id3c7d3fbd3a2686a29e198f025210b85199d53ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335680
Reviewed-by: Michael Hulse <michael.hulse@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-12-19 23:46:23 +00:00
Aaron Shafovaloff 40e68f737e Move jest-moxios-utils to ui/shared
Change-Id: I82012e596e264dfec8581e69d5c8e649eb2f0dc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335270
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Drake Harper <drake.harper@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-12-14 22:33:09 +00:00
Kai Bjorkman 337c10df96 properly check for admin access
Teachers with admin account access in a sub account was wrongfully
getting access to assignment/quiz setting that should not be available
to edit when the grading period is closed. This was due to us just
checking if they had an admin role. We were not checking if the admin
role is within the account the course is in. This ticket passes through
a new js_env variable to rely on for checking admin access.

closes EVAL-3547
flag=none

Test Plan:
  - Prerequisites: Have two sub-accounts, and a course in one sub-account
  that has a term with grading periods. Add an assignment, quiz, and new
   quiz where the grading period is closed. This will require
   submissions to exist on each.
  - Add a user as an admin to sub-account 1
  - Enroll the same user as a teacher into the course in sub-account 2
  - As the user, edit the assignment/quiz created in the prerequisite
  - Notice that a message about it being in a closed grading period
  appears
  - Notice that many of the assignment fields are disabled and the ones
  that are enabled can be edited and saved successfully
  - As the admin, edit the assignment/quiz created in the prerequisite
  - Ensure all settings are enabled and available to be edited by the
  the admin

Change-Id: I1649a4429c958cc85fcbda9f1e089408850c1924
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331559
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-12-05 17:33:06 +00:00
Tucker McKnight 4caf72dc14 spec: Use a different selector to find the tool form
The tool_form will have a unique ID soon, and won't always
be called #tool_form.

Change-Id: I2fbf486180a5518581579272a2c54e8e247953a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334204
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-12-05 00:00:44 +00:00
Samuel Lee 35b37cdcdd modify create/edit assignment page for ICE
modify create/edit assignment page for the ICE initiative

closes EVAL-3560
flag=none

test plan:
- tests pass
- confirm that the heading and breadcrumb both say Create Assignment
  when a new assignment is created
- confirm that the heading says Edit Assignment when editing an
  existing assignment
- confirm that the heading and breadcrumb both say Create Quiz when
  a new New Quiz is created
- confirm that the heading says Edit Quiz when editing an existing
  New Quiz
- Acceptance Criteria
    - header is an h1 tag and font weight of 700
    - there is 36px between header and content
    - divider line is taken away

Change-Id: Ib564ca79c5270cc7ce0b51e73d5fb92c7a20db05
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329796
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Rohan Chugh <rohan.chugh@instructure.com>
QA-Review: Melissa Kruger <melissa.kruger@instructure.com>
Product-Review: Melissa Kruger <melissa.kruger@instructure.com>
2023-11-30 19:39:57 +00:00
Matheus 7ae500f6d2 check user permissions for blueprint setting migration
closes LF-940
flag=none

Test Plan:
- Create a BP course
- With an admin user with no
  manage master courses permissions
- Create a second course and try to
  copy the BP one into it
- Check that the BP settings migration
  option shows up greyed out under import
  all_content
  (oh  and check there is a tooltip there explaining it)
- Check that it does not show up as an option
  on selective import
- Check that even if you enable the checkbox
  and use it, the settings are not imported
  regardless

Change-Id: I622b00cfcf010a9a656c590782c22952c940f1c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333488
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>
2023-11-27 23:00:49 +00:00
Derek Williams 79b8f12dbc allow toggling anonymous grading for new quizzes
closes EVAL-3741
flag=anonymous_grading_with_new_quizzes

test plan:
- create a new quiz with anonymous grading turned on
- edit that quiz and ensure you can toggle anonymous grading off

Change-Id: Ia89fcbcd5028db24cc5855d230acaab02cdc2126
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/333295
Reviewed-by: Rohan Chugh <rohan.chugh@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-11-22 21:41:22 +00:00
Samuel Lee 00b4a05a2c fix excused students in Message Students Who modal
fix issue where students who are excused in an assignment are included
in the message list when Haven't submitted yet or Haven't been graded
options are selected

fixes EVAL-3640
flag=none

Test Plan:
- turn on the Message Observers of Students Who admin flag
- create an assignment
- as the teacher, go to the gradebook and mark one of the students
  as excused
- for the gradebook column of the assignment, click on the triple dots
  next to the assignment title
- click on the Message Students Who option
- confirm that the student who was excused is not included in the
  recipient list for the Have not been graded and Have not yet
  submitted options
- turn off the Message Observers of Students Who admin flag
- confirm that the student is also not included in the message list
  from the same steps above

Change-Id: Ie9d75694283e441b25acfdc559dc9fe373db8302
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331528
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>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-11-22 20:47:49 +00:00
Jeremy Stanley db3f21f1b3 prevent unintended element creation with elementToggler
test plan:
 - paste the HTML from the ticket into an HTML editor
 - save the page
 - click the link
 - nothing should happen

flag=none
fixes FOO-4008

Change-Id: Ibe9490945a5e37396d3c0127feb329fb3d740946
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/331905
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2023-11-02 21:50:06 +00:00
Derek Williams 40e65e2c36 hide anonymous grading for new quizzes unless ff on
flag=anonymous_grading_with_new_quizzes

test plan:
- with flag on, show anonymous grading for new quizzes
- with flag off, hide anonymous grading for new quizzes

Change-Id: I4b3b00ddb4bd3977b60325f1699247878ccc0d50
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330493
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2023-10-17 14:01:27 +00:00
Xander Moffatt b607c92c44 support deep linking in submission_type_selection
why:
* previous implementation was never fully baked
* modal wasn't closing in response to the deep link from the tool
* values were not being set on the assignment

* close modal properly
* set all the same values on the assignment as
assignment_selection deep link response

closes INTEROP-8241
flag=none

test plan:
* install a 1.3 test tool with the assignment_selection and
submission_type_selection placements
* create a new assignment
* choose the External Tool submission type, and choose the 1.3 tool from the list
* pass back assorted data like
  * title: 'a string'
  * custom: {"hello":"there"}
  * lineItem: {"scoreMaximum":2}
  * iframe: {"width":678,"height":456}
* pass the content item back to canvas
* the points possible and title on the assignment should have changed
* save the assignment
* it should launch with the right size and custom params
* create a new assignment
* choose the tool directly from the submission type dropdown
* launch the tool, pass back similar data in the content item
* the same values should be set on the assignment
* save the assignment
* the same values should be set in the launch

Change-Id: I47b0d21c2a10f417235201b2722b2b9576c9c4af
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329216
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>
2023-10-03 21:33:56 +00:00
Samuel Lee 008bfd077b fix video media comment in speedgrader
fix issue where when a video media comment is submitted by a student
with assignments enhancements flag turned on, viewing the comment in
speedgrader will show the comment as audio instead of video

fixes EVAL-3479
flag=assignments_2_student

test plan:
- first stay on the master branch
- have the Assignment Enhancements - Student flag enabled
- have a course with an assignment, a student, and a teacher
- as the student, add a video media comment to the assignment
- as the teacher, go to speedgrader and click on the video media
  comment
- see that the video is not shown and only the audio is displayed
- download the commit branch
- run a 'yarn' to update the canvas-media package to reflect changes
- as the student, add another video media comment to the assignment
- as the teacher, go to speedgrader and view both the existing video
  comment and the new comment
- see that both video comments are fully displayed

Change-Id: I7299885419114b02a6f4f6a4ac91ed87220c1975
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328034
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@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: Ravi Koll <ravi.koll@instructure.com>
2023-10-03 21:12:17 +00:00
Jackson Huang b1ecb34c6c show drop rules settings
we want to display the drop rules
in the assignment group modal when
there are no assignment

fixes EVAL-2851
flag= none

test plan:
- go to assignment and create a new group
  - The drop rules should not appear
- After creating the group edit the group
  - The drop rules should appear
- Move all assignments in the group and reload
  - The drop rules should appear

Change-Id: I2cc14f853270cb2ea38e283ea87f75425d9b99a1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327653
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: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
2023-09-28 14:13:08 +00:00
Samuel Lee 45b7169144 anonymous grading setting cannot be removed
anonymous grading cannot be disabled when editing an existing
anonymous assignment

closes EVAL-3449
flag=anonymous_marking

test plan:
- create an anonymous assignment
- edit the anonymous assignment and verify that the anonymous grading
  checkbox can be toggled off

Change-Id: Ie2028614a2e2f8e135e4cafc2be5c8a5e511ccb6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326551
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>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
2023-08-30 15:37:01 +00:00
Cody Cutrer 2aeaf9e3e6 skip flakey CalendarNavigator specs
refs LF-626

Change-Id: I5c4b23a57e273f11b905d33616954ef858f14b2a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325907
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Tested-by: James Butters <jbutters@instructure.com>
2023-08-23 15:05:25 +00:00
Cody Cutrer 15a2ddbe41 remove submit-assignment-from-google-docs/drive code
it was disabled a year ago due to a broken API. the Google Drive LTI
is the way to do this now. this commit removes now unused related code
from the view, controllers, and the google_drive library

Change-Id: Ieccef46036c847f27e98dc8297da10d04b6721f9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325750
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-08-22 23:30:39 +00:00
Derek Williams 5c6fdd30fe add text to anonymous grading box
also disables the box if the assignment is a new quiz and already
anonymous

closes EVAL-3390
flag=anonymous_marking

test plan:
- create/edit a new quiz
- notice the new text under the anonymous grading checkbox
- edit a new quiz where anonymous grading is already enabled
- notice the checkbox is disabled and cannot be turned off

Change-Id: Ibc0e872c89ad6e932da55e93c93026e4dc492f11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324649
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
2023-08-11 18:47:07 +00:00
Paul Gray d6a4b17941 Use tool url when tool omits launch url in DL
why

When returning from a Deep Linking launch, if the tool does not provide
a url, the tool's url will be used instead. Previously, Canvas would not
choose a url and leave the field blank.

fixes INTEROP-8166
flag=lti_overwrite_user_url_input_select_content_dialog

test plan:

Add the 1.3 test tool, and tweak it to _not_ return a url, then launch
it from the "Add item to module" screen and and make sure the tool's url
is used (it should not have a `deep_link` parameter in it).

Change-Id: Ibad1691453dce5e6d4e5112d00bb445f226f6ccf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/324707
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-08-11 17:43:45 +00:00
Aaron Shafovaloff d013352806 stop using CJS in shared backbone module
test plan:
  - existing tests pass

flag=none

Change-Id: Ie8441259a0cd96e5700d0007a62d4dce281ccd54
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323769
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-07-27 20:51:15 +00:00
Aaron Shafovaloff 11b284327c move .js files with JSX to .jsx extension
- .js files without JSX reduces unnecessary AST transformation
 - also paves way for vitest

test plan:
  - existing tests pass

flag=none

Change-Id: I392daefdfefab89e7cf511477e16c860b05519ff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/323393
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>
Build-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2023-07-24 14:59:37 +00:00
Derek Williams 97ac102945 allow discussion_topics to be edited without losing assingment
users with only assignment edit permissions (and not create) would
cause discussion_topics to lose their assignments if edited. This
change keeps the assignment as is when one of these users edits the
discussion, but they cannot change the assignment details themselves.

closes EVAL-3117
flag=none

test plan:
- create a role with permission 'Assignments and Quizzes - Edit' turned
    on, but the 'create' one turned off
- create a graded discussion topic on a course
- give someone in the course this new role
- masquerade as this user and edit the discussion topic
- notice that you cannot change the graded status or any assignment
    specific information (like due dates or points possible...)
- after saving, the assignment should still be 'graded' and have all
    the same assignment details

Change-Id: If25742a51f86cd925f70b8c78e611c5953e61d01
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320395
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-07-12 16:45:01 +00:00
Adrian Diaz e64386d8c5 fix blueprint assignment/quiz retry failed copy
fixes QUIZ-10827
flag = none

Test Plan:

- Create a master course with one new quiz
  - The new quiz can contain one single question
- Create a course
- Turn off sqs2quizlti container
- In the master course, in the blueprint
  menu create a new association with the last
  created course
- Go to the associated course
- Go to Assignments and wait for the copy to fail
  - If you wish you can mark it as failed
    like this:
    Assignment.last.fail_to_duplicate!
- When the assignment copy has failed you must
  see the retry button.
  - Observe there is no cancel button
- Click the retry button
  - Observe a new duplicate process has been
    triggered
- Go to Quizzes and repeat the same steps
  described for assignments
- Let's test the new quiz copy recovers correctly
- You can erase all sqs2quizlti messages and then
  start the sqs2quizlti
- Go to Assignments and wait for the copy to fail
  - If you wish you can mark it as failed
    like this:
    Assignment.last.fail_to_duplicate!
- Turn on sqs2quizlti
- Click the retry button.
  - Observe a new duplicate process has been
    created
  - After some seconds the copy must finish
- Now, let's test blueprint sync works
  - Go to parent blueprint
  - Go to the assignment
  - Change the title
  - In the blueprint menu click on "Sync"
  - Wait for the sync to finish
  - Go back to the child course
  - Go to the assignment
  - Observe the title has been updated

Change-Id: Ic170ba89fc422d69cf6f7f61b50296307c7715cc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317026
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: James Logan <james.logan@instructure.com>
Product-Review: Marissa Pio Roda <marissa.pioroda@instructure.com>
2023-06-20 14:40:44 +00:00
Michael Hulse 2fbcce35d2 spec: fix intermittently failing test for Calendar Navigator
Updated test to use Jan 18, 2023, thus avoiding any next sibling issues.

fixes FOO-3455
flag=none

test plan:
- N/A

Change-Id: Ice33e5de0aac552d3fe0c43a0d12160caa3931c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320665
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2023-06-15 22:46:41 +00:00
Paul Gray 7fdf1fba7f Ignore tool name for deep linking assignments
why

Previously, if a title wasn't included in a content item returned from
a deep linking request, the assignment would default to the tool name.
Now that these values are prepopulated in the form (instead of being
sent directly to the backend), it doesn't make sense to use the tool
name for the assignment, as this will always override the assignment
title.

test plan:
Create an assignment and choose "External Tool" for submission type.
Launch the LTI 1.3 test tool, and choose various combinations of values
for "Title" and line_item.label, and make sure they match the
behavior sepcifed by the `lti_assignment_page_line_items` flag.

Also test adding a deep linking resource to a module via the "Module +"
button, making sure that the select content dialog properly errors when
no value is passed for "Page Name."

fixes INTEROP-8107

flag=lti_assignment_page_line_items

Change-Id: I203cbf3bca719a4263059e36c4231bac95b2eed4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-06-02 13:08:12 +00:00
Kai Bjorkman 609038eb19 set hide_in_gradebook upon quiz create/edit
Allows for 'hide_in_gradebook' to be set on the new_quiz (assignment)
object when the checkbox is selected when creating/editing the quiz.

flag=hide_zero_point_quizzes_option
closes EVAL-3050

Test Plan:
    - run migrations
    - Create a New quiz
    - Set the points possible to zero
    - select the checkbox the appears and ensure the checkbox above is
    automatically checked and disabled
    - Save the quiz and ensure there are no errors
    - Ensure you can edit the quiz normally and toggle this option on
    and off

Change-Id: Idb126fa4dcc44b037b32468aa54afb26185bd982
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318180
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Jackson Huang <jackson.huang@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-24 17:53:30 +00:00
Jackson Howe 57f9d39129 Remove new_quizzes_skip_to_build_module_button flag
closes LF-291
flag = none

Test plan:
 (Requires a NQ connection to test)
 - Go to a course with at least 1 NQ and 1 CQ
 - On each of the quizzes, assignments, and modules index pages:
   - Click the kebab menu icon next to the NQ
   - Expect a "Build" option that takes you directly to NQ build page
   - Click the kebab menu icon next to the CQ
   - Expect no "Build" button

Change-Id: Ie88e4acc37ad4b9f5695a8214d002892770e2542
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318780
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-23 16:44:12 +00:00
Jackson Howe c196f5d48f Remove new_quizzes_modules_support flag
closes LF-290
flag = none

Test plan:
 (Requires a NQ connection to test)
 - Go to a course's modules page
 - Click '+' to add content to a module
 - Select each content type in the dropdown, and expect to see
   '[Create Assignment]', not '[New Assignment]' (or quiz, page, etc)
 - Select Quiz
 - Expect to be able to choose between NQ and CQ
 - Create a NQ and then a CQ
 - Open each quiz
 - Expect the quizzing engine to match the selected engine

Change-Id: I8a54874a78aace2c6a97250f704ecc0d6d61cb77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318759
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-23 16:44:03 +00:00
Kai Bjorkman b9767bac47 add hide zero point quiz checkbox
flag=hide_zero_point_quizzes_option
closes EVAL-3045

Test Plan:
    - ensure when creating a new quiz and the points possible is 0
    that this new checkbox is not shown of the ff is disabled
    - enable hide_zero_point_quizzes_option ff
    - create a new quiz and enter 0 as the points possible
    - ensure a checkbox labeled 'Do not display in gradebook or the
    student's grade page' is displayed
    - change the points possible 10
    - ensure a checkbox labeled 'Do not display in gradebook or the
    student's grade page' is not displayed (only displayed when 0)
    - enter 0 back into points possible and select the checkbox
    - ensure the 'Do not count this assignment towards the final grade'
    checkbox is disabled and checked with a message reading : 'This
    is enabled by default as assignments can not be withheld from
    the gradebook and still count towards it.'
    - ensure when the 'Do not display in gradebook or the
    student's grade page' checkbox is hidden or unchecked after being
    checked that the 'Do not count this assignment towards the final
    grade' is enabled and remains checked.

Change-Id: Icd51fcd43590b8c91a8a3b208f6b8747e43b9480
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317372
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-22 18:17:22 +00:00
Jackson Howe 30fc2959b4 Remove files_dnd flag
Also removes UploadDropZone component (plus its spec file and css
resources) since it was only used when the flag was disabled.

closes LF-272
flag = none

Test plan:
 - Go to /files
 - Drag a file from your computer into the files list
 - Expect it to be uploaded
 - Drag the same file again
 - In the modal that appears (since you're uploading a duplicate file),
   expect to see a "Skip" button

Change-Id: I325f69fbaad0a40b411fa94189bfb89f1e267055
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318334
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-05-18 21:26:12 +00:00
Yona Appletree d542842994 Update serviceRCELoader to add externalToolsConfig props
Supports new external tools dialog config in legacy RCE loader.

Refs LF-204
flag=none

QA Risk Low

Test plan:
- Load an RCE in a page that uses serviceRCELoader and ensure it loads

Change-Id: I227c2317ab9c51f509c592c07c9d4cf76598ac65
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318087
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: Jake Oeding <jake.oeding@instructure.com>
2023-05-15 16:37:43 +00:00
Paul Gray 58a743fe31 Prefill assignment edit form from DL lineItem
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>
2023-05-10 16:39:29 +00:00
Paul Gray 90a61e51af Convert deep-linking code to typescript
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>
2023-05-10 16:38:18 +00:00
Aaron Shafovaloff d85ec9f17d use lodash in spec
test plan:
  - existing tests pass

flag=none

Change-Id: I94b7137d952d2f1e9dc188244d1719f310794346
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/316105
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-04-17 16:40:27 +00:00
Aaron Shafovaloff 51349dfa05 remove .coffee extension from coffeescript imports
this removes annoyances when decaffeinating files

test plan:
  - all tests pass

flag=none

Change-Id: Ie3af0faf13d64a4701bb917fbcae29cb10474df1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315484
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-04-10 17:01:42 +00:00
Aaron Shafovaloff 4eddb28fe6 Remove browser-sniffer package
Chips away at our dependence on old jQuery

Also: Remove IE and old-Safari detection

Test plan:
  - Load Canvas in Safari
    - document.body should have 'safari' className
  - Load Canvas in Chrome
    - document.body should have 'chrome' className
  - Load Canvas in Firefox
    - document.body should have 'ff' className

flag=none

Refs FOO-87

Change-Id: I27547cce9d6feaaa44c442590962476345229173
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315224
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2023-04-07 16:11:14 +00:00
Aaron Shafovaloff d91009ff9f Move round to ui/shared
Test plan:
  - Existing tests pass

flag=none

Change-Id: I47e30a7e373bf3f28029f2118df0471e889e348b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314751
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Yona Appletree <yona.appletree@instructure.com>
Product-Review: Yona Appletree <yona.appletree@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2023-03-30 23:13:46 +00:00
Eric Saupe 0d2444232d Don't change date if new value is invalid
The parsing of text in the date field cannot be relied upon. This patchset
removes setting the new value if it is invalid.

Here are two patchsets where changes were made to fix issues in this area:
https://gerrit.instructure.com/c/canvas-lms/+/273803
https://gerrit.instructure.com/c/canvas-lms/+/309579

fixes LS-3879
flag=none

test plan:

- Have a teacher in a course with the teacher's language set to Català.
- Create a calendar event for a course and click More Options
- Click user a different date for each section button
- Enter a date that is after one week of the current date
- Click save
- Verify the dates were saved correctly
- As a teacher in any language, create a calendar event and
click More Options
- Select a valid date from the date picker
- Type in nonsense to have an invalid date
- Save
- Verify the valid date was saved

Change-Id: I86c2f4fcb4bcc788f850bbd5eaac25cad019c7e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313980
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-03-29 18:58:36 +00:00
Derek Williams a47a0f69d2 add speed grader link to assignment edit page
closes EVAL-2923
flag=additional_speedgrader_links

test plan:
- as a teacher, create an assignment
- edit the assignment
- notice a speed grader link in the kabob if assignment is published
- the link should NOT show if the assignment is unpublished

Change-Id: Ifba463d64fbb2a25baed194b5801faa1333ee2b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/313713
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Sam Garza <sam.garza@instructure.com>
2023-03-21 21:05:06 +00:00
Matthew Bennink 5b16ba4d42 LtiDeepLinkingResponse can indicate that link open in new tab
closes gh-2157
closes INTEROP-7994

Canvas defaults to using an iframe (new_tab: 0) for ltiResourceLink
content items. This requires that a tool provider use the Canvas HTTP
API to update each module item or assignment to specify that it open the
LTI link in a new tab.

Since Canvas doesn't currently take the `window.targetName` into account
when handling ltiResourceLink content items, it seemed OK to handle a
value of "_blank" as a special case for indicating that the content
should open in a new tab.

This would not affect any existing content and it's unlikely (?) to
surprise any users who have set a targetName of "_blank". In fact,
it may now do what they've intended it to do.

Test Plan:
  - Configure a course to launch an LTI Advantage Deep-Linking workflow
  - The tool should return a Deep-Linking response with at least one
    ltiResourceLink content item whose window.targetName value is set to
    "_blank"
  - Once the item populates (module item or assignment), ensure it opens
    in a new tab (note: Canvas will require you to click the "open in
    new tab" button manually to launch the tool, this seems strange but
    is how it's behaved for many years, see
    522abc26d4)

Change-Id: Ie966cd54d622c6b46138a3ddf3f0ebf1a10f1576
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312816
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
2023-03-16 18:11:28 +00:00
Matheus 0aac83e764 Add "Import Blueprint Settings" support for selective import
test plan:
- Copy a BP course
- Mark "Select specific content"
- Observe the "Copy Blueprint settings" option vanishes
- Click  "Create Course"
- Check that you have the option to select BP
  Settings during the selection of what to import
  (Along with Course Settings)
- Create a course, w no students
- Go to its content migrations and select
  Content Type: "Copy a Canvas Course"
- Search and select a BP course
- Check that "Import Blueprint Course settings"
  shows up like the previous scenario
- Check the behaviors are like the previous copying
- Now do that for a Course with students and check
  that even for a selective import the BP option
  does not show up

fixes LS-3815
flag=copy_blueprint_settings

Change-Id: I4c08779f7c72e8c7688060a89849213f552939ae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312817
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>
2023-03-13 18:18:23 +00:00
Eric Saupe d665d1285f Include time in edit assignment datepicker
Removes allDay related tests from EditAssignmentDetailsSpec since
assignments and the edit modal don't use the allDay attribute.

fixes LS-3813
flag=none

test plan:
- Create an assignment and set a due date and time
- Go to the calendar
- Click on that assignment
- Click Edit
- Click More Options
- Note that the date and time have not changed

Change-Id: I5cd3d8d83087a84adb8a009c7fe91ec9c52f0010
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/312781
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2023-03-08 19:45:27 +00:00