portfolio/forum MDL-21156 fixed a small error in attached files when exporting a full thread

This commit is contained in:
Penny Leach 2010-02-26 15:28:43 +00:00
parent fba249c9c5
commit c2d2f7a987

View file

@ -111,8 +111,8 @@ class forum_portfolio_caller extends portfolio_module_caller_base {
$this->posts = forum_get_all_discussion_posts($this->discussion->id, 'p.created ASC'); $this->posts = forum_get_all_discussion_posts($this->discussion->id, 'p.created ASC');
$this->multifiles = array(); $this->multifiles = array();
foreach ($this->posts as $post) { foreach ($this->posts as $post) {
$attach = $fs->get_area_files($this->modcontext->id, 'forum_attachment', $this->post->id, 'timemodified', false) || array(); $attach = $fs->get_area_files($this->modcontext->id, 'forum_attachment', $post->id, 'timemodified', false);
$embed = $fs->get_area_files($this->modcontext->id, 'forum_post', $this->post->id, 'timemodified', false) || array(); $embed = $fs->get_area_files($this->modcontext->id, 'forum_post', $post->id, 'timemodified', false);
$files = array_merge($attach, $embed); $files = array_merge($attach, $embed);
if ($files) { if ($files) {
$this->keyedfiles[$post->id] = $files; $this->keyedfiles[$post->id] = $files;