예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
    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