From b315b4d7479f8711107ff1538ae4b9cf17e4acb3 Mon Sep 17 00:00:00 2001 From: Carlos de la Guardia Date: Mon, 16 Mar 2015 02:00:17 -0600 Subject: [PATCH] MIT: CCX. Fixes for issues identified in code review Switch to font awesome icons, to fix issue with toggling collapsible sections of the schedule in ccx coach dashboard Ensure access check takes place after descriptor is bound to the user, or field override checks will never happen --- lms/djangoapps/courseware/module_render.py | 6 ------ lms/static/js/ccx/schedule.js | 4 ++-- lms/templates/ccx/schedule.html | 2 +- lms/templates/ccx/schedule.underscore | 12 ++++++------ 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 9e258988cb..7c1eeacff5 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -675,12 +675,6 @@ def get_module_for_descriptor_internal(user, descriptor, field_data_cache, cours request_token (str): A unique token for this request, used to isolate xblock rendering """ - # Do not check access when it's a noauth request. - if getattr(user, 'known', True): - # Short circuit--if the user shouldn't have access, bail without doing any work - if not has_access(user, 'load', descriptor, course_id): - return None - (system, student_data) = get_module_system_for_user( user=user, field_data_cache=field_data_cache, # These have implicit user bindings, the rest of args are considered not to diff --git a/lms/static/js/ccx/schedule.js b/lms/static/js/ccx/schedule.js index 9773669f49..ef51f79b63 100644 --- a/lms/static/js/ccx/schedule.js +++ b/lms/static/js/ccx/schedule.js @@ -292,13 +292,13 @@ var edx = edx || {}; var children = self.get_children(row); if (row.is('.expanded')) { - $(this).removeClass('icon-caret-down').addClass('icon-caret-right'); + $(this).removeClass('fa-caret-down').addClass('fa-caret-right'); row.removeClass('expanded').addClass('collapsed'); children.hide(); } else { - $(this).removeClass('icon-caret-right').addClass('icon-caret-down'); + $(this).removeClass('fa-caret-right').addClass('fa-caret-down'); row.removeClass('collapsed').addClass('expanded'); children.filter('.collapsed').each(function() { children = children.not(self.get_children(this)); diff --git a/lms/templates/ccx/schedule.html b/lms/templates/ccx/schedule.html index b9f6f6e6a5..22b6e67ff1 100644 --- a/lms/templates/ccx/schedule.html +++ b/lms/templates/ccx/schedule.html @@ -32,7 +32,7 @@