Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-proctoring
Commits
c7beb4e5
Commit
c7beb4e5
authored
Jul 16, 2015
by
Muhammad Shoaib
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added the new property for the dateFormat
parent
08460713
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
27 deletions
+38
-27
edx_proctoring/serializers.py
+0
-2
edx_proctoring/static/proctoring/js/views/proctored_exam_attempt_view.js
+14
-2
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
+3
-3
edx_proctoring/tests/test_views.py
+21
-20
No files found.
edx_proctoring/serializers.py
View file @
c7beb4e5
...
...
@@ -3,8 +3,6 @@ from rest_framework import serializers
from
django.contrib.auth.models
import
User
from
edx_proctoring.models
import
ProctoredExam
,
ProctoredExamStudentAttempt
,
ProctoredExamStudentAllowance
DATETIME_FORMAT
=
"
%
b
%
d,
%
Y
%
I:
%
M
%
p"
# "MMMM dd, yyyy HH:MM"
class
StrictBooleanField
(
serializers
.
BooleanField
):
"""
...
...
edx_proctoring/static/proctoring/js/views/proctored_exam_attempt_view.js
View file @
c7beb4e5
...
...
@@ -5,7 +5,17 @@ var edx = edx || {};
edx
.
instructor_dashboard
=
edx
.
instructor_dashboard
||
{};
edx
.
instructor_dashboard
.
proctoring
=
edx
.
instructor_dashboard
.
proctoring
||
{};
var
viewHelper
=
{
getDateFormat
:
function
(
date
)
{
if
(
date
)
{
return
new
Date
(
date
).
toString
(
'MMM dd, yyyy h:mmtt'
);
}
else
{
return
'N/A'
;
}
}
};
edx
.
instructor_dashboard
.
proctoring
.
ProctoredExamAttemptView
=
Backbone
.
View
.
extend
({
initialize
:
function
(
options
)
{
this
.
$el
=
options
.
el
;
...
...
@@ -105,13 +115,15 @@ var edx = edx || {};
render
:
function
()
{
if
(
this
.
template
!==
null
)
{
var
self
=
this
;
var
html
=
this
.
template
(
{
var
data
=
{
proctored_exam_attempts
:
this
.
collection
.
toJSON
()[
0
].
proctored_exam_attempts
,
pagination_info
:
this
.
collection
.
toJSON
()[
0
].
pagination_info
,
attempt_url
:
this
.
collection
.
toJSON
()[
0
].
attempt_url
,
inSearchMode
:
this
.
inSearchMode
,
searchText
:
this
.
searchText
});
};
_
.
extend
(
data
,
viewHelper
);
var
html
=
this
.
template
(
data
);
this
.
$el
.
html
(
html
);
this
.
$el
.
show
();
}
...
...
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
View file @
c7beb4e5
...
...
@@ -80,7 +80,7 @@
<tr class="exam-attempt-headings">
<th class="username"><%- gettext("Username") %></th>
<th class="exam-name"><%- gettext("Exam Name") %></th>
<th class="attempt-allowed-time"><%- gettext("Allowed Time
for Student
") %> </th>
<th class="attempt-allowed-time"><%- gettext("Allowed Time
(Minutes)
") %> </th>
<th class="attempt-started-at"><%- gettext("Started At") %></th>
<th class="attempt-completed-at"><%- gettext("Completed At") %> </th>
<th class="attempt-status"><%- gettext("Status") %> </th>
...
...
@@ -97,8 +97,8 @@
<%- interpolate(gettext(' %(exam_display_name)s '), { exam_display_name: proctored_exam_attempt.proctored_exam.exam_name }, true) %>
</td>
<td> <%= proctored_exam_attempt.allowed_time_limit_mins %></td>
<td> <%=
proctored_exam_attempt.started_at
%></td>
<td> <%=
proctored_exam_attempt.completed_at
%></td>
<td> <%=
getDateFormat(proctored_exam_attempt.started_at)
%></td>
<td> <%=
getDateFormat(proctored_exam_attempt.completed_at)
%></td>
<td>
<% if (proctored_exam_attempt.status){ %>
<%= proctored_exam_attempt.status %>
...
...
edx_proctoring/tests/test_views.py
View file @
c7beb4e5
...
...
@@ -385,7 +385,7 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
external_id'
:
proctored_exam
.
external_id
,
'start_clock'
:
True
,
}
response
=
self
.
client
.
post
(
...
...
@@ -411,7 +411,7 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
external_id'
:
proctored_exam
.
external_id
,
'start_clock'
:
True
,
}
response
=
self
.
client
.
post
(
...
...
@@ -455,7 +455,7 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
external_id'
:
proctored_exam
.
external_id
,
'start_clock'
:
True
,
}
response
=
self
.
client
.
post
(
...
...
@@ -488,7 +488,7 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
external_id'
:
proctored_exam
.
external_id
,
'start_clock'
:
True
,
}
response
=
self
.
client
.
post
(
...
...
@@ -530,8 +530,7 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'attempt_proctored'
:
True
,
'start_clock'
:
False
'external_id'
:
proctored_exam
.
external_id
}
response
=
self
.
client
.
post
(
reverse
(
'edx_proctoring.proctored_exam.attempt.collection'
),
...
...
@@ -567,8 +566,8 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
start_clock'
:
False
'
user_id'
:
self
.
student_taking_exam
.
id
,
'
external_id'
:
proctored_exam
.
external_id
}
response
=
self
.
client
.
post
(
reverse
(
'edx_proctoring.proctored_exam.attempt.collection'
),
...
...
@@ -603,8 +602,8 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
start_clock'
:
False
'
user_id'
:
self
.
student_taking_exam
.
id
,
'
external_id'
:
proctored_exam
.
external_id
}
response
=
self
.
client
.
post
(
reverse
(
'edx_proctoring.proctored_exam.attempt.collection'
),
...
...
@@ -634,7 +633,7 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'start_clock'
:
False
,
'attempt_proctored'
:
Tru
e
'attempt_proctored'
:
Fals
e
}
# create a exam attempt
response
=
self
.
client
.
post
(
...
...
@@ -680,8 +679,8 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
)
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
start_clock'
:
False
'
user_id'
:
self
.
student_taking_exam
.
id
,
'
external_id'
:
proctored_exam
.
external_id
}
response
=
self
.
client
.
post
(
reverse
(
'edx_proctoring.proctored_exam.attempt.collection'
),
...
...
@@ -736,8 +735,9 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'start_clock'
:
True
,
'attempts_proctored'
:
True
'user_id'
:
self
.
user
.
id
,
'external_id'
:
proctored_exam
.
external_id
,
'start_clock'
:
True
}
response
=
self
.
client
.
post
(
reverse
(
'edx_proctoring.proctored_exam.attempt.collection'
),
...
...
@@ -769,8 +769,9 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'start_clock'
:
True
,
'attempt_proctored'
:
True
'user_id'
:
self
.
user
.
id
,
'external_id'
:
proctored_exam
.
external_id
,
'start_clock'
:
True
}
response
=
self
.
client
.
post
(
reverse
(
'edx_proctoring.proctored_exam.attempt.collection'
),
...
...
@@ -805,8 +806,8 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
attempt_data
=
{
'exam_id'
:
proctored_exam
.
id
,
'
attempt_proctored'
:
True
,
'
start_clock'
:
True
'
user_id'
:
self
.
student_taking_exam
.
id
,
'
external_id'
:
proctored_exam
.
external_id
}
response
=
self
.
client
.
post
(
reverse
(
'edx_proctoring.proctored_exam.attempt.collection'
),
...
...
@@ -842,8 +843,8 @@ class TestStudentProctoredExamAttempt(LoggedInTestCase):
# create an attempt but don't start it
attempt_data
=
{
'attempt_proctored'
:
True
,
'exam_id'
:
proctored_exam
.
id
,
'external_id'
:
proctored_exam
.
external_id
,
'start_clock'
:
False
,
}
response
=
self
.
client
.
post
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment