Commit Graph

49166 Commits

Author SHA1 Message Date
Evan Battaglia acca709218 AGS: handle 0-point pass/fail assignments
fixes INTEROP-6977

If an assignment is pass-fail and has 0 points possible, handle it as
Basic Outcomes done (see possibilities in test plan and in ticket
comment).

Test Plan:
- Have a course with at least one student and an LTI tool
- In the UI, make two LTI 1.3 assignments with Complete/Incomplete
  (Pass/Fail) grading:
  - One should have points possible = 0, call it "Zero Points Possible".
  - One should have non-zero points possible -- say 8 -- and call it
    "Eight Points Possible".
- Find the LTI Line Item IDs of the new assignments, e.g.
  `Lti::LineItem.last.id`
- Get an LTI token for the tool you created the assignments with, at
  e.g. web.canvas-lms.docker/api/lti/advantage_token?tool_id=123
- Send an AGS score request to give the student a score, and in an
  Canvas console check the student's Submission's "score" and "grade".
  Test the following cases. The endpoint can be hit with HTTPie with the
  following command line. (If you don't have HTTPie, get it now!)
    http web.canvas-lms2.docker/api/lti/courses/2/line_items/213/scores \
      Authorization:Bearer\ abc123abc123abc123
      userId=5 activityProgress=Completed gradingProgress=FullyGraded \
      timestamp="2021-12-16T11:58:59-0700" \
      scoreMaximum=6 scoreGiven=3
  Test the following cases for scoreMaximum and scoreGiven and make sure
  the submission's "score" and "grade" end up as the following:
    - Zero Points Possible, scoreMaximum = 0, scoreGiven = 0
      Result: submission score=0, grade=incomplete
    - Zero Points Possible, scoreMaximum = 0, scoreGiven > 0 (e.g. 3)
      Result: submission score=0, grade=complete
    - Zero Points Possible, scoreMaximum > 0, scoreGiven = 0
      Result: submission score=0, grade=incomplete
    - Zero Points Possible, scoreMaximum > 0, scoreGiven > 0
      Result: submission score=0, grade=complete
    - Eight Points Possible, scoreMaximum = 0, scoreGiven = 0
      Result: request will error (422)
    - Eight Points Possible, scoreMaximum = 0, scoreGiven > 0
      Result: request will error(422)
    - Eight Points Possible, scoreMaximum > 0, scoreGiven = 0
      Result: submission score=0, grade=incomplete
    - Eight Points Possible, scoreMaximum > 0 (e.g. 6), scoreGiven > 0 (e.g. 2)
      Result: submission score=max (e.g. 8), grade=complete

Change-Id: I9829e719de43fa53ac11a1015fccbce10306ab96
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282207
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: Evan Battaglia <ebattaglia@instructure.com>
2022-01-11 19:08:42 +00:00
Luis Oliveira 62214d9ced Enforce “Don't let teachers modify course availability dates” for imports
fixes LS-2915
flag=none

test plan:
- Check “Don't let teachers modify course availability dates” in the account settings
- Create 2 courses (A and B)
- In course A, set the participation to course.
- In course B, set the participation to term.
- Impersonate a non-admin teacher teacher.
- Perform a course copy content migration from course A to course B.
- Observe that the participation in course B is unchanged.

Change-Id: I3f296fdafaec1f118469b37359110dd5935b7d36
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282482
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>
2022-01-11 17:34:18 +00:00
Jorge Arteaga 3bef1bdd6d show migration limitation alerts only in certain pages
fixes QUIZ-9185
flag = none

test plan:
- import a classic quiz with migrate to NQ enabled
- wait for the import to finish
- navigate to the following pages:
  * /courses/:id
  * /courses/:id/assignments
  * /courses/:id/quizzes
  * /courses/:id/modules

- observe that there's a message about the
limitations of the quiz migrations
- Any other page should not display a migration
 message. (Open SpeedGrader an observe that the migration
  message doesn't show up)
- close the alert and refresh the page
- the alert should not appear again

- repeat the same process with a course copy
and a quiz migration

Change-Id: Ic03e0beb8fc1356687fadf866e828e63cbc9883f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282337
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
2022-01-11 17:33:32 +00:00
Jackson Howe 8ebf534205 Load planner in subject properly for observer
Pass the current (not the initial) observed user into the planner
for initialization - sometimes the planner isn't initialized
immediately, so pass the current user. Also decide whether the user
is observer based off the observer list instead of role (the role
may call a user an observer even if they're not linked to any
student).

closes LS-2913
flag = none

Test plan:
 - Create a user with the following enrollments (and no extra ones):
   - Teacher in any active course
   - Student in an active k5 course
   - Observer who is not linked to any student in an active k5 course
 - Visit the dashboard and expect the schedule tab to work as normal
 - Visit the course where enrolled as a student and expect the
   schedule tab to work there

Change-Id: If0067ee3f51d2b554dab934fcbfb4f4a70bcfad5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282298
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>
2022-01-11 16:14:22 +00:00
Jason Gillett 103c8511aa Reveal author information of non-anonymous authors in preview
fixes: VICE-2394
flag=discussion_anonymity

Test Plan:
1. Navigate to an anonymous discussion
2. Quote a teacher
3. Verify that the teacher name appears in the preview
4. Quote a student
5. Verify that anonymous name appears in preview

Change-Id: I55b43cb7c7c416e757f838204e00d1802ee9380a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282450
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-01-11 16:03:54 +00:00
Ahmad Amireh 657b27fc0b fix gerrit notation for pushing rce translations
refs MAT-393

the rce translations job had been failing to push the patches because of
a syntax error in the push command, see g/281732

~= test plan =~

the package-translations job is functional again (might need to merge
this first)

Change-Id: Id7e61fd965dd8c93db450b01ab1456a962ee5187
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282477
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jon Scheiding <jon.scheiding@instructure.com>
QA-Review: Jon Scheiding <jon.scheiding@instructure.com>
Product-Review: Jon Scheiding <jon.scheiding@instructure.com>
2022-01-11 03:22:09 +00:00
Jeremy Stanley 2050e5a165 rubocop: reconfigure Style/SoleNestedConditional
to allow the modifier form, e.g. this is okay

  if condition_a || condition_b
    do_something unless condition_c && condition_d
  end

and is in fact preferable to

  if (condition_a || condition_b) && !(condition_c && condition_d)
    do_something
  end

which is what rubocop would turn it into otherwise

Change-Id: I1b917e3ea5149379f22e70294d263b713b3b9b35
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282475
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-10 23:36:08 +00:00
Ahmad Amireh b37ae0a5d5 run gulp before attempting to write brand configs
there is an implicit dependency that i missed between BrandConfig
records and BrandableCSS in that attempting to create those records
requires BrandableCSS to be able to resolve asset paths, which can only
happen if we have the "rev manifest" that is generated by Gulp

so in case you have no `public/dist` folder and Gulp has never run
before, we were immediately trying to write the BrandConfig records
without the inputs being available, and it made it awkward when the
error advised you to compile the assets while you were trying to

test plan
---- ----

- run `rm -r public/dist`
- run `rake canvas:compile_assets` and make sure it succeeds

Change-Id: Ib641ff9669f73c764cf3fd5df8ecf2af87d052e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282474
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2022-01-10 22:47:11 +00:00
Chawn Neal 959400cdeb implement AttachmentDisplay Buttons enable add attachment to De
flag=react_discussion_design
fixes VICE-2110

Test Plan:
 1) Create a new entry and add an attachment.
 2) the new entry should show an attachment.
 3) Edit an existing entry, and add an attachent.
 4) the entry should now show an attachment.

