Commit b315b4d7 by Carlos de la Guardia Committed by cewing

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
parent 9ddee934
......@@ -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
......
......@@ -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));
......
......@@ -32,7 +32,7 @@
<section id="enter-date-modal" class="modal" aria-hidden="true">
<div class="inner-wrapper" role="dialog">
<button class="close-modal">
<i class="icon-remove"></i>
<i class="fa-remove"></i>
<span class="sr">
${_("Close")}
</span>
......
......@@ -5,7 +5,7 @@
<th><%- gettext('Start Date') %></th>
<th><%- gettext('Due Date') %></th>
<th><a href="#" id="remove-all">
<i class="icon-remove-sign icon"></i> <%- gettext('remove all') %>
<i class="fa fa-remove"></i> <%- gettext('remove all') %>
</a></th>
</tr>
</thead>
......@@ -13,26 +13,26 @@
<% _.each(chapters, function(chapter) { %>
<tr class="chapter collapsed" data-location="<%= chapter.location %>" data-depth="1">
<td class="unit">
<a href="#"><i class="icon-caret-right icon toggle-collapse"></i></a>
<a href="#"><i class="fa fa-caret-right toggle-collapse"></i></a>
<%= chapter.display_name %>
</td>
<td class="date start-date"><a><%= chapter.start %></a></td>
<td class="date due-date"><a><%= chapter.due %></a></td>
<td><a href="#" class="remove-unit">
<i class="icon-remove-sign icon"></i> <%- gettext('remove') %>
<i class="fa fa-remove"></i> <%- gettext('remove') %>
</a></td>
</tr>
<% _.each(chapter.children, function(child) { %>
<tr class="sequential collapsed" data-depth="2"
data-location="<%= chapter.location %> <%= child.location %>">
<td class="unit">
<a href="#"><i class="icon-caret-right icon toggle-collapse"></i></a>
<a href="#"><i class="fa fa-caret-right toggle-collapse"></i></a>
<%= child.display_name %>
</td>
<td class="date start-date"><a><%= child.start %></a></td>
<td class="date due-date"><a><%= child.due %></a></td>
<td><a href="#" class="remove-unit">
<i class="icon-remove-sign icon"></i> <%- gettext('remove') %>
<i class="fa fa-remove"></i> <%- gettext('remove') %>
</a></td>
</tr>
<% _.each(child.children, function(subchild) { %>
......@@ -42,7 +42,7 @@
<td class="date start-date"><a><%= subchild.start %></a></td>
<td class="date due-date"><a><%= subchild.due %></a></td>
<td><a href="#" class="remove-unit">
<i class="icon-remove-sign icon"></i> <%- gettext('remove') %>
<i class="fa fa-remove"></i> <%- gettext('remove') %>
</a></td>
<% }); %>
<% }); %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment