diff --git a/BUGS.md b/BUGS.md index f02e67d..73df427 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,7 +1,6 @@ BUGS: - reload da página rebenta o estado. -- barra de progresso no footer a funcionar - indicar o topico actual no sidebar - session management. close after inactive time. - guardar state cada vez que topico termina @@ -17,6 +16,7 @@ TODO: SOLVED: +- barra de progresso a funcionar - mostra tópicos do lado esquerdo, indicando quais estão feitos - database hardcoded in LearnApp. - se students.db não existe, rebenta. diff --git a/app.py b/app.py index 2758240..9c90a09 100644 --- a/app.py +++ b/app.py @@ -136,7 +136,6 @@ class LearnApp(object): finishtime=str(current_question['finish_time']), student_id=uid)) s.commit() - logger.debug('check_answer: saving done') return knowledge.new_question() @@ -185,11 +184,13 @@ class LearnApp(object): fullpath = path.expanduser(path.join(prefix, n)) if path.isdir(fullpath): # if directory defaults to "prefix/questions.yaml" - fullpath = path.join(fullpath, "questions.yaml") + filename = path.join(fullpath, "questions.yaml") + else: + logger.error(f'build_dependency_graph: "{fullpath}" is not a directory') - if path.isfile(fullpath): - logger.info(f'Loading questions from "{fullpath}"') - questions = load_yaml(fullpath, default=[]) + if path.isfile(filename): + logger.info(f'Loading questions from "{filename}"') + questions = load_yaml(filename, default=[]) for q in questions: q['path'] = fullpath diff --git a/models.py b/models.py index bfc0bb9..910041b 100644 --- a/models.py +++ b/models.py @@ -15,6 +15,7 @@ class StudentTopic(Base): student_id = Column(String, ForeignKey('students.id'), primary_key=True) topic_id = Column(String, ForeignKey('topics.id'), primary_key=True) level = Column(Float) + # date = Column(String) # --- student = relationship('Student', back_populates='topics') -- libgit2 0.21.2