Commit bb8ca4be by Muhammad Shoaib Committed by Chris Dodge

comments suggestion fixed

parent 21d5a06b
Chris Dodge <cdodge@edx.org>
Muhammad Shoaib <mshoaib@edx.org>
Afzal Wali <afzal@edx.org>
\ No newline at end of file
Afzal Wali <afzal@edx.org>
......@@ -357,7 +357,7 @@ def mark_exam_attempt_as_ready(exam_id, user_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.
"""
......@@ -469,10 +469,7 @@ def get_student_view(user_id, course_id, content_id, context): # pylint: disabl
render it's own view
"""
has_started_exam = False
has_finished_exam = False
has_time_expired = False
is_proctored = False
student_view_template = None
exam_id = None
......@@ -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)
has_started_exam = attempt and attempt.get('started_at')
has_time_expired = False
if has_started_exam:
now_utc = datetime.now(pytz.UTC)
expires_at = attempt['started_at'] + timedelta(minutes=attempt['allowed_time_limit_mins'])
......
......@@ -10,4 +10,4 @@ var edx = edx || {};
url: '/api/edx_proctoring/v1/proctored_exam/'
});
this.edx.instructor_dashboard.proctoring.ProctoredExamAllowanceCollection = edx.instructor_dashboard.proctoring.ProctoredExamAllowanceCollection;
}).call(this, Backbone);
\ No newline at end of file
}).call(this, Backbone);
......@@ -5,9 +5,9 @@ var edx = edx || {};
edx.instructor_dashboard.proctoring = edx.instructor_dashboard.proctoring || {};
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,
url: '/api/edx_proctoring/v1/proctored_exam/attempt/course_id/'
});
this.edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection = edx.instructor_dashboard.proctoring.ProctoredExamAttemptCollection;
}).call(this, Backbone);
\ No newline at end of file
}).call(this, Backbone);
......@@ -10,4 +10,4 @@ var edx = edx || {};
url: '/api/edx_proctoring/v1/proctored_exam/exam/course_id/'
});
this.edx.instructor_dashboard.proctoring.ProctoredExamCollection = edx.instructor_dashboard.proctoring.ProctoredExamCollection;
}).call(this, Backbone);
\ No newline at end of file
}).call(this, Backbone);
{% load i18n %}
<html>
<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>
{% load i18n %}
<div class="sequence timed-exam completed">
<div class="gated-sequence">
{% trans "All done!" %}
{% trans "You have finished your exam!" %}
</div>
</div>
{% include 'proctoring/seq_timed_exam_footer.html' %}
......@@ -8,9 +8,9 @@
<p>
{% trans "This exam has a time limit associated with it." %}
<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>
{% 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>
<div class="gated-sequence">
<a class='start-timed-exam' data-ajax-url="{{enter_exam_endpoint}}" data-exam-id="{{exam_id}}">
......
......@@ -17,7 +17,6 @@
<p>
{% blocktrans %}
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 %}
</p>
</div>
......
{% load i18n %}
<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 %}
{{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="#">
our frequently asked questions about timed exams and more policies.
</a>
......
......@@ -23,7 +23,7 @@ from edx_proctoring.api import (
get_allowances_for_course,
get_all_exams_for_course,
get_exam_attempt_by_id,
remove_exam_attempt_by_id,
remove_exam_attempt,
get_all_exam_attempts,
get_filtered_exam_attempts,
is_feature_enabled,
......@@ -360,13 +360,13 @@ class ProctoredExamApiTests(LoggedInTestCase):
Calling the api remove function removes the attempt.
"""
with self.assertRaises(StudentExamAttemptDoesNotExistsException):
remove_exam_attempt_by_id(9999)
remove_exam_attempt(9999)
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):
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):
"""
......
......@@ -28,7 +28,7 @@ from edx_proctoring.api import (
get_all_exams_for_course,
get_exam_attempt_by_id,
get_all_exam_attempts,
remove_exam_attempt_by_id,
remove_exam_attempt,
get_filtered_exam_attempts)
from edx_proctoring.exceptions import (
ProctoredBaseException,
......@@ -339,7 +339,7 @@ class StudentProctoredExamAttempt(AuthenticatedAPIView):
)
raise StudentExamAttemptDoesNotExistsException(err_msg)
remove_exam_attempt_by_id(attempt_id)
remove_exam_attempt(attempt_id)
return Response()
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