Commit 2e212b5c by Alan Boudreault

Replace correct icon png to FA icon for the 'completed' indicator

parent 082298fd
...@@ -49,7 +49,7 @@ class MentoringBlock(XBlockWithLightChildren): ...@@ -49,7 +49,7 @@ class MentoringBlock(XBlockWithLightChildren):
""" """
An XBlock providing mentoring capabilities An XBlock providing mentoring capabilities
Composed of text, answers input fields, and a set of MRQ/MCQ with advices. Composed of text, answers input fields, and a set of MRQ/MCQ with advices.
A set of conditions on the provided answers and MCQ/MRQ choices will determine if the A set of conditions on the provided answers and MCQ/MRQ choices will determine if the
student is a) provided mentoring advices and asked to alter his answer, or b) is given the student is a) provided mentoring advices and asked to alter his answer, or b) is given the
ok to continue. ok to continue.
...@@ -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;
} }
...@@ -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">
<span class="progress" data-completed="{{ self.completed }}"> <input type="button" value="Submit"></input>
<span class='indicator'></span> <span class="progress" data-completed="{{ self.completed }}">
</span> <span class='indicator'></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>
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