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
5e433cda
Commit
5e433cda
authored
Mar 14, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified comments about the logic of showing the save button
parent
4dabb4ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
common/lib/xmodule/xmodule/capa_module.py
+12
-3
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
5e433cda
...
...
@@ -312,14 +312,23 @@ class CapaModule(XModule):
# If the student has unlimited attempts, and their answers
# are not randomized, then we do not need a save button
# because they can use the "Check" button
# because they can use the "Check" button without consequences.
#
# The consequences we want to avoid are:
# * Using up an attempt (if max_attempts is set)
# * Changing the current problem, and no longer being
# able to view it (if rerandomize is "always")
#
# In those cases. the if statement below is false,
# and the save button can still be displayed.
#
if
self
.
max_attempts
is
None
and
self
.
rerandomize
!=
"always"
:
return
False
# If the problem is closed (and not a survey question with max_attempts==0),
# then do NOT show the
reset
button
# then do NOT show the
save
button
# If we're waiting for the user to reset a randomized problem
# then do NOT show the
reset
button
# then do NOT show the
save
button
elif
(
self
.
closed
()
and
not
is_survey_question
)
or
needs_reset
:
return
False
else
:
...
...
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