Implemented:
  - add fileId to updateDiscussionEntryMutation FE.
  - only allows one file upload.
  - toggles Attach vs filename.
  - can remove file attachment.
  - uses file_upload api.

 Not Implemented yet:
  - does not implement optomistic response.
  - does not save with draft feature.

Change-Id: Ie3afc3dfcb8397aaad5954410ace74b2665f51a2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281438
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
2022-01-10 22:43:23 +00:00
Manoel Quirino Neto c9a82aea84 Fix outcome result calculation when nil outcome.points_possible
closes OUT-4796
flag=none

Test Plan:
  Jenkins passes

Change-Id: I801be74f4f27a0080c26da175a2881aac84c46a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281511
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Marcus Pompeu <marcus.pompeu@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2022-01-10 22:27:03 +00:00
Jared Crystal bfc3a2da49 defer take_quiz js_bundle
fixes QO-834
flag=none

test plan:
 - in chrome 96:
 - create a timed quiz and take it as a student
 - under any normal circumstances, you should never see
   a connectivity error message
 - the reported bug is difficult to reproduce, so ensuring
   taking timed quizzes works normally is probably sufficient

Change-Id: I5c5b7308e272ad05778d1cd9940fe488091395b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Jared Crystal <jcrystal@instructure.com>
2022-01-10 22:25:09 +00:00
Jeremy Stanley aa4a4b1b76 lint adding not-null constraint
test plan:
 - create a database migration and add it to a commit
   (no need to push the commit or run the migration))
   that tries to add a not-null constraint to a column. e.g.

   change_column_null :table, :column, false

 - run script/rlint
 - you should be warned to use `disable_ddl_transaction!` if
   this is not present in the migration class definition
 - you should be warned to use DataFixup::BackfillNulls to
   backfill null values if this is not present

   (note that the linter can't actually tell if your arguments
   to BackfillNulls are correct, because it takes an AR class name
   instead of a table name and the cop has no way of linking
   the two, and also the arguments are dynamic in many places;
   it's just looking for the presence of that call)

closes DE-944

Change-Id: I8b79f8d0a44ae1bbf8de86c1a7e89c50cfe2b702
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282137
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-10 21:22:12 +00:00
Jeremy Stanley 5d257d5e7a rubocop: move add-index non-transactional warning to the class node
which is nicer because
(1) that's where the `disable_ddl_transaction!` needs to be, and
(2) the message doesn't preempt the `algorithm: :concurrently` note

test plan:
 - add a migration to a commit (no need to actually run it or push
   the commit) that adds an index to an existing table, and does
   not use `algorithm: :concurrently` or `disable_ddl_transaction!`
 - run script/rlint and you should see both warnings
   (the transaction one at the top, under the class, and the
   algorithm one on the index line)

flag=none
refs DE-945

Change-Id: Ibfc55b26387d3520c2de9fde5491869a9033b2c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282461
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-10 21:09:43 +00:00
Juan Chavez ebe0e98103 Use timezone on items' dates for links and docs
fixes MAT-542

flag=none

test plan considerations:
It's needed to use dates that could
change depending of timezones, so I suggest
to use 11:59 PM & Mountain Time (US & CA)

test plan 1:
- Create assignment with a due date
Ex. Jan 13, 2022, 11:59 PM ("2022-01-14T06:59:59Z")
- Navigate to RCE instance
- Click course links and open the tray
- Click assignments
> Verify that the created assignment
shows January 13, 2022

test plan 2:
- Upload a doc to course files
- Change its upload date via DB
Ex. Jan 13, 2022, 11:59 PM ("2022-01-14T06:59:59Z")
- Navigate to RCE instance
- Click course documents and open the tray
> Verify that the upload date
shows January 13, 2022

Change-Id: I477ab45c5830df496fcfeb3d44326e34f54c417e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282236
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Joe Hernandez <joe.hernandez@instructure.com>
QA-Review: Joe Hernandez <joe.hernandez@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
2022-01-10 21:04:34 +00:00
Aaron Ogata 0c805a1148 force base Canvas module to be loaded before require_dependency
refs DE-929

Change-Id: I301046ff740170a4107f7065eb62e1a1c5afa2ed
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282455
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-01-10 21:02:56 +00:00
Omar Gerardo Soto-Fortuño 0e2387ee77 Create AnonymousPostSelector component
refs VICE-2367

flag=react_discussions_post
flag=discussion_anonymity

test plan:
  - Specs pass
  - Open storybook
  - Verify that AnonymousPostSelector matches design

qa risk: low

Change-Id: I8e1d5df6ab08b0d56747074e04f08d4c6c23126f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282438
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-01-10 19:55:08 +00:00
Jeremy Stanley 211af6ddb1 lint adding index to existing tables
test plan:
 - create a commit containing a migration that adds an index
   to a table with add_index (no need to actually run the migration
   or push the commit)
 - run script/rlint and verify:
   1. it wants `disable_ddl_transaction!` in the migration class
   2. it wants `algorithm: :concurrently` in the index line
   3. it doesn't care about 1 and 2 if the table was also created
      in the same migration
 - repeat with `add_reference` instead of `add_index`, except for
   part 2, the option is spelled `index: { algorithm: :concurrently }`
   and if you put `index: false` it doesn't complain (but it still
   does if you put `index: true` or omit the option, as it defaults
   to true)
 - repeat with a `change_table` block using `t.index`,
   e.g. `t.index [:columns], algorithm: :concurrently` is fine,
   without the option results in the warning. (but note that
   inside `create_table` the option is not needed!)
 - repeat with a `change_table` block using `t.references`
   (as with `add_reference`, `index: false` is fine, as is
    `index: { algorithm: :concurrently }`, but `index: true`
    or no `index` option result in the warning.)

flag=none
closes DE-945

Change-Id: If95ce2d930bdf41d0bc863a065f2447ec01d2271
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282227
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-10 19:25:05 +00:00
Jeremy Stanley 36a6009934 lint rename_table
test plan:
 - create a migration that renames a table and `git add` it
   (no need to actually run the migration or push the commit)
 - run script/rlint
 - it should tell you that renaming a table requires a multi-
   deploy process and link you to our migration best practices page
 - if your migration uses the process from that page and drops a view
   before renaming the table, no warning is issued
 - it doesn't warn you about the `down` half of the above pattern

flag=none
closes DE-947

Change-Id: Ic19807af210940df60e8b72952db297d71ac7dfa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282292
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-10 19:22:29 +00:00
Ed Schiebel 61216dd42b fix pace plans page focus management
The date input for projected start and end are not fully
keyboard accessible, but there's a ticket for that

closes LS-2837
flag=pace_plans

test plan:
  - go to /courses/:id/pace_plans in a course with a pace plan
  - using only the keyboard, navigate around the page
  > expect it all works as expected
  - expecially make sure you change an assignment duration using
    arrow keys or typing in a new valuee
  > expect focus to stay on the number input as you change duration
  > don't expect focus to stay on the cancel or publish buttons unless
    you've merged LS-2937

