Index: mod/glossary/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/glossary/lib.php,v
retrieving revision 1.211
diff -u -r1.211 lib.php
--- mod/glossary/lib.php	8 Jun 2008 10:43:40 -0000	1.211
+++ mod/glossary/lib.php	13 Jun 2008 11:12:22 -0000
@@ -2303,4 +2303,100 @@
     return $status;
 }
 
+/**
+ * This function prints the recent activity (since current user's last login)
+ * for specified courses.
+ * @param array $courses Array of courses to print activity for.
+ * @param string by reference $htmlarray Array of html snippets for display some
+ *        -where, which this function adds its new html to.
+ */
+function glossary_print_overview($courses,&$htmlarray) {
+    global $USER, $CFG, $DB;
+
+    $LIKE = $DB->sql_ilike();
+    if (empty($courses) || !is_array($courses) || count($courses) == 0) {
+        return array();
+    }
+
+    if (!$glossaries = get_all_instances_in_courses('glossary',$courses)) {
+        return;
+    }
+
+    $params = array();
+    $sql = "SELECT instance,cmid,l.course,COUNT(l.id) as count FROM {log} l "
+        ." JOIN {course_modules} cm ON cm.id = cmid "
+        ." WHERE (";
+        foreach ($courses as $course) {
+            $sql .= '(l.course = ? AND l.time > ?) OR ';
+            $params[] = $course->id;
+            $params[] = $course->lastaccess;
+        }
+    $sql = substr($sql,0,-3); // take off the last OR
+
+    //Ignore comment actions for now, only entries.
+    $sql .= ") AND l.module = 'glossary' AND action in('add entry','update entry') "
+        ." AND userid != ? GROUP BY cmid,l.course,instance";
+    $params[] = $USER->id;
+
+    if (!$new = $DB->get_records_sql($sql,$params)) {
+        $new = array(); // avoid warnings
+    }
+
+
+    $strglossarys = get_string('modulename','glossary');
+
+    $site = get_site();
+    if( count( $courses ) == 1 && isset( $courses[$site->id] ) ){
+
+        $strnumrespsince1 = get_string('overviewnumentrylog1','glossary');
+        $strnumrespsince = get_string('overviewnumentrylog','glossary');
+
+    }else{
+
+        $strnumrespsince1 = get_string('overviewnumentryvw1','glossary');
+        $strnumrespsince = get_string('overviewnumentryvw','glossary');
+
+    }
+
+    //Go through the list of all glossarys build previously, and check whether
+    //they have had any activity.
+    foreach ($glossaries as $glossary) {
+
+        if (array_key_exists($glossary->id, $new) && !empty($new[$glossary->id])) {
+            $count = $new[$glossary->id]->count;
+
+            if( $count > 0 ){
+
+                if( $count == 1 ){
+
+                    $strresp = $strnumrespsince1;
+
+                }else{
+
+                    $strresp = $strnumrespsince;
+
+                }
+
+                $str = '<div class="overview glossary"><div class="name">'.
+                    $strglossarys.': <a title="'.$strglossarys.'" href="'.
+                    $CFG->wwwroot.'/mod/glossary/view.php?g='.$glossary->id.'">'.
+                    $glossary->name.'</a></div>';
+                $str .= '<div class="info">';
+                $str .= $count.' '.$strresp;
+                $str .= '</div></div>';
+
+                if (!array_key_exists($glossary->course,$htmlarray)) {
+                    $htmlarray[$glossary->course] = array();
+                }
+                if (!array_key_exists('glossary',$htmlarray[$glossary->course])) {
+                    $htmlarray[$glossary->course]['glossary'] = ''; // initialize, avoid warnings
+                }
+                $htmlarray[$glossary->course]['glossary'] .= $str;
+
+            }
+
+        }
+
+    }
+}
 ?>
Index: lang/en_utf8/glossary.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/glossary.php,v
retrieving revision 1.13
diff -u -r1.13 glossary.php
--- lang/en_utf8/glossary.php	6 Jun 2008 03:17:01 -0000	1.13
+++ lang/en_utf8/glossary.php	13 Jun 2008 11:12:19 -0000
@@ -167,6 +167,10 @@
 $string['nopermissiontoviewresult'] = 'You can only look at results for your own entries';
 $string['numberofentries'] = 'Number of entries';
 $string['onebyline'] = '(one per line)';
+ $string['overviewnumentrylog1'] = 'new glossary entry since last login.';
+ $string['overviewnumentrylog'] = 'new glossary entries since last login.';
+ $string['overviewnumentryvw1'] = 'new glossary entry since course last viewed.';
+ $string['overviewnumentryvw'] = 'new glossary entries since course last viewed.';
 $string['popupformat'] = 'Popup format';
 $string['printerfriendly'] = 'Printer-friendly version';
 $string['printviewnotallowed'] = 'Print view isn\'t allowed';
Index: lang/en_utf8/my.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/my.php,v
retrieving revision 1.3
diff -u -r1.3 my.php
--- lang/en_utf8/my.php	1 Nov 2006 09:44:07 -0000	1.3
+++ lang/en_utf8/my.php	13 Jun 2008 11:12:19 -0000
@@ -3,9 +3,11 @@
 
 
 $string['mymoodle'] = 'Overview of my courses';
+$string['mycourses'] = 'My courses';
+$string['noactivity'] = 'No site information to show.';
 $string['nocourses'] = 'No course information to show.';
 $string['noguest'] = 'The \'Course Overview\' page is not available to guest users';
 $string['pinblocks'] = 'Configure pinned blocks for my moodle';
 $string['pinblocksexplan'] = 'Any block settings you configure here will be visible (and non-editable) for any user of moodle on their \'my moodle\' overview page.';
-
+$string['sitelevelactivity'] = ' site-level activity';
 ?>
Index: lang/en_utf8/wiki.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/wiki.php,v
retrieving revision 1.6
diff -u -r1.6 wiki.php
--- lang/en_utf8/wiki.php	1 Nov 2006 09:44:08 -0000	1.6
+++ lang/en_utf8/wiki.php	13 Jun 2008 11:12:20 -0000
@@ -120,6 +120,8 @@
 $string['otherwikis'] = 'Other Wikis';
 $string['overridebutton'] = 'Override lock';
 $string['overrideinfo'] = 'You can override this user\'s lock, but doing so may cause them to lose their changes! Please take care.';
+$string['overviewnumentrysince1'] = 'new wiki entry since last login.';
+$string['overviewnumentrysince'] = 'new wiki entries since last login.';
 $string['ownerunknown'] = 'unknown';
 $string['pageactions'] = 'Page actions';
 $string['pageindex'] = 'Page Index';
Index: lang/en_utf8/blog.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/blog.php,v
retrieving revision 1.25
diff -u -r1.25 blog.php
--- lang/en_utf8/blog.php	24 Apr 2008 02:24:49 -0000	1.25
+++ lang/en_utf8/blog.php	13 Jun 2008 11:12:19 -0000
@@ -1,7 +1,6 @@
 <?PHP // $Id: blog.php,v 1.25 2008/04/24 02:24:49 dongsheng Exp $
       // blog.php - created with Moodle 1.7 beta + (2006101003)
 
-
 $string['addnewentry'] = 'Add a new entry';
 $string['backupblogshelp'] = 'If enabled then blogs will be included in SITE automated backups';
 $string['blockmenutitle'] = 'Blog Menu';
@@ -10,6 +9,7 @@
 $string['blog'] = 'Blog';
 $string['blogdisable'] = 'Blogging is disabled!';
 $string['blogdeleteconfirm'] = 'Delete this blog?';
+$string['blogentries'] = 'Blog entries';
 $string['blogpreferences'] = 'Blog preferences';
 $string['blogs'] = 'Blogs';
 $string['blogtags'] = 'Blog Tags';
@@ -26,6 +26,8 @@
 $string['disableblogs'] = 'Disable blog system completely';
 $string['emptybody'] = 'Blog entry body can not be empty';
 $string['emptytitle'] = 'Blog entry title can not be empty';
+$string['overviewnumpostsince1'] = 'entry since last log in';
+$string['overviewnumpostsince'] = 'entries since last log in';
 $string['entrybody'] = 'Blog entry body';
 $string['entrybodyonlydesc'] = 'Entry description';
 $string['entryerrornotyours'] = 'This entry is not yours';
Index: lang/en_utf8/admin.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/admin.php,v
retrieving revision 1.196
diff -u -r1.196 admin.php
--- lang/en_utf8/admin.php	9 Jun 2008 08:44:02 -0000	1.196
+++ lang/en_utf8/admin.php	13 Jun 2008 11:12:19 -0000
@@ -12,6 +12,7 @@
 $string['allowrenames'] = 'Allow renames';
 $string['allowuserblockhiding'] = 'Allow users to hide blocks';
 $string['allowusermailcharset'] = 'Allow user to select character set';
+$string['allowusermycoursehiding'] = 'Allow users to hide course information';
 $string['allowuserthemes'] = 'Allow user themes';
 $string['allowvisiblecoursesinhiddencategories'] = 'Allow visible courses in hidden categories';
 $string['antivirus'] = 'Anti-Virus';
@@ -61,6 +62,7 @@
 $string['configallowunenroll'] = 'If this is set \'Yes\', then students are allowed to unenrol themselves from courses whenever they like. Otherwise they are not allowed, and this process will be solely controlled by the teachers and administrators.';
 $string['configallowuserblockhiding'] = 'Do you want to allow users to hide/show side blocks throughout this site?  This feature uses Javascript and cookies to remember the state of each collapsible block, and only affects the user\'s own view.';
 $string['configallowusermailcharset'] = 'Enabling this, every user in the site will be able to specify his own charset for email.';
+$string['configallowusermycoursehiding'] = 'Do you want to allow users to hide/show the information about individual courses on their myMoodle page?  This feature uses Javascript and cookies to remember the state of each collapsible block, and only affects the user\'s own view.';
 $string['configallowuserthemes'] = 'If you enable this, then users will be allowed to set their own themes.  User themes override site themes (but not course themes)';
 $string['configallusersaresitestudents'] = 'For activities on the front page of the site, should ALL users be considered as students?  If you answer \"Yes\", then any confirmed user account will be allowed to participate as a student in those activities.  If you answer \"No\", then only users who are already a participant in at least one course will be able to take part in those front page activities. Only admins and specially assigned teachers can act as teachers for these front page activities.';
 $string['configvisiblecourses'] = 'Display courses in hidden categories normally';
@@ -214,6 +216,7 @@
 $string['configsessioncookiepath'] = 'If you need to change where browsers send the Moodle cookies, you can change this setting to specify a subdirectory of your web site.  Otherwise the default \'/\' should be fine.';
 $string['configsessiontimeout'] = 'If people logged in to this site are idle for a long time (without loading pages) then they are automatically logged out (their session is ended).  This variable specifies how long this time should be.';
 $string['configshowblocksonmodpages'] = 'Some activity modules support blocks on their pages.  If you turn this on, then teachers will be able to add side blocks on those pages, otherwise the interface does not show this feature.';
+$string['configshowsiteactivity'] = 'Do you want to display the activity in modules at the top level of the site on the myMoodle page?';
 $string['configshowsiteparticipantslist'] = 'All of these site students and site teachers will be listed on the site participants list. Who shall be allowed to see this site participants list?';
 $string['configsitemailcharset'] = 'All the emails generated by your site will be sent in the charset specified here. Anyway, every individual user will be able to adjust it if the next setting is enabled.';
 $string['configsitepolicy'] = 'If you have a site policy that all users must see and agree to before using this site, then specify the URL to it here, otherwise leave this field blank.  The URL can point to anywhere - one convenient place would be a file in the site files.  eg http://yoursite/file.php/1/policy.html';
@@ -631,6 +634,7 @@
 $string['sessionhandling'] = 'Session Handling';
 $string['sessiontimeout'] = 'Timeout';
 $string['showblocksonmodpages'] = 'Show blocks on module pages';
+$string['showsiteactivity'] = 'Show site level activity';
 $string['simpletest'] = 'Unit tests';
 $string['sitelangchanged'] = 'Site language setting changed successfully';
 $string['sitemailcharset'] = 'Character set';
