Skip to content

Commit

Permalink
Change: (refs #183) change to display 'grade-index'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cj-bc committed Sep 12, 2018
1 parent a848777 commit 4ae4c32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/routes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ def public_id_generator(lottery, kind):
for kind in whole_results.keys():
for lottery in lotteries:
public_ids = list(public_id_generator(lottery, kind))
result = {'classroom_id': lottery.classroom_id,
cl = Classroom.query.get(lottery.classroom_id)
result = {'classroom': f'{cl.grade}-{cl.get_classroom_name()}',
'winners': public_ids}
whole_results[kind].append(result)
data = {'kinds': [], 'horizontal': 3}
Expand Down
2 changes: 1 addition & 1 deletion api/templates/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
</style>
<body>
{% for kind in kinds %}
class: {{ lottery['classroom_id'] }}
<div class="outer-container">
<div class="kind">
For: {{ kind['kind'] }}
</div>
{% for lottery in kind['lotteries'] %}
<div class="classroom">
class: {{ lottery['classroom'] }}
{% for row in range(lottery['winners']|length // horizontal +1) %}
<div class="row">
<ul>
Expand Down

0 comments on commit 4ae4c32

Please sign in to comment.