Skip to content

Commit

Permalink
Merge pull request #227 from khanxmetu/fix-add-post-url
Browse files Browse the repository at this point in the history
Added fileurl field for forum posts
  • Loading branch information
C0D3D3V authored Sep 24, 2024
2 parents bb4628a + f737f3f commit 6a67979
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions moodle_dl/moodle/mods/forum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6a67979

Please sign in to comment.