Commit cce5fce7 by Matjaz Gregoric

Add 'name' attribute to AnswerBlock's student_view_data.

It will be useful to be able to get the names of all answer blocks in a
course via the Course API.
parent a7c82214
......@@ -266,7 +266,10 @@ class AnswerBlock(SubmittingXBlockMixin, AnswerMixin, QuestionMixin, StudioEdita
Returns a JSON representation of the student_view of this XBlock,
retrievable from the Course Block API.
"""
return {'question': self.question}
return {
'question': self.question,
'name': self.name,
}
@XBlock.needs("i18n")
......
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