next up previous contents
Next: lib.php 程式修改 Up: 課程 Previous: format.js 程式修改   Contents

index.php 程式修改

  1. 修改課程數量大於 150 就換頁。
    [root@moodle html]# diff -urNwbBE moodle/course/index.php moodle23/course/index.php 
    --- moodle/course/index.php	2012-08-03 08:04:31.000000000 +0800
    +++ moodle23/course/index.php	2012-11-08 18:10:10.000000000 +0800
    @@ -73,7 +73,7 @@
     /// Print form for creating new categories
         $countcategories = $DB->count_records('course_categories');
     
    -    if ($countcategories > 1 || ($countcategories == 1 && $DB->count_records('course') > 200)) {
    +    if ($countcategories > 1 || ($countcategories == 1 && $DB->count_records('course') > 150)) {
             $strcourses = get_string('courses');
             $strcategories = get_string('categories');
    
  2. 增加課程搜尋功能於課程主頁上。
    @@ -281,6 +281,7 @@
     print_course_request_buttons($systemcontext);
     echo '</div>';
     
    +print_course_search();echo '<br>'; //dywang
     echo $OUTPUT->footer();
     
     function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $up=false, $down=false) {
    



2017-08-04