Commit 1aa7be86ad63d44d988a164cd9ddd9315a51fb81

Authored by Miguel Barão
2 parents 681f5cca 4f792b2d
Exists in master and in 1 other branch dev

Merge branch 'dev' of https://git.xdi.uevora.pt/mjsb/aprendizations into dev

aprendizations/serve.py
@@ -411,7 +411,7 @@ class QuestionHandler(BaseHandler): @@ -411,7 +411,7 @@ class QuestionHandler(BaseHandler):
411 return 411 return
412 412
413 # --- brain hacking ;) 413 # --- brain hacking ;)
414 - await asyncio.sleep(1.5) 414 + # await asyncio.sleep(1.5)
415 415
416 # --- answers are in a list. fix depending on question type 416 # --- answers are in a list. fix depending on question type
417 qtype = self.learn.get_student_question_type(user) 417 qtype = self.learn.get_student_question_type(user)
aprendizations/templates/courses.html
@@ -8,12 +8,14 @@ @@ -8,12 +8,14 @@
8 <meta name="author" content="Miguel Barão"> 8 <meta name="author" content="Miguel Barão">
9 <link rel="icon" href="favicon.ico"> 9 <link rel="icon" href="favicon.ico">
10 <!-- Styles --> 10 <!-- Styles -->
11 - <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous"> 11 + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  12 +
12 <link rel="stylesheet" href="{{static_url('css/maintopics.css')}}"> 13 <link rel="stylesheet" href="{{static_url('css/maintopics.css')}}">
13 <link rel="stylesheet" href="{{static_url('css/sticky-footer-navbar.css')}}"> 14 <link rel="stylesheet" href="{{static_url('css/sticky-footer-navbar.css')}}">
14 <!-- Scripts --> 15 <!-- Scripts -->
15 <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> 16 <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
16 - <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script> 17 +
  18 + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
