c833dc06d9
* Add order and grade for course problems * Fix delete problems bug
40 lines
No EOL
1.5 KiB
HTML
40 lines
No EOL
1.5 KiB
HTML
{% extends "course/base.html" %}
|
|
|
|
{% block two_col_media %}
|
|
<style>
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block middle_content %}
|
|
<center><h2>{{title}} - {{profile.username}}</h2></center>
|
|
<h3 class="course-content-title">{{_("Content")}}</h3>
|
|
<div>
|
|
{{ lesson.content|markdown|reference|str|safe }}
|
|
</div>
|
|
<h3 class="course-content-title">{{_("Problems")}}</h3>
|
|
<ul class="course-problem-list">
|
|
{% for lesson_problem in lesson.lesson_problems.order_by('order') %}
|
|
{% set problem = lesson_problem.problem %}
|
|
<a href="{{url('problem_detail', problem.code)}}">
|
|
<li>
|
|
{% if problem.id in completed_problem_ids %}
|
|
<i class="solved-problem-color fa fa-check-circle"></i>
|
|
{% elif problem.id in attempted_problems %}
|
|
<i class="attempted-problem-color fa fa-minus-circle"></i>
|
|
{% else %}
|
|
<i class="unsolved-problem-color fa fa-minus-circle"></i>
|
|
{% endif %}
|
|
<span class="problem-name">{{problem.name}}</span>
|
|
{% set pp = problem_points[problem.id] %}
|
|
<span class="score">
|
|
{% if pp and pp.case_total %}
|
|
{{(pp.case_points / pp.case_total * lesson_problem.score) |floatformat(1)}} / {{lesson_problem.score|floatformat(0)}}
|
|
{% else %}
|
|
0 / {{lesson_problem.score|floatformat(0)}}
|
|
{% endif %}
|
|
</span>
|
|
</li>
|
|
</a>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endblock %} |