Skip to content
Merged
32 changes: 19 additions & 13 deletions problem_builder/public/css/problem-builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,10 @@
vertical-align: top;
}

.mentoring .choice-label {
display: table-cell;
vertical-align: middle;
}

.mentoring .choice-label span.low {
line-height: inherit;
}

.mentoring .choice-tips-container .choice-tips {
position: relative;
}

.mentoring .choice .choice-tips-container.with-tips {
border-left: 2px solid #ddd;
}
Expand All @@ -170,9 +161,24 @@
}

.mentoring .choice-result {
display: block;
float: left;
height: 33.33px;
display: none !important;
height: 17px;
}

.mentoring .checkmark-correct,
.mentoring .checkmark-incorrect,
.mentoring .checkmark-partially-correct {
display: inline-block !important;
margin: -7px 0 0 -35px;
}

.mentoring .sb-review-score .checkmark-correct,
.mentoring .sb-review-score .checkmark-incorrect,
.mentoring .sb-review-score .checkmark-partially-correct,
.mentoring .submit .checkmark-correct,
.mentoring .submit .checkmark-incorrect,
.mentoring .submit .checkmark-partially-correct{
margin: 0;
}

.mentoring .checkmark-correct::before {
Expand Down Expand Up @@ -243,7 +249,7 @@
}

.mentoring .results-section {
margin-left: 50px;
display: inline-block;
}

.mentoring .results-section p {
Expand Down
39 changes: 26 additions & 13 deletions problem_builder/public/css/questionnaire.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
}

.mentoring .questionnaire .choice-result {
display: table-cell;
display: inline-block;
width: 34px;
vertical-align: top;
vertical-align: middle;
cursor: pointer;
float: none;
border: 0;
padding: 0;
background: 0 0;
box-shadow: none !important;
}

.mentoring .questionnaire .feedback {
Expand All @@ -23,15 +26,15 @@
.mentoring div[data-block-type=pb-mrq] .questionnaire .choice-result {
display: inline-block;
padding: 0;
margin: 0 5px;
background: none;
border: none;
outline: none;
}

.mentoring .questionnaire .choice {
overflow-y: hidden;
display: table-row;
padding: 0 0 0 30px;
/*line-height: 0.5;*/
clear: both;
}

.mentoring .questionnaire .choice-result.checkmark-correct,
Expand All @@ -44,15 +47,15 @@
.mentoring .questionnaire .feedback {
display: none;
color: #3c3c3c;
position: absolute;
position: static;
top: 0;
right: 0;
background: transparent;
font-family: arial;
font-size: 14px;
padding: 0 20px;
width: 300px;
min-height: 40px;
min-height: 33px;
max-height: 180px;
z-index: 10000;
}
Expand Down Expand Up @@ -83,6 +86,7 @@
.mentoring .questionnaire .choice-tips p,
.mentoring .questionnaire .feedback p {
color: #3c3c3c;
margin: 5px 0;
}

.mentoring .questionnaire .choice-tips .close,
Expand All @@ -106,22 +110,31 @@
}

.mentoring .choices-list .choice-selector {
display: table-cell;
display: inline-block;
vertical-align: top;
}

.mentoring .choices-list .choice-label-text {
display: table-cell;
display: inline-block;
vertical-align: middle;
padding-left: 0.4em;
padding-right: 0.4em;
width: calc(100% - 47px);
}
.mentoring .choice-tips-container{
width: calc(50% - 10px) !important;
}

.mentoring .choice-tips-container,
.mentoring .choice-label {
display: table-cell;
vertical-align: top;
display: inline-block;
vertical-align: middle;
width: 50%;
min-height: 33px;
}

.mentoring .choice-tips{ top: 0 !important;}


/*RTL Specified CSS*/

