diff --git a/BUGS.md b/BUGS.md index fa12301..aa77143 100644 --- a/BUGS.md +++ b/BUGS.md @@ -2,6 +2,7 @@ ## BUGS +- review por nome e numero no cabecalho jumbotron - talvez a base de dados devesse ter como chave do teste um id que fosse único desse teste particular (não um auto counter, nem ref do teste) - em caso de timeout na submissão (e.g. JOBE ou script nao responde) a correcção diff --git a/package.json b/package.json index c5ff4eb..b682fd5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "email": "mjsb@uevora.pt", "dependencies": { "@fortawesome/fontawesome-free": "^5.15.3", - "bootstrap": "^4.6.0", + "bootstrap": "^5.1.0", + "bootstrap-icons": "^1.7.2", "codemirror": "^5.61.1", "datatables": "^1.10", "jquery": "^3.6.0", diff --git a/perguntations/app.py b/perguntations/app.py index 943151a..d617dfb 100644 --- a/perguntations/app.py +++ b/perguntations/app.py @@ -156,7 +156,7 @@ class App(): # ------------------------------------------------------------------------ async def set_password(self, uid: str, password: str) -> None: - '''change password on the database''' + '''change password in the database''' with Session(self._engine, future=True) as session: query = select(Student).where(Student.id == uid) student = session.execute(query).scalar_one() diff --git a/perguntations/serve.py b/perguntations/serve.py index f2b8925..2d30d2c 100644 --- a/perguntations/serve.py +++ b/perguntations/serve.py @@ -327,7 +327,7 @@ class AdminHandler(BaseHandler): ''' cmd = self.get_body_argument('cmd', None) value = self.get_body_argument('value', None) - logger.debug('POST /admin (cmd=%s, value=%s)') + logger.debug('POST /admin (cmd=%s, value=%s)', cmd, value) if cmd == 'allow': self.testapp.allow_student(value) @@ -338,7 +338,7 @@ class AdminHandler(BaseHandler): elif cmd == 'deny_all': self.testapp.deny_all_students() elif cmd == 'reset_password': - await self.testapp.set_password(uid=value, pw='') + await self.testapp.set_password(uid=value, password='') elif cmd == 'insert_student' and value is not None: student = json.loads(value) await self.testapp.insert_new_student(uid=student['number'], diff --git a/perguntations/static/bootstrap-icons b/perguntations/static/bootstrap-icons new file mode 120000 index 0000000..d8917d2 --- /dev/null +++ b/perguntations/static/bootstrap-icons @@ -0,0 +1 @@ +../../node_modules/bootstrap-icons \ No newline at end of file diff --git a/perguntations/templates/admin.html b/perguntations/templates/admin.html index 1de65d9..04a2a01 100644 --- a/perguntations/templates/admin.html +++ b/perguntations/templates/admin.html @@ -22,7 +22,7 @@ - + @@ -31,80 +31,80 @@
- + -
- Referência: --
- Ficheiro de configuração do teste: --
- Directório com os testes entregues: --
- Base de dados: --
-
# | -Ok | -Número | -Nome | -Estado | -Nota | -
---|
--
--
--
--
# | +Autoriz. | +Número | +Nome | +Estado | +Nota | +
---|