joeni

curriculum.djhtml

1
{% extends "joeni/base.djhtml" %}
2
{% load i18n %}
3
4
{% block title %}
5
    {% trans "Personal curriculum" %} | ◀ Joeni /▶
6
{% endblock %}
7
8
{% block main %}
9
    <h1>{% trans "Your curricula" %}</h1>
10
    {% for curriculum in curricula %}
11
        <h2 id="{{ curriculum.year }}-{{ curriculum.year|add:1 }}">
12
            {{ curriculum.year }} - {{ curriculum.year|add:1 }}
13
        </h2>
14
        <p>{% trans "Status" %}:
15
            {% if curriculum.approved is none %}
16
                {% trans "Processing curriculum; pending decision" %}
17
            {% elif curriculum.approved is True %}
18
                {% trans "Processed and approved by exam committee" %}
19
            {% else %}
20
                {% trans "Processed and <strong>DENIED</strong> by exam committee" %}
21
            {% endif %}
22
        </p>
23
24
        {# Table in which the courses from the curriculum are displayed, along with the results. #}
25
        <table>
26
            <tr>
27
                <td>{% trans "Course" %}</td>
28
                <td>{% trans "ECTS" %}</td>
29
                <td>{% trans "Period" %}</td>
30
                <td>{% trans "First result" %}</td>
31
                <td>{% trans "Second result" %}</td>
32
                <td>{% trans "Decision" %}</td>
33
            </tr>
34
        {% for course_program, course_result in curriculum.course_programmes_results.items %}
35
            <tr>
36
                {% with color=course_program.course.color %}
37
                    <td><a class="course-link" style="text-decoration-color: #{{ color }}; color: #{{ color }};" href="{% url 'courses-course-index' course_program.course.slug_name %}">
38
                    {{ course_program }}</a></td>
39
                {% endwith %}
40
                <td>{{ course_program.ECTS }}</td>
41
                <td>{{ course_program.get_semester_display }}</td>
42
                <td>{{ course_result.first_score|default:"-" }}</td>
43
                <td>{{ course_result.second_score|default:"-" }}</td>
44
                <td>{% with result=course_result.result %}
45
                    {% if result == "CRED" or result == "VRST" or result == "TLRD" or result == "ITLR"%}
46
                        <span style="color:green;">
47
                    {% elif result == "FAIL" %}
48
                        <span style="color:red;">
49
                    {% elif result == "BDRG" %}
50
                        <span style="background-color:red; color:white;">
51
                    {% elif result == "STOP" %}
52
                        <span style="color:black;">
53
                    {% endif %}
54
                    {{ course_result.get_result_display }}</span>
55
                {% endwith %}</td>
56
            </tr>
57
        {% endfor %}
58
        </table>
59
    {% endfor %}
60
61
    <hr />
62
    <a class="btn" href="curriculum-change.pdf" download>{% trans "Request curriculum change" %}</a>
63
{% endblock main %}
64