def get_questions_all(self): h = Hierarchy() questions_all = [] category_list = h.get_hierarchy_categories() for x in category_list: questions_all.extend(Category.get_category_questions(self, x)) return questions_all
def get_question_akut(self): question_akut = [] category_list = [] category_list.extend(Level.get_level_category(self, 0)) category_list.extend(Level.get_level_category(self, 1)) for x in category_list: question_akut.extend(Category.get_category_questions(self, x)) return question_akut
def level_count(self): category_list = [] count_list = [] for level_id in range(5): temp = [] category_list.extend(Level.get_level_category(self, level_id)) for x in category_list: if x != '''''': temp.extend(Category.get_category_questions(self, x)) #category_list = [x for x in temp] print(x) i = len(temp) with open("test.txt", "w") as f: f.write(str(temp)) count_list.append(i) return count_list