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

import.php 程式修改

  1. 修改課表匯入為第 1 節至第 E 節,而非 period 1 ...等。
    [root@moodle mod_tmp]# diff -urNwbBE mrbs/import.php ../blocks/mrbs/import.php
    --- mrbs/import.php	2012-10-21 19:24:42.000000000 +0800
    +++ ../blocks/mrbs/import.php	2013-02-23 13:44:44.000000000 +0800
    @@ -33,18 +33,20 @@
     $cfg_mrbs = get_config('block/mrbs'); //get Moodle config settings for the MRBS block
     if (!isset($cfg_mrbs->periods) or empty($cfg_mrbs->periods)) {
         $cfg_mrbs->periods = array();
    -    $cfg_mrbs->periods[] = "Period 1";
    -    $cfg_mrbs->periods[] = "Period 2";
    -    $cfg_mrbs->periods[] = "Period 3";
    -    $cfg_mrbs->periods[] = "Period 4";
    -    $cfg_mrbs->periods[] = "Period 5";
    -    $cfg_mrbs->periods[] = "Period 6";
    -    $cfg_mrbs->periods[] = "Period 7";
    -    $cfg_mrbs->periods[] = "Period 8";
    -    $cfg_mrbs->periods[] = "Period 9";
    -    $cfg_mrbs->periods[] = "Period 10";
    -    $cfg_mrbs->periods[] = "Period 11";
    -    $cfg_mrbs->periods[] = "Period 12";
    +    $cfg_mrbs->periods[] = "第1節";
    +    $cfg_mrbs->periods[] = "第2節";
    +    $cfg_mrbs->periods[] = "第3節";
    +    $cfg_mrbs->periods[] = "第4節";
    +    $cfg_mrbs->periods[] = "中午";
    +    $cfg_mrbs->periods[] = "第5節";
    +    $cfg_mrbs->periods[] = "第6節";
    +    $cfg_mrbs->periods[] = "第7節";
    +    $cfg_mrbs->periods[] = "第8節";
    +    $cfg_mrbs->periods[] = "第A節";
    +    $cfg_mrbs->periods[] = "第B節";
    +    $cfg_mrbs->periods[] = "第C節";
    +    $cfg_mrbs->periods[] = "第D節";
    +    $cfg_mrbs->periods[] = "第E節";
     } else {
         $pds = explode("\n", $cfg_mrbs->periods);
         $cfg_mrbs->periods = array();
    



2017-08-04