Index: lib/accesslib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/accesslib.php,v
retrieving revision 1.499
diff -u -r1.499 accesslib.php
--- lib/accesslib.php	5 Jun 2008 18:02:56 -0000	1.499
+++ lib/accesslib.php	13 Jun 2008 11:12:20 -0000
@@ -3794,7 +3794,11 @@
         $rolenames = role_fix_names($rolenames, $context);   // Substitute aliases
 
         foreach ($rolenames as $roleid => $rolename) {
-            $rolenames[$roleid] = '<a href="'.$CFG->wwwroot.'/user/index.php?contextid='.$context->id.'&amp;roleid='.$roleid.'">'.$rolename.'</a>';
+            if (has_capability('moodle/site:viewparticipants',$context)) {
+                $rolenames[$roleid] = '<a href="'.$CFG->wwwroot.'/user/index.php?contextid='.$context->id.'&amp;roleid='.$roleid.'">'.$rolename.'</a>';
+            } else {
+                $rolenames[$roleid] = $rolename;
+            }
         }
         $rolestring = implode(',', $rolenames);
     }
Index: course/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/lib.php,v
retrieving revision 1.603
diff -u -r1.603 lib.php
--- course/lib.php	4 Jun 2008 23:45:31 -0000	1.603
+++ course/lib.php	13 Jun 2008 11:12:19 -0000
@@ -795,19 +795,56 @@
             }
         }
     }
-    foreach ($courses as $course) {
-        print_simple_box_start('center', '100%', '', 5, "coursebox");
-        $linkcss = '';
+    
+    // get block content
+    if ($blocks = $DB->get_records('block')) {
+        foreach ($blocks as $block) {
+            if (file_exists(dirname(dirname(__FILE__)).'/blocks/'.$block->name.'/block_'.$block->name.'.php')) {
+                require_once(dirname(dirname(__FILE__)).'/blocks/'.$block->name.'/block_'.$block->name.'.php');
+                call_user_func_array(array('block_'.$block->name,'print_overview'),array($courses,&$htmlarray)); 
+            }
+        } 
+    } 
+    
+    blog_print_overview($courses,&$htmlarray);
+    
+    foreach ($courses as $course) {     	
+        print_box_start("coursebox");
+        //  Now put a padding div inside the box
+        print_box_start("padded");
+        if (!empty($CFG->allowusermycoursehiding)){
+            $strshow = addslashes_js(get_string('showblocka', 'access',$course->fullname));
+            $strhide = addslashes_js(get_string('hideblocka', 'access',$course->fullname));
+ 
+            echo '<div style="float:left;" ><input type="image" src="'.$CFG->pixpath.'/t/switch_minus.gif" '. 
+                'id="'.$course->id.'" onclick="elementToggleHide(this, true, function(el) {'.
+                'return findParentNode(el, \'DIV\', \'coursebox\'); },'.
+                ' \''.$strshow.'\', \''.$strhide.'\'); return false;" '.
+                'alt="'.$strhide.'" title="'.$strhide.'" class="hide-show-image" /></div>';
+         }
+        
+    	$linkcss = '';
         if (empty($course->visible)) {
             $linkcss = 'class="dimmed"';
         }
         print_heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>');
+
+        print_box_start("hidediv");
+        // and the roles
+        $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
+        if ($rolestring = get_user_roles_in_context($USER->id, $coursecontext)) {
+            echo ' '. get_string('roles').':'. format_string($rolestring, false).'<br/><br/>';
+        }
+
         if (array_key_exists($course->id,$htmlarray)) {
             foreach ($htmlarray[$course->id] as $modname => $html) {
                 echo $html;
             }
         }
-        print_simple_box_end();
+        //  Close all divs
+        print_box_end();
+        print_box_end();
+        print_box_end();
     }
 }
 
Index: admin/settings/appearance.php
===================================================================
RCS file: /cvsroot/moodle/moodle/admin/settings/appearance.php,v
retrieving revision 1.34
diff -u -r1.34 appearance.php
--- admin/settings/appearance.php	11 Jun 2008 03:51:05 -0000	1.34
+++ admin/settings/appearance.php	13 Jun 2008 11:12:18 -0000
@@ -86,6 +86,8 @@
 
     $temp = new admin_settingpage('mymoodle', get_string('mymoodle', 'admin'));
     $temp->add(new admin_setting_configcheckbox('mymoodleredirect', get_string('mymoodleredirect', 'admin'), get_string('configmymoodleredirect', 'admin'), 0));
+    $temp->add(new admin_setting_configcheckbox('allowusermycoursehiding', get_string('allowusermycoursehiding', 'admin'), get_string('configallowusermycoursehiding', 'admin'), 0));
+    $temp->add(new admin_setting_configcheckbox('showsiteactivity', get_string('showsiteactivity', 'admin'), get_string('configshowsiteactivity', 'admin'), 0));
     $ADMIN->add('appearance', $temp);
 
     // new CFG variable for coursemanager (what roles to display)
