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
ee49a273
Commit
ee49a273
authored
Nov 02, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error when editing the review component blocks
parent
755ba357
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
problem_builder/mixins.py
+9
-0
problem_builder/step_review.py
+8
-8
No files found.
problem_builder/mixins.py
View file @
ee49a273
from
lazy
import
lazy
from
lazy
import
lazy
from
xblock.fields
import
String
,
Boolean
,
Float
,
Scope
,
UNIQUE_ID
from
xblock.fields
import
String
,
Boolean
,
Float
,
Scope
,
UNIQUE_ID
from
xblock.fragment
import
Fragment
from
xblockutils.helpers
import
child_isinstance
from
xblockutils.helpers
import
child_isinstance
from
xblockutils.resources
import
ResourceLoader
from
xblockutils.resources
import
ResourceLoader
...
@@ -167,3 +168,11 @@ class QuestionMixin(EnumerableChildMixin):
...
@@ -167,3 +168,11 @@ class QuestionMixin(EnumerableChildMixin):
decorative elements/instructions.
decorative elements/instructions.
"""
"""
return
self
.
mentoring_view
(
context
)
return
self
.
mentoring_view
(
context
)
class
NoSettingsMixin
(
object
):
""" Mixin for an XBlock that has no settings """
def
studio_view
(
self
,
_context
=
None
):
""" Studio View """
return
Fragment
(
u'<p>{}</p>'
.
format
(
self
.
_
(
"This XBlock does not have any settings."
)))
problem_builder/step_review.py
View file @
ee49a273
...
@@ -28,7 +28,7 @@ from xblockutils.studio_editable import (
...
@@ -28,7 +28,7 @@ from xblockutils.studio_editable import (
NestedXBlockSpec
,
StudioEditableXBlockMixin
,
StudioContainerWithNestedXBlocksMixin
,
XBlockWithPreviewMixin
NestedXBlockSpec
,
StudioEditableXBlockMixin
,
StudioContainerWithNestedXBlocksMixin
,
XBlockWithPreviewMixin
)
)
from
.mixins
import
XBlockWithTranslationServiceMixin
from
.mixins
import
XBlockWithTranslationServiceMixin
,
NoSettingsMixin
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -133,7 +133,7 @@ class ConditionalMessageBlock(
...
@@ -133,7 +133,7 @@ class ConditionalMessageBlock(
@XBlock.needs
(
"i18n"
)
@XBlock.needs
(
"i18n"
)
class
ScoreSummaryBlock
(
XBlockWithTranslationServiceMixin
,
XBlockWithPreviewMixin
,
XBlock
):
class
ScoreSummaryBlock
(
XBlockWithTranslationServiceMixin
,
XBlockWithPreviewMixin
,
NoSettingsMixin
,
XBlock
):
"""
"""
Summarize the score that the student earned.
Summarize the score that the student earned.
"""
"""
...
@@ -174,7 +174,7 @@ class ScoreSummaryBlock(XBlockWithTranslationServiceMixin, XBlockWithPreviewMixi
...
@@ -174,7 +174,7 @@ class ScoreSummaryBlock(XBlockWithTranslationServiceMixin, XBlockWithPreviewMixi
@XBlock.needs
(
"i18n"
)
@XBlock.needs
(
"i18n"
)
class
PerQuestionFeedbackBlock
(
XBlockWithTranslationServiceMixin
,
XBlockWithPreviewMixin
,
XBlock
):
class
PerQuestionFeedbackBlock
(
XBlockWithTranslationServiceMixin
,
XBlockWithPreviewMixin
,
NoSettingsMixin
,
XBlock
):
"""
"""
Summaryize the score that the student earned.
Summaryize the score that the student earned.
"""
"""
...
@@ -210,7 +210,11 @@ class PerQuestionFeedbackBlock(XBlockWithTranslationServiceMixin, XBlockWithPrev
...
@@ -210,7 +210,11 @@ class PerQuestionFeedbackBlock(XBlockWithTranslationServiceMixin, XBlockWithPrev
@XBlock.needs
(
"i18n"
)
@XBlock.needs
(
"i18n"
)
class
ReviewStepBlock
(
class
ReviewStepBlock
(
StudioContainerWithNestedXBlocksMixin
,
XBlockWithTranslationServiceMixin
,
XBlockWithPreviewMixin
,
XBlock
StudioContainerWithNestedXBlocksMixin
,
XBlockWithTranslationServiceMixin
,
XBlockWithPreviewMixin
,
NoSettingsMixin
,
XBlock
):
):
"""
"""
A dedicated step for reviewing results as the last step of a Step Builder sequence.
A dedicated step for reviewing results as the last step of a Step Builder sequence.
...
@@ -275,10 +279,6 @@ class ReviewStepBlock(
...
@@ -275,10 +279,6 @@ class ReviewStepBlock(
mentoring_view
=
student_view
mentoring_view
=
student_view
def
studio_view
(
self
,
_context
=
None
):
""" Studio View """
return
Fragment
(
u'<p>{}</p>'
.
format
(
self
.
_
(
"This XBlock does not have any settings."
)))
def
author_edit_view
(
self
,
context
):
def
author_edit_view
(
self
,
context
):
"""
"""
Add some HTML to the author view that allows authors to add child blocks.
Add some HTML to the author view that allows authors to add child blocks.
...
...
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