canvas-lms/lib
Jason Anderson bac95e5a22 Fix loading error when Account Scales FF disabled
closes OUT-5168
flag=improved_lmgb

Test Plan:
- Disable Account and Course Level Outcome Mastery Scales FF
- Enable Learning Mastery Gradebook Redesign FF
- Enable Learning Mastery Gradebook
- Create 5 Outcomes ->
  - 2 ratings (mastery at 1 point)
  - 3 ratings (mastery at 2 points)
  - 4 ratings (mastery at 3 points)
  - 5 ratings (mastery at 3 points)
  - 6 ratings (mastery at 4 points)
- Create a course and have these 4 outcomes within that course
- Using CURL or similar tool, invoke the outcome_rollups API using this
  URL
  - https://canvas.docker/api/v1/courses/{course_id}/outcome_rollups
  - params:
    - rating_percents: true
    - per_page: 20
    - include: ['outcomes']
    - sort_by: student
    - page: 1
    - add_defaults: true
  - Note: you will need a Bearer Token created in canvas in order to
  invoke the API
- Go to "linked" -> "outcomes" in the response body
- Verify the following:
  - The outcome with 2 ratings:
    - ratings[0].mastery == true && color == "0B874B"
    - ratings[1].mastery == false && color == "555555"
  - The outcome with 3 ratings:
    - ratings[0].mastery == true && color == "0B874B"
    - ratings[1].mastery == false && color == "FAB901"
    - ratings[2].mastery == false && color == "555555"
  - The outcome with 4 ratings:
    - ratings[0].mastery == true && color == "0B874B"
    - ratings[1].mastery == false && color == "FAB901"
    - ratings[2].mastery == false && color == "E0061F"
    - ratings[3].mastery == false && color == "555555"
  - The outcome with 5 ratings:
    - ratings[0].mastery == false && color == "0374B5"
    - ratings[1].mastery == true && color == "0B874B"
    - ratings[2].mastery == false && color == "FAB901"
    - ratings[3].mastery == false && color == "E0061F"
    - ratings[4].mastery == false && color == "555555"
  - The outcome with 6 ratings:
    - ratings[0].mastery == false && color == "0374B5"
    - ratings[1].mastery == true && color == "0B874B"
    - ratings[2].mastery == false && color == "FAB901"
    - ratings[3].mastery == false && color == "D97900"
    - ratings[4].mastery == false && color == "E0061F
    - ratings[5].mastery == false && color == "555555"
- Change the mastery points on the outcome with 5 ratings to match the
  "Below Mastery" level
- Verify that the outcome with 5 ratings no longer includes default
  color information
- Navigate to the Grades tab in canvas for your created course
- Verify that the page loads without any console errors

Change-Id: I2de9d81116e7f41f64d8f8d5ab3ff7a0102b5322
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/296680
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>
2022-08-17 16:04:00 +00:00
..
address_book RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
api Fix loading error when Account Scales FF disabled 2022-08-17 16:04:00 +00:00
app_center RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
authentication_methods move inst_access to gem 2021-11-05 19:47:46 +00:00
base Fix "Cannot be referred to" errors in cache in development 2022-08-12 20:54:59 +00:00
basic_lti Log all bad requests to datadog 2022-07-27 18:11:49 +00:00
canvadocs RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvas Add live event default_blueprint_restrictions_updated 2022-08-16 15:48:55 +00:00
cc Persist nil resource link urls during course copy 2022-07-29 21:31:41 +00:00
cdc_migration_testing RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
data_fixup fixup more broken course copied resource links 2022-08-03 21:34:44 +00:00
external_auth_observation external auth observation zeitwerk compatibility 2021-10-07 22:35:20 +00:00
feature_flags remove enable_at / pending_enforcement from feature_flags 2022-05-19 01:30:59 +00:00
global_lookups make globalLookups a module to extend, not a stub 2021-10-26 14:58:27 +00:00
gradebook Apply score to ungraded with old and new gb filters 2022-03-11 20:05:29 +00:00
latex RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
lti doc: update com.instructure.User.sectionNames variable substitution 2022-08-15 23:27:58 +00:00
messageable_user Prevent students from sending messages to concluded teacher 2022-07-01 14:31:00 +00:00
microsoft_sync Refresh MS Sync user mappings after email changes 2022-07-18 19:53:35 +00:00
migration_helpers RuboCop: Style/HashSyntax 2021-11-25 14:02:35 +00:00
outcomes Remove deleted outcomes linked to active ContentTags in IOM 2022-07-14 16:41:39 +00:00
rake RuboCop: Style/SignalException 2021-11-19 22:24:25 +00:00
reporting RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
schemas support new module_menu_modal placement 2022-04-11 21:11:32 +00:00
sentry_extensions Add "db." prefix for ActiveRecord Sentry traces 2022-03-25 12:44:49 +00:00
services Allow Plagiarism tools without live events 2022-05-18 21:47:02 +00:00
sis Revert "Add converter to utf-8 for imports" 2022-07-25 11:09:28 +00:00
support_helpers RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
tasks Fix yarn install error with @canvas/engine 2022-07-15 14:51:56 +00:00
turnitin Show error if we can't fetch TII submission 2022-05-20 17:04:35 +00:00
user_content RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
utils fix extra spaces in time strings 2022-04-05 19:10:26 +00:00
account_services.rb Remove Twitter from Canvas due to expired Key 2022-05-18 19:01:26 +00:00
address_book.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
anonymity.rb RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +00:00
api.rb compute total entries for UI course/user api index 2022-06-28 15:36:03 +00:00
api_route_set.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
asset_signature.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
assignment_override_applicator.rb make individual override dates preferred 2022-06-10 15:20:27 +00:00
assignment_util.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
authentication_methods.rb allow for request short-circuiting based on auth 2022-05-11 22:34:47 +00:00
basic_lti.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
brand_account_chain_resolver.rb favor active sub-account for branding 2021-12-08 18:15:55 +00:00
brand_config_helpers.rb Don't include parents in chain for regular accounts 2022-04-14 16:56:51 +00:00
brand_config_regenerator.rb Fix recursive brand config regeneration for subaccounts 2022-06-09 17:14:47 +00:00
brandable_css.rb fix off-month mini-calendar day color contrast 2022-04-07 12:07:04 +00:00
browser_support.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
canvadocs.rb Handle 503s and 504s from Canvadocs better 2022-05-11 16:25:06 +00:00
canvas_logger.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
cc.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
content_licenses.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
content_notices.rb RuboCop: Style/SymbolArray, Style/WordArray 2021-11-23 14:30:08 +00:00
content_zipper.rb include referenced hidden files in offline web exports 2022-05-06 16:50:01 +00:00
conversation_batch_scrubber.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
conversation_helper.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
copy_authorized_links.rb RuboCop: Style/IfInsideElse, Style/SoleNestedConditional 2021-11-23 14:28:35 +00:00
course_link_validator.rb Fix joinining on nil in valid_route? 2021-12-16 19:50:55 +00:00
course_pace_due_dates_calculator.rb Use calendar event blackout dates in due date calculations 2022-08-10 18:58:39 +00:00
course_pace_hard_end_date_compressor.rb Send blackout dates to compress_dates api 2022-05-06 20:00:40 +00:00
course_paces_date_helpers.rb Use calendar event blackout dates in due date calculations 2022-08-10 18:58:39 +00:00
custom_validations.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
cuty_capt.rb rename Canvas::DynamicSettings => DynamicSettings 2022-01-12 21:54:51 +00:00
dates_overridable.rb Remove points display for ungraded surveys 2022-02-16 16:47:44 +00:00
delayed_message_scrubber.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
delicious.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
differentiable_assignment.rb add granular permissions for managing course content 2022-04-11 20:53:27 +00:00
due_date_cacher.rb fix unassigning concluded student bug 2022-05-11 18:55:15 +00:00
dump_helper.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
duplicating_objects.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
dynamic_settings_initializer.rb Cache dynamic settings in request cache 2022-03-07 22:38:17 +00:00
effective_due_dates.rb make individual override dates preferred 2022-06-10 15:20:27 +00:00
email_address_validator.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
enrollments_from_user_list.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
eportfolio_page.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
external_feed_aggregator.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
external_statuses.rb RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
feature.rb remove enable_at / pending_enforcement from feature_flags 2022-05-19 01:30:59 +00:00
feature_flags.rb rename Canvas::DynamicSettings => DynamicSettings 2022-01-12 21:54:51 +00:00
file_authenticator.rb RuboCop: Style/CommentAnnotation 2021-11-21 00:50:46 +00:00
file_in_context.rb Stop duplicating files on repeat cartridge imports 2022-02-03 15:07:56 +00:00
file_splitter.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
global_lookups.rb make globalLookups a module to extend, not a stub 2021-10-26 14:58:27 +00:00
google_docs_preview.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
grade_calculator.rb Some rails 7 tests passing 2022-06-06 14:23:03 +00:00
gradebook_exporter.rb export current gradebook view 2022-06-18 15:00:34 +00:00
gradebook_grading_period_assignments.rb fix viewing grades for deactivated students 2022-02-16 17:56:03 +00:00
gradebook_importer.rb Rescue RangeError to fail progress object 2022-04-28 20:15:31 +00:00
gradebook_settings_helpers.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
gradebook_user_ids.rb RuboCop: Rails/WhereExists 2021-11-16 21:19:43 +00:00
grading_period_helper.rb RuboCop: Style/RedundantSort 2021-11-19 22:25:07 +00:00
has_content_tags.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
host_url.rb Rails 6.1 basic spec functionality 2022-02-16 17:31:11 +00:00
i18n_time_zone.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
imported_html_converter.rb Convert audio and video RCE iframes to HTML tags for import/export 2022-04-18 16:17:53 +00:00
inst_fs.rb rename Canvas::DynamicSettings => DynamicSettings 2022-01-12 21:54:51 +00:00
late_policy_applicator.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
latex.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
learning_outcome_context.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
locale_selection.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
locked_for.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
logging_filter.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
login_hooks.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
math_man.rb rename Canvas::DynamicSettings => DynamicSettings 2022-01-12 21:54:51 +00:00
message_dispatcher.rb Improve error logging for message batch dispatching 2022-06-23 15:10:18 +00:00
message_scrubber.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
messageable_user.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
missing_policy_applicator.rb keep missing status around when default grading 2022-01-21 16:48:44 +00:00
model_cache.rb RuboCop: Style/BlockDelimiters, Style/Lambda 2021-11-23 21:30:47 +00:00
moderation.rb add # frozen_string_literal: true for lib 2020-10-27 20:49:50 +00:00
must_view_module_progressor.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
mutable.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
net_ldap_extensions.rb wrap net_ldap_extensions in a zeitwerk compatible module 2021-10-07 18:50:58 +00:00
notification_message_creator.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
package_root.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
permissions.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
permissions_helper.rb Some rails 7 tests passing 2022-06-06 14:23:03 +00:00
plannable.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
planner_api_helper.rb RuboCop: Performance/RegexpMatch 2021-11-11 22:02:06 +00:00
planner_helper.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
progress_runner.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
pronouns.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
quiz_math_data_fixup.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
request_cache.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
request_error.rb RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +00:00
rubric_context.rb RuboCop: Style/HashSyntax 2021-11-25 14:02:35 +00:00
scope_filter.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
score_statistics_generator.rb Improve score details and grade statistics 2022-07-20 13:24:01 +00:00
scrypt_provider.rb RuboCop: Layout lib 2021-09-22 20:01:52 +00:00
search_term_helper.rb Support basic unicode normalization in search helper 2022-02-16 22:19:10 +00:00
send_to_stream.rb Revert to state before "Add strand for create_stream_items" 2022-06-27 09:09:19 +00:00
sentry_proxy.rb Upgrade Sentry SDKs 2022-01-10 16:58:07 +00:00
session_token.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
simple_stats.rb RuboCop: Performance/Sum 2021-11-16 17:10:38 +00:00
simple_tags.rb Reference directly ConversationParticipant.quoted_table_name 2022-05-16 14:46:36 +00:00
sis.rb do away with non-conventional "common" module 2021-10-07 21:55:24 +00:00
sorts_assignments.rb RuboCop: Style/HashSyntax 2021-11-25 14:02:35 +00:00
ssl_common.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
stats.rb RuboCop: Style/HashSyntax 2021-11-25 14:02:35 +00:00
sticky_sis_fields.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
submission_list.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
submission_search.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
submittable.rb Consider only relevant discussions when evaluating CMPs 2022-07-14 13:51:37 +00:00
submittables_grading_period_protection.rb RuboCop: Style/MultilineIfModifier 2021-11-23 14:30:24 +00:00
summary_message_consolidator.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
syslog_wrapper.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
temp_cache.rb RuboCop: Style/PreferredHashMethods 2021-11-12 16:24:14 +00:00
text_helper.rb Bump i18nliner again 2022-08-10 22:04:14 +00:00
time_zone_helper.rb RuboCop: Style/HashConversion 2021-11-17 15:17:51 +00:00
timed_cache.rb RuboCop: Style/MethodCallWithoutArgsParentheses 2021-11-18 23:07:30 +00:00
token_scopes.rb Fail a test on route changes used by dev keys 2022-07-12 20:24:05 +00:00
token_scopes_helper.rb Fail a test on route changes used by dev keys 2022-07-12 20:24:05 +00:00
turnitin.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
turnitin_id.rb add # frozen_string_literal: true for lib 2020-10-27 20:49:50 +00:00
unzip_attachment.rb Stop duplicating files on repeat cartridge imports 2022-02-03 15:07:56 +00:00
user_content.rb Increase depth limit for syllabus 2022-04-20 19:38:27 +00:00
user_list.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
user_list_v2.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
user_merge.rb prefer submitted submissions if conflict during user merge 2022-05-18 15:26:34 +00:00
user_search.rb optimize UI driven count for users controller api index 2022-07-21 15:53:11 +00:00
uuid_helper.rb RuboCop: Style/MutableConstant 2021-11-16 16:19:54 +00:00
vericite.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00
visibility_plucking_helper.rb RuboCop: Style/RedundantSelf 2021-11-20 16:41:21 +00:00
zip_extractor.rb RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation 2021-11-25 14:03:06 +00:00