canvas-lms/spec/models
Spencer Olson 03ef5d7d77 fix staleness issues with cached_due_date
closes CNVS-36401

test plan:

1. Add an indivdual student override for a student on an assignment.
   Verify the cached_due_date on the submission is updated to reflect
   the override due date (assuming there aren't other overrides for
   that user on the assignment that have a more lenient due date).

2. Remove an individual student override for a student on an
   assignment. Verify the cached_due_date on the submission is updated
   and no longer matches the due date on the override that was removed
   for the student.

3. Enroll a student in 2 sections in a course (Section 1 and Section
   2). On an assignment, add a section override for Section 1 and an
   individual student override for the student. The section override
   should have a more lenient due date than the individual student
   override. Then remove the student from Section 1. The cached_due_date
   on the submission for the assignment should be updated. It should no
   longer reflect the due date from the Section 1 override and should
   now reflect the due date for the individual student override.

Change-Id: I046eb6a468f61af905d96eb1b2a6e41efebc6b8e
Reviewed-on: https://gerrit.instructure.com/109005
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-28 16:01:47 +00:00
..
account_authorization_config rely solely on entity id in account settings, and not on the AAC 2017-04-12 15:59:36 +00:00
alerts spec: switch to regular rspec-mocks `anything` 2017-01-21 04:00:12 +00:00
assignment Add OriginalityReport URL to Speed Grader 2017-01-04 19:38:39 +00:00
assignments Fix negative needs_grading_count 2017-01-11 20:55:41 +00:00
attachments cache 'false' values in adheres_to_policy 2015-06-22 15:58:28 +00:00
auditors spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
broadcast_policies don't double-send submission notifications to teachers 2017-04-07 16:12:06 +00:00
conditional_release Add mechanism for toggling tutorials 2017-03-13 15:00:08 +00:00
content_migration include home page announcement limit in course copy 2017-04-13 19:37:24 +00:00
courses deterministic described classes, refs SD-1969 2017-01-04 21:07:07 +00:00
discussion_topic fix discussion materialized view rendering with track tags 2016-10-12 15:58:47 +00:00
enrollment Great Expectations, fixes SD-2065 2017-02-13 17:25:09 +00:00
epub_exports Set up controllers for web zip export API 2016-12-20 20:36:38 +00:00
exporters Extend content_export_complete live event with a qti export 2017-03-15 15:10:22 +00:00
group_categories deterministic described classes, refs SD-1969 2017-01-04 21:07:07 +00:00
importers don't copy turnitin/vericite assignment settings unless enabled 2017-02-15 20:03:15 +00:00
incoming_mail link to community docs in unlinked channel bounce message 2016-03-29 15:49:19 +00:00
live_assessments spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
lti Add submisison lti api to restricted capabilities 2017-04-19 18:01:36 +00:00
master_courses master courses: fix master tag use_default_restrictions 2017-04-26 18:45:17 +00:00
messages deterministic described classes, refs SD-1969 2017-01-04 21:07:07 +00:00
moderated_grading Great Expectations, fixes SD-2065 2017-02-13 17:25:09 +00:00
page_view spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
polling spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
quizzes set boolean values to false before saving if nil 2017-03-28 19:51:46 +00:00
users deterministic described classes, refs SD-1969 2017-01-04 21:07:07 +00:00
wiki_pages spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
access_token_spec.rb spec: de-dup spec descriptions, fixes SD-2181 2017-03-03 22:52:02 +00:00
account_authorization_config_spec.rb federated attributes support for Facebook 2016-09-02 19:25:36 +00:00
account_notification_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
account_spec.rb let admins without lti management rights see tools 2017-04-18 16:08:19 +00:00
account_user_spec.rb new roles 2014-10-31 19:44:14 +00:00
active_record_base_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
alert_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
announcement_spec.rb spec: de-dup spec descriptions, fixes SD-2181 2017-03-03 22:52:02 +00:00
appointment_group_spec.rb restrict instructor notifications for appointments by section 2017-03-17 15:38:27 +00:00
assessment_question_bank_spec.rb fix deadlocks when generating quizzes from question banks 2017-01-04 20:49:18 +00:00
assessment_question_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
assessment_request_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
asset_user_access_spec.rb update icons on roster usage report 2017-01-24 22:44:21 +00:00
assignment_configuration_tool_lookup_spec.rb Destroy subscription when tool is dissociated 2017-03-23 19:31:35 +00:00
assignment_group_spec.rb Merge branch 'master' into dev/weighted-grading 2017-02-28 16:36:42 -06:00
assignment_override_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
assignment_override_student_spec.rb fix staleness issues with cached_due_date 2017-04-28 16:01:47 +00:00
assignment_spec.rb use effective_due_dates in grade calculator 2017-04-20 17:54:01 +00:00
assignment_student_visibility_spec.rb set default values for booleans on various tables 2017-02-22 18:17:59 +00:00
attachment_spec.rb fix copying attachments on local storage 2017-04-20 23:41:43 +00:00
big_blue_button_conference_spec.rb spec: switch to regular rspec-mocks `anything` 2017-01-21 04:00:12 +00:00
bookmark_service_spec.rb Fix Diigo API Calls 2014-10-28 17:00:50 +00:00
bounce_notification_processor_spec.rb fix parsing of SQS bounce notifications 2017-01-29 02:08:51 +00:00
brand_config_spec.rb Generate JavaScript file file for brand configs 2017-02-17 21:05:18 +00:00
calendar_event_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
canvadoc_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
cloned_item_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
collaboration_spec.rb block inactive students in group conferences or collaborations 2017-02-14 13:34:04 +00:00
collaborator_spec.rb Restrict collaboration membership by context 2017-01-05 17:43:46 +00:00
communication_channel_spec.rb send MFA codes via SMS when possible 2017-04-25 16:25:57 +00:00
content_export_spec.rb Extend content_export_complete live event with a qti export 2017-03-15 15:10:22 +00:00
content_migration_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
content_participation_count_spec.rb prevent grading if submission is due in closed grading period 2016-12-08 21:01:07 +00:00
content_participation_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
content_tag_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
context_external_tool_spec.rb Handle Unicode whitespace in tool launch URLs 2017-03-14 16:02:44 +00:00
context_module_progression_spec.rb re-evaluate discussion entries when adding module requirement 2017-02-07 13:43:33 +00:00
context_module_spec.rb Stop creating context module progressions for non-enrolled users 2017-02-28 17:12:26 +00:00
context_spec.rb make Context.get_account work with CourseSections 2016-01-18 21:08:51 +00:00
conversation_batch_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
conversation_message_participant_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
conversation_message_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
conversation_participant_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
conversation_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
course_date_range_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
course_progress_spec.rb spec: remove bullet_instructure gem 2017-01-10 19:45:39 +00:00
course_section_spec.rb fix course section recompute final score to not use singleton 2017-04-06 20:51:25 +00:00
course_spec.rb add late_policies table and LatePolicy model 2017-04-11 20:01:44 +00:00
crocodoc_document_spec.rb spec: de-dup spec descriptions, fixes SD-2181 2017-03-03 22:52:02 +00:00
custom_data_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
delayed_message_spec.rb rip out more polymorphic shims 2016-01-11 17:40:03 +00:00
delayed_notification_spec.rb rip out more polymorphic shims 2016-01-11 17:40:03 +00:00
developer_key_spec.rb don't allow the default developer key to be deleted by normal means 2017-03-22 21:24:46 +00:00
discussion_entry_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
discussion_topic_participant_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
discussion_topic_spec.rb allow course admins to see concluded group discussion posts 2017-04-24 18:55:55 +00:00
enrollment_spec.rb fix staleness issues with cached_due_date 2017-04-28 16:01:47 +00:00
enrollment_state_spec.rb default lock_version on enrollment states 2017-03-27 16:45:25 +00:00
enrollment_term_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
eportfolio_entry_spec.rb fixes timestamp on eportfolio page 2015-02-26 22:00:17 +00:00
eportfolio_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
epub_export_spec.rb Fix link for offline export notifications 2017-04-07 21:25:53 +00:00
error_report_spec.rb log user_id in error report creation 2017-02-15 18:29:34 +00:00
external_feed_spec.rb allow deleting external feeds that have created announcmenets 2015-02-11 21:45:05 +00:00
external_integration_key_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
external_tool_collaboration_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
feature_flag_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
folder_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
google_docs_collaboration_spec.rb Restrict collaboration membership by context 2017-01-05 17:43:46 +00:00
gradebook_csv_spec.rb bring back shoulda-matchers and associated specs 2017-01-06 22:28:27 +00:00
gradebook_upload_spec.rb gradebook importer files through S3 2016-02-05 16:06:02 +00:00
grading_period_group_spec.rb remove feature flag and place on grading period set 2017-03-15 19:54:16 +00:00
grading_period_permissions_spec.rb Get rid of multiple_grading_periods feature flag 2017-01-25 20:35:18 +00:00
grading_period_spec.rb Recompute course score when deleting a weighted grading period 2017-04-17 21:59:47 +00:00
grading_standard_spec.rb add scores table 2016-12-28 20:11:54 +00:00
group_category_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
group_leadership_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
group_membership_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
group_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
kaltura_media_file_handler_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
late_policy_spec.rb add late_policy controller/serializer 2017-04-26 19:09:55 +00:00
learning_outcome_group_spec.rb Add columns for Academic Benchmarks GUID update 2017-01-09 18:59:38 +00:00
learning_outcome_result_spec.rb remove protected_attributes 2017-01-12 17:46:18 +00:00
learning_outcome_spec.rb spec: de-dup spec descriptions, fixes SD-2181 2017-03-03 22:52:02 +00:00
mailer_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
media_object_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
media_source_fetcher_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
message_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
notification_endpoint_spec.rb convert push notifications to AWS SDK v2 2016-12-21 21:34:21 +00:00
notification_failure_processor_spec.rb convert push notifications to AWS SDK v2 2016-12-21 21:34:21 +00:00
notification_finder_spec.rb gemify broadcast policy 2014-09-24 11:35:33 +00:00
notification_policy_spec.rb remove protected_attributes 2017-01-12 17:46:18 +00:00
notification_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
notifier_spec.rb spec: convert uses of kind_of to rspec-mocks 2017-01-20 21:24:15 +00:00
observer_enrollment_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
originality_report_spec.rb Remove orignality_score constraints 2017-04-26 17:10:47 +00:00
page_view_spec.rb remove protected_attributes 2017-01-12 17:46:18 +00:00
plugin_setting_spec.rb cache plugin setting lookup in process 2017-03-09 19:44:57 +00:00
profile_spec.rb remove protected_attributes 2017-01-12 17:46:18 +00:00
progress_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
pseudonym_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
quiz_student_visibility_spec.rb set default values for booleans on various tables 2017-02-22 18:17:59 +00:00
role_override_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
role_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
rubric_assessment_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
rubric_association_spec.rb give admins without manage_courses rubric association rights 2017-03-03 13:23:02 +00:00
rubric_spec.rb rails 5: find and fix lots of deprecation warnings [ci verbose] 2017-03-16 16:03:51 +00:00
score_spec.rb add scores table 2016-12-28 20:11:54 +00:00
settings_spec.rb spec: de-dup spec descriptions, fixes SD-2181 2017-03-03 22:52:02 +00:00
sharded_bookmarked_collection_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
shared_brand_config_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
sis_batch_spec.rb Great Expectations, fixes SD-2065 2017-02-13 17:25:09 +00:00
sis_pseudonym_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
split_user_spec.rb don't explode splitting users in a deleted course 2017-02-23 18:14:30 +00:00
stream_item_instance_spec.rb spec: don't allow raise_error with no arguments 2017-03-10 21:34:37 +00:00
stream_item_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
student_enrollment_spec.rb Great Expectations, fixes SD-2065 2017-02-13 17:25:09 +00:00
student_view_enrollment_spec.rb Great Expectations, fixes SD-2065 2017-02-13 17:25:09 +00:00
submission_comment_interaction_spec.rb rails 5: spec/models/s*_spec.rb fixes 2017-03-02 20:25:06 +00:00
submission_comment_spec.rb make submission comments draft not-null 2017-04-17 18:39:41 +00:00
submission_spec.rb fix staleness issues with cached_due_date 2017-04-28 16:01:47 +00:00
submission_version_spec.rb improve submissions api performance 2017-03-27 18:59:00 +00:00
ta_enrollment_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
teacher_enrollment_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
usage_rights_spec.rb spec: rename the `user` helper to `user_factory` 2016-12-27 20:25:25 +00:00
user_observer_spec.rb restore deleted enrollments on attempted observee restore 2017-03-15 12:32:01 +00:00
user_profile_spec.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
user_service_spec.rb Remove Google Docs plugin 2016-02-01 23:41:53 +00:00
user_spec.rb unify admin view handling in address book 2017-04-20 19:47:07 +00:00
web_conference_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
web_conference_spec_helper.rb rspec 3-ify spec/models 2014-10-14 20:10:03 +00:00
web_zip_export_spec.rb Create web zip zip package if there are no course files 2017-02-16 20:56:19 +00:00
wiki_page_spec.rb only send wiki page update notifications to active users by date 2017-02-08 13:37:10 +00:00
wiki_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00
wimba_conference_spec.rb spec: rename the `course` helper to `course_factory` 2016-12-27 20:25:29 +00:00