Index: my/index.php
===================================================================
RCS file: /cvsroot/moodle/moodle/my/index.php,v
retrieving revision 1.18
diff -u -r1.18 index.php
--- my/index.php	9 Apr 2008 02:46:55 -0000	1.18
+++ my/index.php	13 Jun 2008 11:12:22 -0000
@@ -6,6 +6,7 @@
     require_once($CFG->libdir.'/blocklib.php');
     require_once($CFG->dirroot.'/course/lib.php');
     require_once('pagelib.php');
+    require_once( $CFG->dirroot.'/blog/lib.php' );
     
     require_login();
 
@@ -69,10 +70,23 @@
     $site = get_site();
     $course = $site; //just in case we need the old global $course hack
 
+   if (!empty($CFG->showsiteactivity)) {
+
+        //Now get the site course record and print the module entries for that.
+        print_site_overview( $site, $courses );
+        print_heading( get_string( 'mycourses', 'my' ) ); 
+    }
+
     if (array_key_exists($site->id,$courses)) {
         unset($courses[$site->id]);
     }
 
+    $b = array();
+    foreach ($courses as $key => $course) {
+        $b[$key] = $course->lastaccess;
+    }
+    array_multisort($b,SORT_DESC,$courses);
+    
     foreach ($courses as $c) {
         if (isset($USER->lastcourseaccess[$c->id])) {
             $courses[$c->id]->lastaccess = $USER->lastcourseaccess[$c->id];
@@ -116,4 +130,72 @@
 
     print_footer();
 
+    // function to output site level activity
+    function print_site_overview( $site, $courses ) {
+
+        global $CFG, $USER, $DB;
+
+        //The lastaccess time for the site course is not held - so use lastlogin.
+        $site->lastaccess = $USER->lastlogin;
+        $sitearr = array( $site->id => $site );
+
+        $htmlarray = array();
+        if ($modules = $DB->get_records('modules')) {
+            foreach ($modules as $mod) {
+                if (file_exists(dirname(dirname(__FILE__)).'/mod/'.$mod->name.'/lib.php')) {
+                    require_once(dirname(dirname(__FILE__)).'/mod/'.$mod->name.'/lib.php');
+                    $fname = $mod->name.'_print_overview';
+                    if (function_exists($fname)) {
+                        $fname($sitearr,$htmlarray);
+                    }
+                }
+            }
+        }
+
+        require_once($CFG->dirroot.'/blocks/moodleblock.class.php');
+        if ($blocks = $DB->get_records('block')) {
+            foreach ($blocks as $block) {
+                if (file_exists(dirname(dirname(__FILE__)).'/blocks/'.$block->name.'/block_'.$block->name.'.php')) {
+                    require_once(dirname(dirname(__FILE__)).'/blocks/'.$block->name.'/block_'.$block->name.'.php');
+                    call_user_func_array(array('block_'.$block->name,'print_overview'),array($sitearr,&$htmlarray)); 
+                }
+            }
+        }
+
+        blog_print_overview($sitearr,&$htmlarray);
+
+        if( !(array_key_exists($site->id,$htmlarray) ) && empty( $blogoverview ) ){
+             print_simple_box(get_string('noactivity','my'),'center');
+        }else{
+
+            print_box_start('coursebox', 'mymoodlebox');
+            //  Now put a padding div inside the box
+            print_box_start('padded', 'mymoodlecontent');
+
+             if (!empty($CFG->allowusermycoursehiding)){
+                $strshow = addslashes_js(get_string('showblocka', 'access',$site->fullname));
+                $strhide = addslashes_js(get_string('hideblocka', 'access',$site->fullname));
+
+                echo '<input style="float:left;" src="'.$CFG->pixpath.'/t/switch_minus.gif" '. 
+                'id="togglehide_'.$site->id.'" onclick="elementToggleHide(this, true, function(el) {'.
+                'return findParentNode(el, \'DIV\', \'padded\'); },'.
+                ' \''.$strshow.'\', \''.$strhide.'\'); return false;" '.
+                'alt="'.$strhide.'" title="'.$strhide.'" class="hide-show-image" type="image"/>';
+            }
+            print_heading($site->fullname.get_string( 'sitelevelactivity', 'my' ));
+
+            print_box_start('hidediv');
+
+            if (array_key_exists($site->id,$htmlarray)) {
+                foreach ($htmlarray[$site->id] as $modname => $html) {
+                    echo $html;
+                }
+            }
+
+            //  Close both divs
+            print_box_end();
+            print_box_end();
+            print_box_end();
+        }
+    }
 ?>
Index: mod/forum/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/forum/lib.php,v
retrieving revision 1.679
diff -u -r1.679 lib.php
--- mod/forum/lib.php	12 Jun 2008 12:55:13 -0000	1.679
+++ mod/forum/lib.php	13 Jun 2008 11:12:21 -0000
@@ -964,7 +964,7 @@
  *
  */
 function forum_print_overview($courses,&$htmlarray) {
-    global $USER, $CFG;
+    global $USER, $CFG, $DB;
     $LIKE = $DB->sql_ilike();
 
     if (empty($courses) || !is_array($courses) || count($courses) == 0) {
Index: blog/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/blog/lib.php,v
retrieving revision 1.95
diff -u -r1.95 lib.php
--- blog/lib.php	2 Jun 2008 21:47:31 -0000	1.95
+++ blog/lib.php	13 Jun 2008 11:12:19 -0000
@@ -697,4 +697,70 @@
                                        FROM {post}
                                       WHERE module = 'blog' AND courseid = 0");
     }
+
+   /**
+    * This function returns a summary of all the postings since the current user
+    * last logged in.  (Analogous to the print_overview function found in some
+    * modules).
+    */
+    function blog_print_overview($courses,$htmlarray ){
+
+        global $USER, $CFG, $SITE;
+
+        $sitecontext = get_context_instance(CONTEXT_SYSTEM, $SITE->id);
+
+        if (!has_capability('moodle/blog:view', $sitecontext) || $CFG->bloglevel < BLOG_COURSE_LEVEL) {
+            return;
+        }
+        
+        if($CFG->bloglevel==BLOG_COURSE_LEVEL){
+         	if (array_key_exists($SITE->id,$courses)) {
+        		return;
+            }
+            $filtertype='course';
+        } else {
+        	if (!array_key_exists($SITE->id,$courses)) {
+        		return;
+        	}
+        	$filtertype='site';
+        }
+
+        foreach($courses as $course) {
+            $new = array();
+        	$entries = blog_fetch_entries('',10,'',$filtertype,$course->id,'','','lastmodified DESC',false);
+	        foreach($entries as $entry) {
+	            if ($entry->lastmodified > $course->lastaccess && $entry->userid != $USER->id) {
+                    array_push($new,$entry);
+	            }
+	        }
+
+	        $count = count($new);
+	        $strblogs = get_string('blogs','blog');
+	
+	        if( $count > 0 ){
+	            $strposts = get_string('blogentries','blog');
+	            if( $count == 1 ){
+	                $strnumpostsince = get_string('overviewnumpostsince1','blog');
+	            }else{
+	                $strnumpostsince = get_string('overviewnumpostsince','blog');
+	            }
+	
+	            if ($filtertype=='course') {
+	            	$filterselect = $course->id;
+	            } else {
+	            	$filterselect = '';
+	            }
+	            
+	            $str = '<div class="overview blogs"><div class="name">'.
+	                '<a title="'.$strposts.'" href="'.
+	                $CFG->wwwroot.'/blog/index.php?filtertype='.$filtertype.'&filterselect='.$filterselect.'">'.
+	                $strposts.'</a></div>';
+	            $str .= '<div class="info">';
+	            $str .= $count.' '.$strnumpostsince;
+	            $str .= '</div></div>';
+	
+	            $htmlarray[$course->id]['blog'] = $str;
+	        }
+	    }
+    }
 ?>
Index: theme/standard/styles_layout.css
===================================================================
RCS file: /cvsroot/moodle/moodle/theme/standard/styles_layout.css,v
retrieving revision 1.582
diff -u -r1.582 styles_layout.css
--- theme/standard/styles_layout.css	11 Jun 2008 08:39:05 -0000	1.582
+++ theme/standard/styles_layout.css	13 Jun 2008 11:12:22 -0000
@@ -2036,6 +2036,10 @@
   margin-left: 5px;
 }
 
+#my-index .hidden .hidediv {
+  display:none;
+}
+
 .categorylist {
   width:90%;
   margin-left:auto;
Index: mod/wiki/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/wiki/lib.php,v
retrieving revision 1.59
diff -u -r1.59 lib.php
--- mod/wiki/lib.php	4 Jun 2008 21:34:15 -0000	1.59
+++ mod/wiki/lib.php	13 Jun 2008 11:12:22 -0000
@@ -1757,5 +1757,81 @@
     }
 }
 
