Commit f29048c2dbcb2a2637ca7ecf9882cf76273539ee

Authored by Miguel Barão
1 parent d50fa6fc
Exists in master and in 1 other branch dev

- fixed issues in review and improved looks.

templates/admin.html
... ... @@ -23,7 +23,9 @@
23 23 <!-- ===================================================================== -->
24 24 <body>
25 25 <nav class="navbar navbar-expand-sm fixed-top navbar-dark bg-danger">
26   - <a class="navbar-brand" href="#">Admin</a>
  26 + <a class="navbar-brand" href="#">
  27 + <img src="/static/logo_navbar.png" height="30" alt="">
  28 + </a>
27 29 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
28 30 <span class="navbar-toggler-icon"></span>
29 31 </button>
... ... @@ -38,12 +40,12 @@
38 40 <!-- right -->
39 41 <ul class="navbar-nav">
40 42 <li class="nav-item dropdown">
41   - <a class="nav-link dropdown-toggle active" href="#" id="navbarDropdownAluno" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
42   - Aluno
  43 + <a class="nav-link dropdown-toggle active" href="#" id="navbarDropdownAluno" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  44 + Acções
43 45 </a>
44 46 <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownAluno">
45   - <a class="dropdown-item" href="#" id="novo_aluno" data-toggle="modal" data-target="#novo_aluno_modal">Inserir novo...</a>
46   - <a class="dropdown-item" href="#" id="reset_password_menu" data-toggle="modal" data-target="#reset_password_modal">Reset password...</a>
  47 + <a class="dropdown-item" href="#" id="novo_aluno" data-toggle="modal" data-target="#novo_aluno_modal">Inserir novo aluno...</a>
  48 + <a class="dropdown-item" href="#" id="reset_password_menu" data-toggle="modal" data-target="#reset_password_modal">Reset password do aluno...</a>
47 49 <a class="dropdown-item" href="#" id="allow_all">Autorizar todos</a>
48 50 <a class="dropdown-item" href="#" id="deny_all">Desautorizar todos</a>
49 51 </div>
... ...
templates/question-checkbox.html
... ... @@ -7,10 +7,10 @@
7 7 {% for n, opt in enumerate(q['options']) %}
8 8 <a class="list-group-item">
9 9 <div class="d-flex flex-row">
10   - <div class="p-1">
  10 + <div class="p-2">
11 11 <input type="checkbox" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}">
12 12 </div>
13   - <div class="p-1">
  13 + <div class="p-2">
14 14 <label for="{{n}}">{{ md(opt, q) }}</label>
15 15 </div>
16 16 </div>
... ...
templates/question.html
... ... @@ -21,7 +21,6 @@
21 21 (Cotação: {{ round(q['points'], 2) }} pontos)
22 22 </small>
23 23 </p>
24   -
25 24 </div>
26 25 </div>
27 26 {% end %}
28 27 \ No newline at end of file
... ...
templates/review-question-checkbox.html
... ... @@ -4,10 +4,17 @@
4 4 {% block answer %}
5 5 <fieldset data-role="controlgroup">
6 6 <ul class="list-group">
7   - {% for n, opt in enumerate(q['options']) %}
8   - <li class="list-group-item">
9   - {% if q['answer'] is not None and str(n) in q['answer'] %}
10   - {{ md('<i class="fa fa-check-square-o" aria-hidden="true"></i> ' + opt, q)}}
  7 + {% for n, opt in enumerate(q['options']) %}
  8 + <li class="list-group-item">
  9 + <div class="d-flex flex-row">
  10 + {% if q['answer'] is not None and str(n) in q['answer'] %}
  11 + <div class="p-2">
  12 + <i class="fa fa-check-square-o" aria-hidden="true"></i>
  13 + </div>
  14 + <div class="p-2">
  15 + {{ md(opt, q) }}
  16 + </div>
  17 + <div class="ml-auto p-2">
