Splitting the differentiated_modules flag allows us to enable the
backend changes transparently and in a backwards-compatible manner
to ensure performance before enabling the user-facing changes that
fully expose this feature. Renaming the original flag makes it easy
to ensure we've transitioned each existing instance to the proper
new flag.
What should go behind each flag?
selective_release_backend
- any change with potential performance implications should go here
- any change that is not required to go in
selective_release_ui_api should go here
selective_release_ui_api
- any change that changes UI or reveals this feature in the
frontend must go here
- any change allowing the creation of module-, page-, or discussion-
type AssignmentOverride must go here
- any change which allows data changes that are not backwards
compatible (if the flags are disabled) must go here
One other way of putting this - with the selective_release_backend
flag enabled, selective release should be fully functional if
AssignmentOverrides exist, there's just no way to actually create
them or tell that anything has changed.
closes LX-1671
flag = selective_release_backend, selective_release_ui_api
[skip-crystalball]
[fsc-max-nodes=20]
[fsc-timeout=40]
Test plan:
- Enable the selective_release_backend but not
selective_release_ui_api
- Expect to not see any selective release UI around Canvas
(including module edit rewrite, module assign to, learning
object show/index/edit assign to, pages "Mastery paths"
checkbox)
- Expect to not be able to use the learning object dates
api
- Enable the selective_release_ui_api flag
- Expect selective release to work as normal
Change-Id: Ia9ab02a005e4391aa63e7f2b7d5b77c990cd8154
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349192
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: Jackson Howe <jackson.howe@instructure.com>
Gate the learning object dates api according to new permissions, and
only render the assign to buttons & UI if the appropriate permissions
are present. This commit works by adding a policy called
:manage_assign_to to each learning object model which checks the
appropriate course permissions/ conditions. Then in various parts
throughout the UI, we can simply call `object.grants_right?(user,
:manage_assign_to)` anywhere where we're checking the ability to edit
an existing learning object's assign to settings.
To change a module's assign to settings, require the "Course content -
edit" permission.
For existing learning objects, changing assign to settings requires the
following permissions:
- assignments -> "Manage Assignments and Quizzes - edit"
- quizzes -> "Manage Assignments and Quizzes - edit"
- graded discussions -> "Discussions - moderate" and "Manage Assignments
and Quizzes - edit"
- ungraded discussions -> "Discussions - moderate" and either a course
admin enrollment or an enrollment that's not section restricted
- pages -> "Pages - update"
For new learning objects, we require the following permissions on the
object's create page:
- assignments -> "Manage Assignments and Quizzes - add"
- quizzes -> "Manage Assignments and Quizzes - add"
- graded discussions -> "Discussions - create" and "Manage Assignments
and Quizzes - add"
- ungraded discussions -> "Discussions - create" and either a course
admin enrollment or an enrollment that's not section restricted
- pages -> "Pages - update"
The "Discussions - moderate" permission can be granted to students, so
if the user does not have an admin enrollment in the course, we verify
that the student's enrollment is not section-restricted before allowing
them to edit a discussion's assign to settings. Thus, students with
"Discussions - moderate" permissions and a section-restricted
enrollment can not use the assign to tray and can no longer
differentiate a discussion by section.
closes LX-1694
flag = differentiated_modules
[fsc-max-nodes=20]
[fsc-timeout=40]
Test plan:
Visit each of the following locations as a teacher and verify that you
can access the "Assign To" UI. Then disable the associated permission
for the teacher and verify that you can no longer access the "Assign
To" UI. Note that you may need to clear your cache and restart Canvas
after toggling permissions.
- assignments (show, index, edit, create, module items) - note that
the index can show quiz and graded discussion items, and these
items' assign to buttons should be gated by their respective
permissions
- quizzes (show, index, edit, create, module items)
- graded discussions (show, index, edit, create, module items)
- ungraded discussions (show, index, edit, create, module items) -
test this as a student as well
- pages (show, index, edit, create, module items)
- modules (index) - both the menu option and "View Assign To"
button should be gated
Change-Id: I19bdb24c16a4bc77b993a55be4d9536904c6441f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348755
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
closes EVAL-4203
flag=none
[fsc-max-nodes=30]
Ensures wherever we refer to SpeedGrader that we use "SpeedGrader"
(one word, with the "S" and "G" capitalized).
Test Plan:
- specs pass
Change-Id: I1e4c331866cb698b7eee70e62c6a203e088c6d0c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/348456
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Melissa Kruger <melissa.kruger@instructure.com>
fixes LX-1408
flag = none
Motivation:
- Issue caused by jQuery upgrade
- Updated labelFn to include _index parameter
- Updated .map() usage in render
Test Plan:
- Assert it displays the name for ALL invalid sections
Change-Id: I3c94d858d10a7bf898284c3a41202ca65c6f80fa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347693
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Riley Crahen <riley.crahen@instructure.com>
- icon-sis-imported will only be shown if the
assignment group has sis_source_id set
- icon-link will be shown if the assignment group
has a sistemic category mapping set in its
integration data
refs DSYNC-1544
flag=none
Test Plan:
- Check if an assignment group with a
sis_source_id has a sis imported icon
- Check if an assignment group with an
integration_data containing sistemic category
mapping has a link icon
Change-Id: I1528b779f7751a49bdab2f5d192883a2d3ba82e6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/346749
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Peter Bartha <peter.bartha@instructure.com>
Reviewed-by: Kristóf Miskolczi <kristof.miskolczi@instructure.com>
QA-Review: Balazs Komaromi <balazs.komaromi@instructure.com>
Product-Review: Balazs Komaromi <balazs.komaromi@instructure.com>
why: When editing an assignments submission type from any non-LTI option
(online, no submission and on paper) to the submission type
placement for a tool, it gives a false impression of being already
connected to a resource with the tool. This is due to the pre-
populated Canvas assignment name being listed under the button to
launch and select content. This replaces that assignment name with
the new resource card that will be created when the tool is
selected.
closes: INTEROP-8535
flag=assignment_submission_type_card
test plan:
- Create a new assignment with 'External Tool'
during creation, select the submission type "External Tool" and walk
through the process of selecting a tool. In this flow the card should
not appear until the assignment is saved and you try to edit it. Then
you should see the new resource card displayed.
- Create a new assignment with a tool in the list (ie. LTI Test Tool)
when this tool is selected you should still get the launch button
that was created recently. Launch the tool and and walk through this
flow. Once done with this selection flow the card should immediately
appear.
- If your tool has an icon_url it should be displayed in the card, and
if it does not then the default LTI icon should be displayed. You
can simulate the tool not having an icon by removing the icon_url
from the Avatar `src` prop in the `LtiToolIcon` component.
- Click the close button on the card and verify that it disappears and
the launch button is displayed again.
- Edit an existing assignment that has a tool selected, change the type
to something else (like 'Online') and then change it back to the tool.
The card should appear after the second change as it should be
remembered until you either close the card or save the assignment with
a different submission type.
Change-Id: I7e716a09211568c2f0e51eb4bb2e7109fad2140d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345517
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Mark Starkman <mark.starkman@instructure.com>
fixes VICE-4171
flag=none
test plan:
- Create a discussion with user A
- Add discussion replies with the same user in a thread
- Delete some nested replies with the same user
- With user B observe that there are no unread replies with this change
(and there are without this)
Change-Id: I0106e46295676500b50d95be34d3a048c4cce56e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/345235
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Reviewed-by: Roland Beres <roland.beres@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Fixes FOO-4288
flag=none
It's all too easy to inadvertently manually enter an incorrect
year when typing into either the jQuery or the InstUI date
input components. For example, while '20' is read as the year
2020, '2' becomes 1902 and '202' is left as the year 202. This
has created issues in custommer accounts.
Since Canvas dates are always related to some school term that
is likely to be in or near the present, it makes the most sense
to simply have the datepickers reject any year earlier than
1980. That figure was arbitrarily chosen but seems reasonable.
Test plan:
* Try both datepickers (suggest the course module "Lock Until"
setting for the jQuery picker and the "Course Participation"
start and end dates in the main course settings page).
* Free-form type a date. Any date that resolves to a year after
1980 should work just as always; any earlier year should be
rejected and the displayed error ("suggestion") below the
picker field should indicate that the year is too far in
the past.
Change-Id: Ib53d8c5cca1f9e76319323c5eda316eb63c34ef1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/344411
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
[change-merged]
[build-registry-path=jenkins/canvas-lms/jschrome-120]
we recently updated the version of chrome for testing on
Jenkins but missed the JS tests. Update that version to
match all other test suites, version 120
Test Plan:
- Jenkins passes
Change-Id: Iea7d74a8ce4c4b666b3b5453e37bc0fc842298e2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/343771
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
with jquery-migrate 3.4.1 (added to instructure_jquery_patches.js
this time, as it wasn't being loaded soon enough for header usage
in runOnEveryPageButDontBlockAnythingElse.jsx)
this change also disables the assignment column resizing and
reordering feature in the grid gradebook. The drag library used
for this feature does not support jquery 3.x and it is a blocker
refs FOO-4260
flag=none
Test Plan:
- Jenkins Passes
[skip-crystalball]
[fsc-max-nodes=18]
[fsc-timeout=40]
Change-Id: I56ff289813c532c98279766dbca19b9ec28c5d0c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341600
Product-Review: Ryan Norton <rnorton@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
This commit skips the focus management test for the
help dialog. It was failing on Jenkins and we could
not reproduce it locally.
unblocking jquery upgrade path
refs FOO-4344
refs FOO-4260
flag=none
test plan: tests pass
[skip-crystalball]
Change-Id: I292a915cbe9e863303475cd3e8bb34543c8f605f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/342628
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jen Smith <jen.smith@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
QA-Review: Jen Smith <jen.smith@instructure.com>
Product-Review: Jen Smith <jen.smith@instructure.com>
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>
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>
This fixes some failing tests when upgrading to jQuery 3.5.
In jQuery 2.2.4 when $todoDateInput.show() is called it adds
'display:block' which is how we checked for the input being
displayed. In jQuery 3.5 it affects the styles differently
depending on the case. In this particular case it removes
the 'display:none' css from the input style. This change
updates checking for the input displaying by checking it
no longer has 'display:none'.
refs FOO-4260
flag=none
Test Plan:
- Jenkins Passes
[skip-crystalball]
Change-Id: Icd55c60bcc46bf10ebe652635489f47e2077b40c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341381
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Angela Gomba <angela.gomba@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
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>
the h2 and button removed from the calendar
header were not being used anywhere. Getting rid
of them and related functions to keep the code clean
closes LF-1286
flag=none
test plan:
- navigate to the calendar page and mess around with
the existing buttons in the header. Ensure there are no changes
to their functionality.
Change-Id: Id7266728b32da823a706a68a1cc4fa6e8a946155
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341447
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>
In this commit the codebase has been updated to use .prop()
over .attr().
The .attr() calls were found using this regex:
\.attr\(\s*['"](?:checked|disabled|selected)
This regex looks to update attributes from .attr(...) to
.prop(...) to ensure compatibility with jQuery 3.5 as these
are boolean properties (checked, disabled, and selected).
unblocking jquery upgrade path
refs FOO-4260
flag=none
test plan: tests pass
[skip-crystalball]
Change-Id: Ieddff1688ca9d8659b9b952ae548aad8c7b58dd8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/341290
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>
This is part of fixing a test failure when removing
jquery-migrate 1.4. I also made some fixes for eslint errors.
refs FOO-4260
flag=none
Test Plan:
- Jenkins passes
[skip-crystalball]
Change-Id: I856af834e1fd5207a84403c059e53a8b2fab3d57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/340809
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>