next up previous contents
Next: function.php 程式修改 Up: Timetable 課表 Previous: edit_entry_handler.php 程式修改   Contents

edit_entry.php 程式修改

  1. 以目前 ROOM 進行編輯,而非 AREA。
    [root@moodle mod_tmp]# diff -urNwbBE mrbs/web/edit_entry.php ../blocks/mrbs/web/edit_entry.php
    --- mrbs/web/edit_entry.php	2012-10-21 19:24:42.000000000 +0800
    +++ ../blocks/mrbs/web/edit_entry.php	2014-03-23 16:38:35.909922772 +0800
    @@ -454,8 +454,8 @@
       <?php
     // select the rooms in the area determined above
     //$sql = "select id, room_name from $tbl_room where area_id=$area_id order by room_name";
    -$rooms = $DB->get_records('block_mrbs_room', array('area_id'=>$area_id), 'room_name');
     
    +$rooms = $DB->get_records('block_mrbs_room', array('id'=>$room_id), 'room_name'); 
     $i = 0;
     foreach ($rooms as $dbroom) {
         if (!allowed_to_book($USER, $dbroom)) {
    



2017-08-04