-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathexercises.html
More file actions
65 lines (64 loc) · 2.89 KB
/
exercises.html
File metadata and controls
65 lines (64 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{%- extends 'base.html' -%}
{%- block page_content -%}
<div class="container">
<div id="exercises-page" class="page {{ direction }}">
<div id="exercises-header">
<div id="main-title">
<h1 id="exercises-head">{{ _('Exercises') }}{% if tag_name %} - #{{ tag_name | e }}{% endif %}</h1>
</div>
</div>
<div id="exercises">
{%- for exercise in exercises %}
<div class="exercise">
<div class="right-side {{ direction }}-language">
<div class="exercise-number me-3">{{ exercise['exercise_number'] }}</div>
<div class="exercise-name"><div class="ex-title">{{ exercise['exercise_name'] | e }}</div></div>
<div class="exercise-tags ms-1">
{% for tag in exercise.tags %}
<a class="ms-1" id="exercise-tag-link" href="{{ url_for('exercises_tag_page', tag_name=tag.tag) }}">#{{ tag.tag | e }}</a>
{% endfor %}
</div>
</div>
<div class="left-side">
<div class="comments-count">
<span class="badge bg-secondary">{{ exercise['comments_num'] }}</span>
<span class="visually-hidden">{{ _("Comments for the solution") }}</span>
</div>
{%- if exercise['notebook'] %}
<div class="which-notebook">
<i class="fa fa-book" aria-hidden="true"></i>
{{ exercise['notebook'] }}
</div>
{%- endif %}
{%- if exercise.get('is_checked') is none %}
{% set details = {'page': 'send', 'icon': 'upload', 'text': _('Send'), 'css': 'send', 'page_id': exercise['course_id'] ~ '/' ~ exercise['exercise_id']} %}
{% elif not exercise.get('is_checked') %}
{% set details = {'page': 'view', 'icon': 'eye', 'text': _('View'), 'css': 'view', 'page_id': exercise['solution_id']} %}
{% else %}
{% set details = {'page': 'view', 'icon': 'check-circle-o', 'text': _('Check'), 'css': 'checked', 'page_id': exercise['solution_id']} %}
{% endif -%}
{%- if not exercise.get('is_archived') or exercise.get('is_checked') is not none %}
<a class="our-button go-{{ details['css'] }}" href="{{ details['page'] }}/{{ details['page_id'] }}">
{{ details['text'] | e }}
<i class="fa fa-{{ details['icon'] }}" aria-hidden="true"></i>
</a>
{% endif -%}
{% if is_manager %}
<a class="our-button our-button-narrow go-grader" href="check/{{ exercise['exercise_id'] }}">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
</a>
{% endif %}
</div>
</div>
{% endfor -%}
{%- if not fetch_archived %}
<div class="exercise centered">
<div id="show-all-exercises-action" class="right-side">
<a href="?archived=1">{{ _('All Exercises') }}</a>
</div>
</div>
{% endif -%}
</div>
</div>
</div>
{%- endblock -%}