next up previous contents
Next: edit_entry.php 程式修改 Up: Timetable 課表 Previous: config.inc.php 程式修改   Contents

edit_entry_handler.php 程式修改

  1. MRBS 修改成 timetable 後,固定以週顯示,日及月的顯示方式將不再使用,故編輯課本後,回到週顯示程式 week.php。
    [root@moodle mod_tmp]# diff -urNwbBE mrbs/web/edit_entry_handler.php ../blocks/mrbs/web/edit_entry_handler.php
    --- mrbs/web/edit_entry_handler.php	2012-10-21 19:24:42.000000000 +0800
    +++ ../blocks/mrbs/web/edit_entry_handler.php	2013-02-25 13:37:00.000000000 +0800
    @@ -449,7 +449,7 @@
         $area = mrbsGetRoomArea($room_id);
     
         // Now its all done go back to the day view
    -    $dayurl = new moodle_url('/blocks/mrbs/web/day.php', array('year'=>$year, 'month'=>$month, 'day'=>$day, 'area'=>$area));
    +    $dayurl = new moodle_url('/blocks/mrbs/web/week.php', array('year'=>$year, 'month'=>$month, 'day'=>$day, 'area'=>$area)); //dywang
         redirect($dayurl,$forcemoveoutput,20);
         exit;
     }
    
  2. MRBS 修改成 timetable 後,固定以週顯示,日及月的顯示方式將不再使用,實際上是將所有連到 day.php 及 month.php 的連結都改成 week.php。
    [root@moodle mrbs]# sed 's/\(\/blocks\/mrbs\/web\/\)day.php/\1week.php/' web/*.php
    [root@moodle mrbs]# sed 's/\(\/blocks\/mrbs\/web\/\)month.php/\1week.php/' web/*.php
    



2018-08-14