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
98542f79
Commit
98542f79
authored
Aug 27, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define dateformat variable in xqueue_interface
parent
50481c2a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
common/lib/capa/capa/capa_problem.py
+5
-2
common/lib/capa/capa/responsetypes.py
+1
-1
common/lib/capa/capa/xqueue_interface.py
+1
-1
No files found.
common/lib/capa/capa/capa_problem.py
View file @
98542f79
...
@@ -34,6 +34,7 @@ from datetime import datetime
...
@@ -34,6 +34,7 @@ from datetime import datetime
import
eia
import
eia
import
inputtypes
import
inputtypes
from
util
import
contextualize_text
,
convert_files_to_filenames
from
util
import
contextualize_text
,
convert_files_to_filenames
import
xqueue_interface
# to be replaced with auto-registering
# to be replaced with auto-registering
import
responsetypes
import
responsetypes
...
@@ -215,8 +216,10 @@ class LoncapaProblem(object):
...
@@ -215,8 +216,10 @@ class LoncapaProblem(object):
return
None
return
None
# Get a list of timestamps of all queueing requests, then convert it to a DateTime object
# Get a list of timestamps of all queueing requests, then convert it to a DateTime object
queuetimes
=
[
self
.
correct_map
.
get_queuetime_str
(
answer_id
)
for
answer_id
in
self
.
correct_map
if
self
.
correct_map
.
is_queued
(
answer_id
)]
queuetime_strs
=
[
self
.
correct_map
.
get_queuetime_str
(
answer_id
)
queuetimes
=
[
datetime
.
strptime
(
qt
,
'
%
Y
%
m
%
d
%
H
%
M
%
S'
)
for
qt
in
queuetimes
]
for
answer_id
in
self
.
correct_map
if
self
.
correct_map
.
is_queued
(
answer_id
)]
queuetimes
=
[
datetime
.
strptime
(
qt_str
,
xqueue_interface
.
dateformat
)
for
qt_str
in
queuetime_strs
]
return
max
(
queuetimes
)
return
max
(
queuetimes
)
...
...
common/lib/capa/capa/responsetypes.py
View file @
98542f79
...
@@ -1150,7 +1150,7 @@ class CodeResponse(LoncapaResponse):
...
@@ -1150,7 +1150,7 @@ 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
(),
'
%
Y
%
m
%
d
%
H
%
M
%
S'
)
qtime
=
datetime
.
strftime
(
datetime
.
now
(),
xqueue_interface
.
dateformat
)
queuestate
=
{
'key'
:
queuekey
,
queuestate
=
{
'key'
:
queuekey
,
'time'
:
qtime
,
'time'
:
qtime
,
}
}
...
...
common/lib/capa/capa/xqueue_interface.py
View file @
98542f79
...
@@ -9,7 +9,7 @@ import time
...
@@ -9,7 +9,7 @@ import time
log
=
logging
.
getLogger
(
'mitx.'
+
__name__
)
log
=
logging
.
getLogger
(
'mitx.'
+
__name__
)
dateformat
=
'
%
Y
%
m
%
d
%
H
%
M
%
S'
def
make_hashkey
(
seed
=
None
):
def
make_hashkey
(
seed
=
None
):
'''
'''
...
...
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