LMS Update to hide subsection content based on due-date
TNL-4905
This commit is contained in:
@@ -447,7 +447,7 @@ class CoursewareIndex(View):
|
||||
return "{url}?child={requested_child}".format(
|
||||
url=reverse(
|
||||
'courseware_section',
|
||||
args=[unicode(self.course.id), section_info['chapter_url_name'], section_info['url_name']],
|
||||
args=[unicode(self.course_key), section_info['chapter_url_name'], section_info['url_name']],
|
||||
),
|
||||
requested_child=requested_child,
|
||||
)
|
||||
@@ -455,6 +455,7 @@ class CoursewareIndex(View):
|
||||
section_context = {
|
||||
'activate_block_id': self.request.GET.get('activate_block_id'),
|
||||
'requested_child': self.request.GET.get("child"),
|
||||
'progress_url': reverse('progress', kwargs={'course_id': unicode(self.course_key)}),
|
||||
}
|
||||
if previous_of_active_section:
|
||||
section_context['prev_url'] = _compute_section_url(previous_of_active_section, 'last')
|
||||
|
||||
26
lms/templates/hidden_content.html
Normal file
26
lms/templates/hidden_content.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<%page expression_filter="h"/>
|
||||
<%!
|
||||
from django.utils.translation import ugettext as _
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
%>
|
||||
|
||||
<div class="sequence hidden-content proctored-exam completed">
|
||||
<h3>
|
||||
${_("The due date for this {subsection_format} has passed.").format(
|
||||
subsection_format=subsection_format,
|
||||
)}
|
||||
</h3>
|
||||
<hr>
|
||||
<p>
|
||||
${Text(_(
|
||||
"Because the due date has passed, this {subsection_format} "
|
||||
"is no longer available.{line_break}If you have completed this {subsection_format}, "
|
||||
"your grade is available on the {link_start}progress page{link_end}."
|
||||
)).format(
|
||||
subsection_format=subsection_format,
|
||||
line_break=HTML("<br>"),
|
||||
link_start=HTML("<a href='{}'>").format(progress_url),
|
||||
link_end=HTML("</a>"),
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
<div id="sequence_${element_id}" class="sequence" data-id="${item_id}" data-position="${position}" data-ajax-url="${ajax_url}" data-next-url="${next_url}" data-prev-url="${prev_url}">
|
||||
<div class="path"></div>
|
||||
% if override_hidden_exam:
|
||||
% if banner_text:
|
||||
<div class="pattern-library-shim alert alert-information subsection-header" tabindex="-1">
|
||||
<span class="pattern-library-shim icon alert-icon icon-bullhorn" aria-hidden="true"></span>
|
||||
<div class="pattern-library-shim alert-message">
|
||||
<p class="pattern-library-shim alert-copy">
|
||||
${_("This exam is hidden from the learner.")}
|
||||
${banner_text}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user