+/**
+ * This function prints the recent activity (since current user's last login)
+ * for specified courses.
+ * @param array $courses Array of courses to print activity for.
+ * @param string by reference $htmlarray Array of html snippets for display some
+ *        -where, which this function adds its new html to.
+ */
+function wiki_print_overview($courses,&$htmlarray) {
+    global $USER, $CFG, $DB;
 
+    if (empty($courses) || !is_array($courses) || count($courses) == 0) {
+        return array();
+    }
+
+    if (!$wikis = get_all_instances_in_courses('wiki',$courses)) {
+        return;
+    }
+
+    $params = array();
+    $sql = "SELECT instance,cmid,l.course,COUNT(l.id) as count FROM {log} l "
+        ." JOIN {course_modules} cm ON cm.id = cmid "
+        ." WHERE (";
+    foreach ($courses as $course) {
+        $sql .= '(l.course = ? AND l.time > ?) OR ';
+        $params[] = $course->id;
+        $params[] = $course->lastaccess;
+    }
+    $sql = substr($sql,0,-3); // take off the last OR
+
+    //Ignore comment actions for now, only entries.
+    $sql .= ") AND l.module = 'wiki' AND action = 'edit' "
+        ." AND userid != ? GROUP BY cmid,l.course,instance";
+    $params[] = $USER->id;
+
+    if (!$new = $DB->get_records_sql($sql,$params)) {
+        $new = array(); // avoid warnings
+    }
+
+    $strwikis = get_string('modulename','wiki');
+    $strnumrespsince1 = get_string('overviewnumentrysince1','wiki');
+    $strnumrespsince = get_string('overviewnumentrysince','wiki');
+
+    //Go through the list of all wikis build previously, and check whether
+    //they have had any activity.
+    foreach ($wikis as $wiki) {
+
+        if (array_key_exists($wiki->id, $new) && !empty($new[$wiki->id])) {
+            $count = $new[$wiki->id]->count;
+
+            if( $count > 0 ){
+
+                if( $count == 1 ){
+                    $strresp = $strnumrespsince1;
+                }else{
+                    $strresp = $strnumrespsince;
+                }
+
+                $str = '<div class="overview wiki"><div class="name">'.
+                    $strwikis.': <a title="'.$strwikis.'" href="'.
+                    $CFG->wwwroot.'/mod/wiki/view.php?wid='.$wiki->id.'">'.
+                    $wiki->name.'</a></div>';
+                $str .= '<div class="info">';
+                $str .= $count.' '.$strresp;
+                $str .= '</div></div>';
+
+                if (!array_key_exists($wiki->course,$htmlarray)) {
+                    $htmlarray[$wiki->course] = array();
+                }
+                if (!array_key_exists('wiki',$htmlarray[$wiki->course])) {
+                    $htmlarray[$wiki->course]['wiki'] = ''; // initialize, avoid warnings
+                }
+                $htmlarray[$wiki->course]['wiki'] .= $str;
+
+            }
+        }
+    }
+}
 ?>
Index: blocks/moodleblock.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/blocks/moodleblock.class.php,v
retrieving revision 1.103
diff -u -r1.103 moodleblock.class.php
--- blocks/moodleblock.class.php	2 Jun 2008 21:39:24 -0000	1.103
+++ blocks/moodleblock.class.php	13 Jun 2008 11:12:18 -0000
@@ -794,7 +794,16 @@
     function user_can_addto(&$page) {
         return true;
     }
-
+    
+    /* 
+    * Allows block class to output on myMoodle page
+    * @param $courses array of courses to being displayed
+    * @param $htmlarray passed by reference to hold results 
+    * 
+    */
+    function print_overview($courses,$htmlarray) {
+            return;
+    }
 }
 
 /**
