closes LF-769
flag=none
test plan:
- open a CanvasModal
- calendar, click on a date, from Frequency dropdown pick
Custom
- courses/:id/assignments, choose Edit Assignment Dates
from the kabob menu, select assignment(s), click the
Bulk Edit button
- if you have some LTI tools installed, go somewhere with
an RCE, click on the external tools button, then View All
> expect the 'x' close button to be in the upper-right corner
of the modal
- put your user in a rtl language
> expect the close button to be in the upper-left corner
Change-Id: Ieb314304bb159b1c2192a00b2fa126153bfe8c22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327812
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
fixes LF-732
flag=none
Test Plan:
-Go to files, preview media
-Verify Info button has aria-expanded false
-Open info button (mouse, keyboard, screenreader)
-Verify Info button has aria-expanded true
Change-Id: I0d283192acaf96dc8da3ffa65d26fa1c3dbd6177
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327821
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Jacob DeWar <jacob.dewar@instructure.com>
closes VICE-3777
flag=student_grade_summary_upgrade
Test Plan:
- create a custom grade status
- ff: "Custom Status Labels for Submissions and Final Grades"
- http://localhost:3000/accounts/2/grading_settings/statuses
- as a teacher give a student submission the custom status
- as the graded student, go to react student grade page
- ff: "Update grade summary table to use a modern framework"
> should see custom status
Change-Id: Ibaa62aaef22df0cb7ca6c3b8926d80cb92906cc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327375
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
flag=react_discussions_post
flag=discussion_create
refs VICE-3749
previous commit missed a not sign
this commit fixes it
along with adding a sad path
and a happy path test
test plan:
- bundle exec rails c
- get a course
- @course.allow_student_anonymous_discussion_topics = false
- @course.save!
- as a teacher, verify that you can create an
anonymous discussion in the new discussion create page
- as a student, verify that you do not see anonymous
options on discussion create,
and you cannot create an anonymous discussion via graphql
(feel free to not test this as the spec does this)
Change-Id: Iecc74b2dfc32d67dd794d2c59ff50c7b4368cb0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327790
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
flag=none
The fallback English translation file has changed from I18n
so it needs to be updated or the update script will re-dirty
it every time it runs.
Test plan:
* none
Change-Id: Ia65d2793487ba1270f56e1b9a82ccf82e032ebb9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327817
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Committing code no longer auto runs the linter
Some lint errors don't get caught by Jenkins.
This commit fixes the lint error
flag=none
refs: VICE-3751
Test Plan
1. Go to the code with eslint
2. Make sure there are no linting errors
Change-Id: I09224a5fedf2c6f6e332bf5792619a5bd17c4a8d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327814
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
closes VICE-3720
flag=split_screen_view
Test Plan
1. Create a discussion
2. Create a discussion entry with a media upload
3. Verify that the media thumbnail appears correctly
4. Type in a search term that will cause that entry to appear
5. verify media is visible on search page
Change-Id: I12610706f561bdd3db021ba2a2d440d3a0b9f8e3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327508
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
Closes FOO-3190
Closes FOO-3192
flag=none
After the upgrade of canvas-lms to InstUI version 8, this list
bit of work (neither forward nor backward-compatible) needs
to get done. On components (not InstUISettingsProvider) if a
local theme override happens, the name of the prop to do that
changed from `theme` to `themeOverride`. This takes care of
that everywhere that wasn't mopped up in the "mega commit."
Also fixed up some Typescript here and there where it made
sense. (usually related to the other stuff touched)
Test plan:
* Manually inspect the UI on some feature bundles touched by
this and make sure they look correct and per design
Change-Id: Ibc5ae6d65912f0eabd8c174390c9cf0e2ad2e53d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327772
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Refs FOO-3190
Refs FOO-3708
flag=none
[fsc-max-nodes=30] [fsc-timeout=60]
[pin-commit-multiple_root_accounts=03b5f961bbaa28af3d43b0a6a2ab072654cc6468]
Uprevs InstUI and addresses all post-uprev tasks. Also now that
InstUI is fully TypeScript, a bunch of type errors appeared
which needed to be addressed.
NOTE:
This is an amalgam of g/314136 and g/326557 which will get abandoned
once this passes Jenkins and is merged.
It builds against the commit of MRA that will have to merge
concurrently with this.
Still to do: theme -> themeOverride which is a separate commit
off of this one that is ready to go.
Test plan:
* cross your fingers
* (this will need some extensive review before merging)
Change-Id: I860c3dc04d34237e32aeaa138f6c377a016ceeae
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327683
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Closes QUIZ-12124
flag=none
Test Plan:
- Make a request to fetch an active course without the
global_id include:
```
/api/v1/courses/:id/?include[]=lti_context_id
```
- Validate the response does not include a global_id
field
- Make a request to fetch an active course with the
global_id included:
```
/api/v1/courses/:id/include[]=global_id
```
- Validate global_id of the course is included in the
new global_id property of the response body
Change-Id: Ica8bfc830c52b3515821d5eb3820d83eb1fc93a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327316
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes OUT-5880
flag=none
Test plan:
- Open up outcomes page
- Open up dev tools
- Verify "Outcome Groups" is surrounded by h2 tags
(1 or 2 rows away)
- Verify "All ... outcomes" heading is surrounded by h3
(1 or 2 rows away)
Change-Id: Idff6a407b76b3ff78253756d9ec30fca8b98cf1c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327345
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wilmer Corrales <wilmer.corrales@instructure.com>
QA-Review: Jason Anderson <jason.anderson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
closes OUT-5895
flag=outcome_alignment_summary_with_new_quizzes
Test plan:
- Start Canvas, Outcomes-Service, Quiz LTI and Quiz API
- Create course with course outcome and add account outcome
- Enable "New Quizzes included on Outcome Alignment Summary Tab FF"
- Create new quiz, add quiz item and align course outcome to both
the quiz item and the quiz
- Create item bank with bank item, align account outcome to bank
item and add the item bank to the new quiz
- Click on Alignment Summary tab and verify that course outcome
displays Alignments: 2 and account outcome Alignments: 1
- Expand description of account outcome and verify that it
displays the alignment to the bank item
- Expand description of course outcome and verify that it
displays the alignment to the quiz item
Change-Id: Iec246d88dc21fd55b051f0c43c3c9816e92cb5f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327646
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Dave Wenzlick <david.wenzlick@instructure.com>
QA-Review: Dave Wenzlick <david.wenzlick@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
refs VICE-3749
flag=react_discussions_post
flag=discussion_create
IN FOLLOW_UP COMMITS:
- add is_author_anonymous e2e functionality
- add e2e tests
NOTE:
- i found that we returned a 500 when creating a discussion
in a group context instead of 400 in our REST API
this commit fixes that issue (see new controller tests)
- i also deleted redundant env vars
TEST PLAN:
- turn on discussion_create and react_discussions_post
feature flags
- as a teacher create a fully anonymous discussion
- verify it saves and works as fully anonymous
- now, create a partially anonymous discussion
- verify it saves and works as partially anonymous
- create a non-anonymous discussion
- verify it saves and works as a non-anonymous discussion
LEGACY TEST PLAN:
- use rest api to test what is in the controller tests
or just code review the controller tests
Change-Id: Ida859c47c0c0d862f008278f56fb3f381ca7824d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327459
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
because switchman doesn't keep `public` in the search path
refs ADV-22
Change-Id: I11ac81ce3a85ffd91912258c5e2f319cf1cce8a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327641
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
In newer postgres versions, this migration will fail, because of the
foreign key of `root_account_id` -> `id`. For this reason, we will
defer constraint checking when making this insert.
fixes AE-474
flag=none
test plan:
- with the fix:
- the migration completes successfully on newer postgres
- without the fix:
- the migration does not complete successfully on newer postgres
Change-Id: I1ea7b874aea4d3cae979248edafd249675fb4221
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326597
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
When the new decaying average FF and Account Mastery scales is
enabled, the default calculation method was being stored as
weighted_average. This is incorrect and should be saved as
standard_decaying_average.
closes OUT-5897
flag=outcomes_new_decaying_average_calculation
test plan:
- tests pass in Jenkins
Change-Id: I172e320b95d462fafba943313fac17f2261a03c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327650
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Anderson <jason.anderson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
flag=none
The PlannerHelper module supports these plannable_types, but our
documentation did not reflect that.
test plan:
- n/a
qa risk: low
Change-Id: I66cc9b4b28accf0dd16171ebf5529de600b6022a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327657
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
closes LF-612
flag=differentiated_modules
qa risk: low
test plan:
-go to modules, launch the tray from the first
module on the page
>expect to not see the prerequisite form
-launch the tray form a subsequent module
>expect to see the prerequisite form
-click on the drop down
>expect to see the module(s) that preceed the
current module
-choose one and click update module
>confirm the UI updates to show the pre-req in the
module's header
-launch the tray for that module again
>confirm the form reflects the current pre-req you
added upon opening the tray
-click the 'x' next to the selector
>confirm it removes your pre-req
-click update module
>confirm the UI removes your pre-req indicator
Change-Id: I3c74d1b609c2d49421d4a7b5fcc4552f5bd6a05b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327248
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Jake Oeding <jake.oeding@instructure.com>
closes INTEROP-6659
flag=none
As detailed in https://github.com/rails/rails/issues/43466, the default
behavior for parameters in a route path is:
1. disallow dots, slashes, and question marks when parsing the request
URL, so that we don't greedily include these characters (particularly
slashes) in the parameter:
- example: we don't want "/courses/123/enrollments" to be matched by
route "/courses/:course_id" (with "123/enrollments" being
picked up as course_id); it will only be matched by
"/courses/:course_id/enrollments")
- example: if the request URL "/courses/123.txt/enrollments", the
parsing stops at the "." character, so course_id will be 123 and
rails will parse "txt" as the "format"
2. no constraints are enforced when constructing a path/url with a helper.
The helper will escape these special characters in the parameter
- example: courses_path(course_id: "a/b") will be "/courses/a%2Fb"
In our API routes we want to allow dots in the parameter, so
we use the "constraints" option when creating a route. This lets us
override that default regex (the one which disallows dots, slashes, and
question marks) with one that just disallows slashes and question marks.
Using "constraints" has the following effects:
1. rails uses the regex given to parse the request URL.
- example: we use a regex (ID_REGEX) conceptually similar to just
"[^/?]+" (it also disallows ids ending in '.json', but that's
irrelevant) so a route "/courses/:course_id" would:
- match "/course/123.txt" with "123.txt" being the course_id
- would not match "/course/123/foo" (would not greedily get
"123/foo" as course_id)
2. however, using constraints also has the unwanted effect of erroring
whenever we try to use a rails helper to construct the routing with a
rails helper.
- example: courses_path(course_id: "a/b") now errors, saying "a/b"
does not meet our constraints regex. We want it to return
"/courses/a%2Fb", as this is a working path with "a/b" as the
course_id.
As detailed in [this comment](https://github.com/rails/rails/issues/43466#issuecomment-1694140836),
`constraints` is used in two places, corresponding to the effects listed
in (1) and (2) above. This commit overrides the `requirements` method,
buried deep in an ActionDispatch (rails routing) object hierarchy, to
disable effect 2 (the checking of constraints when constructing paths
using helpers). The request URL parsing (effect 1) is unaffected.
The usage of the `constraints` for the two effects can be seen in
actionpack-7.0.7.2/lib/action_dispatch/routing/route_set.rb:163:
ast.requirements = @requirements
@path = Journey::Path::Pattern.new(ast, @requirements, JOINED_SEPARATORS, @anchor)
In this commit I am effectively removing our ID_REGEX constraint from
the @requirements passed in to Journey::Path::Pattern.new().
I explored some other avenues such as modifying the route immediately
after creating it with the ID_REGEX constraint in `route()`, but the
call to super() doesn't return the latest route, so to get at the route
I have to do something like `instance_variable_get(:@set).routes.last`
Test plan:
- check enrollments API endpoint works when given a SIS ID with an
(escaped) slash. You can also try question marks (escaped) and dots
(unescaped). Example (sis_course_id "a/b?c.d"):
/api/v1/courses/sis_course_id:a%2Fb%3Fc.d/enrollments
- check another endpoint where id is the last path prefix -- that it
parses correctly the escaped slash, and you can generate a url with a
slash
- for parsing, you can check the above URL minus "/enrollments"
- for generating: from a rails console, you can use something like
Rails.application.routes.url_helpers
.api_v1_audit_course_for_course_path \
course_id: "sis_course_id:#{Course.last.sis_source_id}"
You can also go to the returns URL to make sure it works
Change-Id: Ifaade757636065a43d078067f4ff04bd25dde383
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326718
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
this should fix issues with the media player in safari
closes LF-662
flag=none
test plan:
- in a Safari browser, add some media to a page using the rce
- ensure that you can pause/play/pause again the video/audio
as expected, both in the rce and after saving the page
- ensure otherwise that the media player is still working normally
Change-Id: I7431924592b5ae2d7c33e308673a6ca7466aacc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327631
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Sarah Gerard <sarah.gerard@instructure.com>
Added temp enrollment functionality and updated Jest tests
closes FOO-3714
flag=temporary_enrollments
test plan:
- one and more enrollments are created with source_user_id
- the courses and section ids match the UI
- error shows if API call fails
- modal closes after success
- tests pass
Change-Id: Iec49176fe06520e9952254c8212462fb2a9d8f7c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325354
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Michael Hulse <michael.hulse@instructure.com>
Product-Review: Michael Hulse <michael.hulse@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
flag=discussion_create
closes VICE-3751
Test Plan
1. Create a new discussion topic with the
1a "must respond before viewing other reply" option
2. Verify that the newly created discussion topic respects the option
Note, editing the newly created topic won't accurately show this setting
Change-Id: I64a76352b5ec04faf14c35a97e2c860dc326776b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327487
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
until npm-groovy-lint is updated to fetch Java from its new location
Change-Id: Ia61f7cbd5df7ce98b757f5782639a9bd5429d200
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327610
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Build-Review: James Butters <jbutters@instructure.com>
and apply Rails/SelectMap and Rails/RedundantActiveRecordAllMethod
the offenses in User were manually fixed to maintain sharding
correctness
[skip-stages=Flakey]
[skip-crystalball]
Change-Id: I96f877ee8474655bd62a149f3aa54b312d38a5e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327334
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
fixes LF-734
flag=none
Test Plan:
- Create a sub-account (a)
- Create another sub-account (b)
- Enable C4E on both sub-accounts
- Add one course to each sub-account
- Add the same teacher to both courses
- Make both courses homerooms
- From the home tab, create a subject
- In the account selection drop-down,
select account (b)
- Check the box to sync enrollments
- Don't touch the homeroom Select, leave
the B course there
- Give the subject a name
- Click create
- Ensure the enrollments option is correct
(with B)
fixes
Change-Id: Iac379f2e60fb12cc6a712f680dcf23c5f6cd6984
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327498
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
fixes LF-628
flag=none
Test Plan:
-Create a new page
-Upload studio video
-Disable "Display media tabs"
-Access "Studio Media Options" from video
-Select "Display Text Link"
-Click "x" or "Done
*Video turns into a link
*Link opens up original video
Change-Id: Ia50bfb2bfa9f809ca5ab70867a6967c769719aab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327490
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: Jacob DeWar <jacob.dewar@instructure.com>