diff --git a/problem_builder/mentoring.py b/problem_builder/mentoring.py
index 45c3c068..3cd5b9c7 100644
--- a/problem_builder/mentoring.py
+++ b/problem_builder/mentoring.py
@@ -820,7 +820,11 @@ def author_edit_view(self, context):
fragment = Fragment(u'
') # This DIV is needed for CSS to apply to the previews
self.render_children(context, fragment, can_reorder=True, can_add=False)
fragment.add_content(u'
')
- fragment.add_content(loader.render_template('templates/html/mentoring_add_buttons.html', {}))
+
+ # Show buttons to add review-related child blocks only in assessment mode.
+ fragment.add_content(loader.render_template('templates/html/mentoring_add_buttons.html', {
+ "show_review": self.is_assessment,
+ }))
fragment.add_content(loader.render_template('templates/html/mentoring_url_name.html', {
"url_name": self.url_name
}))
diff --git a/problem_builder/message.py b/problem_builder/message.py
index bc8ea632..7315c98d 100644
--- a/problem_builder/message.py
+++ b/problem_builder/message.py
@@ -88,16 +88,14 @@ class MentoringMessageBlock(XBlock, StudioEditableXBlockMixin, XBlockWithTransla
},
"on-assessment-review-question": {
"display_name": _(u"Study tips if this question was wrong"),
- "long_display_name": _(u"Study tips shown during assessment review if wrong"),
+ "long_display_name": _(u"Study tips shown if question was answered incorrectly"),
"default": _(
u"Review ____."
),
"description": _(
- u"In assessment mode, this message will be shown when the student is reviewing "
+ u"This message will be shown when the student is reviewing "
"their answers to the assessment, if the student got this specific question "
- "wrong and is allowed to try again. "
- "This message is ignored in standard mode and is not shown if the student has "
- "used up all of their allowed attempts."
+ "wrong and is allowed to try again."
),
},
}
diff --git a/problem_builder/public/css/problem-builder-edit.css b/problem_builder/public/css/problem-builder-edit.css
index beed38a8..a910faaa 100644
--- a/problem_builder/public/css/problem-builder-edit.css
+++ b/problem_builder/public/css/problem-builder-edit.css
@@ -28,9 +28,11 @@
.xblock[data-block-type=step-builder] .add-xblock-component .new-component .new-component-type .add-xblock-component-button,
.xblock[data-block-type=problem-builder] .add-xblock-component .new-component .new-component-type .add-xblock-component-button,
.xblock[data-block-type=mentoring] .add-xblock-component .new-component .new-component-type .add-xblock-component-button {
- width: 200px;
- height: 30px;
+ width: auto;
+ height: auto;
line-height: 30px;
+ padding-left: 1em;
+ padding-right: 1em;
}
.xblock[data-block-type=sb-plot] .add-xblock-component .new-component .new-component-type .add-xblock-component-button.disabled,
diff --git a/problem_builder/public/css/questionnaire-edit.css b/problem_builder/public/css/questionnaire-edit.css
index 5b4aefaa..d46b143c 100644
--- a/problem_builder/public/css/questionnaire-edit.css
+++ b/problem_builder/public/css/questionnaire-edit.css
@@ -1,8 +1,10 @@
/* Custom appearance for our "Add" buttons */
.xblock .add-xblock-component .new-component .new-component-type .add-xblock-component-button {
- width: 200px;
- height: 30px;
+ width: auto;
+ height: auto;
line-height: 30px;
+ padding-left: 1em;
+ padding-right: 1em;
}
.xblock .add-xblock-component .new-component .new-component-type .add-xblock-component-button.disabled,
diff --git a/problem_builder/questionnaire.py b/problem_builder/questionnaire.py
index 3f572ae6..5d338e90 100644
--- a/problem_builder/questionnaire.py
+++ b/problem_builder/questionnaire.py
@@ -158,7 +158,14 @@ def author_edit_view(self, context):
Add some HTML to the author view that allows authors to add choices and tips.
"""
fragment = self.get_author_edit_view_fragment(context)
- fragment.add_content(loader.render_template('templates/html/questionnaire_add_buttons.html', {}))
+
+ # Let the parent block determine whether to display buttons to add review-related child blocks.
+ # * Problem Builder units use MentoringBlock parent components, which define an 'is_assessment' property,
+ # indicating whether the (deprecated) assessment mode is enabled.
+ # * Step Builder units can show review components in the Review Step.
+ fragment.add_content(loader.render_template('templates/html/questionnaire_add_buttons.html', {
+ 'show_review': getattr(self.get_parent(), 'is_assessment', True),
+ }))
fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/problem-builder.css'))
fragment.add_css_url(self.runtime.local_resource_url(self, 'public/css/questionnaire-edit.css'))
fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/util.js'))
diff --git a/problem_builder/templates/html/mentoring_add_buttons.html b/problem_builder/templates/html/mentoring_add_buttons.html
index d03c7452..e9ac09a0 100644
--- a/problem_builder/templates/html/mentoring_add_buttons.html
+++ b/problem_builder/templates/html/mentoring_add_buttons.html
@@ -15,7 +15,9 @@ {% trans "Add New Component" %}
{% trans "Message (Complete)" %}
{% trans "Message (Incomplete)" %}
{% trans "Message (Max # Attempts)" %}
+ {% if show_review %}
{% trans "Message (Assessment Review)" %}
+ {% endif %}
diff --git a/problem_builder/templates/html/questionnaire_add_buttons.html b/problem_builder/templates/html/questionnaire_add_buttons.html
index 33a05d0c..90dc9235 100644
--- a/problem_builder/templates/html/questionnaire_add_buttons.html
+++ b/problem_builder/templates/html/questionnaire_add_buttons.html
@@ -5,7 +5,9 @@