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
c1781f3b
Commit
c1781f3b
authored
Jul 23, 2015
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #37 from edx/cdodge/order-attempts
sort by reverse date
parents
4fe36066
52a0b59f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
edx_proctoring/models.py
+1
-1
edx_proctoring/tests/test_api.py
+2
-2
No files found.
edx_proctoring/models.py
View file @
c1781f3b
...
@@ -138,7 +138,7 @@ class ProctoredExamStudentAttemptManager(models.Manager):
...
@@ -138,7 +138,7 @@ class ProctoredExamStudentAttemptManager(models.Manager):
if
course_id
is
not
None
:
if
course_id
is
not
None
:
filtered_query
=
filtered_query
&
Q
(
proctored_exam__course_id
=
course_id
)
filtered_query
=
filtered_query
&
Q
(
proctored_exam__course_id
=
course_id
)
return
self
.
filter
(
filtered_query
)
return
self
.
filter
(
filtered_query
)
.
order_by
(
'-created'
)
class
ProctoredExamStudentAttemptStatus
(
object
):
class
ProctoredExamStudentAttemptStatus
(
object
):
...
...
edx_proctoring/tests/test_api.py
View file @
c1781f3b
...
@@ -430,8 +430,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
...
@@ -430,8 +430,8 @@ class ProctoredExamApiTests(LoggedInTestCase):
add_allowance_for_user
(
self
.
proctored_exam_id
,
self
.
user
.
username
,
'new_key'
,
'new_value'
)
add_allowance_for_user
(
self
.
proctored_exam_id
,
self
.
user
.
username
,
'new_key'
,
'new_value'
)
student_active_exams
=
get_active_exams_for_user
(
self
.
user_id
,
self
.
course_id
)
student_active_exams
=
get_active_exams_for_user
(
self
.
user_id
,
self
.
course_id
)
self
.
assertEqual
(
len
(
student_active_exams
),
2
)
self
.
assertEqual
(
len
(
student_active_exams
),
2
)
self
.
assertEqual
(
len
(
student_active_exams
[
0
][
'allowances'
]),
2
)
self
.
assertEqual
(
len
(
student_active_exams
[
0
][
'allowances'
]),
0
)
self
.
assertEqual
(
len
(
student_active_exams
[
1
][
'allowances'
]),
0
)
self
.
assertEqual
(
len
(
student_active_exams
[
1
][
'allowances'
]),
2
)
def
test_get_filtered_exam_attempts
(
self
):
def
test_get_filtered_exam_attempts
(
self
):
"""
"""
...
...
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