MDL-37009 function print_course_search() is moved to course renderer
[moodle.git] / index.php
index 320d796..23423b3 100644 (file)
--- a/index.php
+++ b/index.php
@@ -95,6 +95,7 @@
     $editing = $PAGE->user_is_editing();
     $PAGE->set_title($SITE->fullname);
     $PAGE->set_heading($SITE->fullname);
+    $courserenderer = $PAGE->get_renderer('core', 'course');
     echo $OUTPUT->header();
 
 /// Print Section or custom info
                     echo html_writer::tag('span', '', array('class'=>'skip-block-to', 'id'=>'skipavailablecourses'));
                 } else {
                     echo html_writer::tag('div', get_string('therearecourses', '', $ncourses), array('class' => 'notifyproblem'));
-                    print_course_search('', false, 'short');
+                    echo $courserenderer->course_search_form('', 'short');
                 }
             break;
 
                 echo $OUTPUT->box_start('generalbox categorybox');
                 print_whole_category_list(NULL, NULL, NULL, -1, false);
                 echo $OUTPUT->box_end();
-                print_course_search('', false, 'short');
+                echo $courserenderer->course_search_form('', 'short');
 
                 //end frontpage category names div container
                 echo html_writer::end_tag('div');
                 } else {
                     echo $renderer->course_category_tree(get_course_category_tree());
                 }
-                print_course_search('', false, 'short');
+                echo $courserenderer->course_search_form('', 'short');
 
                 //end frontpage category combo div container
                 echo html_writer::end_tag('div');