canvas-lms/config
viktor.szpisjak 10f47ed85e Change date shift flow for assignment and classic quizzes
Assignments and classic quizzes will date shifting now become
an initial operation instead a late update to avoid
unnecessary lifecycle hook triggers.

refs CLAB-102

flag=pre_date_shift_for_assignment_importing

test plan:
# Setup
Create a course (SC) with:
 - Assignment
 - Quiz
 - Graded Discussion
On all 3 set due date to a past date and other dates to something.

# With flag off (current behavior)
Create a new course
go to courses/{id}/content_migrations
use Copy a Canvas course
Source course should be SC
Select All content
Select Adjust events and due dates
Click remove dates
Import

Go to imported resources and verify that
due dates and other dates are gone.

Create a new course, do same import but
adjust dates instead of removing them.
Verify dates were adjusted as expected.

# With flag on
Enable pre_date_shift_for_assignment_importing
Create a new course
Test both scenarios of Adjust events and due dates
Expect same results

# Race condition
Ensure flag is on
Testing the race condition with SubmissionLifecycleManager
Create a new course
Create a student user, add to course, accept invite

in AssignmentImporter#try_to_save_with_date_shift
add "binding.irb" on line 607

open terminal
cd canvas-lms
docker compose stop jobs
docker compose run jobs (do the same in another terminal)
bundle exec script/delayed_job run (in both shells)

Import SC into new course
one of the job processes will pick up the job
and give you an irb
"item.save_without_broadcasting"
"SubmissionLifecycleManager.recompute(item)"
"item.submissions" should be empty or should have no graded subs

Change-Id: Ide39a552b625c099c0c87fc6166cd9bd37a0ab15
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/357178
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rajmund Csehil <rajmund.csehil@instructure.com>
QA-Review: Rajmund Csehil <rajmund.csehil@instructure.com>
Product-Review: Rajmund Csehil <rajmund.csehil@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
2024-09-18 14:22:20 +00:00
..
environments drop Rails 7.0 support 2024-07-05 15:30:54 +00:00
feature_flags Change date shift flow for assignment and classic quizzes 2024-09-18 14:22:20 +00:00
initializers Revert "remove WeakParameters" 2024-09-11 21:01:15 +00:00
llm_configs Lower the limits on LLM calls for rich content text 2024-07-09 17:32:55 +00:00
locales update uk translation 2024-09-11 14:16:00 +00:00
saml
teams finish colocating QUnit test files 2024-06-13 11:40:57 +00:00
amazon_s3.yml.example
application.rb reduce connection-establishment queries 2024-08-20 20:42:19 +00:00
boot.rb ensure we're running the correct bundler version 2024-05-20 17:27:36 +00:00
bounce_notifications.yml.example
brakeman.ignore update brakeman.ignore 2024-08-21 19:12:24 +00:00
brakeman.yml
brandable_css.yml
browsers.yml
cache_store.yml.example bundle update redis 2023-09-28 15:49:47 +00:00
canvas_cdn.yml.example
canvas_rails_switcher.rb give a more helpful error message when you're trying to run an unsupported rails version 2024-07-30 20:38:42 +00:00
code_ownership.yml Rename collaborate to vice 2023-07-27 17:51:08 +00:00
consul.yml.example
copyright-template.js
credentials.test.yml
crystalball.yml
cutycapt.yml.example
database.yml.example add persistent test shards to database.yml.example 2024-01-04 19:55:37 +00:00
delayed_jobs.yml.example
docker-compose.override.yml.example remove CommonJS from k5uploader 2024-02-22 20:18:45 +00:00
domain.yml.example
dynamic_settings.yml.example update development configuration for bedrock and sagemaker 2024-08-20 19:11:30 +00:00
dynamodb.yml.example
environment.rb rails 7.1: set up environments correctly 2024-04-01 14:40:13 +00:00
external_migration.yml.example
file_store.yml.example
incoming_mail.yml.example
local_cache.yml.example
logging.yml.example
marginalia.yml.example
memcache.yml.example
notification_failures.yml.example
notification_service.yml.example
offline_web.yml.sample
outgoing_mail.yml.example
periodic_jobs.yml.example
puma.rb Set Puma worker boot timeout 2024-08-27 15:27:32 +00:00
redis.yml.example bundle update redis 2023-09-28 15:49:47 +00:00
routes.rb feat: add Alert to handle disallow issue 2024-09-13 15:48:10 +00:00
saml.yml.example
security.yml.example
selenium.yml.example
sentry.yml.example
session_store.yml.example
spring.rb
statsd.yml.example
styleguide.yml
testrail.yml.example
twilio.yml.example
twitter.yml.example
vault.yml.example
vault_contents.yml.example Add example attachments_secret to vault contents example 2024-08-22 19:59:37 +00:00