diff --git a/moodle_dl/moodle/mods/lesson.py b/moodle_dl/moodle/mods/lesson.py index 14c20b2..872eb21 100644 --- a/moodle_dl/moodle/mods/lesson.py +++ b/moodle_dl/moodle/mods/lesson.py @@ -99,10 +99,13 @@ async def load_attempt_page(self, attempt_page: Dict) -> List[Dict]: page_files = page_result.get('contentfiles', []) self.set_props_of_files(page_files, type='lesson_file') + page_content = page_result.get('pagecontent', '') + if page_content is None: + page_content= '' page_files.append( { '_is_page_content': True, - 'content': page_result.get('pagecontent', '').split('