Integration of edx_proctoring into the LMS
This commit is contained in:
@@ -33,9 +33,37 @@
|
||||
formatted_string = get_time_display(section['due'], due_date_display_format, coerce_tz=settings.TIME_ZONE_DISPLAYED_FOR_DEADLINES)
|
||||
due_date = '' if len(formatted_string)==0 else _('due {date}').format(date=formatted_string)
|
||||
%>
|
||||
<p class="subtitle">${section['format']} ${due_date}</p>
|
||||
|
||||
## There is behavior differences between
|
||||
## rending of sections which have proctoring/timed examinations
|
||||
## and those that do not.
|
||||
##
|
||||
## Proctoring exposes a exam status message field as well as
|
||||
## a status icon
|
||||
|
||||
% if section['format'] or due_date or 'proctoring' in section:
|
||||
<p class="subtitle">
|
||||
% if 'proctoring' in section:
|
||||
## Display the proctored exam status icon and status message
|
||||
<i class="fa ${section['proctoring'].get('suggested_icon', 'fa-lock')} ${section['proctoring'].get('status', 'eligible')}"></i>
|
||||
<span class="subtitle-name">${section['proctoring'].get('short_description', '')}
|
||||
</span>
|
||||
## completed proctored exam statuses should not show the due date
|
||||
## since the exam has already been submitted by the user
|
||||
% if not section['proctoring'].get('in_completed_state', False):
|
||||
<span class="subtitle-name">${due_date}</span>
|
||||
% endif
|
||||
% else:
|
||||
## non-proctored section, we just show the exam format and the due date
|
||||
## this is the standard case in edx-platform
|
||||
<span class="subtitle-name">${section['format']} ${due_date}
|
||||
</span>
|
||||
% endif
|
||||
</p>
|
||||
% endif
|
||||
|
||||
% if 'graded' in section and section['graded']:
|
||||
## sections that are graded should indicate this through an icon
|
||||
<i class="icon fa fa-pencil-square-o" aria-hidden="true" data-tooltip="${_("This section is graded.")}"></i>
|
||||
% endif
|
||||
</a>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
## mako
|
||||
<%namespace name='static' file='/static_content.html'/>
|
||||
<%!
|
||||
from django.utils.translation import ugettext as _
|
||||
from courseware.tabs import get_course_tab_list
|
||||
from courseware.views import notification_image_for_tab
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.conf import settings
|
||||
from openedx.core.djangoapps.course_groups.partition_scheme import get_cohorted_user_partition
|
||||
from student.models import CourseEnrollment
|
||||
%>
|
||||
@@ -29,8 +31,18 @@ masquerade_group_id = masquerade.group_id if masquerade else None
|
||||
staff_selected = selected(not masquerade or masquerade.role != "student")
|
||||
specific_student_selected = selected(not staff_selected and masquerade.user_name)
|
||||
student_selected = selected(not staff_selected and not specific_student_selected and not masquerade_group_id)
|
||||
include_proctoring = settings.FEATURES.get('ENABLE_PROCTORED_EXAMS', False) and course.enable_proctored_exams
|
||||
%>
|
||||
<%static:js group='proctoring'/>
|
||||
|
||||
% if include_proctoring:
|
||||
% for template_name in ["proctored-exam-status"]:
|
||||
<script type="text/template" id="${template_name}-tpl">
|
||||
<%static:include path="courseware/${template_name}.underscore" />
|
||||
</script>
|
||||
% endfor
|
||||
<div class="proctored_exam_status"></div>
|
||||
% endif
|
||||
% if show_preview_menu:
|
||||
<nav class="wrapper-preview-menu" aria-label="${_('Course View')}">
|
||||
<div class="preview-menu">
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
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_proctoring = settings.FEATURES.get('ENABLE_PROCTORED_EXAMS', False) and course.enable_proctored_exams
|
||||
%>
|
||||
<%def name="course_name()">
|
||||
<% return _("{course_number} Courseware").format(course_number=course.display_number_with_default) %>
|
||||
</%def>
|
||||
@@ -25,13 +29,23 @@ ${page_title_breadcrumbs(course_name())}
|
||||
<%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
|
||||
<script type="text/template" id="${template_name}-tpl">
|
||||
<%static:include path="search/${template_name}.underscore" />
|
||||
</script>
|
||||
% endfor
|
||||
% endif
|
||||
|
||||
% if include_proctoring:
|
||||
% 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">
|
||||
@@ -81,7 +95,7 @@ ${page_title_breadcrumbs(course_name())}
|
||||
var $$course_id = "${course.id | escapejs}";
|
||||
|
||||
$(function(){
|
||||
$(".ui-accordion-header a, .ui-accordion-content .subtitle").each(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 = "";
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<div class="wrap-instructor-info studio-view">
|
||||
<a class="instructor-info-action proctored-exam-action proctored-exam-action-stop">
|
||||
<%- gettext("Mark Exam As Completed") %>
|
||||
</a>
|
||||
</div>
|
||||
24
lms/templates/courseware/proctored-exam-status.underscore
Normal file
24
lms/templates/courseware/proctored-exam-status.underscore
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="exam-timer">
|
||||
<%
|
||||
function gtLtEscape(str) {
|
||||
return String(str)
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
}
|
||||
%>
|
||||
<%= interpolate_text('You are taking "{exam_link}" as a proctored exam. The timer on the right shows the time remaining in the exam.', {exam_link: "<a href='" + exam_url_path + "'>"+gtLtEscape(exam_display_name)+"</a>"}) %>
|
||||
<span id="turn_in_exam_id" class="pull-right">
|
||||
<span id="turn_in_exam_id">
|
||||
<% if(attempt_status !== 'ready_to_submit') {%>
|
||||
<button class="exam-button-turn-in-exam">
|
||||
<%- gettext("End My Exam") %>
|
||||
</button>
|
||||
<% } %>
|
||||
</span>
|
||||
<span id="time_remaining_id">
|
||||
<b>
|
||||
</b>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user