grade.html
4.07 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> Teste </title>
<link rel="icon" href="/static/favicon.ico">
<!-- Bootstrap -->
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css"> <!-- optional -->
<link rel="stylesheet" href="/static/css/test.css">
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
</head>
<!-- ===================================================================== -->
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid drop-shadow">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
${t['title']}
</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
<span id="name">${t['student']['name']}</span>
(<span id="number">${t['student']['number']}</span>)
<!-- <span class="caret"></span> -->
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron drop-shadow">
<h1>Resultado</h1>
<p>Teve <strong>${t['grade']}</strong> valores na escala de 0 a 20.</p>
<p>A prova está terminada, pode fechar o browser e desligar o computador.</p>
</div>
<div class="panel panel-default drop-shadow">
<div class="panel-heading">
Provas realizadas até ao momento
</div>
<div class="panel-body">
<table class="table table-condensed">
<thead>
<tr>
<th>Prova</th>
<th>Data</th>
<th>Hora</th>
<th>Nota (0-20)</th>
</tr>
</thead>
<tbody>
% for g in allgrades:
<tr>
<td>${g[0]}</td> <!-- teste -->
<td>${g[2][:10]}</td> <!-- data -->
<td>${g[2][11:19]}</td> <!-- hora -->
<td>
<div class="progress">
% if g[1] < 10:
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="${'{0}'.format(round(g[1]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * g[1]))}%;">
% elif g[1] < 15:
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="${'{0}'.format(round(g[1]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * g[1]))}%;">
% else:
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="${'{0}'.format(round(g[1]))}" aria-valuemin="0" aria-valuemax="20" style="min-width: 2em; width: ${'{0}'.format(round(5 * g[1]))}%;">
% endif
${'{:.1f}'.format(g[1])}
</div>
</div>
</td>
</tr>
% endfor
</tbody>
</table>
</div>
</div> <!-- panel -->
</div> <!-- container -->
</body>
</html>