Commit f84a59c2 by Braden MacDonald

Add font awesome if running in workbench

parent 63d3f7d7
...@@ -219,6 +219,14 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC ...@@ -219,6 +219,14 @@ class MentoringBlock(XBlock, StepParentMixin, StudioEditableXBlockMixin, StudioC
fragment.add_resource(loader.load_unicode('templates/html/mentoring_attempts.html'), "text/html") fragment.add_resource(loader.load_unicode('templates/html/mentoring_attempts.html'), "text/html")
fragment.add_resource(loader.load_unicode('templates/html/mentoring_grade.html'), "text/html") fragment.add_resource(loader.load_unicode('templates/html/mentoring_grade.html'), "text/html")
# Workbench doesn't have font awesome, so add it:
try:
from workbench.runtime import WorkbenchRuntime
if isinstance(self.runtime, WorkbenchRuntime):
fragment.add_css_url('//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css')
except ImportError:
pass
fragment.initialize_js('MentoringBlock') fragment.initialize_js('MentoringBlock')
if not self.display_submit: if not self.display_submit:
......
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