Change-Id: I1a9c19c3fde22d97cdff686f97784b7aef674503
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282377
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: Ed Schiebel <eschiebel@instructure.com>
2022-01-10 19:20:17 +00:00
Ed Schiebel e2508e908d Keep focus on pace plan footer buttons after clicking
before, because the buttons were rendered differently whether there
was a tooltip or not, focus was lost after cancelling or publishing
a plan. this change always renders the tooltip so the footer's DOM
remains the same, but disables the tooltip if it's not necessary

closes LS-2937
flag=pace_plans

test plan:
  - in a course with a pace plan, go to the pace plan page
  - hover or focus on Cancel or Publish
  > expect a tooltip telling you you can't
  > expect a screenreader to read the tooltip
  - click the button
  > expect nothing to happen
  > expect focus to remain on the button
  - change something in the plan
  - hover or focus on Cancel or Publish
  > expect no tooltip
  > expect a screenreader to only tell you you're on
    the button
  - click the button
  > expect the action to take place
  > expect focus to stay on the button

Change-Id: Ibe4c0e6b1cdbf919f97a1617417c706fef464117
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282269
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: Ed Schiebel <eschiebel@instructure.com>
2022-01-10 19:20:03 +00:00
Drake Harper 8a2084d51c Add avatar url to anonymous selector
refs VICE-2359
flag=partial_anonymity

Test Plan:
 - turn on redesign, anonymity, and partial anonymity ff
 - as a student go to reply to a partially anonymous discussion
 > should see anonymous reply selector
 - if you have an avatar set
   > should see avatar for non anonymous option
 - if you have no avatar set
   > should see initials

Change-Id: I9c050311ae8e578276f56d8c08951793e8408518
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282358
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2022-01-10 19:13:40 +00:00
Robin Kuss 66542d3835 spec: new pace plans selenium tests
Closes LS-2925

Test Plan: passes Jenkins

Change-Id: Id4bcc27f56bc43c60894256dd4111f0a6955bf8d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282349
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
2022-01-10 19:06:47 +00:00
Mysti Lilla febdd72ba7 Sort object hash for identity
closes INTEROP-7063
flag=none

We're adding a column to context external tools
so that we can dedupe off of it.  For that, we
need a way to verify that two (potentially
deeply nested with arrays and hashes) are
the same

Test plan
- Run the database migration and make sure
  the column shows up
- On a tool, calculate the identity_hash
- Save it to the new column and make sure
  it saves correctly
- Try some tools that should be identical
  and make sure that their hashes are
  identical
- Try some tools with minute differences
  in the identity fields and make sure
  we are seeing differences in the hash

Change-Id: Ie6d15320aa7c6ccb04f760f8dd15ea513f954404
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282071
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mark Starkman <mark.starkman@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Migration-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-10 17:58:43 +00:00
Jacob Burroughs 67bbf8e44d Bump min mobile timeout to 2 days
fixes FOO-2654

test plan:
- You can't save a mobile session timeout < 2 days
- You can save one >= 2 days

Change-Id: I45c9e70b0dbdec2eb58caf04910b73c1cea311ee
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282357
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: Jacob Burroughs <jburroughs@instructure.com>
2022-01-10 17:43:19 +00:00
Syed Hussain 5ce9a85e55 Add/View feedback for non digital assignments
closes EVAL-2113
flag=assignments_2_student

Test Plan:
Things to look for during QA (Badge for unread comments, button text
either "Add Comment" or "View Feedback", grade)

With the flag enabled:
1. As a teacher, create a non-digital assignment (e.g. No Submission)
2. As a student, goto the assignment and see that "Add Comment" button is
available and you can add a comment
3. As the teacher, add a comment to the assignment using Speedgrader
4. As the student:
- when you go to the assignment, the feedback tray should open by default
and you should see the teacher's comment
- Refresh the page and you should see the "View Feedback" button
5. As the teacher, grade the assignment
6. As the student, Offline Score should be visible beside the feedback
button
7. Repeat steps 1 - 6  for another Online (e.g. Text Entry) assignment

