Commit f58c73d3 by Eric Fischer

Merge pull request #888 from edx/efischer/pdf_upload

Fix leaderboard PDFs
parents 595f393b ee2a1c84
......@@ -17,11 +17,9 @@
</h4>
{% endwith %}
<div class="leaderboard__answer">
{% if topscore.file %}
<img class="leaderboard__score__image" alt="{% trans "The image associated with your peer's submission." %}" src="{{ topscore.file }}" />
{% endif %}
{% trans "Your peer's response to the question above:" as translated_label %}
{% include "openassessmentblock/oa_submission_answer.html" with answer=topscore.submission.answer answer_text_label=translated_label %}
{% include "openassessmentblock/oa_uploaded_file.html" with file_upload_type=file_upload_type file_url=topscore.file class_prefix="submission__answer"%}
</div>
</li>
{% endfor %}
......
......@@ -86,7 +86,7 @@ class LeaderboardMixin(object):
score.pop('content', None)
context = {'topscores': scores, 'allow_latex': self.allow_latex,}
context = {'topscores': scores, 'allow_latex': self.allow_latex, 'file_upload_type': self.file_upload_type,}
return 'openassessmentblock/leaderboard/oa_leaderboard_show.html', context
......
......@@ -242,6 +242,7 @@ class TestLeaderboardRender(XBlockHandlerTransactionTestCase):
{
'topscores': scores,
'allow_latex': xblock.allow_latex,
'file_upload_type': xblock.file_upload_type,
},
workflow_status='done'
)
......
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