Commit 1eba407c by Braden MacDonald

Display choices as HTML in studio editor

parent 3f4ff281
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
# Imports ########################################################### # Imports ###########################################################
from django.utils.safestring import mark_safe
from lxml import etree from lxml import etree
from xblock.core import XBlock from xblock.core import XBlock
from xblock.fields import Scope, String, Float, List, UNIQUE_ID from xblock.fields import Scope, String, Float, List, UNIQUE_ID
...@@ -160,7 +161,7 @@ class QuestionnaireAbstractBlock(StudioEditableXBlockMixin, StudioContainerXBloc ...@@ -160,7 +161,7 @@ class QuestionnaireAbstractBlock(StudioEditableXBlockMixin, StudioContainerXBloc
@property @property
def human_readable_choices(self): def human_readable_choices(self):
return [{"display_name": c.content, "value": c.value} for c in self.custom_choices] return [{"display_name": mark_safe(c.content), "value": c.value} for c in self.custom_choices]
@staticmethod @staticmethod
def choice_values_provider(question): def choice_values_provider(question):
......
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