forked from LibraryCarpentry/lc-open-refine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
syllabus.html
112 lines (105 loc) · 4.79 KB
/
syllabus.html
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{% include base_path.html %}
{% comment %}
Display syllabus in tabular form.
Days are displayed if at least one episode has 'start = true'.
{% endcomment %}
{% include manual_episode_order.html %}
<div class="syllabus">
<h2 id="schedule">Schedule</h2>
{% assign lesson_number = 0 %}
{% assign day = 0 %}
{% assign multiday = false %}
{% for lesson_episode in lesson_episodes %}
{% if site.episode_order %}
{% assign episode = site.episodes | where: "slug", lesson_episode | first %}
{% else %}
{% assign episode = lesson_episode %}
{% endif %}
{% if episode.start %}{% assign multiday = true %}{% break %}{% endif %}
{% endfor %}
{% assign current = site.start_time %}
<table class="table table-striped">
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}"></td>
<td class="col-md-3"><a href="{{ relative_root_path }}{% link setup.md %}">Setup</a></td>
<td class="col-md-7">Download files required for the lesson</td>
</tr>
{% if site.instructor_training %}
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}"></td>
<td class="col-md-3"><a href="{{ site.instructor_pre_survey }}{{ site.github.project_title }}">Pre-training survey</a></td>
<td class="col-md-7">Please fill out our pre-training survey before the start of the course.</td>
</tr>
{% endif %}
{% for lesson_episode in lesson_episodes %}
{% if site.episode_order %}
{% assign episode = site.episodes | where: "slug", lesson_episode | first %}
{% else %}
{% assign episode = lesson_episode %}
{% endif %}
{% if episode.start %} {% comment %} Starting a new day? {% endcomment %}
{% assign day = day | plus: 1 %}
{% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">Finish</td>
<td class="col-md-7"></td>
</tr>
{% endif %}
{% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %}
{% endif %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
<tr>
{% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">
{% assign lesson_number = lesson_number | plus: 1 %}
{{ lesson_number }}. <a href="{{ relative_root_path }}{{ episode.url }}">{{ episode.title }}</a>
</td>
<td class="col-md-7">
{% if episode.break %}
Break
{% else %}
{% if episode.questions %}
{% for question in episode.questions %}
{{question|markdownify|strip_html}}
{% unless forloop.last %}
<br/>
{% endunless %}
{% endfor %}
{% endif %}
{% endif %}
</td>
</tr>
{% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %}
{% endfor %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
{% if site.instructor_training %}
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif +++ %}{{ minutes }}</td>
<td class="col-md-3"><a href="{{ site.instructor_post_survey }}{{ site.github.project_title }}">Post-training survey</a></td>
<td class="col-md-7">Please fill out our post-training survey after the course.</td>
</tr>
{% assign current = current | plus: 15 %}
{% assign hours = current | divided_by: 60 %}
{% assign minutes = current | modulo: 60 %}
{% endif %}
<tr>
{% if multiday %}<td class="col-md-1"></td>{% endif %}
<td class="{% if multiday %}col-md-1{% else %}col-md-2{% endif %}">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">Finish</td>
<td class="col-md-7"></td>
</tr>
</table>
<p>
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
</p>
</div>