Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
799b6023
Commit
799b6023
authored
Aug 28, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate the timestamp uses in CodeResponse
parent
704bd6fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
common/lib/capa/capa/responsetypes.py
+5
-4
No files found.
common/lib/capa/capa/responsetypes.py
View file @
799b6023
...
@@ -1127,11 +1127,14 @@ class CodeResponse(LoncapaResponse):
...
@@ -1127,11 +1127,14 @@ class CodeResponse(LoncapaResponse):
# Prepare xqueue request
# Prepare xqueue request
#------------------------------------------------------------
#------------------------------------------------------------
qinterface
=
self
.
system
.
xqueue
[
'interface'
]
qinterface
=
self
.
system
.
xqueue
[
'interface'
]
qtime
=
datetime
.
strftime
(
datetime
.
now
(),
xqueue_interface
.
dateformat
)
anonymous_student_id
=
self
.
system
.
anonymous_student_id
anonymous_student_id
=
self
.
system
.
anonymous_student_id
# Generate header
# Generate header
queuekey
=
xqueue_interface
.
make_hashkey
(
str
(
self
.
system
.
seed
)
+
str
(
time
.
time
())
+
queuekey
=
xqueue_interface
.
make_hashkey
(
str
(
self
.
system
.
seed
)
+
qtime
+
anonymous_student_id
+
anonymous_student_id
+
self
.
answer_id
)
self
.
answer_id
)
xheader
=
xqueue_interface
.
make_xheader
(
lms_callback_url
=
self
.
system
.
xqueue
[
'callback_url'
],
xheader
=
xqueue_interface
.
make_xheader
(
lms_callback_url
=
self
.
system
.
xqueue
[
'callback_url'
],
...
@@ -1147,9 +1150,8 @@ class CodeResponse(LoncapaResponse):
...
@@ -1147,9 +1150,8 @@ class CodeResponse(LoncapaResponse):
contents
=
self
.
payload
.
copy
()
contents
=
self
.
payload
.
copy
()
# Metadata related to the student submission revealed to the external grader
# Metadata related to the student submission revealed to the external grader
current_time
=
datetime
.
now
()
student_info
=
{
'anonymous_student_id'
:
anonymous_student_id
,
student_info
=
{
'anonymous_student_id'
:
anonymous_student_id
,
'submission_time'
:
str
(
current_time
)
,
'submission_time'
:
qtime
,
}
}
contents
.
update
({
'student_info'
:
json
.
dumps
(
student_info
)})
contents
.
update
({
'student_info'
:
json
.
dumps
(
student_info
)})
...
@@ -1165,7 +1167,6 @@ class CodeResponse(LoncapaResponse):
...
@@ -1165,7 +1167,6 @@ class CodeResponse(LoncapaResponse):
body
=
json
.
dumps
(
contents
))
body
=
json
.
dumps
(
contents
))
# State associated with the queueing request
# State associated with the queueing request
qtime
=
datetime
.
strftime
(
datetime
.
now
(),
xqueue_interface
.
dateformat
)
queuestate
=
{
'key'
:
queuekey
,
queuestate
=
{
'key'
:
queuekey
,
'time'
:
qtime
,
'time'
:
qtime
,
}
}
...
...
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