MDL-48723 mod/forum: Fix cron task error on digest attachments.
[moodle.git] / mod / forum / lib.php
index 613aa74..2ac9a6e 100644 (file)
@@ -4094,8 +4094,8 @@ function forum_print_attachments($post, $cm, $type) {
                 $output .= plagiarism_get_links(array('userid' => $post->userid,
                     'file' => $file,
                     'cmid' => $cm->id,
-                    'course' => $post->course,
-                    'forum' => $post->forum));
+                    'course' => $cm->course,
+                    'forum' => $cm->instance));
                 $output .= '<br />';
             }
         }