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
25860ca1
Commit
25860ca1
authored
Jun 10, 2012
by
ichuang
Committed by
Matthew Mongeau
Jun 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix capa_problems pep8
parent
cd9e4672
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
common/lib/capa/capa_problem.py
+3
-3
No files found.
common/lib/capa/capa_problem.py
View file @
25860ca1
...
...
@@ -146,7 +146,7 @@ class LoncapaProblem(object):
def
get_max_score
(
self
):
'''
Return maximum score for this problem.
We do this by counting the number of answers available for each question
We do this by counting the number of answers available for each question
in the problem. If the Response for a question has a get_max_score() method
then we call that and add its return value to the count. That can be
used to give complex problems (eg programming questions) multiple points.
...
...
@@ -351,7 +351,7 @@ class LoncapaProblem(object):
Also create capa Response instances for each responsetype and save as self.responders
'''
response_id
=
1
self
.
responders
=
{}
self
.
responders
=
{}
for
response
in
tree
.
xpath
(
'//'
+
"|//"
.
join
(
response_tag_dict
)):
response_id_str
=
self
.
problem_id
+
"_"
+
str
(
response_id
)
response
.
set
(
'id'
,
response_id_str
)
# create and save ID for this response
...
...
@@ -367,7 +367,7 @@ class LoncapaProblem(object):
answer_id
=
answer_id
+
1
responder
=
response_tag_dict
[
response
.
tag
](
response
,
inputfields
,
self
.
context
,
self
.
system
)
# instantiate capa Response
self
.
responders
[
response
]
=
responder
# save in list in self
self
.
responders
[
response
]
=
responder
# save in list in self
# <solution>...</solution> may not be associated with any specific response; give IDs for those separately
# TODO: We should make the namespaces consistent and unique (e.g. %s_problem_%i).
...
...
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