why:
- To remove FF cruft
- To simplify the code. We were using errors to redirect on missing
scopes, but explicitly redirecting for all other oauth param issues,
which was confusing. We don't do that anymore.
closes INTEROP-7446
flag=none
test-plan:
- The tests cover all of these cases, as there should be no user/API
changes, just code removal/simplification.
Change-Id: I1a5e1f6e07e517d936748fc41a38dd2e7ee8f49d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330832
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
because writing to the shadow record is deprecated, and the
primary record might not be deleted. instead follow the
code path where a non-deleted clash exists and generate a
new random lti_context_id
test plan: specs
flag=none
fixes CANVAS-MDMF
fixes CANVAS-MAEC
fixes CANVAS-MAH9
fixes CANVAS-MAGM
Change-Id: Ic511d0bad3a90b1299fca5ed5944125b91f6ecfe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330990
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes FOO-3963
closes FOO-3964
flag = temporary_enrollments
test plan:
• in rails console create a temporary enrollment pairing
TemporaryEnrollmentPairing.create!(root_account: Account.default)
• should be created with a default workflow_state of "active"
• temporary enrollment pairings are soft-deletable
• they have a one to many association on enrollments to be used for
tracking the enrollments that were created from the pairing
during temporary enrollment creation (TempEnrollAssign) modal
Change-Id: I75083d3163af13a609b15d984313f4dc8ec944a8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330991
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jason Perry <jason.perry@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
closes VICE-3874
flag=discussion_checkpoints
Test Plan:
1. Create a checkpointed discussion in a rails console via
DiscussionTopic#create_checkpoints. Set the points_possible on the
checkpoints to 3 and 7, and the required replies to 1.
2. Verify the "parent" assignment has points_possible of 10:
topic.reload.assignment.points_possible
3. Update the points_possible on the first checkpoint from 3 to 4, and
then verify the points_possible on the parent are updated from 10 to
11:
topic.reply_to_topic_checkpoint.update!(points_possible: 4)
topic.reload.assignment.points_possible # should be 11
Change-Id: Ic4f3472a624faab68c989daade6f8cc7f55c4496
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330996
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
A conversation participant should not be able to exist
However we have run into a few instances where they do
This commit handles them gracefully
refs VICE-3725
flag=react_inbox
Test Plan
1. Test the new test case before and after changes
Or
1. Disable foreign key restraints
2. Delete a conversation in a way that preserves
the participant
3. verify orphaned participant exists
4. open inbox, no error should occur
Change-Id: I16b067bddf72d12a92d8f97dbb4abdcfd4e491f8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330792
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
flag=restrict_quantitative_data
closes EVAL-3585
Test Plan:
- Enable restrict_quantitative_data flag
- create a course
- go to courses/:course_id/settings#tab-details
- check 'Restrict view of quantitative data' and click update
- copy the course
- the copy should has 'Restrict view of quantitative data'
checked
Change-Id: I6e5ad1bd34a20ddfb73fa2eef27a73a7da72b77f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330507
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
Reviewed-by: Samuel Lee <samuel.lee@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
why:
* this gets loaded on every page and the HTML
isn't currently cached at all
* cache for a day to start
closes INTEROP-8276
flag=lti_platform_storage
test plan:
* enable the lti_platform_storage flag
* open the browser network tools and filter by
post_message_forwarding
* load and reload a canvas page a couple of times
* this page should be cached after the first time
* check the Cache-Control response header
* it should have 86400 in it
* bonus:
* open a rails console and run
`Setting.set('post_message_forwarding_ttl', 2.days.seconds.to_s)`
* restart your canvas
* disable the network cache briefly to request the page again
* enable cache again
* check the Cache-Control header on the page
* it should have 172800 in it now
Change-Id: I6f9387a92ba56a1825284abb0ead3369e4c83e90
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330965
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs OUT-5928 OUT-5929
flag=none
Test Plan:
- Tests pass in Jenkins
When specifying a section, errors were occurring when
a student with "rejected" enrollment status existed within
the section. This changes the api to include these students
with the rest of the section
Change-Id: I60859d0f8593d3537d3df4ba72ef4fbbf2e699ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330581
Reviewed-by: Chrystal Langston <chrystal.langston@instructure.com>
QA-Review: Chrystal Langston <chrystal.langston@instructure.com>
Product-Review: Chrystal Langston <chrystal.langston@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs LF-887
flag=none
Test plan
- Test with g/330353 and g/330025
- Set up a BP course with a child
course linked to it
- Create a file in the parent course
and lock the BP content for that
file
- View the child file in the api
with include=blueprint_course_status
as a query param
- Verify you can see the restricted_
by_master course stuff
Change-Id: I81f61fd7c37aa1f65aea1c4e80591310c29f24aa
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330028
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
QA-Review: Luis Oliveira <luis.oliveira@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
closes VICE-3873
closes VICE-3875
flag=discussion_checkpoints
Updates the following attributes on the "parent" submission when a
checkpoint submission is updated:
- grade
- graded_at
- graded_anonymously
- grader_id
- grade_matches_current_submission
- published_grade
- published_score
- posted_at
- score
- submission_type
- submitted_at
- updated_at
- workflow_state
Some fields are aggregated across all checkpoint submissions (like score),
whereas some fields have special rules (e.g. posted_at is only set on the
parent if all checkpoint submissions have a posted_at).
Test Plan:
- For score and published_score, ensure that grading a checkpoint stores
the aggregate value on the parent submission
- For grade and published_grade, ensure that grading a checkpoint sets the
value to be the grade interpretation of the score/published_score. For
instance, if a checkpointed discussion displays the grade as Letter Grade
and the two checkpoints are worth 5 points each, grading each checkpoint
with a grade of 5 should result in an "A" being stored on the parent
submission.
- For grader_id, graded_at, and graded_anonymously, ensure that the value
on the parent submission matches the value on the most-recently-graded
checkpoint
- For grade_matches_current_submission, ensure that the value on the parent
is:
- true if the student has submitted for at least one checkpoint and has
not been graded on any checkpoints
- false if there's any checkpoint where the student submitted after they
were graded
- true if the student was graded on both checkpoints after submitting
- For posted_at, ensure that the value is:
- nil if both checkpoints have not been posted to
- the most recent posted_at of the checkpoints, if they have both been
posted to
- For submission_type, ensure the value is:
- the same as the checkpoints' submission_type values, if they match
- nil otherwise
- For submitted_at, ensure the value is:
- the most recent checkpoint submitted_at when both checkpoints are
submitted
- nil otherwise
- For updated_at, ensure that the value is equal to the most recent
updated_at of the checkpoint submissions
- For workflow_state, ensure that the value is:
- the same as the checkpoints' workflow_state values, if they match
- 'unsubmitted' otherwise
Change-Id: I8e5fe14d2c9e0cdedccab0e9867bad22613a4753
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330497
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Reviewed-by: Aaron Suggs <aaron.suggs@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
instead of trying to delete them, which can run afoul of
any number of foreign key constraints
test plan:
- have a user enrolled in a course
with an assignment that accepts submissions
- merge the user into another user
- as that user, submit an assignment
- make sure the deleted merge source user has an
unsubmitted submission (generally they don't, but
they did often enough to cause support week headaches,
possibly due to weird timing issues)--
e.g. use `find_or_create_submission`
- split the users
- the submitted submission should return to
the restored user, and the unsubmitted one
should go to the source user
flag=none
closes FOO-3815
Change-Id: Ie94d43ec44c4812fe515435e55cf865b5ac873a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330831
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes VICE-3886
flag=discussion_checkpoints
test plan:
- Specs pass.
- Reply to Entry checkpoint submission
should be marked as submitted only
when all the entries required have
been posted.
qa risk: low
Change-Id: I99554bffa9570bcd265bf6cb5010f45be951abbe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330863
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
closes LF-669
flag=differentiated_modules
test plan:
- with the flag on
- in a course, create a module with an assignment in it
- in the assign to tab, create an override for the module
- test out both ADHOC and section overrides
- ensure the module is published
- in a rails console, run
EffectiveDueDates.for_course(course, assignment_in_module).to_hash
- whatever overrides you set for the module should be reflected
Change-Id: Ie0ba63300c54827f4e965410a0353c67a367765c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330582
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: Sarah Gerard <sarah.gerard@instructure.com>
closes OUT-5932
flag=outcome_alignment_summary_with_new_quizzes
Test plan:
- Start Canvas, Outcomes-Service, Quiz LTI and Quiz API
- Create course with outcome
- Create new quiz and align the outcome to the quiz
- Select Alignment Summary and filter "With Alignments"
- Verify that outcome is displayed with 1 alignment
- Stop sqs2outcomes container in Outcomes-Service
- Delete the Quiz from Canvas
- Select Alignment Summary and filter "With Alignments"
- Verify that outcome is not displayed
- Select Alignment Summary and filter "Without Alignments"
- Verify that the outcome is displayed with 0 alignments
Change-Id: I2513377c7aab1ea4a983302fecd8af80196ad3d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329320
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Angela Gomba <angela.gomba@instructure.com>
QA-Review: Angela Gomba <angela.gomba@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
closes OUT-5857
flag=improved_lmgb
Students within LMGB can now be filtered by 3 categories
- Students Without Assessments
- Inactive Enrollments
- Concluded Enrollments
Test Plan:
- Automatic: Unit tests are sufficient and pass in Jenkins
- Manual:
- Enable LMGB
- Create a course with the following:
- At least one outcome
- At least one assignment aligned to the outcome
- At least 4 students:
- One student with Concluded Enrollment
- One student with Inactive Enrollment
- One student with no assement (did not do assignment)
- One student that is active
- Open LMGB and select dropdown menu in the "Students" box
- Ensure that all three options are enabled by default
- Toggle options in the menu and ensure that the
corresponding student is shown/hidden.
- Ensure that the loading spinner is shown after selecting
an option in the menu
- Ensure that any students with concluded or inactive
status are given a label next to their name
Change-Id: I2c420b8b40d19abec004ca883e676bed28893de8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/327216
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: Kyle Rosenbaum <krosenbaum@instructure.com>
flag=react_discussions_post
fixes VICE-3822
test plan:
- specs pass, or follow the steps
of the selenium test that was changed
Change-Id: Ic73cc77ac607b4c854f2643615302ca29c2754f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330808
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Closes FOO-3955
Refs EVAL-3613
Closes FOO-3820
Refs FOO-3947
flag=none
There's mount/unmount bug in <Tray> that was causing
some heartburn, this fixes that.
This InstUI fix exposed some broken tests which were
checking for a Tray to no longer be open; because a
tray closing is a transition, it's necessary to wait
for it to close in an asynchronous test... checking
for that immediately cannot be expected to work due
to the transition, but was accidentally working in
some cases.
Two entire Selenium specs became very flaky as a
result of this version bump; they were just skipped
for now since they're rather complex and it wasn't
obvious how to fix them. The EVAL ticket was created
so that that issue could be addressed later.
test plan:
* automated tests pass
Change-Id: I81374d0c8e783a7b0285c2cf9506153e2194fceb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330333
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Based on slack conversation, this can be removed now. Leaving it around
is confusing because it is confusing to see non-Site Admin keys in Site
Admin (SA).
This change will not affect hosted Canvas because the flag is already on
at the Site Admin level
flag=none
Test plan:
- have a developer key in Site Admin and in a non-Site Admin root
account.
- go to the Developer Keys page in Site Admin and observe that only the
Site Admin key is sohwn
Change-Id: I0e12ed68436d8900302e9c8c6a25eec53a9cf72b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330701
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Steve Mcgee <steve.mcgee@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Note: if the job fails to enqueue on some shard for the max number of
retries, it will still leave some shards unprocessed. But since this is
an intermittent error that's happened once in the fast 3 months, and we
have backoff in the jobs (I think?) I'm guessing that won't happen and
isn't worth the complexity. It would look something like this:
last_error = nil
Shard.with_each_shard(Shard.in_current_region) do
delay(**enqueue_args).manage_external_tools_on_shard(*args)
rescue => e
# not even sure we want an error report if it's semi-expected???
error_report_id = Canvas::Errors.capture(exception_or_info)[:error_report]
end
raise Delayed::Job::RetriableError, "Error report id: #{error_report_id}" if error_report_id
Test plan:
- have a site admin developer key with some tools installed
- in DeveloperKey#manage_external_tools_multi_shard_in_region,
right before the delay() line, add the following:
STDERR.puts "DEBUGRETRY1!"
Rails.logger.error "DEBUGRETRY1!"
unless $debugretry
STDERR.puts "DEBUGRETRY2!"
Rails.logger.error "DEBUGRETRY2!"
$debugretry = true
raise PG::ConnectionBad
end
- Edit the developer key
- Run jobs and check that the job outputted "DEBUGRETRY2!" (if you want
you can also check for a DEBUGRETRY1 after that)
- Check that the tool(s) were updated
closes INTEROP-8238
flag=none
Change-Id: I7e72669db54bacf56786f0aeaabde32f136b8580
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329798
Reviewed-by: Steve Mcgee <steve.mcgee@instructure.com>
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Steve Mcgee <steve.mcgee@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
why:
* rendering school.instructure.com/post_message_forwarding
that just redirects to sso.canvaslms.com/post_message_forwarding
is double the amount of requests needed
* directly request sso.canvaslms.com and skip the intermediate step
closes INTEROP-8270
flag=none
test plan:
* in the browser network tools, filter for "post_message_forwarding"
requests
* load any Canvas page
* notice that a post_message_forwarding request is sent to your
main Canvas domain (`canvas.docker` is used as an example)
* if you have MRA set up:
* find the definition of LoginRedirectController#sso_host in the MRA
repo
* comment it out and replace it with your primary shard domain,
like `canvas.docker`
* load any Canvas page from your second shard
* the post_message_forwarding should be for `canvas.docker`
and succeed - no CORS errors
* in the console tab, switch context to the forwarding frame,
likely titled Canvas LMS (but not the top frame)
* in that context, `window.ENV.PARENT_ORIGIN` should be your
second shard's domain
Change-Id: Id255a511c7b225308d5846f7d2fdd079cd0e8068
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330486
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Paul Gray <paul.gray@instructure.com>
QA-Review: Paul Gray <paul.gray@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
previously, syllabus links with query params and / or
fragments in the URI were flagged as invalid links
by the course link validator
fixes LF-844
flag=none
test plan:
-insert a syllabus link into user content via
the course link tray in the RCE
-add a query param to the end of the linke (e.g. "?wrap=1")
-make another syllabus link but add a fragment (e.g. "#dogs")
-run the link validator
>confirm neither of these links are flagged as invalid
Change-Id: I31754a161453fc278a71e756c2af908ef19c598d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330655
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: Jake Oeding <jake.oeding@instructure.com>
this commit changes the modules page to use
the same react component/ui as the assignments page
fixes EVAL-2920
flag=none
test plan:
- create a modules within a course
- add an assignment to the module
- add a peer review to the assignment
- publish the module
- as a student, view the module
- verify that the peer review is visible
Change-Id: Ieaf50451beafeb589ab21b2664649b570fa02fce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328715
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
upon looking at the selenium tests, there are no
setting toggles or feature flag toggles triggerred
before any of the discussion new edit tests run,
this means that discussion edit and discussion new
edit are both testing the same default edit page
Change-Id: If1081ad00b91b354fd665692b13d72e1dd9c4787
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330668
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
Previous to this change, there was a race condition that resulted in
some ContextModuleProgressions not getting relocked (i.e.,
workflow_state='locked') when requested. This resulted in students
having access to module items without completing the prerequisites.
When a module is updated, we call `invalidate_progressions` on the
module, which sets `current: false` on the module's progressions
synchronously, then creates a job to evaluate progressions. This job
eventually restores `current: true`. Sometimes the UI immediately
sends another request to relock progressions. This sets
`workflow_state: 'locked'` on progressions where `current: true`.
In some cases though, the job which restores `current: true` (created
in the previous request) will not have completed by the time this
request happens, and thus progressions with `current: false` aren't
relocked like they should be.
This commit relocks all non-locked progressions when a relock is
requested, including ones where `current: false`. This ensures that
all progressions get locked, even if the previous job hasn't completed.
The `relock_progressions` method creates another job to evaluate
progressions after locking, so all progressions will eventually get
restored as `current: true`.
closes LF-885
flag = none
Test plan:
- If in development, set `synchronous: false` in
config/initializers/delayed_job.rb:228 and restart rails (jobs must
run asynchronously to reproduce the race condition)
- Create a course
- Publish it
- Enroll a student
- Create 2 modules
- Create an assignment in each module
- Publish the modules/assignments
- As the student, visit the modules page
- Add a submit requirement to module 1; click re-lock
- Add module 1 as a prerequisite to module 2; click re-lock
- As the student, visit the modules page again
- Expect the second module to be locked
Change-Id: I6a6c50908ad146c090fa4295653e5fe575cc3532
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330598
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>
These tests have not failed in multiple jenkins runs and local
flakey spec testing.
Closes LF-931
Test Plan: passes Jenkins
Change-Id: I7d108d9585a64161a601176bb22c18e9eab54024
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sarah Gerard <sarah.gerard@instructure.com>
QA-Review: Sarah Gerard <sarah.gerard@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
ContextExternalTool#find_external_tool uses the content_id to find the
external tool regardless of the external_url value. By removing the
content_id when the external_url is changed this lets that method fall
through and use the url to either find the external tool via the url.
fixes LF-884
flag=none
test plan:
- Add an ExternalTool as a module item
- Verify via the database that the last ContentTag has an external_url
and content_id
- Using the modules frontend, change the external url to another
external tool's url
- Verify via the database that the ContentTag has changed to the other
tool's content_id
- Verify the link shows the other ExternalTool related to the new url
- Repeat the same steps but using the api to change the url by
hitting PUT /api/v1/courses/:course_id/modules/:module_id/items/:item_id
- Verify the content id was changed to the other tool's id
- Repeat the steps but with a URL that is not associated with an ExternalTool
- Verify the content_id is set to nil
Change-Id: If43083d7ef55453229c55e7247fd99ef9f9007dd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330496
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
I think this may be due to instui8 being fully typescript,
though I don't understand why it would affect native react
prop type validations. This commit eliminates the new
prop warning console error messages.
The real solution to this is to convert CanvasConentTray
and all the related components to typescript, but that
is way beyond the scope of this ticket.
closes LF-786
flag=none
test plan:
- in a dev environment (so you get react console messages)
- open a page with the rce
- open dev tools
- in the RCE, open the CanvasContentTray
(e.g. Documents -> Course Documents)
> expect the tray to open w/o bad prop error messages in
the devtools console
- repeat for images and media
Change-Id: I3d211eaade0f4a27fde446dfeafc27edcfb4558e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328124
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>
closes VICE-3798
flag=discussion_create
Test Plan:
- create an assignment via graphiql
- with gradingStandardId
- create a discussion topic
- with assignment
NOTE:
the assignment field will always return null
because the actual assignment creation will
be done in VICE-3799
Sample for discussion topic with assignment:
mutation MyMutation {
__typename
createDiscussionTopic(input: {contextId: "1",
contextType: "Course",
assignment: {
name: "GQL Test Assignment Create 1",
courseId: "1",
pointsPossible: 15
},
title: "GQL Test Assignment Create 1"
}) {
discussionTopic {
_id
title
assignment {
_id
}
}
}
}
Change-Id: Ib86f69307d6d2c91888cc88aab6d48d1fc163c44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330480
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
Product-Review: Jason Gillett <jason.gillett@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
fixes FOO-3960
flag = temporary_enrollments
Test plan:
• Create a temporary enrollment for a recipient
• Delete that enrollment
• Verify that the recipient is not returned in the search results
when filtering by "Show only temporary enrollment recipients"
on the People page
• This also includes provider filtering
Change-Id: Icc6d957faa852d434d1cc063788b0459ced5080a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330585
Reviewed-by: Michael Hulse <michael.hulse@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
flag=discussion_create
fixes VICE-3811
test plan:
Announcement Create
- default: Cancel, Publish
- check delay posting, leve date blank, (must show cancel, publish)
- now set available from date to future, (must show cancel, save)
- set available from date to the past, (must show cancel, publish)
- uncheck delay posting, (must show cancel, publish)
Discussion Create
- as student, must show cancel, save (save publishes the discussion)
- as a teacher, must show cancel, save and publish, save
- - save must save as unpublished
- - save and publish must save as published
- - save with an available from date in the future must
save as unpublished
- - save and publish with an available from date in tge future
must save as workflow_state: post_delayed
Discussion Edit
- you only see cancel and save buttons
for published discussions
- teachers see cancel, save and publish, and
save for unpublished discussions
- teachers only see cancel and save for
published discussions
Discussions/Announcements any state
- cancel sends you to the place you came from
Change-Id: I57945b78afd26f5024351c7bd0b303cd2027a80b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330478
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
fixes LF-807
flag=none
Test Plan:
- Course copy a non BP course into another
- Opt for a selective import
- Check blueprint settings are not among
the content options
- Course copy a BP course into a another course
(the second course can have no students)
- Opt for a selective import
- Check blueprint settings are among the content
options present in the modal
Change-Id: I0f986c1bb55f45e2441fe4274375e074afa5a335
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330250
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
closes VICE-3836
flag=discussion_checkpoints
Test Plan:
1. Enable the "discussion_checkpoints" root account feature flag.
2. Create a graded discussion
3. In a rails console, create two checkpoints for the discussion:
```
discussion_topic.assignment.checkpoint_assignments.create!(
context: discussion_topic.course,
checkpoint_label: CheckpointLabels::REPLY_TO_TOPIC,
due_at: 2.days.from_now
)
discussion_topic.assignment.checkpoint_assignments.create!(
context: discussion_topic.course,
checkpoint_label: CheckpointLabels::REPLY_TO_ENTRY,
due_at: 3.days.from_now
)
```
4. As a teacher, verify you can grade an assigned student for the
"reply to topic" checkpoint with the following request:
POST /courses/:course_id/gradebook/update_submission
submission: {
assignment_id: <the discussion topic's assignment_id>,
user_id: <an assigned student's ID>,
grade: 10,
checkpoint_label: "reply_to_topic"
}
The student's submission for the "reply to topic" assignment should
be graded:
```
a = discussion_topic.reply_to_topic_assignment
a.submissions.find_by(user: <the student's ID>).score # should be 10
```
5. As a teacher, verify you can grade an assigned student for the
"reply to topic" checkpoint with the following request:
PUT /api/v1/courses/:course_id/assignments/:assignment_id
/submissions/:user_id
submission: { posted_grade: 5 },
checkpoint_label: "reply_to_topic"
The student's submission for the "reply to topic" assignment should
be graded:
```
a = discussion_topic.reply_to_topic_assignment
a.submissions.find_by(user: <the student's ID>).score # should be 5
```
Change-Id: I09d141af0278d5a5d3134f458cc698e0fec60db2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330375
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Reviewed-by: Jason Gillett <jason.gillett@instructure.com>
fixes VICE-3849
flag=discussion_create
Test Plan:
0) specs pass.
1) update via ui or graphqli
3) The ticket was broad, so this is base update mutation
with implemented in the ui.
- We should note inconsistencies with old update.
-- depending on that we can update this ticket to
accomodate.
-- otherwise we can create new tickets for additonal
complicated arguments.
Change-Id: I5f5ae4587fa4c0edcb71b71caa7414ac1f3e2455
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329726
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Gillett <jason.gillett@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
flag=anonymous_grading_with_new_quizzes
test plan:
- with flag on, show anonymous grading for new quizzes
- with flag off, hide anonymous grading for new quizzes
Change-Id: I4b3b00ddb4bd3977b60325f1699247878ccc0d50
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330493
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Samuel Lee <samuel.lee@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
fixed error where the speed grader would not show the updated status
pill after changing the status of a student when the student did not
have a submission for that assignment.
fixes EVAL-3526
flag=custom_gradebook_statuses
test plan:
- ensure custom grade statuses are enabled and you have two created
- create/go to an assignment where a student doesn't have a
submission
- open that assignment in speed grader for that student
- change the status of the grade in the following ways:
- change it from no status to a standard status
- change it from a standard status to no status
- change it from a standard status to a different standard status
- change it from a standard status to a custom status
- change it from a custom status to a standard status
- change it from a custom status to a different custom status
- change it from a custom status to no status
- change it from no status to a custom status
- ensure that the status pill is updated correctly in all cases
without needing to refresh the page
Change-Id: Idafd7753112decd20598c71bfaa562260eb0b064
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/328649
Reviewed-by: Cameron Ray <cameron.ray@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
add the custom status pills to the submission details page in old
assignments view, following formatting of other standard status
pills
closes EVAL-3544
flag=custom_gradebook_statuses
test plan:
- ensure a2 is disabled for the course
- add a custom status and assign that status to a user's
submission
- act as that user and go to the grades page, then click
on the assignment that you gave them the custom status for
- in this submission details page, ensure there is a grey pill
with the status's name in full uppercase
- if the student submitted something, the status pill will be
next to the submission time under the assignment name
- otherwise, it will be under the assignment name, where the
submission time usually would be
Change-Id: If6aec1d3a64baff11543d3f962e7cd58b86af19d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329555
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
add custom status pills to the a2 assignment view where the other
standard status pills currently exist
closes EVAL-3545
flag=custom_gradebook_statuses
flag=assignments_2_student
test plan:
- enable custom gradebook statuses and assignments 2 student view
- add a custom status
- assign a custom status to a student's submission
- act as the student and go to the a2 assignment view for that
assignment
- ensure that the name of the custom status is displayed in the
status pill in all uppercase and with a gray color
Change-Id: Ia59a25207bd7b7613e656f80c2e067c3bb24294c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329527
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Christopher Soto <christopher.soto@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
flag=hide_zero_point_quizzes_option
closes EVAL-3415
Test Plan:
- Create a New quizzes assignment with 0 points.
- Enable option “Do not display in gradebook or the student's grade
page“.
- import the new quiz into another course
- Edit the assignment and ensure the “Do not display in gradebook or the
student's grade page“ is still enabled.
Change-Id: I18c78f4f263c6ef4078c515f652255cf751ba506
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/329558
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Christopher Soto <christopher.soto@instructure.com>
Reviewed-by: Derek Williams <derek.williams@instructure.com>
QA-Review: Derek Williams <derek.williams@instructure.com>
Product-Review: Ravi Koll <ravi.koll@instructure.com>
This reverts commit 9360fcdb85.
Reason for revert: this caused more problems than it solved, including breaking tools. We will look to cut down on these requests in other ways.
Change-Id: I4589c63c7cf3a974f5943e41adcf67eb02cdb144
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/330431
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Xander Moffatt <xmoffatt@instructure.com>