17 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script> 19 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script>
18 <script defer src="{{static_url('js/maintopics.js')}}"></script> 20 <script defer src="{{static_url('js/maintopics.js')}}"></script>
19 21
@@ -22,14 +24,14 @@ @@ -22,14 +24,14 @@
22 24
23 <body> 25 <body>
24 <!-- ===== navbar ======================================================== --> 26 <!-- ===== navbar ======================================================== -->
25 - <nav class="navbar navbar-expand-sm navbar-dark bg-primary fixed-top shadow"> 27 + <nav class="navbar navbar-expand-sm navbar-dark bg-secondary fixed-top shadow">
26 <div class="container-fluid"> 28 <div class="container-fluid">
27 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora"> 29 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora">
28 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> 30 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
29 <span class="navbar-toggler-icon"></span> 31 <span class="navbar-toggler-icon"></span>
30 </button> 32 </button>
31 33
32 - <div class="collapse navbar-collapse" id="navbarNavText"> 34 + <div class="collapse navbar-collapse" id="navbarText">
33 <ul class="navbar-nav"> 35 <ul class="navbar-nav">
34 <li class="nav-item"><a class="nav-link active" aria-current="page" href="/courses">Cursos</a></li> 36 <li class="nav-item"><a class="nav-link active" aria-current="page" href="/courses">Cursos</a></li>
35 <li class="nav-item"><a class="nav-link disabled" href="#">Tópicos</a></li> 37 <li class="nav-item"><a class="nav-link disabled" href="#">Tópicos</a></li>
aprendizations/templates/maintopics-table.html
@@ -9,12 +9,13 @@ @@ -9,12 +9,13 @@
9 <link rel="icon" href="/static/favicon.ico"> 9 <link rel="icon" href="/static/favicon.ico">
10 10
11 <!-- Styles --> 11 <!-- Styles -->
12 - <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous"> 12 + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  13 +
13 <link rel="stylesheet" href="{{static_url('css/maintopics.css')}}"> 14 <link rel="stylesheet" href="{{static_url('css/maintopics.css')}}">
14 15
15 <!-- Scripts --> 16 <!-- Scripts -->
16 <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> 17 <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
17 - <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script> 18 + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
18 19
19 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script> 20 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script>
20 <script defer src="{{static_url('js/maintopics.js')}}"></script> 21 <script defer src="{{static_url('js/maintopics.js')}}"></script>
@@ -23,14 +24,14 @@ @@ -23,14 +24,14 @@
23 </head> 24 </head>
24 <!-- ===================================================================== --> 25 <!-- ===================================================================== -->
25 <body> 26 <body>
26 -<nav class="navbar navbar-expand-sm navbar-dark bg-primary fixed-top shadow"> 27 +<nav class="navbar navbar-expand-sm navbar-dark bg-secondary fixed-top shadow">
27 <div class="container-fluid"> 28 <div class="container-fluid">
28 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora"> 29 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora">
29 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> 30 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
30 <span class="navbar-toggler-icon"></span> 31 <span class="navbar-toggler-icon"></span>
31 </button> 32 </button>
32 33
33 - <div class="collapse navbar-collapse" id="navbarNavText"> 34 + <div class="collapse navbar-collapse" id="navbarText">
34 <ul class="navbar-nav"> 35 <ul class="navbar-nav">
35 <li class="nav-item"><a class="nav-link" href="/courses">Cursos</a></li> 36 <li class="nav-item"><a class="nav-link" href="/courses">Cursos</a></li>
36 <li class="nav-item"><a class="nav-link active" aria-current="page" href="#">Tópicos</a></li> 37 <li class="nav-item"><a class="nav-link active" aria-current="page" href="#">Tópicos</a></li>
aprendizations/templates/rankings.html
@@ -8,10 +8,10 @@ @@ -8,10 +8,10 @@
8 <meta name="author" content="Miguel Barão"> 8 <meta name="author" content="Miguel Barão">
9 <link rel="icon" href="/static/favicon.ico"> 9 <link rel="icon" href="/static/favicon.ico">
10 <!-- Styles --> 10 <!-- Styles -->
11 - <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous"> 11 + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
12 <link rel="stylesheet" href="{{static_url('css/maintopics.css')}}"> 12 <link rel="stylesheet" href="{{static_url('css/maintopics.css')}}">
13 <!-- Scripts --> 13 <!-- Scripts -->
14 - <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script> 14 + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
15 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script> 15 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script>
16 <script defer src="{{static_url('js/maintopics.js')}}"></script> 16 <script defer src="{{static_url('js/maintopics.js')}}"></script>
17 17
@@ -19,14 +19,14 @@ @@ -19,14 +19,14 @@
19 </head> 19 </head>
20 <!-- ===================================================================== --> 20 <!-- ===================================================================== -->
21 <body> 21 <body>
22 -<nav class="navbar navbar-expand-sm navbar-dark bg-primary fixed-top"> 22 +<nav class="navbar navbar-expand-sm navbar-dark bg-secondary fixed-top shadow">
23 <div class="container-fluid"> 23 <div class="container-fluid">
24 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora"> 24 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora">
25 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> 25 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
26 <span class="navbar-toggler-icon"></span> 26 <span class="navbar-toggler-icon"></span>
27 </button> 27 </button>
28 28
29 - <div class="collapse navbar-collapse" id="navbarNavText"> 29 + <div class="collapse navbar-collapse" id="navbarText">
30 <ul class="navbar-nav"> 30 <ul class="navbar-nav">
31 <li class="nav-item"><a class="nav-link" href="/courses">Cursos</a></li> 31 <li class="nav-item"><a class="nav-link" href="/courses">Cursos</a></li>
32 <li class="nav-item"><a class="nav-link" href="/course/{{course_id}}">Tópicos</a></li> 32 <li class="nav-item"><a class="nav-link" href="/course/{{course_id}}">Tópicos</a></li>
@@ -53,8 +53,8 @@ @@ -53,8 +53,8 @@
53 <div class="container"> 53 <div class="container">
54 <h1 class="display-6">{{ course_title }}</h1> 54 <h1 class="display-6">{{ course_title }}</h1>
55 55
56 -<table class="table table-hover">  
57 - <col width="100"> 56 +<table class="table table-sm table-hover">
  57 + <!-- <col width="100"> -->
58 <thead> 58 <thead>
59 <tr> 59 <tr>
60 <th scope="col" class="text-center">Posição</th> 60 <th scope="col" class="text-center">Posição</th>
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
65 </thead> 65 </thead>
66 <tbody> 66 <tbody>
67 {% for i,r in enumerate(rankings) %} 67 {% for i,r in enumerate(rankings) %}
68 - <tr class="{{ 'table-primary' if r[0] == uid else '' }}"> 68 + <tr class="{{ 'table-secondary' if r[0] == uid else '' }}">
69 <td class="text-center"> <!-- rank --> 69 <td class="text-center"> <!-- rank -->
70 <strong> 70 <strong>
71 {{ '<i class="fas fa-crown fa-lg text-warning"></i>' if i==0 else i+1 }} 71 {{ '<i class="fas fa-crown fa-lg text-warning"></i>' if i==0 else i+1 }}
aprendizations/templates/topic.html
@@ -7,10 +7,8 @@ @@ -7,10 +7,8 @@
7 <link rel="icon" href="/static/favicon.ico"> 7 <link rel="icon" href="/static/favicon.ico">
8 8
9 <!-- Styles --> 9 <!-- Styles -->
10 - <!-- <link rel="stylesheet" href="{{static_url('mdbootstrap/css/bootstrap.min.css')}}"> -->  
11 - <!-- <link rel="stylesheet" href="{{static_url('mdbootstrap/css/mdb.min.css')}}"> --> 10 + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
12 11
13 - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">  
14 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" /> 12 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
15 13
16 <link rel="stylesheet" href="{{static_url('codemirror/lib/codemirror.css')}}"> 14 <link rel="stylesheet" href="{{static_url('codemirror/lib/codemirror.css')}}">
@@ -32,7 +30,8 @@ @@ -32,7 +30,8 @@
32 <script async type="text/javascript" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> 30 <script async type="text/javascript" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
33 31
34 <script defer src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> 32 <script defer src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
35 - <script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script> 33 +
  34 + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
