Commit 20dac17995da58077a35dc1878d743984d778eda

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

- removed commented code and updated BUGS.md

Showing 2 changed files with 4 additions and 9 deletions   Show diff stats
1 1
2 # BUGS 2 # BUGS
3 3
4 -- md_to_html() nao usa o segundo argumento q. pode retirar-se dos templates? 4 +- ctrl-c should ask for confirmation before exiting.
5 - eventos unfocus? 5 - eventos unfocus?
6 - servidor nao esta a lidar com eventos scroll/resize. ignorar? 6 - servidor nao esta a lidar com eventos scroll/resize. ignorar?
7 7
@@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
39 39
40 # FIXED 40 # FIXED
41 41
  42 +- md_to_html() nao usa o segundo argumento q. pode retirar-se dos templates?
42 - config/logger.yaml ainda é do cherrypy... 43 - config/logger.yaml ainda é do cherrypy...
43 - uniformizar question.py com a de aprendizations... 44 - uniformizar question.py com a de aprendizations...
44 - qual a diferenca entre md_to_html e md_to_html_review, parece desnecessario haver dois. 45 - qual a diferenca entre md_to_html e md_to_html_review, parece desnecessario haver dois.
@@ -128,7 +128,6 @@ class App(object): @@ -128,7 +128,6 @@ class App(object):
128 # ----------------------------------------------------------------------- 128 # -----------------------------------------------------------------------
129 def logout(self, uid): 129 def logout(self, uid):
130 self.online.pop(uid, None) # remove from dict if exists 130 self.online.pop(uid, None) # remove from dict if exists
131 - # del self.online[uid]  
132 logger.info(f'Student {uid}: logged out.') 131 logger.info(f'Student {uid}: logged out.')
133 132
134 # ----------------------------------------------------------------------- 133 # -----------------------------------------------------------------------
@@ -139,7 +138,8 @@ class App(object): @@ -139,7 +138,8 @@ class App(object):
139 self.online[uid]['test'] = self.testfactory.generate(student_id) 138 self.online[uid]['test'] = self.testfactory.generate(student_id)
140 return self.online[uid]['test'] 139 return self.online[uid]['test']
141 else: 140 else:
142 - logger.error(f'Student {uid}: offline, can\'t generate test') 141 + # this implies an error in the code. should never be here!
  142 + logger.critical(f'Student {uid}: offline, can\'t generate test')
143 return None 143 return None
144 144
145 # ----------------------------------------------------------------------- 145 # -----------------------------------------------------------------------
@@ -292,12 +292,6 @@ class App(object): @@ -292,12 +292,6 @@ class App(object):
292 s.commit() 292 s.commit()
293 logger.info(f'Student {uid}: password reset to ""') 293 logger.info(f'Student {uid}: password reset to ""')
294 294
295 - # def set_user_agent(self, uid, user_agent=''):  
296 - # self.online[uid]['student']['user_agent'] = user_agent  
297 -  
298 - # def set_user_ip(self, uid, ipaddress=''):  
299 - # self.online[uid]['student']['ip_address'] = ipaddress  
300 -  
301 def insert_new_student(self, uid, name): 295 def insert_new_student(self, uid, name):
302 try: 296 try:
303 with self.db_session() as s: 297 with self.db_session() as s: