Prova:
${t['title']}
Nome:
${t['student']['name']}
Número:
${t['student']['number']}
Início:
${t['start_time'][:19]}
Fim:
${t['finish_time'][:19]}
Nota:
% if t['grade'] < 10: ${t['grade']} valores % elif t['grade'] < 15: ${t['grade']} valores % else: ${t['grade']} valores % endif
Referência:
${t['ref']}
IP:
${t['student']['ip_address']}
Browser:
${t['student']['user_agent']}
<%! from tools import md_to_html %> <% total_points = sum(q['points'] for q in t['questions']) %> % for i,q in enumerate(t['questions']):
% if q['type'] == 'information': % elif q['type'] == 'warning': % elif q['type'] == 'alert': % else:

${q['title']}

Classificar  % if q['answer'] is not None: % else: % endif
${md_to_html(q['text'], q['ref'], q['files'])}
% if q['type'] == 'radio': % for opt in q['options']: % if q['answer'] is not None and str(loop.index) == q['answer']: ${md_to_html(' ' + opt, q['ref'], q['files'])} % else: ${md_to_html(' ' + opt, q['ref'], q['files'])} % endif % endfor % elif q['type'] == 'checkbox': % for opt in q['options']: % if q['answer'] is not None and str(loop.index) in q['answer']: ${md_to_html(' ' + opt, q['ref'], q['files'])} % else: ${md_to_html(' ' + opt, q['ref'], q['files'])} % endif % endfor % elif q['type'] in ('text', 'text_regex', 'textarea'):
${q['answer'] if q['answer'] is not None else ''}
% endif % if t['show_hints']: % if 'hint' in q:
${md_to_html(q['hint'], q['ref'], q['files'])}
% endif # hint % endif % if t['show_points']:

(Cotação: ${round(q['points'] / total_points * 20.0, 1)} pontos)

% endif % if q['grade'] > 0.99:

% elif q['grade'] > 0.49: % else: % endif
% endif
% endfor