Example #1
0
    def __init__(self, lesson_number):

        lesson_text = lessonlib.get_lesson_text(lesson_number)
        self.name = lessonlib.get_lesson_name(lesson_text)
        self.concepts = lessonlib.fill_concepts(
            lesson_text, lessonlib.get_num_of_concepts(lesson_text),
            str(lesson_number))
Example #2
0
    def __init__(self, lesson_number):

        file_name = str(lesson_number)+'.txt'
        # lesson_path = os.path.join(os.path.dirname(__file__), 'lesson_notes')
        lesson_path = os.path.join("C:\\Users\\Ian\Documents\\Intro to Programming\\notesapp\lesson_notes\\", file_name)
        # lessonlib.write_log("**** %s found in %s *****" % (file_name, lesson_path))

        lessonfile = open(lesson_path, 'r')
        # lessonlib.write_log("**** Opening %s ****" % file_name)

        lesson_text = lessonfile.read()
        # lessonlib.write_log("Reading %s" % file_name)

        lessonfile.close()
        # lessonlib.write_log("**** %s Closed *****\n" % file_name)

        self.name = lessonlib.get_lesson_name(lesson_text)
        self.concepts = lessonlib.fill_concepts(lesson_text, lessonlib.get_num_of_concepts(lesson_text))
Example #3
0
    def __init__(self, lesson_number):

        file_name = str(lesson_number) + '.txt'
        # lesson_path = os.path.join(os.path.dirname(__file__), 'lesson_notes')
        lesson_path = os.path.join(
            "C:\\Users\\Ian\Documents\\Intro to Programming\\notesapp\lesson_notes\\",
            file_name)
        # lessonlib.write_log("**** %s found in %s *****" % (file_name, lesson_path))

        lessonfile = open(lesson_path, 'r')
        # lessonlib.write_log("**** Opening %s ****" % file_name)

        lesson_text = lessonfile.read()
        # lessonlib.write_log("Reading %s" % file_name)

        lessonfile.close()
        # lessonlib.write_log("**** %s Closed *****\n" % file_name)

        self.name = lessonlib.get_lesson_name(lesson_text)
        self.concepts = lessonlib.fill_concepts(
            lesson_text, lessonlib.get_num_of_concepts(lesson_text))
Example #4
0
    def __init__(self, lesson_number):

        lesson_text = lessonlib.get_lesson_text(lesson_number)
        self.name = lessonlib.get_lesson_name(lesson_text)
        self.concepts = lessonlib.fill_concepts(lesson_text, lessonlib.get_num_of_concepts(lesson_text), str(lesson_number))
def process_lesson_text():
    concept_list_string = lessonlib.fill_concepts(LESSON_TEXT, lessonlib.get_num_of_concepts(LESSON_TEXT))
    lesson_list = [lessonlib.get_lesson_name(LESSON_TEXT), lessonlib.get_lesson_id(LESSON_TEXT),
                   concept_list_string]
    return lesson_list