Change-Id: I51401d0b0f351543c7e93df7eef4a65f8d3b5099
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282180
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Jody Sailor
2022-01-10 17:29:19 +00:00
Jonathan Guardado 982a3f6657 Calendar header buttons navigation with VO/Safari
Screenreader-only class has position: absolute which makes the
element be removed from the page flow, causing the VO to jump to the
first element each time the warning loses the focus, this PS sets the
warning position to "relative", so the element can stay in the normal
page flow

fixes: LS-2898
flag= none

Test plan:

- With Safari go to the Calendar.
- Enable VO and navigate over the Calendar header options using the
arrow keys.
- When you get the warning that recommends the agenda usage
- Notice that it jumps to the next element correctly

Change-Id: I29327133196f0b20be4f728fb746399119325c8f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282374
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2022-01-10 17:28:51 +00:00
Jeremy Stanley 8c3479eae4 don't specify a chromedriver version in example yml
after g/255045, we don't need to override the version jenkins uses
to do local selenium testing anymore, so simply removing the line
saves the trouble of updating it every time there's a new version
of chrome

test plan:
 - remove chromedriver_version from config/selenium.yml
 - you should be able to run selenium specs locally

Change-Id: Ia2ccd9fbe6ed518adbcc9c6cf0755e4e22f4507a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279761
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-10 17:27:27 +00:00
Isaac Moore c8f74a2316 Add option to enable Sentry breadcrumbs
Breadcrumbs are a feature in Sentry to display events that occurred
leading up to an error. The Ruby/Rails SDKs support a logger for outgoing
HTTP requests, and a logger for all messages logged to the Rails logger
by the app. Because Canvas logs raw SQL queries, this second logger is
not enabled.

Settings related to this change:

- `sentry_backend_breadcrumbs_enabled`: whether or not breadcrumbs are
  collected, with a default value of `false`

refs DE-922
flag=none

test plan:
- make sure to check out the correct patchset in the
  `gems/plugins/uuid_provisioner` directory (see the tag below for ref)
- ensure you have Sentry running at sentry.docker and have a DSN
  configured in `config/sentry.rb`
- perform an action in Canvas which results in an outgoing HTTP request
  being made, and raises an exception later in the same request
- confirm that, by default, no breadcrumbs are associated with the
  exception
- change the `sentry_backend_breadcrumbs_enabled` setting to `true`
- restart rails and job servers
- repeat the action which results in the outgoing HTTP request and
  exception
- confirm that breadcrumbs are now associated with the exception

[pin-commit-uuid_provisioner=735c2102fb0020ac5aa80734a323bf08322d002d]

Change-Id: Idbee616b923936099de1a9601085e179ad993931
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282307
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
2022-01-10 17:20:21 +00:00
Caleb Guanzon a4de9530a1 update last_reply_at only if > 1.minute
fixes VICE-2207
flag=discussion_redesign
- the existing specs that i updated
still works the same way as before.
i just made the discussion and the entry
unique to those tests

TEST PLAN:
- create a discussion
- but a byebug in app/models/discussion_entry.rb
  right after line 308
- save and restart the rails server
- add a reply to the discussion when more than 1 minute
from the last reply
- verify that byebug pauses
- continue byebug

- now, quickly add a reply to the discussion (make sure less than
1 minute has passed)
- verify that the reply posts successfully without byebug pausing

Change-Id: Icb8e4ef8c1d42707cc28da16430928ee8faae8bd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chawn Neal <chawn.neal@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
Product-Review: Chawn Neal <chawn.neal@instructure.com>
2022-01-10 17:20:13 +00:00
Martin Yosifov fcecfcf439 Fix misc UI issues in Improved Outcomes Management
closes OUT-4780
flag=improved_outcomes_management

Test plan:
- Enable Improved Outcomes Management FF
- Enable Account Level Mastery Scales FF
- Go to Outcomes > Account
- Select outcome group with outcomes via TreeBrowser
- Select few outcomes and click Outcomes Selected footer link
- Verify that \/ of the popup points to the outcomes/bullseye
icon and not to the Outcomes Selected footer link
- Resize browser to mobile view and click Add -> Find
- Select Account Standards via Group Selector
- Verify that there is no space between Account Standards
and the horizontal separator below

Change-Id: I3ffa5f659d73f4f8772910a4eb5077b3040f535e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282301
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Ben Friedman <ben.friedman@instructure.com>
2022-01-10 17:17:51 +00:00
Isaac Moore 3e748c1c7e Upgrade Sentry SDKs
This commit replaces `sentry-raven` with the more modern Sentry SDKs.

Settings related to this change:

- `sentry_disabled`: completely disables Sentry, in case anything goes
  sideways (defaults to `false`)

