Compare commits

..

No commits in common. "0059ec527065b46b07f693ca2d732ecc92bea5f5" and "7db0d055e5d6ae107ee23d01214137c2180fc19f" have entirely different histories.

2 changed files with 7 additions and 13 deletions

View File

@ -30,7 +30,7 @@
</div>
{% if entry.results.grade == 'fail' %}
Unfortunately, you have not passed the theory exam in this attempt. For your next attempt, it might help to brush up on the following topics:
Unfortunately, you have not passed the theory exam in this attempt. For your next attempt, it might help to revise the following topics:
<ul>
{% for tag in tag_output %}

View File

@ -176,8 +176,6 @@ def result():
tags_low = { tag: tag_result['max'] - tag_result['scored'] for tag, tag_result in entry['results']['tags'].items() }
sorted_low_tags = sorted(tags_low.items(), key=lambda x: x[1], reverse=True)
tag_output = [ tag[0] for tag in sorted_low_tags[0:3] if tag[1] > 3]
revision_plain = ''
revision_html = ''
if entry['results']['grade'] == 'pass':
flavour_text_plain = """Well done on successfully completing the refereeing theory exam. We really appreciate members of our community taking the time to get qualified to referee.
"""
@ -187,14 +185,6 @@ def result():
elif entry['results']['grade'] == 'fail':
flavour_text_plain = """Unfortunately, you were not successful in passing the theory exam in this attempt. We hope that this does not dissuade you, and that you try again in the future.
"""
revision_plain = f"""Based on your answers, we would also suggest you brush up on the following topics for your next attempt:\n\n
{','.join(tag_output)}\n\n
"""
revision_html = f"""<p>Based on your answers, we would also suggest you brush up on the following topics for your next attempt:</p>
<ul>
<li>{'</li><li>'.join(tag_output)}</li>
</ul>
"""
if not entry['status'] == 'late':
email = Message(
subject="SKA Refereeing Theory Exam Results",
@ -210,7 +200,8 @@ def result():
Score: {score}%\n
Grade: {entry['results']['grade']}\n\n
{flavour_text_plain}\n\n
{revision_plain}
Based on your answers, we would also suggest you brush up on the following topics as you continue refereeing:\n\n
{','.join(tag_output)}\n\n
Thank you for taking the time to get qualified as a referee.\n\n
Best wishes,\n
SKA Refereeing
@ -226,7 +217,10 @@ def result():
<h1>{score}%</h1>
<h2>{entry['results']['grade']}</h2>
<p>{flavour_text_plain}</p>
{revision_html}
<p>Based on your answers, we would also suggest you revise the following topics as you continue refereeing:</p>
<ul>
<li>{'</li><li>'.join(tag_output)}</li>
</ul>
<p>Thank you for taking the time to get qualified as a referee.</p>
<p>Best wishes,<br />
SKA Refereeing</p>