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
6b1e1b14
Commit
6b1e1b14
authored
Mar 29, 2013
by
brianhw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1769 from MITx/fix/ned/cleanup-wacky-code
Enough is enough.
parents
a5b1428b
0cfcd183
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
common/lib/capa/capa/correctmap.py
+7
-6
No files found.
common/lib/capa/capa/correctmap.py
View file @
6b1e1b14
...
...
@@ -80,16 +80,17 @@ class CorrectMap(object):
Special migration case:
If correct_map is a one-level dict, then convert it to the new dict of dicts format.
'''
if
correct_map
and
not
(
type
(
correct_map
[
correct_map
.
keys
()[
0
]])
==
dict
):
# empty current dict
self
.
__init__
()
# empty current dict
self
.
__init__
()
# create new dict entries
# create new dict entries
if
correct_map
and
not
isinstance
(
correct_map
.
values
()[
0
],
dict
):
# special migration
for
k
in
correct_map
:
self
.
set
(
k
,
correct_map
[
k
])
self
.
set
(
k
,
correct
ness
=
correct
_map
[
k
])
else
:
self
.
__init__
()
for
k
in
correct_map
:
self
.
set
(
k
,
**
correct_map
[
k
])
...
...
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