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