Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
problem-builder
Commits
1eba407c
Commit
1eba407c
authored
Apr 01, 2015
by
Braden MacDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display choices as HTML in studio editor
parent
3f4ff281
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
problem_builder/questionnaire.py
+2
-1
No files found.
problem_builder/questionnaire.py
View file @
1eba407c
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment