Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions problem_builder/public/css/problem-builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@

.mentoring .grade .checkmark-incorrect {
margin-left: 10px;
margin-right: 20px;
}

.mentoring input[type=button],
Expand Down Expand Up @@ -159,11 +158,12 @@
}

.mentoring .results-section {
float: left;
margin-left: 40px;
}

.mentoring .results-section p {
margin: 4px;
margin-bottom: 4px;
padding-top: 4px;
}

.mentoring .clear {
Expand Down
10 changes: 9 additions & 1 deletion problem_builder/public/themes/lms.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,12 @@ div.course-wrapper section.course-content .themed-xblock.mentoring p:empty {

.themed-xblock.mentoring .choice.incorrect .choice-tips-container.active {
border-color: #c1373f;
}
}

.themed-xblock.mentoring .review-list {
margin-top: 0;
}

.themed-xblock.mentoring .grade .grade-result .results-section p {
margin-bottom: 4px; /* Override LMS rule 'div.course-wrapper section.course-content p { margin-bottom: huge; }' */
}
16 changes: 12 additions & 4 deletions problem_builder/templates/html/review_step.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,19 @@ <h2>

<!-- Template for extended feedback: Show extended feedback details when all attempts are used up. -->
<script type="text/template" id="xblock-step-links-template">
<% var q, last_question; %>
<ul class="review-list <%= correctness %>-list">
<% for (var question in questions) {{ q = questions[question]; last_question = question == questions.length - 1; %>
<li><a href="#" class="step-link" data-step="<%= q.step %>"><%= _.template(gettext("Question {number}"), {number: q.number}, {interpolate: /\{(.+?)\}/g}) %></a></li>
<% }} %>
<% for (var question in questions) { %>
<%
var q = questions[question];
var last_question = question == questions.length - 1;
var second_last_question = question == questions.length - 2;
%>
<li>
<a href="#" class="step-link" data-step="<%= q.step %>"><%=
_.template(gettext("Question {number}"), {number: q.number}, {interpolate: /\{(.+?)\}/g})
%></a><% if (!last_question) { %><%= (questions.length > 2 ? ", " : "") %><%= (second_last_question ? " " + gettext("and"): "") %><% } %>
</li>
<% } %>
</ul>
</script>

Expand Down
7 changes: 7 additions & 0 deletions problem_builder/tests/integration/test_step_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ def test_step_builder(self, params):
"num_attempts": 1, "max_attempts": max_attempts
}
self.peek_at_review(step_builder, controls, expected_results, extended_feedback=extended_feedback)
if extended_feedback and max_attempts == 1:
self.assertIn("Question 1 and Question 3", step_builder.find_element_by_css_selector('.correct-list').text)

if max_attempts == 1:
self.assert_message_text(step_builder, "On review message text")
Expand Down Expand Up @@ -302,6 +304,11 @@ def test_step_builder(self, params):
"num_attempts": 2, "max_attempts": max_attempts
}
self.peek_at_review(step_builder, controls, expected_results, extended_feedback=extended_feedback)
if extended_feedback and max_attempts == 2:
self.assertIn(
"Question 1, Question 2, and Question 4",
step_builder.find_element_by_css_selector('.correct-list').text
)

if max_attempts == 2:
self.assert_disabled(controls.try_again)
Expand Down
1 change: 1 addition & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-e git+https://github.com/edx/XBlock.git@tag-master-2015-05-22#egg=XBlock
selenium==2.47.3 # 2.48 is not working atm