Files
edx-platform/lms/templates/courseware/submission_history.html
sigberto 6e0fb24dab Display correct timezone on timestamp for question submission
The view for submission history used to grab the timezone from the database (UTC) and
appeded the TIME_ZONE variable after (could be any time zone). Adjusted displayed
timedate to the TIME_ZONE variable. Added unittest checks the localized datetime
object used by submission history for the expected hour difference.
2016-05-16 12:26:37 -07:00

17 lines
517 B
HTML

<%page expression_filter="h"/>
<% import json, pytz %>
<h3>${username} > ${course_id} > ${location}</h3>
% for i, (entry, score) in enumerate(zip(history_entries, scores)):
<hr/>
<div>
<% timedate = entry.updated.astimezone(pytz.timezone(settings.TIME_ZONE))%>
<% timedate_str = timedate.strftime('%Y-%m-%d %H:%M:%S %Z') %>
<b>#${len(history_entries) - i}</b>: ${timedate_str}</br>
Score: ${score.grade} / ${score.max_grade}
<pre>
${json.dumps(entry.state, indent=2, sort_keys=True)}
</pre>
</div>
% endfor