This was originally contributed upstream by Stanford, circa 2013.
We neither use nor support this feature in its current implementation,
and in fact, we may never have used this production. Until recently, we
had additional chat/Jabber code [1] (in the form of a Jabber djangoapp in
LMS); context there suggests this feature may have never been more than
a prototype. The original author is no longer on the team, so I can't directly
confirm this on our end.
Do you use this feature?
Stanford had already abandoned this Jabber-backed chat implementation,
in favor of an IRC backend, by the time I joined the team in early 2014.
[1] dbe52a6b13
220 lines
7.9 KiB
HTML
220 lines
7.9 KiB
HTML
<%inherit file="/main.html" />
|
|
<%namespace name='static' file='/static_content.html'/>
|
|
<%!
|
|
from django.utils.translation import ugettext as _
|
|
from django.template.defaultfilters import escapejs
|
|
from microsite_configuration import page_title_breadcrumbs
|
|
from django.conf import settings
|
|
from edxnotes.helpers import is_feature_enabled as is_edxnotes_enabled
|
|
%>
|
|
<%
|
|
include_special_exams = settings.FEATURES.get('ENABLE_SPECIAL_EXAMS', False) and (course.enable_proctored_exams or course.enable_timed_exams)
|
|
%>
|
|
<%def name="course_name()">
|
|
<% return _("{course_number} Courseware").format(course_number=course.display_number_with_default) %>
|
|
</%def>
|
|
|
|
<%block name="bodyclass">view-in-course view-courseware courseware ${course.css_class or ''}</%block>
|
|
<%block name="title"><title>
|
|
% if section_title:
|
|
${page_title_breadcrumbs(section_title, course_name())}
|
|
% else:
|
|
${page_title_breadcrumbs(course_name())}
|
|
%endif
|
|
</title></%block>
|
|
|
|
<%block name="header_extras">
|
|
% for template_name in ["image-modal"]:
|
|
<script type="text/template" id="${template_name}-tpl">
|
|
<%static:include path="common/templates/${template_name}.underscore" />
|
|
</script>
|
|
% endfor
|
|
|
|
% if settings.FEATURES.get('ENABLE_COURSEWARE_SEARCH'):
|
|
% for template_name in ["course_search_item", "course_search_results", "search_loading", "search_error"]:
|
|
<script type="text/template" id="${template_name}-tpl">
|
|
<%static:include path="search/${template_name}.underscore" />
|
|
</script>
|
|
% endfor
|
|
% endif
|
|
|
|
% if include_special_exams:
|
|
% for template_name in ["proctored-exam-status"]:
|
|
<script type="text/template" id="${template_name}-tpl">
|
|
<%static:include path="courseware/${template_name}.underscore" />
|
|
</script>
|
|
% endfor
|
|
% endif
|
|
|
|
</%block>
|
|
|
|
<%block name="headextra">
|
|
<%static:css group='style-course-vendor'/>
|
|
<%static:css group='style-course'/>
|
|
## Utility: Notes
|
|
% if is_edxnotes_enabled(course):
|
|
<%static:css group='style-student-notes'/>
|
|
% endif
|
|
|
|
<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
|
|
|
|
<%include file="../discussion/_js_head_dependencies.html" />
|
|
${fragment.head_html()}
|
|
</%block>
|
|
|
|
<%block name="js_extra">
|
|
<script type="text/javascript" src="${static.url('js/vendor/jquery.scrollTo-1.4.2-min.js')}"></script>
|
|
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
|
|
|
|
## codemirror
|
|
<script type="text/javascript" src="${static.url('js/vendor/codemirror-compressed.js')}"></script>
|
|
|
|
<%static:js group='courseware'/>
|
|
<%static:js group='discussion'/>
|
|
% if settings.FEATURES.get('ENABLE_COURSEWARE_SEARCH'):
|
|
<%static:require_module module_name="js/search/course/course_search_factory" class_name="CourseSearchFactory">
|
|
var courseId = $('#courseware-search-results').data('courseId');
|
|
CourseSearchFactory(courseId);
|
|
</%static:require_module>
|
|
% endif
|
|
|
|
<%include file="../discussion/_js_body_dependencies.html" />
|
|
% if staff_access:
|
|
<%include file="xqa_interface.html"/>
|
|
% endif
|
|
|
|
<script type="text/javascript">
|
|
var $$course_id = "${course.id | escapejs}";
|
|
|
|
$(function(){
|
|
$(".ui-accordion-header a, .ui-accordion-content .subtitle-name").each(function() {
|
|
var elemText = $(this).text().replace(/^\s+|\s+$/g,''); // Strip leading and trailing whitespace
|
|
var wordArray = elemText.split(" ");
|
|
var finalTitle = "";
|
|
if (wordArray.length > 0) {
|
|
for (i=0;i<=wordArray.length-1;i++) {
|
|
finalTitle += wordArray[i];
|
|
if (i == (wordArray.length-2)) {
|
|
finalTitle += " ";
|
|
} else if (i == (wordArray.length-1)) {
|
|
// Do nothing
|
|
} else {
|
|
finalTitle += " ";
|
|
}
|
|
}
|
|
}
|
|
$(this).html(finalTitle);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
${fragment.foot_html()}
|
|
|
|
</%block>
|
|
|
|
% if default_tab:
|
|
<%include file="/courseware/course_navigation.html" />
|
|
% else:
|
|
<%include file="/courseware/course_navigation.html" args="active_page='courseware'" />
|
|
% endif
|
|
|
|
<div class="container">
|
|
<div class="course-wrapper" role="presentation">
|
|
|
|
% if disable_accordion is UNDEFINED or not disable_accordion:
|
|
<div class="course-index">
|
|
% if settings.FEATURES.get('ENABLE_COURSEWARE_SEARCH'):
|
|
<div id="courseware-search-bar" class="search-bar courseware-search-bar" role="search" aria-label="Course">
|
|
<form>
|
|
<label for="course-search-input" class="sr">${_('Course Search')}</label>
|
|
<div class="search-field-wrapper">
|
|
<input id="course-search-input" type="text" class="search-field"/>
|
|
<button type="submit" class="search-button">
|
|
${_('search')} <i class="icon fa fa-search" aria-hidden="true"></i>
|
|
</button>
|
|
<button type="button" class="cancel-button" aria-label="${_('Clear search')}">
|
|
<i class="icon fa fa-remove" aria-hidden="true"></i>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
% endif
|
|
|
|
<div class="accordion">
|
|
<nav class="course-navigation" aria-label="${_('Course')}">
|
|
% if accordion.strip():
|
|
${accordion}
|
|
% else:
|
|
<div class="chapter">${_("No content has been added to this course")}</div>
|
|
% endif
|
|
</nav>
|
|
</div>
|
|
|
|
</div>
|
|
% endif
|
|
<section class="course-content" id="course-content" role="main" aria-label="Content">
|
|
% if getattr(course, 'entrance_exam_enabled') and \
|
|
getattr(course, 'entrance_exam_minimum_score_pct') and \
|
|
entrance_exam_current_score is not UNDEFINED:
|
|
% if not entrance_exam_passed:
|
|
<p class="sequential-status-message">
|
|
${_('To access course materials, you must score {required_score}% or higher on this \
|
|
exam. Your current score is {current_score}%.').format(
|
|
required_score=int(round(course.entrance_exam_minimum_score_pct * 100)),
|
|
current_score=int(round(entrance_exam_current_score * 100))
|
|
)}
|
|
</p>
|
|
<script type="text/javascript">
|
|
$(document).ajaxSuccess(function(event, xhr, settings) {
|
|
if (settings.url.indexOf("xmodule_handler/problem_check") > -1) {
|
|
var data = JSON.parse(xhr.responseText);
|
|
if (data.entrance_exam_passed){
|
|
location.reload();
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
% else:
|
|
<p class="sequential-status-message">
|
|
${_('Your score is {current_score}%. You have passed the entrance exam.').format(
|
|
current_score=int(round(entrance_exam_current_score * 100))
|
|
)}
|
|
</p>
|
|
% endif
|
|
% endif
|
|
|
|
${fragment.body_html()}
|
|
</section>
|
|
% if settings.FEATURES.get('ENABLE_COURSEWARE_SEARCH'):
|
|
<section id="courseware-search-results" class="search-results courseware-search-results" data-course-id="${course.id}">
|
|
</section>
|
|
% endif
|
|
</div>
|
|
</div>
|
|
<div class="container-footer">
|
|
% if settings.FEATURES.get("LICENSING", False):
|
|
<div class="course-license">
|
|
% if getattr(course, "license", None):
|
|
<%include file="../license.html" args="license=course.license" />
|
|
% else:
|
|
## Default course license: All Rights Reserved, if none is explicitly set.
|
|
<%include file="../license.html" args="license='all-rights-reserved'" />
|
|
% endif
|
|
</div>
|
|
% endif
|
|
</div>
|
|
|
|
<nav class="nav-utilities ${"has-utility-calculator" if course.show_calculator else ""}" aria-label="${_('Course Utilities')}">
|
|
## Utility: Notes
|
|
% if is_edxnotes_enabled(course):
|
|
<%include file="/edxnotes/toggle_notes.html" args="course=course"/>
|
|
% endif
|
|
|
|
## Utility: Calc
|
|
% if course.show_calculator:
|
|
<%include file="/calculator/toggle_calculator.html" />
|
|
% endif
|
|
</nav>
|
|
|
|
<%include file="../modal/accessible_confirm.html" />
|