Commit 1ae6aab7 by Xavier Antoviaque

Merge pull request #3 from aboudreault/mrq-mistake-mark

Mrq mistake mark
parents 6d576e07 2e212b5c
...@@ -74,8 +74,6 @@ class MentoringBlock(XBlockWithLightChildren): ...@@ -74,8 +74,6 @@ class MentoringBlock(XBlockWithLightChildren):
fragment, named_children = self.get_children_fragment(context, view_name='mentoring_view', fragment, named_children = self.get_children_fragment(context, view_name='mentoring_view',
not_instance_of=MentoringMessageBlock) not_instance_of=MentoringMessageBlock)
correct_icon_url = self.runtime.local_resource_url(self, 'public/img/correct-icon.png')
fragment.add_content(render_template('templates/html/mentoring.html', { fragment.add_content(render_template('templates/html/mentoring.html', {
'self': self, 'self': self,
'named_children': named_children, 'named_children': named_children,
...@@ -85,9 +83,7 @@ class MentoringBlock(XBlockWithLightChildren): ...@@ -85,9 +83,7 @@ class MentoringBlock(XBlockWithLightChildren):
fragment.add_javascript_url( fragment.add_javascript_url(
self.runtime.local_resource_url(self, 'public/js/vendor/underscore-min.js')) self.runtime.local_resource_url(self, 'public/js/vendor/underscore-min.js'))
fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/mentoring.js')) fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/mentoring.js'))
fragment.add_resource(load_resource('templates/html/mentoring_progress.html').format( fragment.add_resource(load_resource('templates/html/mentoring_progress.html'), "text/html")
completed=correct_icon_url),
"text/html")
fragment.initialize_js('MentoringBlock') fragment.initialize_js('MentoringBlock')
......
...@@ -50,5 +50,5 @@ ...@@ -50,5 +50,5 @@
} }
.mentoring .progress .indicator .checkmark { .mentoring .progress .indicator .checkmark {
margin-top: 25px; color: #006600;
} }
...@@ -12,18 +12,21 @@ ...@@ -12,18 +12,21 @@
} }
.mentoring .choices .choice-result { .mentoring .choices .choice-result {
padding-right: 40px; padding-right: 10px;
background-position: center; vertical-align: middle;
background-repeat: no-repeat;
} }
.mentoring .choices .choice-result.correct { .mentoring .choices .choice-result.correct {
background-image: url({{ correct_icon_url }}); color: #006600;
cursor: pointer; position: relative;
top: -3px;
} }
.mentoring .choices .choice-result.incorrect { .mentoring .choices .choice-result.incorrect {
background-image: url({{ incorrect_icon_url }}); margin-right: 10px;
cursor: pointer; padding-left: 10px;
padding-right: 10px;
color: #ff0000;
} }
.mentoring .choices .choice-tips, .mentoring .choices .choice-tips,
......
...@@ -66,9 +66,9 @@ function MRQBlock(runtime, element) { ...@@ -66,9 +66,9 @@ function MRQBlock(runtime, element) {
choiceTipsCloseDOM; choiceTipsCloseDOM;
if (choice.completed) { if (choice.completed) {
choiceResultDOM.removeClass('incorrect').addClass('correct'); choiceResultDOM.removeClass('incorrect icon-exclamation').addClass('correct icon-ok');
} else { } else {
choiceResultDOM.removeClass('correct').addClass('incorrect'); choiceResultDOM.removeClass('correct icon-ok').addClass('incorrect icon-exclamation');
} }
choiceTipsDOM.html(choice.tips); choiceTipsDOM.html(choice.tips);
......
...@@ -85,10 +85,6 @@ class QuestionnaireAbstractBlock(LightChild): ...@@ -85,10 +85,6 @@ class QuestionnaireAbstractBlock(LightChild):
fragment = Fragment(html) fragment = Fragment(html)
fragment.add_css(render_template('public/css/questionnaire.css', { fragment.add_css(render_template('public/css/questionnaire.css', {
'self': self, 'self': self,
'correct_icon_url': self.runtime.local_resource_url(self.xblock_container,
'public/img/correct-icon.png'),
'incorrect_icon_url': self.runtime.local_resource_url(self.xblock_container,
'public/img/incorrect-icon.png'),
'close_icon_url': self.runtime.local_resource_url(self.xblock_container, 'close_icon_url': self.runtime.local_resource_url(self.xblock_container,
'public/img/close.png'), 'public/img/close.png'),
})) }))
......
...@@ -7,10 +7,12 @@ ...@@ -7,10 +7,12 @@
{{c.body_html|safe}} {{c.body_html|safe}}
{% endfor %} {% endfor %}
{% if self.display_submit %} {% if self.display_submit %}
<input type="button" value="Submit" class="submit"></input> <div class="submit">
<input type="button" value="Submit"></input>
<span class="progress" data-completed="{{ self.completed }}"> <span class="progress" data-completed="{{ self.completed }}">
<span class='indicator'></span> <span class='indicator'></span>
</span> </span>
</div>
{% endif %} {% endif %}
<div class="messages"></div> <div class="messages"></div>
</div> </div>
<script type="text/template" id="xblock-progress-template"> <script type="text/template" id="xblock-progress-template">
<% if (completed === "True") {{ %> <% if (completed === "True") {{ %>
<img src="{completed}" class="checkmark" alt="Completed"> <i class="icon-ok icon-2x checkmark"></i>
<% }} %> <% }} %>
</script> </script>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="choices-list"> <div class="choices-list">
{% for choice in custom_choices %} {% for choice in custom_choices %}
<div class="choice"> <div class="choice">
<span class="choice-result"></span> <span class="choice-result icon-2x"></span>
<label class="choice-label"> <label class="choice-label">
<input class="choice-selector" type="checkbox" name="{{ self.name }}" value="{{ choice.value }}"{% if choice.value in self.student_choices %} checked{% endif %}> {{ choice.content }} <input class="choice-selector" type="checkbox" name="{{ self.name }}" value="{{ choice.value }}"{% if choice.value in self.student_choices %} checked{% endif %}> {{ choice.content }}
</label> </label>
......
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