refs DE-922
flag=none

test plan:
- make sure to check out the correct patchset in the
  `gems/plugins/uuid_provisioner` directory (see the tag below for ref)
- create a new project in Sentry (it may be easiest to set up Sentry to
  run locally; check out `getsentry/onpremise` on GitHub for setup
  details; it's not too onerous. note that you will need to add
  `VIRTUAL_HOST` and `VIRTUAL_PORT` to the `nginx` container in that
  `docker-compose.yml` in order to have your Sentry accessible via Dory
  at `sentry.docker`)
- configure `config/sentry.rb` with your DSN
- restart rails and job servers
- confirm that, by default:
  - any errors raised in controllers appear in the "Issues" section
  - any errors raised in jobs appear in the "Issues" section
  - user context associated with issues includes user IP and global ID
  - job issues contain context from the job under the "INST-JOBS" section
- set `sentry_disabled` setting to true and restart rails/jobs servers
- confirm that the app/jobs start fine and there are no issues
  - also confirm that Sentry is disabled (no errors received)
- remove `config/sentry.yml` and restart rails and jobs servers
- confirm that the app/jobs start fine and there are no issues

[pin-commit-uuid_provisioner=735c2102fb0020ac5aa80734a323bf08322d002d]

Change-Id: Id0fa4b4ee57ab812cd75d21d2e8ab5e21177af1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279454
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-01-10 16:58:07 +00:00
Jenkins ff4e0dface update nn translation
Change-Id: I468b6c43ee8f02499949d1eb622f1e2c02514992
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282388
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-01-08 05:47:56 +00:00
Jenkins b666c1e77a [i18n] Update package translations
Change-Id: Id8c9239d147432444ef59eae08251b472e3324b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282387
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-01-08 04:58:18 +00:00
Omar Gerardo Soto-Fortuño 59cc4b0e88 Add courseID to the createDiscussionEntry mutation
closes VICE-2387

flag=react_discussions_post
flag=discussion_anonymity

test plan:
  - Specs pass
  - Go to an anonymous discussion topic.
  - As a teacher, reply to the anonymous discussion.
  - The author info should show after creating the entry.

qa risk: low

Change-Id: I306d32ad640a5c2371e182f76fd4f912790e2303
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282283
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>
2022-01-07 19:05:44 +00:00
Eric Saupe 45085786d1 Add logging for recurring calendar events api
refs LS-2666
flag=none

test plan:
- n/a

Change-Id: I809e128046762d86faf64e803b231b83eaab75b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282277
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2022-01-07 18:25:13 +00:00
Eric Saupe 99dab8525b Fix date squishing
There were situations where the end date of a pace plan was getting
additional end days to pad the pace plan length twice which caused
edge case issues. Here we are removing one of those end date additions
to keep dates ending correctly.

fixes LS-2887
flag=pace_plans

test plan:
- Using the `compress_dates` end point of PacePlansController try
various start and end dates with varying durations on items
- Expect dates to always end on the given end_date
- Expect durations to be compressed as needed but always end on the
given end_date

Change-Id: I0cace2c99fe7b7e78bba5f4ab5d7a2b2c72a05e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281629
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>
2022-01-07 18:24:48 +00:00
August Thornton 1b9a1b1bf2 add descriptions to LTI granular permissions
closes FOO-2638
flag = granular_permissions_manage_lti

Test plan:
• At the root account level, enable the feature flag for:
  "managing LTI tools in Account or Course contexts"
• Navigate to `accounts/self/permissions`
• Search for "Manage LTI"
• Select the grouped granular permission
• Verify the popout menu to the right correctly and accurately
  describes what each granular permission is responsible for and
  any additional considerations

Change-Id: I7f38a89ec27f420a036a68a332f73ab8f479babe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282350
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: August Thornton <august@instructure.com>
2022-01-07 17:46:51 +00:00
Martin Yosifov 45a8b92be7 Update EditOutcomeModal to use calculations component
closes OUT-4835
flag=individual_outcome_rating_and_calculation

Test plan:
- Enable Improved Outcomes Management FF
- Enable Individual Outcome Rating and Calculation FF
- Disable Account Level Mastery Scales FF
- Go to Account > Outcomes
- Select an Outcome and click on Kebab menu -> Edit
- Verify that in the Edit Modal there is a form for
selecting calculation method
- Select calculation method Decaying Average and enter
an invalid parameter (e.g. 999)
- Verify that error message appears below the parameter
field and that Save button becomes disabled
- Change parameter to a valid value (between 1 and 99)
- Verify that error message disappers and that Save
button becomes enabled
- Click on Save button and verify that the outcome is
updated with the selected calculation method/parameter
(devTools -> Network view response to graphql mutation)
- Go to Account > Course
- Add an Account level outcome to the course, select that
outcome via Tree Browser and click Kebab menu -> Edit
- Verify that in the Edit Modal the calculation method and
parameter are displayed but cannot be changed
- Disable Individual Outcome Rating and Calculation FF
- Enable Account Level Mastery Scales FF
- Go to Account > Outcomes
- Select an Outcome and click on Kebab menu -> Edit
- Verify that in the Edit Modal there is no form for
selecting calculation method

Change-Id: I1c4b57be5f4aaf2df3ae41b2ef052757c63eb161
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/280535
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Manoel Quirino <manoel.quirino@instructure.com>
Product-Review: Ben Friedman <ben.friedman@instructure.com>
Reviewed-by: Manoel Quirino <manoel.quirino@instructure.com>
Reviewed-by: Marcus Pompeu <marcus.pompeu@instructure.com>
2022-01-07 16:35:08 +00:00
balazs.komaromi c2999cb957 Fix removing leader when enrollment gets deleted
Closes SOS-2594

Test plan:
 - Do a SIS import, assigning two users to a course
 - Create a group in the course, add both users
 - Make one of the user the leader of the group
 - Delete this user's enrollment with another SIS import
 - User should be removed from the course
 - User should not be the leader of the course anymore

flag = none

Change-Id: I0f430779663c16adb341337d089018d2d35f0388
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282107
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Richard Zana <rzana@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Balazs Komaromi <balazs.komaromi@instructure.com>
Product-Review: Balazs Komaromi <balazs.komaromi@instructure.com>
2022-01-07 08:00:42 +00:00
James Butters 456401b4bb Revert "fix i18n unloading/reloading failures"
This reverts commit 41be4400c6.

Reason for revert: breaking the Account>Settings page

Change-Id: Iaa1f96ddf0c232f65c915556e234bc03c9768c32
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282035
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2022-01-07 02:12:19 +00:00
August Thornton df4ec9f5d1 fix canAddEdit usage when using manage lti perm granulars
refs FOO-2397
flag = granular_permissions_manage_lti

Test plan:
• At a root account level enable the feature flag for:
  "managing LTI tools in Account or Course contexts"
• Verify an authorized user with manage_lti_add permission has the
  ability to add an LTI app via External Apps configurations
• Verify an authorized user with manage_lti_add permission disabled
  *does not* have the ability to add an LTI app via External Apps
  configurations

Change-Id: I4d3fd4447b560a3894bd908acfcb42c7f8228968
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282300
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2022-01-07 00:14:34 +00:00
August Thornton e634f3d453 account for custom roles when filtering group perms
fixes FOO-2554
flag = none

test plan:
• Create a custom role with limited permissions
  • Note: easy way would be to base off StudentEnrollment
• Go to rename the custom role
• Once the custom role has been renamed you should see all the
  previously disabled permissions remaining disabled
• Refresh the page and ensure permissions that were previously
  disabled, remain disabled
• Verify this behavior for both Course and Account Role tabs
  within /permissions
• Default roles and custom roles should behave similarly
• See associated Jira for more info

Change-Id: I4b30ea6b7e3775cb565352d1a7986d6598b0ca79
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282272
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2022-01-07 00:09:47 +00:00
Gonzalo Penaranda 14544ba024 Fix equation image resize for quizzes
fixes MAT-327
flag=none

Test Plan:
 - As a teacher, create a new quiz and
   create a new question (any type)
 - Once RCE loads, insert a new
   equation and save the changes
   on question and quiz
 - When clicking on 'Preview' or
   'Keep Editing this Quiz' (teacher)
   there is the equation image with the
   size assigned at first when creating
   the question
 - This also applies for the student when
   taking the quiz

Change-Id: Ifcd84f1f9fc2f4c17c88e2a0192c5b63c91982f5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282121
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob DeWar <jacob.dewar@instructure.com>
QA-Review: Jacob DeWar <jacob.dewar@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
2022-01-06 22:56:44 +00:00
Jeremy Stanley c682e9946b disable Performance/CaseCmp
because it gives bad advice. `str.casecmp("foo").zero?` is not only
less clear than `str.downcase == "foo"`, but it is not Unicode-aware

(ironically, `str.casecmp?("foo")`, with the question mark, _is_
Unicode-aware)

Change-Id: I1abd17f4a09b205073998c5cf9e89cb4bd85ad6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282294
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2022-01-06 22:44:23 +00:00
Aaron Ogata b51d0f3a77 Revert "help fix RespondusSoapEndpoint getting unloaded"
This reverts commit 5ebb4a62fa.

Reason for revert: maybe broke build

