]> git.mjollnir.org Git - moodle.git/commitdiff
modified print_recent_instance_activity to fix missing course value
authorselliott <selliott>
Fri, 14 Nov 2003 19:28:43 +0000 (19:28 +0000)
committerselliott <selliott>
Fri, 14 Nov 2003 19:28:43 +0000 (19:28 +0000)
modified get_recent_posts to select course id from forum_discussions table

mod/forum/lib.php

index 8ddcbfb248d7635e6a59f3500426c3e2bf52f3fc..d02bcdfb3d9c626ee01937b1798009bc84a069d5 100644 (file)
@@ -439,7 +439,7 @@ function forum_print_recent_instance_activity($forum, $timestart, $detail=false)
         echo $post->subject;
         echo "</a></font><br>";
         echo "<font size=2>";
-        $by->name = "<a href=\"$CFG->wwwroot/user/view.php?id=$post->userid&course=$courseid\">$post->firstname $post->lastname</a>";
+        $by->name = "<a href=\"$CFG->wwwroot/user/view.php?id=$post->userid&course=$post->course\">$post->firstname $post->lastname</a>";
         $by->date = userdate($post->modified);
         print_string("bynameondate", "forum", $by);
         echo "</font></p></td></tr></table>";
@@ -905,7 +905,7 @@ function forum_get_recent_posts($sincetime, $forum="0") {
         $forumselect = "";
     }
 
-    return get_records_sql("SELECT p.*, d.name, u.id, u.firstname, u.lastname, u.picture
+    return get_records_sql("SELECT p.*, d.name, u.id, u.firstname, u.lastname, u.picture, d.course
                               FROM {$CFG->prefix}forum_posts p, 
                                    {$CFG->prefix}forum_discussions d,
                                    {$CFG->prefix}user u