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
48e7966e
Commit
48e7966e
authored
Aug 23, 2012
by
Arjun Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
partial credit for an inputfield
parent
4e3d8211
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
common/lib/capa/capa/correctmap.py
+6
-4
No files found.
common/lib/capa/capa/correctmap.py
View file @
48e7966e
...
...
@@ -73,10 +73,12 @@ class CorrectMap(object):
return
answer_id
in
self
.
cmap
and
self
.
cmap
[
answer_id
][
'queuekey'
]
==
test_key
def
get_npoints
(
self
,
answer_id
):
if
self
.
is_correct
(
answer_id
):
npoints
=
self
.
cmap
[
answer_id
]
.
get
(
'npoints'
,
1
)
# default to 1 point if correct
return
npoints
or
1
return
0
# if not correct, return 0
npoints
=
self
.
get_property
(
answer_id
,
'npoints'
)
if
npoints
is
not
None
:
return
npoints
elif
self
.
is_correct
(
answer_id
):
return
1
return
0
# if not correct and no points have been assigned, return 0
def
set_property
(
self
,
answer_id
,
property
,
value
):
if
answer_id
in
self
.
cmap
:
self
.
cmap
[
answer_id
][
property
]
=
value
...
...
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