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
c7d80a91
Commit
c7d80a91
authored
Mar 05, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed name of survey_question to is_survey_question for clarity
parent
43d8574e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
common/lib/xmodule/xmodule/capa_module.py
+4
-4
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
c7d80a91
...
...
@@ -279,7 +279,7 @@ class CapaModule(XModule):
"""
Return True/False to indicate whether to show the "Reset" button.
"""
survey_question
=
(
self
.
max_attempts
==
0
)
is_
survey_question
=
(
self
.
max_attempts
==
0
)
if
self
.
rerandomize
in
[
"always"
,
"onreset"
]:
...
...
@@ -287,7 +287,7 @@ class CapaModule(XModule):
# then do NOT show the reset button.
# If the problem hasn't been submitted yet, then do NOT show
# the reset button.
if
(
self
.
closed
()
and
not
survey_question
)
or
not
self
.
is_completed
():
if
(
self
.
closed
()
and
not
is_
survey_question
)
or
not
self
.
is_completed
():
return
False
else
:
return
True
...
...
@@ -307,14 +307,14 @@ class CapaModule(XModule):
if
self
.
force_save_button
==
"true"
:
return
not
self
.
closed
()
else
:
survey_question
=
(
self
.
max_attempts
==
0
)
is_
survey_question
=
(
self
.
max_attempts
==
0
)
needs_reset
=
self
.
is_completed
()
and
self
.
rerandomize
==
"always"
# If the problem is closed (and not a survey question with max_attempts==0),
# then do NOT show the reset button
# If we're waiting for the user to reset a randomized problem
# then do NOT show the reset button
if
(
self
.
closed
()
and
not
survey_question
)
or
needs_reset
:
if
(
self
.
closed
()
and
not
is_
survey_question
)
or
needs_reset
:
return
False
else
:
return
True
...
...
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