From f737f3f151cf77e447863a8cf76ba768a90d89af Mon Sep 17 00:00:00 2001 From: khanxmetu Date: Fri, 20 Sep 2024 22:11:51 +0300 Subject: [PATCH] Added fileurl field for forum posts --- moodle_dl/moodle/mods/forum.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moodle_dl/moodle/mods/forum.py b/moodle_dl/moodle/mods/forum.py index ac13532..289856e 100644 --- a/moodle_dl/moodle/mods/forum.py +++ b/moodle_dl/moodle/mods/forum.py @@ -176,10 +176,14 @@ async def load_files_of_discussion(self, discussion: Dict) -> List[Dict]: is_file=False, ) + if 'urls' in post: + post_url = post['urls'].get('view') + result.append( { 'filename': post_filename, 'filepath': post_path, + 'fileurl': post_url, 'timemodified': post_modified, 'description': post_message, 'type': 'description',