36 35
37 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script> 36 <script defer src="{{static_url('fontawesome-free/js/all.min.js')}}"></script>
38 <script defer src="{{static_url('codemirror/lib/codemirror.js')}}"></script> 37 <script defer src="{{static_url('codemirror/lib/codemirror.js')}}"></script>
@@ -44,18 +43,18 @@ @@ -44,18 +43,18 @@
44 <body> 43 <body>
45 <!-- Progress bar --> 44 <!-- Progress bar -->
46 <div class="progress fixed-top" style="height: 70px; border-radius: 0px;"> 45 <div class="progress fixed-top" style="height: 70px; border-radius: 0px;">
47 - <div class="progress-bar bg-warning" id="topic_progress" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 1em;width: 0%"></div> 46 + <div class="progress-bar bg-secondary" id="topic_progress" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="min-width: 1em;width: 0%"></div>
48 </div> 47 </div>
49 48
50 <!-- Navbar --> 49 <!-- Navbar -->
51 - <nav class="navbar navbar-expand-sm navbar-dark bg-primary fixed-top shadow"> 50 + <nav class="navbar navbar-expand-sm navbar-dark bg-secondary fixed-top shadow">
52 <div class="container-fluid"> 51 <div class="container-fluid">
53 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora"> 52 <img src="{{static_url('logo_horizontal.png')}}" height="48" width="120" class="navbar-brand" alt="UEvora">
54 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation"> 53 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
55 <span class="navbar-toggler-icon"></span> 54 <span class="navbar-toggler-icon"></span>
56 </button> 55 </button>
57 56
58 - <div class="collapse navbar-collapse" id="navbarNavText"> 57 + <div class="collapse navbar-collapse" id="navbarText">
59 <ul class="navbar-nav"> 58 <ul class="navbar-nav">
60 <li class="nav-item"><a class="nav-link" href="/courses">Cursos</a></li> 59 <li class="nav-item"><a class="nav-link" href="/courses">Cursos</a></li>
61 <li class="nav-item"><a class="nav-link active" aria-current="page" href="/course/{{course_id}}">Tópicos</a></li> 60 <li class="nav-item"><a class="nav-link active" aria-current="page" href="/course/{{course_id}}">Tópicos</a></li>
package-lock.json
@@ -19,9 +19,9 @@ @@ -19,9 +19,9 @@
19 } 19 }
20 }, 20 },
21 "node_modules/codemirror": { 21 "node_modules/codemirror": {
22 - "version": "5.62.2",  
23 - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.2.tgz",  
24 - "integrity": "sha512-tVFMUa4J3Q8JUd1KL9yQzQB0/BJt7ZYZujZmTPgo/54Lpuq3ez4C8x/ATUY/wv7b7X3AUq8o3Xd+2C5ZrCGWHw==" 22 + "version": "5.63.3",
  23 + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.3.tgz",
  24 + "integrity": "sha512-1C+LELr+5grgJYqwZKqxrcbPsHFHapVaVAloBsFBASbpLnQqLw1U8yXJ3gT5D+rhxIiSpo+kTqN+hQ+9ialIXw=="
25 } 25 }
26 }, 26 },
27 "dependencies": { 27 "dependencies": {
@@ -31,9 +31,9 @@ @@ -31,9 +31,9 @@
31 "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==" 31 "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg=="
32 }, 32 },
33 "codemirror": { 33 "codemirror": {
34 - "version": "5.62.2",  
35 - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.2.tgz",  
36 - "integrity": "sha512-tVFMUa4J3Q8JUd1KL9yQzQB0/BJt7ZYZujZmTPgo/54Lpuq3ez4C8x/ATUY/wv7b7X3AUq8o3Xd+2C5ZrCGWHw==" 34 + "version": "5.63.3",
  35 + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.63.3.tgz",
  36 + "integrity": "sha512-1C+LELr+5grgJYqwZKqxrcbPsHFHapVaVAloBsFBASbpLnQqLw1U8yXJ3gT5D+rhxIiSpo+kTqN+hQ+9ialIXw=="
37 } 37 }
38 } 38 }
39 } 39 }