Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
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
OpenEdx
problem-builder
Commits
b59e5e4f
Commit
b59e5e4f
authored
Oct 01, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #85 from open-craft/dragonfi-workbench-workaround
Workaround for workbench not assigning location parameter
parents
3a7b7822
1031cbb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
mentoring/html.py
+2
-1
mentoring/light_children.py
+4
-1
mentoring/questionnaire.py
+1
-1
No files found.
mentoring/html.py
View file @
b59e5e4f
...
@@ -56,7 +56,8 @@ class HTMLBlock(LightChild):
...
@@ -56,7 +56,8 @@ class HTMLBlock(LightChild):
return
block
return
block
def
student_view
(
self
,
context
=
None
):
def
student_view
(
self
,
context
=
None
):
if
context
.
get
(
'as_template'
,
True
):
as_template
=
context
.
get
(
'as_template'
,
True
)
if
context
is
not
None
else
True
if
as_template
:
return
Fragment
(
u"<script type='text/template' id='{}'>
\n
{}
\n
</script>"
.
format
(
return
Fragment
(
u"<script type='text/template' id='{}'>
\n
{}
\n
</script>"
.
format
(
'light-child-template'
,
'light-child-template'
,
self
.
content
self
.
content
...
...
mentoring/light_children.py
View file @
b59e5e4f
...
@@ -216,7 +216,10 @@ class LightChild(Plugin, LightChildrenMixin):
...
@@ -216,7 +216,10 @@ class LightChild(Plugin, LightChildrenMixin):
def
__init__
(
self
,
parent
):
def
__init__
(
self
,
parent
):
self
.
parent
=
parent
self
.
parent
=
parent
self
.
location
=
parent
.
location
try
:
self
.
location
=
parent
.
location
except
AttributeError
:
self
.
location
=
None
self
.
scope_ids
=
parent
.
scope_ids
self
.
scope_ids
=
parent
.
scope_ids
self
.
xblock_container
=
parent
.
xblock_container
self
.
xblock_container
=
parent
.
xblock_container
self
.
_student_data_loaded
=
False
self
.
_student_data_loaded
=
False
...
...
mentoring/questionnaire.py
View file @
b59e5e4f
...
@@ -75,7 +75,7 @@ class QuestionnaireAbstractBlock(LightChild, StepMixin):
...
@@ -75,7 +75,7 @@ class QuestionnaireAbstractBlock(LightChild, StepMixin):
def
student_view
(
self
,
context
=
None
):
def
student_view
(
self
,
context
=
None
):
name
=
self
.
__class__
.
__name__
name
=
self
.
__class__
.
__name__
as_template
=
context
.
get
(
'as_template'
,
True
)
as_template
=
context
.
get
(
'as_template'
,
True
)
if
context
is
not
None
else
True
if
str
(
self
.
type
)
not
in
self
.
valid_types
:
if
str
(
self
.
type
)
not
in
self
.
valid_types
:
raise
ValueError
(
u'Invalid value for {}.type: `{}`'
.
format
(
name
,
self
.
type
))
raise
ValueError
(
u'Invalid value for {}.type: `{}`'
.
format
(
name
,
self
.
type
))
...
...
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