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
5c48b40f
Commit
5c48b40f
authored
Aug 13, 2012
by
John Hess
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed __init__ args to reflect changes to xmodule
parent
3f51759b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
common/lib/xmodule/xmodule/survey_module.py
+9
-4
No files found.
common/lib/xmodule/xmodule/survey_module.py
View file @
5c48b40f
...
@@ -30,8 +30,10 @@ class SurveyModule(CapaModule):
...
@@ -30,8 +30,10 @@ class SurveyModule(CapaModule):
"""
"""
def
__init__
(
self
,
system
,
location
,
definition
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
):
def
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
CapaModule
.
__init__
(
self
,
system
,
location
,
definition
,
instance_state
,
shared_state
,
**
kwargs
)
shared_state
=
None
,
**
kwargs
):
CapaModule
.
__init__
(
self
,
system
,
location
,
definition
,
descriptor
,
instance_state
=
None
,
shared_state
=
None
,
**
kwargs
)
# no maximum number of attempts so students can
# no maximum number of attempts so students can
# always answer surveys
# always answer surveys
...
@@ -44,12 +46,13 @@ class SurveyModule(CapaModule):
...
@@ -44,12 +46,13 @@ class SurveyModule(CapaModule):
def
get_problem_html
(
self
,
encapsulate
=
True
):
def
get_problem_html
(
self
,
encapsulate
=
True
):
'''Similiar to the parent class method from CapaModule
'''Similiar to the parent class method from CapaModule
but
never shows "check answer"
but
only shows "save answer" (unless past due date)
'''
'''
try
:
try
:
html
=
self
.
lcp
.
get_html
()
html
=
self
.
lcp
.
get_html
()
except
Exception
,
err
:
except
Exception
,
err
:
# TODO (vshnayder): another switch on DEBUG.
if
self
.
system
.
DEBUG
:
if
self
.
system
.
DEBUG
:
log
.
exception
(
err
)
log
.
exception
(
err
)
msg
=
(
msg
=
(
...
@@ -65,7 +68,7 @@ class SurveyModule(CapaModule):
...
@@ -65,7 +68,7 @@ class SurveyModule(CapaModule):
content
=
{
'name'
:
self
.
metadata
[
'display_name'
],
content
=
{
'name'
:
self
.
metadata
[
'display_name'
],
'html'
:
html
,
'html'
:
html
,
'weight'
:
self
.
weight
,
'weight'
:
self
.
weight
,
}
}
check_button
=
False
check_button
=
False
reset_button
=
False
reset_button
=
False
...
@@ -96,3 +99,5 @@ class SurveyModule(CapaModule):
...
@@ -96,3 +99,5 @@ class SurveyModule(CapaModule):
class
SurveyDescriptor
(
RawDescriptor
):
class
SurveyDescriptor
(
RawDescriptor
):
module_class
=
SurveyModule
module_class
=
SurveyModule
stores_state
=
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