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
b53327a6
Commit
b53327a6
authored
Aug 27, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctmap state debugging continued...
parent
ff38f5b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
common/lib/capa/capa/capa_problem.py
+1
-0
common/lib/capa/capa/correctmap.py
+4
-3
No files found.
common/lib/capa/capa/capa_problem.py
View file @
b53327a6
...
...
@@ -101,6 +101,7 @@ class LoncapaProblem(object):
print
'THK: LoncapaProblem.__init__'
print
json
.
dumps
(
state
[
'correct_map'
],
indent
=
4
)
self
.
correct_map
.
set_dict
(
state
[
'correct_map'
])
print
json
.
dumps
(
self
.
correct_map
.
get_dict
(),
indent
=
4
)
if
'done'
in
state
:
self
.
done
=
state
[
'done'
]
...
...
common/lib/capa/capa/correctmap.py
View file @
b53327a6
...
...
@@ -58,10 +58,11 @@ class CorrectMap(object):
dict of dicts format.
'''
if
correct_map
and
not
(
type
(
correct_map
[
correct_map
.
keys
()[
0
]])
==
dict
):
self
.
__init__
()
# empty current dict
for
k
in
correct_map
:
self
.
set
(
k
,
correct_map
[
k
])
# create new dict entries
self
.
__init__
()
# empty current dict
for
k
in
correct_map
:
self
.
set
(
k
,
correct_map
[
k
])
# create new dict entries
else
:
self
.
cmap
=
correct_map
self
.
__init__
()
for
k
in
correct_map
:
self
.
set
(
k
,
**
correct_map
[
k
])
def
is_correct
(
self
,
answer_id
):
if
answer_id
in
self
.
cmap
:
return
self
.
cmap
[
answer_id
][
'correctness'
]
==
'correct'
...
...
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