2019-06-05 14:12:30 +00:00
|
|
|
{% extends "templates/base.html" %}
|
2019-06-12 07:20:38 +00:00
|
|
|
{% block title %}{{ topic.name }}{% endblock %}
|
2019-06-05 14:12:30 +00:00
|
|
|
{% from "www/lms/macros/hero.html" import hero %}
|
2019-06-06 10:32:38 +00:00
|
|
|
{% from "www/lms/macros/card.html" import null_card %}
|
2019-06-05 14:12:30 +00:00
|
|
|
|
2019-06-06 08:33:01 +00:00
|
|
|
{% block head_include %}
|
|
|
|
<style>
|
|
|
|
section {
|
|
|
|
padding: 5rem 0 5rem 0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
2019-06-05 14:12:30 +00:00
|
|
|
|
|
|
|
{% macro card(content, index, length) %}
|
2019-06-12 07:20:38 +00:00
|
|
|
<div class="col-sm-4 mb-4 text-left">
|
2019-06-05 14:12:30 +00:00
|
|
|
<a href="/lms/content?program={{ program }}&course={{ course }}&topic={{ topic.name }}&type={{ content.content_type }}&content={{ content.content.name }}" class="no-decoration no-underline">
|
|
|
|
<div class="card h-100">
|
|
|
|
<div class='card-body'>
|
2019-06-06 13:03:58 +00:00
|
|
|
<div class="text-muted">{{ content.content_type or '' }}</div>
|
2019-06-05 14:12:30 +00:00
|
|
|
<h5 class='card-title'>{{ content.content.name }}</h5>
|
|
|
|
</div>
|
|
|
|
{% if has_access %}
|
|
|
|
<div class='card-footer'>
|
|
|
|
{% if content.content_type == 'Quiz' %}
|
2020-06-22 05:36:12 +00:00
|
|
|
{% if content.result == 'Fail' %} <span class="indicator red">{{_('Fail')}} <span class="text-muted">({{ content.score }}/100)</span></span>
|
|
|
|
{% elif content.result == 'Pass' %} <span class="indicator green">{{_('Pass')}} <span class="text-muted">({{ content.score }}/100)</span>
|
|
|
|
{% else %} <span class="indicator blue">{{_('Start')}}</span>
|
2019-06-05 14:12:30 +00:00
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
2020-06-22 05:36:12 +00:00
|
|
|
{% if content.completed %} <span class="indicator green">{{_('Completed')}}</span>
|
|
|
|
{% else %} <span class="indicator blue">{{_('Start')}}</span>
|
2019-06-05 14:12:30 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<section class="section">
|
|
|
|
{{ hero(topic.topic_name, topic.description, has_access, {'name': 'Course', 'url': '/lms/course?name=' + course +'&program=' + program}) }}
|
|
|
|
<div class='container'>
|
|
|
|
<div class="row mt-5">
|
|
|
|
{% for content in contents %}
|
|
|
|
{{ card(content, loop.index, topic.contents|length) }}
|
|
|
|
{% endfor %}
|
2019-06-06 10:32:38 +00:00
|
|
|
{% if contents %}
|
2019-06-12 09:23:00 +00:00
|
|
|
{% for n in range( (3 - (contents|length)) %3) %}
|
2019-06-06 10:32:38 +00:00
|
|
|
{{ null_card() }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2019-06-05 14:12:30 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2021-08-19 08:11:10 +00:00
|
|
|
{% endblock %}
|