--- /home/deni/moodle/moodl19/moodle/index.php	2007-10-12 10:13:23.000000000 +0200
+++ /usr/share/moodle/index.php	2007-10-31 19:10:37.000000000 +0100
@@ -219,18 +219,18 @@
             case FRONTPAGECOURSELIST:
 
                 if (isloggedin() and !has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguest() and empty($CFG->disablemycourses)) {
-                    print_heading_block(get_string('mycourses'));
+                    print_heading_block(get_string('mycourses'), '', false, 'mycourses');
                     print_my_moodle();
                 } else if ((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguest()) or (count_records('course') <= FRONTPAGECOURSELIMIT)) {
                     // admin should not see list of courses when there are too many of them
-                    print_heading_block(get_string('availablecourses'));
+                    print_heading_block(get_string('availablecourses'), '', false, 'availablecourses');
                     print_courses(0);
                 }
             break;
 
             case FRONTPAGECATEGORYNAMES:
 
-                print_heading_block(get_string('categories'));
+                print_heading_block(get_string('categories'), '', false, 'categories');
                 print_box_start('generalbox categorybox');
                 print_whole_category_list(NULL, NULL, NULL, -1, false);
                 print_box_end();
@@ -239,7 +239,7 @@
 
             case FRONTPAGECATEGORYCOMBO:
 
-                print_heading_block(get_string('categories'));
+                print_heading_block(get_string('categories'), '', false, 'categories');
                 print_box_start('generalbox categorybox');
                 print_whole_category_list(NULL, NULL, NULL, -1, true);
                 print_box_end();
diff -Naur /home/deni/moodle/moodl19/moodle/lib/weblib.php /usr/share/moodle/lib/weblib.php
--- /home/deni/moodle/moodl19/moodle/lib/weblib.php	2007-10-12 10:17:25.000000000 +0200
+++ /usr/share/moodle/lib/weblib.php	2007-10-31 18:20:48.000000000 +0100
@@ -3564,9 +3564,12 @@
 }
 
 
-function print_heading_block($heading, $class='', $return=false) {
+function print_heading_block($heading, $class='', $return=false, $name=null) {
     //Accessibility: 'headingblock' is now H1, see theme/standard/styles_*.css: ??
-    $output = '<h2 class="headingblock header '.$class.'">'.stripslashes($heading).'</h2>';
+    if(empty($name)) {
+	$name = str_replace(' ', '', stripslashes_safe($heading));
+    }
+    $output = '<a name="'.$name.'"></a><h2 class="headingblock header '.$class.'">'.stripslashes($heading).'</h2>';
 
     if ($return) {
         return $output;