Commit e2f8c7ad by E. Kolpakov

Added ability to override feedback messages title

parent a4703a2a
...@@ -131,6 +131,12 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -131,6 +131,12 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
default=_("Mentoring Questions"), default=_("Mentoring Questions"),
scope=Scope.settings scope=Scope.settings
) )
feedback_label = String(
display_name=_("Feedback Messages Title"),
help=_("Title for feedback messages"),
default=_("Feedback"),
scope=Scope.content
)
# User state # User state
attempted = Boolean( attempted = Boolean(
...@@ -170,7 +176,7 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -170,7 +176,7 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
editable_fields = ( editable_fields = (
'display_name', 'mode', 'followed_by', 'max_attempts', 'enforce_dependency', 'display_name', 'mode', 'followed_by', 'max_attempts', 'enforce_dependency',
'display_submit', 'weight', 'display_submit', 'feedback_label', 'weight',
) )
icon_class = 'problem' icon_class = 'problem'
has_score = True has_score = True
......
...@@ -22,7 +22,8 @@ function MentoringBlock(runtime, element) { ...@@ -22,7 +22,8 @@ function MentoringBlock(runtime, element) {
hideAllSteps: hideAllSteps, hideAllSteps: hideAllSteps,
step: step, step: step,
steps: steps, steps: steps,
publish_event: publish_event publish_event: publish_event,
data: data
}; };
function publish_event(data) { function publish_event(data) {
......
...@@ -25,7 +25,7 @@ function MentoringStandardView(runtime, element, mentoring) { ...@@ -25,7 +25,7 @@ function MentoringStandardView(runtime, element, mentoring) {
// Messages should only be displayed upon hitting 'submit', not on page reload // Messages should only be displayed upon hitting 'submit', not on page reload
mentoring.setContent(messagesDOM, results.message); mentoring.setContent(messagesDOM, results.message);
if (messagesDOM.html().trim()) { if (messagesDOM.html().trim()) {
messagesDOM.prepend('<div class="title1">' + gettext('Feedback') + '</div>'); messagesDOM.prepend('<div class="title1">' + mentoring.data.feedback_label + '</div>');
messagesDOM.show(); messagesDOM.show();
} }
......
{% load i18n %} {% load i18n %}
<div class="mentoring themed-xblock" data-mode="{{ self.mode }}" data-step="{{ self.step }}"> <div class="mentoring themed-xblock" data-mode="{{ self.mode }}" data-step="{{ self.step }}" data-feedback_label="{{ self.feedback_label}}">
<div class="missing-dependency warning" data-missing="{{ self.has_missing_dependency }}"> <div class="missing-dependency warning" data-missing="{{ self.has_missing_dependency }}">
{% with url=missing_dependency_url|safe %} {% with url=missing_dependency_url|safe %}
{% blocktrans with link_start="<a href='"|add:url|add:"'>" link_end="</a>" %} {% blocktrans with link_start="<a href='"|add:url|add:"'>" link_end="</a>" %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment