Skip to content

Commit

Permalink
wip dropout result view
Browse files Browse the repository at this point in the history
  • Loading branch information
fekoch committed Dec 16, 2024
1 parent 502aa31 commit 977a55d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions evap/results/templates/results_evaluation_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,17 @@ <h3>{{ evaluation.full_name }} ({{ evaluation.course.semester.name }})</h3>
</div>
{% endif %}

<!-- TODO@Felix: WIP Dropout view -->
<div class="card card-outline-primary">
<div class="card-header d-flex flex-row justify-content-between">
<span>{% translate 'Dropout' %}</span>
<span class="bg-secondary-outline">Dropout count: {{ evaluation.dropout_count }}</span>
</div>
<div class="card-body">
{% include 'results_evaluation_detail_questionnaires.html' with questionnaire_result=dropout_results %}
</div>
</div>

{# Leave some space for big tooltips #}
<div class="py-5 py-md-0"></div>
{% endblock %}
6 changes: 4 additions & 2 deletions evap/results/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ def cache_results(evaluation, *, refetch_related_objects=True):
def get_results(evaluation: Evaluation) -> EvaluationResult:
assert evaluation.state in STATES_WITH_RESULTS_CACHING | {Evaluation.State.IN_EVALUATION}

if evaluation.state == Evaluation.State.IN_EVALUATION:
return _get_results_impl(evaluation)
# TODO@remove commenting out
# if evaluation.state == Evaluation.State.IN_EVALUATION:
# return _get_results_impl(evaluation)
return _get_results_impl(evaluation)

cache_key = get_results_cache_key(evaluation)
result = caches["results"].get(cache_key)
Expand Down

0 comments on commit 977a55d

Please sign in to comment.