|
2 | 2 | <html> |
3 | 3 | <head> |
4 | 4 | <style type="text/css"> |
| 5 | + :root { |
| 6 | + --green: #adf7c7; |
| 7 | + --orange: #f8bca3; |
| 8 | + --red: #ffaaaa; |
| 9 | + } |
5 | 10 | th, td { |
6 | 11 | border: 1px black solid; |
7 | 12 | background-color: white; |
8 | 13 | } |
9 | 14 | td.attendance-absent { |
10 | | - background-color: #ff0d0d57; |
| 15 | + background-color: var(--red); |
11 | 16 | } |
12 | 17 | td.attendance-present { |
13 | | - background-color: rgba(68, 238, 142, 0.5); |
| 18 | + background-color: var(--green); |
14 | 19 | } |
15 | 20 | td.attendance-late { |
16 | 21 | background-color: #e6f4ae; |
|
19 | 24 | background-color: grey; |
20 | 25 | } |
21 | 26 | td.pr-missing { |
22 | | - background-color: #ff0d0d57; |
| 27 | + background-color: var(--red); |
23 | 28 | } |
24 | 29 | td.pr-complete { |
25 | | - background-color: rgba(68, 238, 142, 0.5); |
| 30 | + background-color: var(--green); |
26 | 31 | } |
27 | 32 | td.pr-reviewed { |
28 | | - background-color: #ee784480; |
| 33 | + background-color: var(--orange); |
29 | 34 | } |
30 | 35 | td.pr-needs-review { |
31 | | - background-color: #ee784480; |
| 36 | + background-color: var(--orange); |
32 | 37 | } |
33 | 38 | td.pr-unknown { |
34 | 39 | background-color: grey; |
35 | 40 | } |
36 | 41 |
|
| 42 | + .trainee-on-track { |
| 43 | + background-color: var(--green); |
| 44 | + } |
| 45 | + |
| 46 | + .trainee-behind { |
| 47 | + background-color: var(--orange); |
| 48 | + } |
| 49 | + |
| 50 | + .trainee-at-risk { |
| 51 | + background-color: var(--red); |
| 52 | + } |
| 53 | + |
37 | 54 | table { |
38 | 55 | border-spacing: 0px; |
39 | 56 | } |
|
57 | 74 | </head> |
58 | 75 | <body> |
59 | 76 | <h1>{{ course.name }} - {{ batch.name }}</h1> |
60 | | - <button id="regions-filter-all">All Regions</button> |
| 77 | + {% set (global_on_track, global_total) = on_track_and_total_for_region(None) %} |
| 78 | + <button id="regions-filter-all">All Regions ({{ global_on_track }} / {{ global_total }})</button> |
61 | 79 | {% for region in batch.all_regions() %} |
62 | | - <input type="checkbox" checked="checked" name="region-checkbox" value="{{ region }}" /> {{ region }} |
| 80 | + {% set (on_track, total) = on_track_and_total_for_region(Some(region.as_str())) %} |
| 81 | + <input type="checkbox" checked="checked" name="region-checkbox" value="{{ region }}" /> {{ region }} ({{ on_track }} / {{ total }}) |
63 | 82 | {% endfor %} |
64 | 83 | <button id="regions-filter-none">No Regions</button> |
65 | 84 | <table> |
@@ -95,14 +114,14 @@ <h1>{{ course.name }} - {{ batch.name }}</h1> |
95 | 114 | <tbody> |
96 | 115 | {% for trainee in batch.trainees %} |
97 | 116 | <tr> |
98 | | - <th>{{ trainee.name }} - <a href="https://github.com/{{trainee.github_login}}">@{{ trainee.github_login }}</a> - {{ trainee.email }}</th> |
| 117 | + <th class="{{ css_classes_for_trainee_status(&trainee.status()) }}">{{ trainee.name }} - <a href="https://github.com/{{trainee.github_login}}">@{{ trainee.github_login }}</a> - {{ trainee.email }} - {{ trainee.progress_score() / 100 }}%</th> |
99 | 118 | <td>{{ trainee.region }}</td> |
100 | 119 | {% for (module_name, module) in trainee.modules %} |
101 | 120 | {% for sprint in module.sprints %} |
102 | 121 | {% for submission in sprint.submissions %} |
103 | 122 | {% match submission %} |
104 | 123 | {% when crate::course::SubmissionState::Some(submission) %} |
105 | | - <td class="{{ css_classes(submission) }}"><a href="{{ submission.link() }}">{{ submission.display_text() }}</a></td> |
| 124 | + <td class="{{ css_classes_for_submission(submission) }}"><a href="{{ submission.link() }}">{{ submission.display_text() }}</a></td> |
106 | 125 | {% when crate::course::SubmissionState::MissingButExpected(_) %} |
107 | 126 | <td class="pr-missing"></td> |
108 | 127 | {% when crate::course::SubmissionState::MissingButNotExpected(_) %} |
|
0 commit comments