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
2c5efc6c
Commit
2c5efc6c
authored
Sep 30, 2015
by
Tim Krones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure Step Builder descendants don't show up in sequence navigation tooltips.
parent
79b53ca5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
problem_builder/mentoring.py
+18
-20
No files found.
problem_builder/mentoring.py
View file @
2c5efc6c
...
...
@@ -34,10 +34,8 @@ from xblock.fields import Boolean, Scope, String, Integer, Float, List
from
xblock.fragment
import
Fragment
from
xblock.validation
import
ValidationMessage
from
.message
import
(
MentoringMessageBlock
,
CompletedMentoringMessageShim
,
IncompleteMentoringMessageShim
,
OnReviewMentoringMessageShim
)
from
.message
import
MentoringMessageBlock
from
.mixins
import
(
_normalize_id
,
QuestionMixin
,
MessageParentMixin
,
StepParentMixin
,
XBlockWithTranslationServiceMixin
)
...
...
@@ -45,7 +43,7 @@ from .mixins import (
from
xblockutils.helpers
import
child_isinstance
from
xblockutils.resources
import
ResourceLoader
from
xblockutils.studio_editable
import
(
NestedXBlockSpec
,
StudioEditableXBlockMixin
,
StudioContainerXBlockMixin
,
StudioContainerWithNestedXBlocksMixin
StudioEditableXBlockMixin
,
StudioContainerXBlockMixin
,
StudioContainerWithNestedXBlocksMixin
)
...
...
@@ -135,6 +133,21 @@ class BaseMentoringBlock(
def
max_attempts_reached
(
self
):
return
self
.
max_attempts
>
0
and
self
.
num_attempts
>=
self
.
max_attempts
def
get_content_titles
(
self
):
"""
By default, each Sequential block in a course ("Subsection" in Studio parlance) will
display the display_name of each descendant in a tooltip above the content. We don't
want that - we only want to display one title for this mentoring block as a whole.
Otherwise things like "Choice (yes) (Correct)" will appear in the tooltip.
If this block has no title set, don't display any title. Then, if this is the only block
in the unit, the unit's title will be used. (Why isn't it always just used?)
"""
has_explicitly_set_title
=
self
.
fields
[
'display_name'
]
.
is_set_on
(
self
)
if
has_explicitly_set_title
:
return
[
self
.
display_name
]
return
[]
def
get_theme
(
self
):
"""
Gets theme settings from settings service. Falls back to default (LMS) theme
...
...
@@ -795,21 +808,6 @@ class MentoringBlock(BaseMentoringBlock, StudioContainerXBlockMixin, StepParentM
fragment
.
initialize_js
(
'MentoringEditComponents'
)
return
fragment
def
get_content_titles
(
self
):
"""
By default, each Sequential block in a course ("Subsection" in Studio parlance) will
display the display_name of each descendant in a tooltip above the content. We don't
want that - we only want to display one title for this mentoring block as a whole.
Otherwise things like "Choice (yes) (Correct)" will appear in the tooltip.
If this block has no title set, don't display any title. Then, if this is the only block
in the unit, the unit's title will be used. (Why isn't it always just used?)
"""
has_explicitly_set_title
=
self
.
fields
[
'display_name'
]
.
is_set_on
(
self
)
if
has_explicitly_set_title
:
return
[
self
.
display_name
]
return
[]
@staticmethod
def
workbench_scenarios
():
"""
...
...
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