diff --git a/BUGS.md b/BUGS.md index e2146f2..a0dbccc 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,7 +1,6 @@ # BUGS -- reset password nao funciona no admin - qual a diferenca entre md_to_html e md_to_html_review, parece desnecessario haver dois. - servir imagens das perguntas - como alterar configuracao para mostrar logs de debug? @@ -12,6 +11,7 @@ # TODO +- cancelar teste no menu admin. Dado o numero de aluno remove teste e faz logout do aluno. - decorador para user 0, evita o "if uid==0" em muitas funcoes. - mathjax-node: sudo pkg install node npm @@ -35,6 +35,7 @@ # FIXED +- reset password nao funciona no admin - reload a intervalos não funciona. - allow/deny nao funciona no /admin. - Review de um teste que foi apagado rebenta. diff --git a/app.py b/app.py index 63f62c1..170b4d3 100644 --- a/app.py +++ b/app.py @@ -252,9 +252,7 @@ class App(object): 'start_time': self.online.get(uid, {}).get('test', {}).get('start_time',''), 'password_defined': pw != '', 'grades': self.get_student_grades_from_test(uid, self.testfactory['ref']), - 'ip_address': self.online.get(uid, {}).get('student', {}).get('ip_address',''), - 'user_agent': self.online.get(uid, {}).get('student', {}).get('user_agent',''), - 'focus': self.online.get(uid, {}).get('student', {}).get('focus', True), + 'focus': self.online.get(uid, {}).get('student', {}).get('focus', True), # FIXME }) return l @@ -284,11 +282,11 @@ class App(object): s.commit() logger.info(f'Student {uid}: password reset to ""') - def set_user_agent(self, uid, user_agent=''): - self.online[uid]['student']['user_agent'] = user_agent + # def set_user_agent(self, uid, user_agent=''): + # self.online[uid]['student']['user_agent'] = user_agent - def set_user_ip(self, uid, ipaddress=''): - self.online[uid]['student']['ip_address'] = ipaddress + # def set_user_ip(self, uid, ipaddress=''): + # self.online[uid]['student']['ip_address'] = ipaddress def insert_new_student(self, uid, name): try: diff --git a/serve.py b/serve.py index b6c126d..9a84392 100755 --- a/serve.py +++ b/serve.py @@ -280,7 +280,6 @@ class AdminHandler(BaseHandler): self.testapp.deny_student(value) elif cmd == 'reset_password': - print('reset ',value) self.testapp.reset_password(value) elif cmd == 'insert_student': diff --git a/static/css/test.css b/static/css/test.css index 914ca64..756ab52 100644 --- a/static/css/test.css +++ b/static/css/test.css @@ -1,6 +1,6 @@ /* Fixes navigation panel overlaying content */ html { - font-size: 14px; + font-size: 13px; } body { @@ -14,20 +14,15 @@ body { color: inherit; } -/*.card { +.card { margin-top: 70px; } -*/ -/*.drop-shadow { - -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .5); - box-shadow: 0px 2px 10px 3px rgba(0, 0, 0, .2); - border-radius:5px; -} -*/ + textarea { font-family: monospace !important; } + /* make markdown tables beautiful */ table { border-collapse: collapse; diff --git a/static/js/admin.js b/static/js/admin.js index 062ce0a..9975884 100644 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -1,7 +1,6 @@ $(document).ready(function() { - // button handlers (runs once) function button_handlers() { - + // button handlers (runs once) $("#allow_all").click( function() { $(":checkbox").prop("checked", true).trigger('change'); @@ -39,7 +38,6 @@ $(document).ready(function() { }); } ); - // authorization checkboxes in the students_table: $("tbody", "#students_table").on("change", "input", autorizeStudent); } @@ -86,7 +84,7 @@ $(document).ready(function() { $.ajax({ url: "/admin", data: {"cmd": "test", "value": ""}, - // dataType: "json", + dataType: "json", success: function(data) { // fill jumbotron data $("#title").html(data['data']['title']); @@ -114,8 +112,9 @@ $(document).ready(function() { emptyTable: "Não há alunos inscritos", }, ajax: { - data: {"cmd": "students_table", "value": ""}, url: "admin", // students_table + data: {"cmd": "students_table", "value": ""}, + dataType: "json", dataSrc: function ( json ) { var t = []; for ( var i=0; i @@ -105,7 +105,6 @@ @@ -124,15 +123,20 @@ - + diff --git a/templates/test.html b/templates/test.html index 0a4d580..1a724d2 100644 --- a/templates/test.html +++ b/templates/test.html @@ -42,22 +42,10 @@ - - - - {{ escape(t['student']['name']) }} ({{ escape(t['student']['number']) }}) - - @@ -65,17 +53,16 @@

{{ t['title'] }}

- {{ t.get('duration', '') }}
- -
{{ str(t['start_time'].time())[:8]}}
+ +
{{ str(t['start_time'].time())[:8]}}
- -
{{ t.get('duration', chr(8734)) }}
+ +
{{ t.get('duration', chr(8734)) }}
@@ -86,10 +73,10 @@ {% end %}
-
+
-
-- libgit2 0.21.2