Commit bb8ca4be by Muhammad Shoaib Committed by Chris Dodge

comments suggestion fixed

parent 21d5a06b
Chris Dodge <cdodge@edx.org> Chris Dodge <cdodge@edx.org>
Muhammad Shoaib <mshoaib@edx.org> Muhammad Shoaib <mshoaib@edx.org>
Afzal Wali <afzal@edx.org> Afzal Wali <afzal@edx.org>
\ No newline at end of file
...@@ -357,7 +357,7 @@ def mark_exam_attempt_as_ready(exam_id, user_id): ...@@ -357,7 +357,7 @@ def mark_exam_attempt_as_ready(exam_id, user_id):
return exam_attempt_obj.id return exam_attempt_obj.id
def remove_exam_attempt_by_id(attempt_id): def remove_exam_attempt(attempt_id):
""" """
Removes an exam attempt given the attempt id. Removes an exam attempt given the attempt id.
""" """
...@@ -469,10 +469,7 @@ def get_student_view(user_id, course_id, content_id, context): # pylint: disabl ...@@ -469,10 +469,7 @@ def get_student_view(user_id, course_id, content_id, context): # pylint: disabl
render it's own view render it's own view
""" """
has_started_exam = False
has_finished_exam = False has_finished_exam = False
has_time_expired = False
is_proctored = False
student_view_template = None student_view_template = None
exam_id = None exam_id = None
...@@ -500,6 +497,7 @@ def get_student_view(user_id, course_id, content_id, context): # pylint: disabl ...@@ -500,6 +497,7 @@ def get_student_view(user_id, course_id, content_id, context): # pylint: disabl
attempt = get_exam_attempt(exam_id, user_id) attempt = get_exam_attempt(exam_id, user_id)
has_started_exam = attempt and attempt.get('started_at') has_started_exam = attempt and attempt.get('started_at')
has_time_expired = False
if has_started_exam: if has_started_exam:
now_utc = datetime.now(pytz.UTC) now_utc = datetime.now(pytz.UTC)
expires_at = attempt['started_at'] + timedelta(minutes=attempt['allowed_time_limit_mins']) expires_at = attempt['started_at'] + timedelta(minutes=attempt['allowed_time_limit_mins'])
......
...@@ -10,4 +10,4 @@ var edx = edx || {}; ...@@ -10,4 +10,4 @@ var edx = edx || {};
url: '/api/edx_proctoring/v1/proctored_exam/' url: '/api/edx_proctoring/v1/proctored_exam/'
}); });
this.edx.instructor_dashboard.proctoring.ProctoredExamAllowanceCollection = edx.instructor_dashboard.proctoring.ProctoredExamAllowanceCollection; this.edx.instructor_dashboard.proctoring.ProctoredExamAllowanceCollection = edx.instructor_dashboard.proctoring.ProctoredExamAllowanceCollection;
}).call(this, Backbone); }).call(this, Backbone);
\ No newline at end of file
...@@ -5,9 +5,9 @@ var edx = edx || {}; ...@@ -5,9 +5,9 @@ var edx = edx || {};
edx.instructor_dashboard.proctoring = edx.instructor_dashboard.proctoring || {}; edx.instructor_dashboard.proctoring = edx.instructor_dashboard.proctoring || {};
edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection = Backbone.Collection.extend({ edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection = Backbone.Collection.extend({
/* model for a collection of ProctoredExamAllowance */ /* model for a collection of ProctoredExamAttempt */
model: edx.instructor_dashboard.proctoring.ProctoredExamAttemptModel, model: edx.instructor_dashboard.proctoring.ProctoredExamAttemptModel,
url: '/api/edx_proctoring/v1/proctored_exam/attempt/course_id/' url: '/api/edx_proctoring/v1/proctored_exam/attempt/course_id/'
}); });
this.edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection = edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection; this.edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection = edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection;
}).call(this, Backbone); }).call(this, Backbone);
\ No newline at end of file
...@@ -10,4 +10,4 @@ var edx = edx || {}; ...@@ -10,4 +10,4 @@ var edx = edx || {};
url: '/api/edx_proctoring/v1/proctored_exam/exam/course_id/' url: '/api/edx_proctoring/v1/proctored_exam/exam/course_id/'
}); });
this.edx.instructor_dashboard.proctoring.ProctoredExamCollection = edx.instructor_dashboard.proctoring.ProctoredExamCollection; this.edx.instructor_dashboard.proctoring.ProctoredExamCollection = edx.instructor_dashboard.proctoring.ProctoredExamCollection;
}).call(this, Backbone); }).call(this, Backbone);
\ No newline at end of file
{% load i18n %}
<html> <html>
<body> <body>
</body> </body>
<p>Your proctored exam has started. Please immediately go back to the website to enter into your exam</p> <p>
{% blocktrans %}
Your proctoring session has started. Do not close this window.
Return to the browser window where your course is open to take your exam.
{% endblocktrans %}
</p>
</html> </html>
{% load i18n %} {% load i18n %}
<div class="sequence timed-exam completed"> <div class="sequence timed-exam completed">
<div class="gated-sequence"> <div class="gated-sequence">
{% trans "All done!" %} {% trans "You have finished your exam!" %}
</div> </div>
</div> </div>
{% include 'proctoring/seq_timed_exam_footer.html' %} {% include 'proctoring/seq_timed_exam_footer.html' %}
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<p> <p>
{% trans "This exam has a time limit associated with it." %} {% trans "This exam has a time limit associated with it." %}
<strong> <strong>
{% trans "In order to successfully pass this exam you will have to answer the following questions and problems in the time allotted." %} {% trans "To pass this exam you must complete the problems in the time allowed." %}
</strong> </strong>
{% trans "Once you proceed, you'll start both the exam and the "%} {{total_time|lower}} {% trans " given to you." %} {% trans "As soon as you indicate that you are ready to start the exam, you will have "%} {{total_time|lower}} {% trans " to complete the exam." %}
</p> </p>
<div class="gated-sequence"> <div class="gated-sequence">
<a class='start-timed-exam' data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}"> <a class='start-timed-exam' data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}">
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<p> <p>
{% blocktrans %} {% blocktrans %}
Other work that you have completed in this course contributes to your final grade. Other work that you have completed in this course contributes to your final grade.
See the <a href="{{progress_page_url}}">Progress page</a> for your current grade in the course.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
</div> </div>
......
{% load i18n %} {% load i18n %}
<div class="footer-sequence"> <div class="footer-sequence">
<h4> {% trans "What if i need more time " %}? </h4> <h4> {% trans "Can I request additional time to complete my exam? " %} </h4>
<p>{% blocktrans %} <p>{% blocktrans %}
{{platform_name}} ocassionally grants more time for students with disabilities and difficult conditions. If you have disabilities or are taking the exam in difficult conditions,
you might be eligible for additional time allowance on timed exams.
Ask your instructor or course staff for information about additional time allowances.
Please see <a href="#"> Please see <a href="#">
our frequently asked questions about timed exams and more policies. our frequently asked questions about timed exams and more policies.
</a> </a>
......
...@@ -23,7 +23,7 @@ from edx_proctoring.api import ( ...@@ -23,7 +23,7 @@ from edx_proctoring.api import (
get_allowances_for_course, get_allowances_for_course,
get_all_exams_for_course, get_all_exams_for_course,
get_exam_attempt_by_id, get_exam_attempt_by_id,
remove_exam_attempt_by_id, remove_exam_attempt,
get_all_exam_attempts, get_all_exam_attempts,
get_filtered_exam_attempts, get_filtered_exam_attempts,
is_feature_enabled, is_feature_enabled,
...@@ -360,13 +360,13 @@ class ProctoredExamApiTests(LoggedInTestCase): ...@@ -360,13 +360,13 @@ class ProctoredExamApiTests(LoggedInTestCase):
Calling the api remove function removes the attempt. Calling the api remove function removes the attempt.
""" """
with self.assertRaises(StudentExamAttemptDoesNotExistsException): with self.assertRaises(StudentExamAttemptDoesNotExistsException):
remove_exam_attempt_by_id(9999) remove_exam_attempt(9999)
proctored_exam_student_attempt = self._create_unstarted_exam_attempt() proctored_exam_student_attempt = self._create_unstarted_exam_attempt()
remove_exam_attempt_by_id(proctored_exam_student_attempt.id) remove_exam_attempt(proctored_exam_student_attempt.id)
with self.assertRaises(StudentExamAttemptDoesNotExistsException): with self.assertRaises(StudentExamAttemptDoesNotExistsException):
remove_exam_attempt_by_id(proctored_exam_student_attempt.id) remove_exam_attempt(proctored_exam_student_attempt.id)
def test_stop_a_non_started_exam(self): def test_stop_a_non_started_exam(self):
""" """
......
...@@ -28,7 +28,7 @@ from edx_proctoring.api import ( ...@@ -28,7 +28,7 @@ from edx_proctoring.api import (
get_all_exams_for_course, get_all_exams_for_course,
get_exam_attempt_by_id, get_exam_attempt_by_id,
get_all_exam_attempts, get_all_exam_attempts,
remove_exam_attempt_by_id, remove_exam_attempt,
get_filtered_exam_attempts) get_filtered_exam_attempts)
from edx_proctoring.exceptions import ( from edx_proctoring.exceptions import (
ProctoredBaseException, ProctoredBaseException,
...@@ -339,7 +339,7 @@ class StudentProctoredExamAttempt(AuthenticatedAPIView): ...@@ -339,7 +339,7 @@ class StudentProctoredExamAttempt(AuthenticatedAPIView):
) )
raise StudentExamAttemptDoesNotExistsException(err_msg) raise StudentExamAttemptDoesNotExistsException(err_msg)
remove_exam_attempt_by_id(attempt_id) remove_exam_attempt(attempt_id)
return Response() return Response()
except ProctoredBaseException, ex: except ProctoredBaseException, ex:
......
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