diff -ruN moodle-1.7/blocks/course_list/block_course_list.php moodle-dev/blocks/course_list/block_course_list.php
--- moodle-1.7/blocks/course_list/block_course_list.php 2006-09-29 03:00:48.000000000 +0100
+++ moodle-dev/blocks/course_list/block_course_list.php 2006-10-02 20:06:29.000000000 +0100
@@ -19,11 +19,24 @@
return $this->content;
}
+ $hiddentoguests = false;
+
+ if (isset($CFG->block_course_list_hiddentoguests) ){
+ if ( $CFG->block_course_list_hiddentoguests == '1' ){
+ $hiddentoguests = true;
+ }
+ }
+
$this->content = new stdClass;
$this->content->items = array();
$this->content->icons = array();
$this->content->footer = '';
+ // hide courses to those not loogged in
+ if ( $hiddentoguests && ( !isset($USER->id) || isguest() ) ){
+ return $this->content;
+ }
+
$icon = "pixpath/i/course.gif\"".
" height=\"16\" width=\"16\" alt=\"".get_string("course")."\" />";
diff -ruN moodle-1.7/blocks/course_list/config_global.html moodle-dev/blocks/course_list/config_global.html
--- moodle-1.7/blocks/course_list/config_global.html 2005-02-08 18:32:59.000000000 +0000
+++ moodle-dev/blocks/course_list/config_global.html 2006-10-02 20:12:24.000000000 +0100
@@ -4,14 +4,21 @@