11 18 {% if q['correct'][n] > 0 %}
12 19 <div class="text-right text-success">
13 20 <i class="fa fa-check" aria-hidden="true"></i>
... ... @@ -17,8 +24,16 @@
17 24 <i class="fa fa-close" aria-hidden="true"></i>
18 25 </div>
19 26 {% end %}
20   - {% else %}
21   - {{ md('<i class="fa fa-square-o" aria-hidden="true"></i> ' + opt, q) }}
  27 + </div>
  28 +
  29 + {% else %}
  30 + <div class="p-2">
  31 + <i class="fa fa-square-o" aria-hidden="true"></i>
  32 + </div>
  33 + <div class="p-2">
  34 + {{ md(opt, q) }}
  35 + </div>
  36 + <div class="ml-auto p-2">
22 37 {% if q['correct'][n] > 0 %}
23 38 <div class="text-right text-danger">
24 39 <i class="fa fa-close" aria-hidden="true"></i>
... ... @@ -28,9 +43,11 @@
28 43 <i class="fa fa-check" aria-hidden="true"></i>
29 44 </div>
30 45 {% end %}
31   - {% end %}
32   - </li>
33   - {% end %}
  46 + </div>
  47 + {% end %}
  48 + </div>
  49 + </li>
  50 + {% end %}
34 51 </ul>
35 52 </fieldset>
36 53 {% end %}
... ...
templates/review-question-radio.html
... ... @@ -4,10 +4,17 @@
4 4 {% block answer %}
5 5 <fieldset data-role="controlgroup">
6 6 <ul class="list-group">
7   - {% for n, opt in enumerate(q['options']) %}
8   - <li class="list-group-item">
9   - {% if q['answer'] is not None and str(n)==q['answer'] %}
10   - {{ md('<i class="fa fa-dot-circle-o" aria-hidden="true"></i> ' + opt, q)}}
  7 + {% for n, opt in enumerate(q['options']) %}
  8 + <li class="list-group-item">
  9 + <div class="d-flex flex-row">
  10 + {% if q['answer'] is not None and str(n)==q['answer'] %}
  11 + <div class="p-2">
  12 + <i class="fa fa-dot-circle-o" aria-hidden="true"></i>
  13 + </div>
  14 + <div class="p-2">
  15 + {{ md(opt, q) }}
  16 + </div>
  17 + <div class="ml-auto p-2">
11 18 {% if q['correct'][n] > 0 %}
12 19 <div class="text-right text-success">
13 20 <i class="fa fa-check" aria-hidden="true"></i>
... ... @@ -17,17 +24,25 @@
17 24 <i class="fa fa-close" aria-hidden="true"></i>
18 25 </div>
19 26 {% end %}
20   - {% else %}
21   - {{ md('<i class="fa fa-circle-o" aria-hidden="true"></i> ' + opt, q) }}
  27 + </div>
22 28  
  29 + {% else %}
  30 + <div class="p-2">
  31 + <i class="fa fa-circle-o" aria-hidden="true"></i>
  32 + </div>
  33 + <div class="p-2">
  34 + {{ md(opt, q) }}
  35 + </div>
  36 + <div class="ml-auto p-2">
23 37 {% if q['correct'][n] > 0 %}
24 38 <div class="text-right text-info">
25 39 <i class="fa fa-circle" aria-hidden="true"></i>
26 40 </div>
27 41 {% end %}
28   - {% end %}
29   - </li>
30   - {% end %}
  42 + </div>
  43 + {% end %}
  44 + </li>
  45 + {% end %}
31 46 </ul>
32 47 </fieldset>
33 48 {% end %}
34 49 \ No newline at end of file
... ...
templates/review-question.html
... ... @@ -14,9 +14,9 @@
14 14 </h5> <!-- card-header -->
15 15  
16 16 <div class="card-body">
17   - <p id="text">
  17 + <div id="text">
18 18 {{ md(q['text'], q) }}
19   - </p>
  19 + </div>
20 20  
21 21 {% block answer %}{% end %}
22 22  
... ...
templates/review.html
... ... @@ -27,7 +27,7 @@
27 27 </head>
28 28 <!-- ===================================================================== -->
29 29 <body>
30   -<nav class="navbar navbar-expand-sm fixed-top navbar-dark bg-dark">
  30 +<nav class="navbar navbar-expand-sm fixed-top navbar-dark bg-danger">
31 31 <a class="navbar-brand" href="#">
32 32 <img src="/static/logo_navbar.png" height="30" alt="">
33 33 </a>
... ...