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
b645683d
Commit
b645683d
authored
Jan 13, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `student_view()` calls when they aren't implemented by blocks
parent
04f74620
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
22 deletions
+0
-22
mentoring/answer.py
+0
-4
mentoring/message.py
+0
-5
mentoring/quizz.py
+0
-4
mentoring/table.py
+0
-9
No files found.
mentoring/answer.py
View file @
b645683d
...
...
@@ -71,10 +71,6 @@ class AnswerBlock(XBlock):
return
student_input
def
student_view
(
self
,
context
=
None
):
# pylint: disable=W0613
"""Returns default student view."""
return
Fragment
(
u"<p>I can only appear inside mentoring blocks.</p>"
)
def
mentoring_view
(
self
,
context
=
None
):
if
not
self
.
read_only
:
html
=
render_template
(
'templates/html/answer_editable.html'
,
{
...
...
mentoring/message.py
View file @
b645683d
...
...
@@ -27,7 +27,6 @@ import logging
from
xblock.core
import
XBlock
from
xblock.fields
import
Scope
,
String
from
xblock.fragment
import
Fragment
from
.utils
import
render_template
,
XBlockWithChildrenFragmentsMixin
...
...
@@ -48,10 +47,6 @@ class MentoringMessageBlock(XBlock, XBlockWithChildrenFragmentsMixin):
type
=
String
(
help
=
"Type of message"
,
scope
=
Scope
.
content
,
default
=
"completed"
)
has_children
=
True
def
student_view
(
self
,
context
=
None
):
# pylint: disable=W0613
"""Returns default student view."""
return
Fragment
(
u"<p>I can only appear inside mentoring blocks.</p>"
)
def
mentoring_view
(
self
,
context
=
None
):
fragment
,
named_children
=
self
.
get_children_fragment
(
context
,
view_name
=
'mentoring_view'
)
fragment
.
add_content
(
render_template
(
'templates/html/message.html'
,
{
...
...
mentoring/quizz.py
View file @
b645683d
...
...
@@ -84,10 +84,6 @@ class QuizzBlock(XBlock):
return
block
def
student_view
(
self
,
context
=
None
):
# pylint: disable=W0613
"""Returns default student view."""
return
Fragment
(
u"<p>I can only appear inside mentoring blocks.</p>"
)
def
mentoring_view
(
self
,
context
=
None
):
if
self
.
type
not
in
(
'rating'
,
'choices'
):
raise
ValueError
,
u'Invalid value for QuizzBlock.type: `{}`'
.
format
(
self
.
type
)
...
...
mentoring/table.py
View file @
b645683d
...
...
@@ -27,7 +27,6 @@ import logging
from
xblock.core
import
XBlock
from
xblock.fields
import
Scope
,
String
from
xblock.fragment
import
Fragment
from
.utils
import
load_resource
,
render_template
,
XBlockWithChildrenFragmentsMixin
...
...
@@ -82,10 +81,6 @@ class MentoringTableColumnBlock(XBlock, XBlockWithChildrenFragmentsMixin):
header
=
String
(
help
=
"Header of the column"
,
scope
=
Scope
.
content
,
default
=
None
)
has_children
=
True
def
student_view
(
self
,
context
=
None
):
# pylint: disable=W0613
"""Returns default student view."""
return
Fragment
(
u"<p>I can only appear inside mentoring-table blocks.</p>"
)
def
mentoring_table_view
(
self
,
context
):
"""
The content of the column
...
...
@@ -120,10 +115,6 @@ class MentoringTableColumnHeaderBlock(XBlock, XBlockWithChildrenFragmentsMixin):
content
=
String
(
help
=
"Body of the header"
,
scope
=
Scope
.
content
,
default
=
''
)
has_children
=
True
def
student_view
(
self
,
context
=
None
):
# pylint: disable=W0613
"""Returns default student view."""
return
Fragment
(
u"<p>I can only appear inside mentoring-table blocks.</p>"
)
def
mentoring_table_header_view
(
self
,
context
):
fragment
=
super
(
MentoringTableColumnHeaderBlock
,
self
)
.
children_view
(
context
)
fragment
.
add_content
(
unicode
(
self
.
content
))
...
...
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