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
dca16ad0
Commit
dca16ad0
authored
Aug 27, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CorrectMap uses dict to represent queuestate
parent
0cff6fa3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
common/lib/capa/capa/correctmap.py
+3
-3
No files found.
common/lib/capa/capa/correctmap.py
View file @
dca16ad0
...
@@ -15,7 +15,7 @@ class CorrectMap(object):
...
@@ -15,7 +15,7 @@ class CorrectMap(object):
- msg : string (may have HTML) giving extra message response (displayed below textline or textbox)
- msg : string (may have HTML) giving extra message response (displayed below textline or textbox)
- hint : string (may have HTML) giving optional hint (displayed below textline or textbox, above msg)
- hint : string (may have HTML) giving optional hint (displayed below textline or textbox, above msg)
- hintmode : one of (None,'on_request','always') criteria for displaying hint
- hintmode : one of (None,'on_request','always') criteria for displaying hint
- queuestate :
Tuple (key, time)
where key is a secret string, and time is a string dump
- queuestate :
Dict {key:'', time:''}
where key is a secret string, and time is a string dump
of a DateTime object in the format '
%
Y
%
m
%
d
%
H
%
M
%
S'. Is None when not queued
of a DateTime object in the format '
%
Y
%
m
%
d
%
H
%
M
%
S'. Is None when not queued
Behaves as a dict.
Behaves as a dict.
...
@@ -83,10 +83,10 @@ class CorrectMap(object):
...
@@ -83,10 +83,10 @@ class CorrectMap(object):
return
answer_id
in
self
.
cmap
and
self
.
cmap
[
answer_id
][
'queuestate'
]
is
not
None
return
answer_id
in
self
.
cmap
and
self
.
cmap
[
answer_id
][
'queuestate'
]
is
not
None
def
is_right_queuekey
(
self
,
answer_id
,
test_key
):
def
is_right_queuekey
(
self
,
answer_id
,
test_key
):
return
self
.
is_queued
(
answer_id
)
and
self
.
cmap
[
answer_id
][
'queuestate'
][
0
]
==
test_key
return
self
.
is_queued
(
answer_id
)
and
self
.
cmap
[
answer_id
][
'queuestate'
][
'key'
]
==
test_key
def
get_queuetime_str
(
self
,
answer_id
):
def
get_queuetime_str
(
self
,
answer_id
):
return
self
.
cmap
[
answer_id
][
'queuestate'
][
1
]
if
self
.
is_queued
(
answer_id
)
else
None
return
self
.
cmap
[
answer_id
][
'queuestate'
][
'time'
]
if
self
.
is_queued
(
answer_id
)
else
None
def
get_npoints
(
self
,
answer_id
):
def
get_npoints
(
self
,
answer_id
):
npoints
=
self
.
get_property
(
answer_id
,
'npoints'
)
npoints
=
self
.
get_property
(
answer_id
,
'npoints'
)
...
...
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