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
0e218528
Commit
0e218528
authored
Sep 17, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
onreset rerandomize option
parent
0ebea52f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
common/lib/xmodule/xmodule/capa_module.py
+4
-2
No files found.
common/lib/xmodule/xmodule/capa_module.py
View file @
0e218528
...
...
@@ -179,6 +179,8 @@ class CapaModule(XModule):
return
"per_student"
elif
rerandomize
==
"never"
:
return
"never"
elif
rerandomize
==
"onreset"
:
return
"onreset"
else
:
raise
Exception
(
"Invalid rerandomize attribute "
+
rerandomize
)
...
...
@@ -307,7 +309,7 @@ class CapaModule(XModule):
save_button
=
False
# Only show the reset button if pressing it will show different values
if
self
.
rerandomize
!=
'always'
:
if
self
.
rerandomize
not
in
[
"always"
,
"onreset"
]
:
reset_button
=
False
# User hasn't submitted an answer yet -- we don't want resets
...
...
@@ -617,7 +619,7 @@ class CapaModule(XModule):
return
"Refresh the page and make an attempt before resetting."
self
.
lcp
.
do_reset
()
if
self
.
rerandomize
==
"always"
:
if
self
.
rerandomize
in
[
"always"
,
"onreset"
]
:
# reset random number generator seed (note the self.lcp.get_state()
# in next line)
self
.
lcp
.
seed
=
None
...
...
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