Commit a938e7f2 by chrisndodge

Merge pull request #92 from edx/cdodge/fixups

make sure we display the allowed time, not the default time to the us…
parents f69f3e4d 8d16f879
...@@ -1022,7 +1022,8 @@ def get_student_view(user_id, course_id, content_id, ...@@ -1022,7 +1022,8 @@ def get_student_view(user_id, course_id, content_id,
if student_view_template: if student_view_template:
template = loader.get_template(student_view_template) template = loader.get_template(student_view_template)
django_context = Context(context) django_context = Context(context)
total_time = humanized_time(context['default_time_limit_mins']) attempt_time = attempt['allowed_time_limit_mins'] if attempt else exam['time_limit_mins']
total_time = humanized_time(attempt_time)
progress_page_url = '' progress_page_url = ''
try: try:
progress_page_url = reverse( progress_page_url = reverse(
...@@ -1030,6 +1031,9 @@ def get_student_view(user_id, course_id, content_id, ...@@ -1030,6 +1031,9 @@ def get_student_view(user_id, course_id, content_id,
args=[course_id] args=[course_id]
) )
except NoReverseMatch: except NoReverseMatch:
# we are allowing a failure here since we can't guarantee
# that we are running in-proc with the edx-platform LMS
# (for example unit tests)
pass pass
django_context.update({ django_context.update({
......
...@@ -46,7 +46,7 @@ from .utils import AuthenticatedAPIView ...@@ -46,7 +46,7 @@ from .utils import AuthenticatedAPIView
ATTEMPTS_PER_PAGE = 25 ATTEMPTS_PER_PAGE = 25
SOFTWARE_SECURE_CLIENT_TIMEOUT = 15 SOFTWARE_SECURE_CLIENT_TIMEOUT = settings.PROCTORING_SETTINGS.get('SOFTWARE_SECURE_CLIENT_TIMEOUT', 30)
LOG = logging.getLogger("edx_proctoring_views") LOG = logging.getLogger("edx_proctoring_views")
......
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