Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
6d444de0
Commit
6d444de0
authored
12 years ago
by
ichuang
Browse files
Options
Downloads
Patches
Plain Diff
fix capa_problems pep8
parent
4f6d9143
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/capa/capa_problem.py
+3
-3
3 additions, 3 deletions
common/lib/capa/capa_problem.py
with
3 additions
and
3 deletions
common/lib/capa/capa_problem.py
+
3
−
3
View file @
6d444de0
...
...
@@ -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).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment