formerr($err["numsections"]);
?></td>
</tr>
+<tr valign=top>
+ <td><P><? print_string("showrecent") ?>:</td>
+ <td><?
+ unset($choices);
+ $choices["0"] = get_string("no");
+ $choices["1"] = get_string("yes");
+ choose_from_menu ($choices, "showrecent", $form->showrecent, "");
+ helpbutton("courserecent", get_string("showrecent")); ?>
+ </td>
+</tr>
<tr valign=top>
<td><P><? print_string("wordforteacher") ?>:</td>
<td><input type="text" name="teacher" size=25 value="<? p($form->teacher) ?>">
echo "</TABLE>";
- echo "</TD><TD WIDTH=210>";
-
-/// Print all the news items.
+ if ($news or $course->showrecent) {
+ echo "</TD><TD WIDTH=210>";
+
+ /// Print all the news items.
+
+ if ($news) {
+ print_simple_box(get_string("latestnews"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+ print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
+ echo "<FONT SIZE=1>";
+ forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "DESC", false);
+ echo "</FONT>";
+ print_simple_box_end();
+ echo "<BR>";
+ }
+
+ /// Print all the recent activity
+ if ($course->showrecent) {
+ print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+ print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
+ print_recent_activity($course);
+ print_simple_box_end();
+ }
- if ($news) {
- print_simple_box(get_string("latestnews"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
- print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
- echo "<FONT SIZE=1>";
- forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "DESC", false);
- echo "</FONT>";
- print_simple_box_end();
- echo "<BR>";
+ echo "<BR><IMG SRC=\"../pix/spacer.gif\" WIDTH=210 HEIGHT=1>";
}
-
- // Print all the recent activity
- print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
- print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
- print_recent_activity($course);
- print_simple_box_end();
echo "</TD></TR></TABLE>\n";
}
echo "</TABLE>";
-
- echo "</TD><TD WIDTH=210>";
-
- // Print all the news items.
-
- if ($news) {
- print_simple_box(get_string("latestnews"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
- print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
- echo "<FONT SIZE=1>";
- forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "DESC", false);
- echo "</FONT>";
- print_simple_box_end();
- echo "<BR>";
- }
+ if ($news or $course->showrecent) {
+ echo "</TD><TD WIDTH=210>";
+
+ // Print all the news items.
+
+ if ($news) {
+ print_simple_box(get_string("latestnews"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+ print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
+ echo "<FONT SIZE=1>";
+ forum_print_latest_discussions($news->id, $course->newsitems, "minimal", "DESC", false);
+ echo "</FONT>";
+ print_simple_box_end();
+ echo "<BR>";
+ }
+
+ // Print all the recent activity
+ if ($course->showrecent) {
+ print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
+ print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
+ print_recent_activity($course);
+ print_simple_box_end();
+ }
- // Print all the recent activity
- print_simple_box(get_string("recentactivity"), $align="CENTER", $width="100%", $color="$THEME->cellheading");
- print_simple_box_start("CENTER", "100%", "#FFFFFF", 3, 0);
- print_recent_activity($course);
- print_simple_box_end();
-
- echo "<BR><IMG SRC=\"../pix/spacer.gif\" WIDTH=210 HEIGHT=1>";
+ echo "<BR><IMG SRC=\"../pix/spacer.gif\" WIDTH=210 HEIGHT=1>";
+ }
echo "</TD></TR></TABLE>\n";
--- /dev/null
+<P ALIGN=CENTER><B>Recent Activity</B></P>
+
+<P>Moodle can display "recent activity" on the course home page.
+
+<P>This shows the everything that has happened in the course since
+the last time the viewer logged in to the course, including
+new posts, new users, submitted journals etc.
+
+<P>It is highly recommended you leave this feature enabled in
+your courses, as it helps give a sense of activity in the course.
+Knowing what everyone else is doing also helps to promote a
+collaborative atmosphere in the class.
+
+<P>You might want to disable this feature for extremely large or
+heavily used courses, as it may slow down the display of
+the course page.
$string['showlistofcourses'] = "Show list of courses";
$string['showonlytopic'] = "Show only topic \$a";
$string['showonlyweek'] = "Show only week \$a";
+$string['showrecent'] = "Show recent activity";
$string['showtheselogs'] = "Show these logs";
$string['socialheadline'] = "Social forum - latest topics";
$string['showallcourses'] = "Show all courses";
print_simple_box_end();
}
+ if ($oldversion < 2002111200) {
+ execute_sql(" ALTER TABLE `course` ADD `showrecent` TINYINT(5) UNSIGNED DEFAULT '1' NOT NULL AFTER `numsections` ");
+ }
+
return true;
}
`guest` tinyint(2) unsigned NOT NULL default '0',
`startdate` int(10) unsigned NOT NULL default '0',
`numsections` smallint(5) unsigned NOT NULL default '1',
+ `showrecent` smallint(5) unsigned NOT NULL default '1',
`marker` int(10) unsigned NOT NULL default '0',
`timecreated` int(10) unsigned NOT NULL default '0',
`timemodified` int(10) unsigned NOT NULL default '0',
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2002111100; // The current version is a date (YYYYMMDDXX)
+$version = 2002111200; // The current version is a date (YYYYMMDDXX)
$release = "1.0.6.2"; // User-friendly version number