canvas-lms/app/models
James Williams 429108fb38 performance improvements for enrollments and state_based_on_date
test plan:
* regression test enrollment dates and
 the course/account settings to restrict students
 to from viewing past and future courses

closes #CNVS-21602

Change-Id: Ifc2fd8f6fd279839bd8ba520442e2c0b9cc91da6
Reviewed-on: https://gerrit.instructure.com/57535
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-07-02 15:51:16 +00:00
..
account performance improvements for enrollments and state_based_on_date 2015-07-02 15:51:16 +00:00
account_authorization_config fix changing of recognized params for oauth+plugin 2015-06-24 21:01:40 +00:00
alerts don't send account alerts to rejected enrollments 2015-05-11 22:58:11 +00:00
assignments improve performance of needs_grading_count in course_json 2015-06-17 19:38:43 +00:00
attachments don't move files to the same spot just for fun 2015-06-23 17:44:59 +00:00
auditors initial live events implementation 2015-04-03 15:22:33 +00:00
bookmarks bookmark service, fixes CNVS-19363 2015-05-14 05:06:20 +00:00
broadcast_policies don't let broadcast_policy swallow errors 2015-04-24 22:35:35 +00:00
context_module_progressions rework module progressions evaluation 2014-05-01 16:42:07 +00:00
courses fix delayed alerts for courses with only section-limited teachers 2014-10-30 16:07:12 +00:00
data_exports_api validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
discussion_topic discussion entry liking 2015-04-25 03:10:48 +00:00
enrollment show correct total activity time for users 2015-04-22 20:44:29 +00:00
exporters fix Lint/StringConversionInInterpolation issue 2015-04-27 20:53:25 +00:00
grading_period fix grading period dropdown in gradebook and student grades page 2015-04-02 21:25:48 +00:00
group_categories allow group leadership edits on group categories 2014-10-10 20:42:06 +00:00
importers don't try to resolve references to objects without migration_id 2015-06-18 14:40:28 +00:00
incoming_mail verify incoming mail sender addresses 2015-05-27 20:54:18 +00:00
live_assessments updated learning outcome to retain eval method and info for weighted methods 2014-12-16 01:04:28 +00:00
lti Create a feature flag that stops copying the query params to the post body for LTI 2015-05-20 15:29:43 +00:00
messages Use source user as "FROM" for emails 2014-05-31 01:02:14 +00:00
polling fix Style/EmptyLineBetweenDefs issue 2015-04-29 16:28:39 +00:00
quizzes don't fulfill must_submit requirements on manual grade 2015-06-26 16:03:24 +00:00
users add a parameter to user creation for forcing self-registraion flow 2015-04-14 17:26:05 +00:00
abstract_course.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
access_token.rb push notifications 2015-01-15 22:19:24 +00:00
account.rb performance improvements for enrollments and state_based_on_date 2015-07-02 15:51:16 +00:00
account_authorization_config.rb soft delete associated pseudonyms 2015-06-16 15:49:31 +00:00
account_notification.rb show cross-shard notifications for built-in roles 2015-02-24 01:11:14 +00:00
account_notification_role.rb new roles 2014-10-31 19:44:14 +00:00
account_report.rb make account reports a gem 2014-11-03 22:57:35 +00:00
account_user.rb refactor grading standards controller 'index' action 2015-02-12 17:00:08 +00:00
alert.rb fix a syntax error with alerts looking up account roles 2015-05-04 22:11:40 +00:00
alert_criterion.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
announcement.rb Don't show announcement comments to non-students 2015-03-31 23:28:18 +00:00
appointment_group.rb Don't send notifications when deleting unpublished appointment groups 2015-05-26 21:55:46 +00:00
appointment_group_context.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
appointment_group_sub_context.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
assessment_question.rb imported link refactoring 2015-06-16 20:04:32 +00:00
assessment_question_bank.rb Fix quiz questions from banks 2014-12-15 17:38:13 +00:00
assessment_question_bank_user.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
assessment_request.rb give more access to peer reviews 2014-08-08 16:18:45 +00:00
asset_user_access.rb fix asset_user_access spec 2014-10-10 16:30:03 +00:00
assignment.rb misc improvements for assignments, calendar events and modules 2015-06-29 15:45:27 +00:00
assignment_group.rb hide unpublished assignments on index page for logged out users in public course 2015-02-09 20:19:56 +00:00
assignment_override.rb fix override notification error 2015-05-01 14:20:23 +00:00
assignment_override_student.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
assignment_student_visibility.rb DA - module evaluation efficiency 2014-10-28 19:11:47 +00:00
attachment.rb add api endpoint for modified_by in files 2015-06-03 17:12:38 +00:00
attachment_association.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
auditors.rb rework error handling in event stream 2014-08-28 21:19:24 +00:00
authorization_code.rb check all models for protecting attributes refs #3847 2011-05-25 17:38:50 -06:00
big_blue_button_conference.rb include test env in BBB recording ready url 2015-06-16 18:50:11 +00:00
bookmark_service.rb don't autorequire a bunch of gems that are rarely used 2015-04-09 18:47:50 +00:00
bookmarks.rb bookmark service, fixes CNVS-19363 2015-05-14 05:06:20 +00:00
bounce_notification_processor.rb Store information about the last bounce for a communication channel 2015-06-24 18:59:31 +00:00
calendar_event.rb fix Lint/StringConversionInInterpolation issue 2015-04-27 20:53:25 +00:00
canvadoc.rb handle crocodoc/canvadocs timeouts when creating sessions 2014-10-30 23:05:44 +00:00
cloned_item.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
collaboration.rb Google Drive Collaborations & Submissions 2015-02-18 16:02:25 +00:00
collaborator.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
communication_channel.rb Store information about the last bounce for a communication channel 2015-06-24 18:59:31 +00:00
content_export.rb get sentry into canvas 2015-04-13 22:26:15 +00:00
content_migration.rb imported link refactoring 2015-06-16 20:04:32 +00:00
content_participation.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
content_participation_count.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
content_tag.rb fix module items api for differentiated assignments 2015-06-24 19:17:29 +00:00
context.rb fix Style/EmptyLiteral issue 2015-04-27 19:47:30 +00:00
context_external_tool.rb Add support for localized LTI tool labels 2015-06-26 14:00:20 +00:00
context_external_tool_placement.rb migrate has_X context_external_tool columns to separate table 2014-08-12 12:13:42 +00:00
context_module.rb Teacher Edit Module Settings form for CNVS-20853 2015-06-29 20:14:23 +00:00
context_module_item.rb avoid dynamic finders on an assocition with an include 2014-02-21 12:52:39 +00:00
context_module_progression.rb don't fulfill must_submit requirements on manual grade 2015-06-26 16:03:24 +00:00
context_module_sub_header.rb optimize AdheresToPolicy 2011-07-14 13:25:28 -06:00
conversation.rb prevent large group conversation creation 2015-04-29 16:11:32 +00:00
conversation_batch.rb CC author on conversation create 2014-09-26 22:23:00 +00:00
conversation_message.rb don't autorequire a bunch of gems that are rarely used 2015-04-09 18:47:50 +00:00
conversation_message_participant.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
conversation_participant.rb run add_message for large conversations in a delayed job 2015-04-27 22:23:18 +00:00
course.rb performance improvements for enrollments and state_based_on_date 2015-07-02 15:51:16 +00:00
course_account_association.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
course_date_range.rb adds due date validations to assignment quick add and quick edit 2015-03-19 16:29:43 +00:00
course_import.rb remove some of the less useful associations from export 2014-05-27 15:44:00 +00:00
course_profile.rb improve acts_as_list 2013-12-17 19:55:43 +00:00
course_progress.rb fix module items api for differentiated assignments 2015-06-24 19:17:29 +00:00
course_section.rb avoid raw sql updates in several places 2015-06-16 16:14:48 +00:00
crocodoc_document.rb get sentry into canvas 2015-04-13 22:26:15 +00:00
custom_data.rb remove rails 2 support 2014-08-06 18:16:19 +00:00
custom_gradebook_column.rb add model level validation for teacher notes presence 2015-06-30 15:52:24 +00:00
custom_gradebook_column_datum.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
delayed_message.rb don't send summaries to bouncing channels 2015-02-27 23:56:58 +00:00
delayed_notification.rb get sentry into canvas 2015-04-13 22:26:15 +00:00
designer_enrollment.rb straighten out course designer permissions 2012-01-13 18:56:50 -07:00
developer_key.rb don't autorequire a bunch of gems that are rarely used 2015-04-09 18:47:50 +00:00
discussion_entry.rb discussion entry liking 2015-04-25 03:10:48 +00:00
discussion_entry_participant.rb discussion entry liking 2015-04-25 03:10:48 +00:00
discussion_topic.rb fixes permissions with discussion page 2015-06-03 17:24:31 +00:00
discussion_topic_participant.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
document_service.rb Initial commit. 2011-01-31 18:57:29 -07:00
enrollment.rb performance improvements for enrollments and state_based_on_date 2015-07-02 15:51:16 +00:00
enrollment_dates_override.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
enrollment_term.rb don't allow terms with active courses to be deleted 2015-02-02 13:36:02 +00:00
eportfolio.rb ensure there is a default eportfolio page 2014-08-14 23:15:09 +00:00
eportfolio_category.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
eportfolio_entry.rb drop attachment_id and artifact_type from eportfolio_entries 2015-07-02 15:07:25 +00:00
error_report.rb don't die when trying to report exceptional exits for job queue 2015-06-22 19:57:36 +00:00
etherpad_collaboration.rb don't re-calculate the etherpad url when a new user joins 2013-11-08 21:45:44 +00:00
external_feed.rb validate length of external_feed url in the app 2015-05-15 14:40:51 +00:00
external_feed_entry.rb change external feed entry titles to text 2015-06-19 12:30:12 +00:00
external_integration_key.rb add type scope for external integration keys 2015-04-24 16:39:45 +00:00
external_url.rb optimize AdheresToPolicy 2011-07-14 13:25:28 -06:00
favorite.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
feature_flag.rb improve multicache 2015-05-06 19:21:21 +00:00
folder.rb cleanup refactor of Rubocop's Style/WhileUntilDo 2015-04-28 18:37:29 +00:00
google_docs_collaboration.rb don't autorequire a bunch of gems that are rarely used 2015-04-09 18:47:50 +00:00
gradebook_csv.rb gradebook csvs belong on the course's shard, not the user's 2015-05-15 15:46:55 +00:00
gradebook_upload.rb gradebook csv upload: ignore failed uploads 2015-04-22 22:21:02 +00:00
grading_period.rb one grading period save button 2015-06-18 18:46:22 +00:00
grading_period_grade.rb Extract Soft Deletion 2015-05-18 18:45:01 +00:00
grading_period_group.rb Extract Soft Deletion 2015-05-18 18:45:01 +00:00
grading_standard.rb fix Performance/ReverseEach issue 2015-04-27 20:53:43 +00:00
group.rb Only grant group permissions to users who can read the group's context 2015-06-17 19:39:13 +00:00
group_category.rb refresh subtopics when a group is added 2015-02-06 20:55:08 +00:00
group_leadership.rb Typo fix: changed occurrences of unkown to unknown 2015-03-25 20:08:05 +00:00
group_membership.rb Add group memberships show API endpoint 2015-05-07 00:12:29 +00:00
ignore.rb give more access to peer reviews 2014-08-08 16:18:45 +00:00
importers.rb imported link refactoring 2015-06-16 20:04:32 +00:00
inbox_item.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
kaltura_media_file_handler.rb pick sis pseudonym reliably 2015-06-25 22:18:14 +00:00
learning_outcome.rb validate outcome display name as we do with title 2015-06-26 15:27:32 +00:00
learning_outcome_group.rb avoid raw sql updates in several places 2015-06-16 16:14:48 +00:00
learning_outcome_result.rb use submitted at or assessed at for line graph x axis. 2015-03-25 16:19:20 +00:00
live_assessments.rb improve AR::all_models for non-eager-loading 2014-07-14 15:56:49 +00:00
lti.rb add lti2 models and registration endpoints 2014-07-18 16:42:10 +00:00
mailer.rb don't autorequire a bunch of gems that are rarely used 2015-04-09 18:47:50 +00:00
media_object.rb get sentry into canvas 2015-04-13 22:26:15 +00:00
media_source_fetcher.rb Prefer mp3 for audio comments in api_user_content 2014-04-30 20:00:13 +00:00
media_track.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
message.rb pick sis pseudonym reliably 2015-06-25 22:18:14 +00:00
migration_issue.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
notification.rb rails4: rename Notification.all to all_cached 2015-07-01 17:23:22 +00:00
notification_endpoint.rb don't autorequire a bunch of gems that are rarely used 2015-04-09 18:47:50 +00:00
notification_finder.rb rails4: rename Notification.all to all_cached 2015-07-01 17:23:22 +00:00
notification_policy.rb rails4: rename Notification.all to all_cached 2015-07-01 17:23:22 +00:00
notification_preloader.rb avoid extraneous queries to Notification 2014-09-09 21:54:16 +00:00
notifier.rb gemify broadcast policy 2014-09-24 11:35:33 +00:00
oauth_request.rb check all models for protecting attributes refs #3847 2011-05-25 17:38:50 -06:00
observer_enrollment.rb misc improvements for assignments, calendar events and modules 2015-06-29 15:45:27 +00:00
page_comment.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
page_view.rb the cassandra migrator does not need to be shard aware 2015-01-12 22:23:26 +00:00
plugin_setting.rb improve multicache 2015-05-06 19:21:21 +00:00
polling.rb improve AR::all_models for non-eager-loading 2014-07-14 15:56:49 +00:00
polymorphic_type_override.rb remove rails 2 support 2014-08-06 18:16:19 +00:00
profile.rb fix Lint/StringConversionInInterpolation issue 2015-04-27 20:53:25 +00:00
progress.rb get sentry into canvas 2015-04-13 22:26:15 +00:00
pseudonym.rb avoid find_each where it requires a temp table, but won't work through pgbouncer 2015-07-01 18:43:29 +00:00
pseudonym_session.rb remove basic auth support 2015-03-04 19:50:50 +00:00
report_snapshot.rb clarify Slug vs. UUID and fix event stream 2014-07-11 16:58:42 +00:00
role.rb fix user enrollment create permissions 2015-03-24 19:31:25 +00:00
role_override.rb add new permission and API endpoint for manage_catalog 2015-02-06 19:45:20 +00:00
rollup_score.rb ensure proper sorting if submitted_at times exist on any decaying avg results 2015-03-09 21:39:08 +00:00
rubric.rb no more dynamic finders (models) 2014-09-24 20:51:48 +00:00
rubric_assessment.rb grant :read on rubric assessments to users with :view_all_grades 2015-06-27 00:15:00 +00:00
rubric_association.rb grant :read on rubric assessments to users with :view_all_grades 2015-06-27 00:15:00 +00:00
scribd_mime_type.rb remove rails 2 support 2014-08-06 18:16:19 +00:00
session_persistence_token.rb no more dynamic finders (models) 2014-09-24 20:51:48 +00:00
setting.rb fix some boot up issues when the db isn't set up yet 2015-06-11 15:16:38 +00:00
sharded_bookmarked_collection.rb extract bookmarked_collection gem 2014-04-17 18:16:13 +00:00
sis_batch.rb fix Lint/StringConversionInInterpolation issue 2015-04-27 20:53:25 +00:00
sis_post_grades_status.rb Add validation to the post grades model 2015-01-07 23:27:25 +00:00
sis_pseudonym.rb pick sis pseudonym reliably 2015-06-25 22:18:14 +00:00
stream_item.rb abstract locks for postgres 9.3 specific exclusive locks 2015-05-12 15:31:13 +00:00
stream_item_instance.rb validate types on polymorphic associations 2014-05-28 17:05:34 +00:00
student_enrollment.rb DA - enrollment deletion works 2014-09-25 22:01:02 +00:00
student_view_enrollment.rb fix viewing test student grades by teacher 2014-05-30 04:35:59 +00:00
submission.rb avoid raw sql updates in several places 2015-06-16 16:14:48 +00:00
submission_comment.rb fix anonymous peer review checkbox on graded discussion form. 2015-04-22 14:23:49 +00:00
submission_comment_interaction.rb fix teacher interaction report to work with submission comments 2015-02-06 18:54:59 +00:00
submission_comment_participant.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
submission_version.rb validations on Version and SubmissionVersion 2014-12-12 23:29:45 +00:00
ta_enrollment.rb straighten out course designer permissions 2012-01-13 18:56:50 -07:00
tableless.rb check all models for protecting attributes refs #3847 2011-05-25 17:38:50 -06:00
teacher_enrollment.rb straighten out course designer permissions 2012-01-13 18:56:50 -07:00
thumbnail.rb default settings values to strings 2015-05-07 21:24:54 +00:00
usage_rights.rb add new variable expansions for attachments 2015-02-19 17:12:38 +00:00
user.rb performance improvements for enrollments and state_based_on_date 2015-07-02 15:51:16 +00:00
user_account_association.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
user_note.rb stabby lambda scopes for rails4 2014-07-04 02:11:56 +00:00
user_observer.rb don't allow a user to observe oneself 2015-03-19 20:46:07 +00:00
user_profile.rb New Canvas UI 2015-04-30 22:41:23 +00:00
user_profile_link.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
user_service.rb delete facebook integration 2015-03-30 20:21:58 +00:00
web_conference.rb don't explode computing web conference notifications 2015-05-12 02:03:25 +00:00
web_conference_participant.rb define exportable attributes/associations on models 2014-05-06 23:54:24 +00:00
wiki.rb Don't show Save & Publish for group wiki pages 2015-05-13 21:30:40 +00:00
wiki_page.rb Don't show Save & Publish for group wiki pages 2015-05-13 21:30:40 +00:00
wimba_conference.rb fix Lint/StringConversionInInterpolation issue 2015-04-27 20:53:25 +00:00
zip_file_import.rb get sentry into canvas 2015-04-13 22:26:15 +00:00