.rtl .mentoring .questionnaire .choice-tips,
Expand Down
3 changes: 2 additions & 1 deletion problem_builder/public/js/questionnaire.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function MCQBlock(runtime, element) {

// We're showing previous answers, so go ahead and display results as well
if (choiceInputDOM.prop('checked')) {
choiceResultDOM.find('span.sr-only').remove();
display_message(result.message, messageView, options.checkmark);
if (result.status === "correct") {
choiceDOM.addClass('correct');
Expand Down Expand Up @@ -230,7 +231,7 @@ function MRQBlock(runtime, element) {
var choiceDOM = choiceInputDOM.closest('.choice');
var choiceResultDOM = $('.choice-result', choiceDOM);
var choiceTipsDOM = $('.choice-tips', choiceDOM);

choiceResultDOM.find('span.sr-only').remove();
/* show hint if checked or max_attempts is disabled */
if (!hide_results &&
(result.completed || choiceInputDOM.prop('checked') || options.max_attempts <= 0)) {
Expand Down
4 changes: 2 additions & 2 deletions problem_builder/templates/html/mcqblock.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ <h4 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_
<label class="choice-label"
for="{{ self.html_id }}_{{ forloop.counter }}"
aria-describedby="feedback_{{ self.html_id }} choice_tips_{{ self.html_id }}-{{ forloop.counter }}">
<span class="choice-result fa icon-2x"
<button class="choice-result fa icon-2x"
Comment thread
Agrendalath marked this conversation as resolved.
aria-label=""
data-label_correct="{% trans "Correct" %}"
data-label_incorrect="{% trans "Incorrect" %}"></span>
data-label_incorrect="{% trans "Incorrect" %}"></button>
<span class="choice-selector">
<input type="radio" name="{{ self.name }}" value="{{ choice.value }}"
id="{{ self.html_id }}_{{ forloop.counter }}"
Expand Down
11 changes: 6 additions & 5 deletions problem_builder/templates/html/ratingblock.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ <h4 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_
{% for i in '12345' %}
<div class="choice" aria-live="polite" aria-atomic="true">
<label class="choice-label"
for = "{{ i }}radio"
aria-describedby="feedback_{{ self.html_id }} choice_tips_{{ self.html_id }}-{{ i }}">
<span class="choice-result fa icon-2x" aria-label=""
data-label_correct="{% trans "Correct" %}" data-label_incorrect="{% trans "Incorrect" %}"></span>
<button class="choice-result fa icon-2x" aria-label=""
data-label_correct="{% trans "Correct" %}" data-label_incorrect="{% trans "Incorrect" %}"></button>
<span class="choice-selector">
<input type="radio" name="{{ self.name }}" value="{{i}}"
<input type="radio" id="{{ i }}radio" name="{{ self.name }}" value="{{i}}"
{% if self.student_choice == i and not hide_prev_answer %} checked{%else%} data-student-choice='{{self.student_choice}}'{% endif %}
/>
</span>
Expand All @@ -32,8 +33,8 @@ <h4 class="question-title" id="heading_{{ self.html_id }}">{{ self.display_name_
<div class="choice" aria-live="polite" aria-atomic="true">
<label class="choice-label"
aria-describedby="feedback_{{ self.html_id }} choice_tips_{{ self.html_id }}-{{ forloop.counter }}">
<span class="choice-result fa icon-2x" aria-label=""
data-label_correct="{% trans "Correct" %}" data-label_incorrect="{% trans "Incorrect" %}"></span>
<button class="choice-result fa icon-2x" aria-label=""
data-label_correct="{% trans "Correct" %}" data-label_incorrect="{% trans "Incorrect" %}"></button>
<span class="choice-selector">
<input type="radio" name="{{ self.name }}" value="{{ choice.value }}"
{% if self.student_choice == choice.value and not hide_prev_answer %} checked{%else%} data-student-choice='{{self.student_choice}}'{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# Constants #########################################################

VERSION = '3.4.7'
VERSION = '3.4.8'

# Functions #########################################################

Expand Down