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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>