Change-Id: Ied06d05de2f04eaccb98bb27acc30f6cfbf8bb3a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282034
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-01-06 22:26:56 +00:00
Spencer Olson edd934c8ef recalculate grades when a course changes terms
closes EVAL-2157
flag=none

Test Plan:
1. Verify that changing the enrollment term on a course causes grades
   for that course to get recalculated (you can verify this by having
   differently weighted grading periods associated with two different
   enrollment terms, so that changing the term on the course results in
   different total grades for students).

Change-Id: I3b82f71673483a6db1290d25e094a0e73fcb8c58
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281725
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Syed Hussain <shussain@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
2022-01-06 22:10:51 +00:00
James Butters 5ebb4a62fa help fix RespondusSoapEndpoint getting unloaded
flag = none

Change-Id: Ica343736fa2cdc31307b57c2aed841659d1fea52
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282274
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2022-01-06 20:38:15 +00:00
Ahmad Amireh e61659ffdf refactor RevManifest to simplify the CDN interface
refs FOO-2520
flag = none

[pin-commit-multiple_root_accounts=2a9bf89895f38df6bf8f54828af66aced594abf0]

revisit the API for resolving asset names to their (real)path on disk,
because adding to the existing logic to support an alternative bundler
made things hard to understand.

This patch brings a new simplified interface Canvas::Cdn::Registry to
query assets and resolve their location.

- Registry#include?(path) tells whether a realpath points to a static
  asset
- Registry#statics_available? tells whether static assets are available
- Registry#scripts_available? tells whether JS assets are available
- Registry#scripts_for(bundle) provides the realpaths to all the JS
  files in the specified bundle
- Registry#url_for(name) provides the realpath to the static asset

The Registry is a good place to house the BrandableCSS resolving logic
in the future for even more consistency. It can also support an
alternative bundler internally without leaking. Eventually, it would be
nice to have it as a gem.

CHANGES
-------

- helper "font_url_for()" has been removed as it was a duplicate of
  existing logic; instead use "font_path(...)" to achieve the correct
  result. As a result, BrandableCSS is no longer querying Gulp's
  manifest.
- preloaded fonts are now aware of the asset host and work for CDN
- InfoController uses the new Registry API to tell whether Gulp and
  Webpack have produced their assets successfully
- ApplicationHelper no longer re-computes the base URL for JavaScripts,
  now only the Registry is concerned with that
- ?optimized_js query parameter is no longer supported as it has no real
  benefit now that we have access to sourcemaps on production
- ENV['USE_OPTIMIZED_JS'] is now more consistent as there is a single
  source of truth for it. The Registry can be instantiated with
  {environment: "production"} to point to the optimized version of the
  scripts.
- "css:compile" task no longer writes BrandConfig records to the DB,
  that is now done as part of the "compile_assets" task, which you can
  opt out of doing by setting COMPILE_ASSETS_BRAND_CONFIGS=0

TEST PLAN
---- ----

- load your dashboard and verify all the assets are loaded correctly
- set up a CDN, restart your Rails server and reload the dashboard
  - verify all assets are loaded from the CDN
  - verify the Lato fonts are pre-loaded from the CDN
- (optional) add custom JS to a sub-account and visit it
  - verify the custom JS is loaded and evaluated *after* Canvas's main
    javascript bundles

Change-Id: I8198de747cdd5892d6a831cb6c61ba0ef9afa789
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276537
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
2022-01-06 20:20:40 +00:00
James Butters 41be4400c6 fix i18n unloading/reloading failures
we have been getting some failures in rspec tests related to
i18n getting unloaded and not reloaded. This should help
resolve that issue.

flag = none

Change-Id: I411e2bd452299bb3eacfeb32b51395284d103599
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282273
Reviewed-by: Aaron Ogata <aogata@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>
2022-01-06 20:17:15 +00:00
Jackson Howe b118972be4 Fix missing submissions for cross-shard users
A couple of issues made the missing_submissions endpoint return odd
results for cross-shard users. The submissions were being computed
across shards, but only the latest shard's submissions were returned.
Additionally, local ids relative to the current shard but not the
user's shard passed in to course_ids were not parsed correctly.

closes LS-2930
flag = none

Test plan:
 - In 2 different (trusted) shard accounts, create a set of grading
   periods where one period is closed and another is current
 - Associate these grading period sets with a k5 course in each account
 - In each course, create an assignment whose due date falls in the
   current period, and one with a due date in the closed period
 - Open the dashboard as a student enrolled in both courses
 - Expect to see the missing assignments from the current period in
   the schedule tab (but not the missing assignments from the closed
   period)

Change-Id: Icd0eec5382827a6330fcead1c10f6e97b1793804
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282112
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>
2022-01-06 19:38:16 +00:00