next up previous contents
Next: 簡答及數字答案輸入 Up: 其他小修改 Previous: 上傳檔案大小   Contents

計算題

  1. 計算題公式輸入欄位,預設大小為 10,不適用於較長的公式。重新設定為 20。
    [root@dywang question]# diff -uN ../../moodle/question/type/calculated/edit_calculated_form.php \
    type/calculated/edit_calculated_form.php 
    --- ../../moodle/question/type/calculated/edit_calculated_form.php	2012-06-26 01:15:25.000000000 +0800
    +++ type/calculated/edit_calculated_form.php	2014-09-15 08:30:35.467364352 +0800
    @@ -74,6 +74,7 @@
     
             // 1 is the answer. 3 is tolerance.
             $repeated[1]->setLabel(get_string('correctanswerformula', 'qtype_calculated') . '=');
    +		$repeated[1]->setSize(20);
             $repeated[3]->setLabel(get_string('tolerance', 'qtype_calculated') . '=');
             $repeatedoptions['tolerance']['default'] = 0.01;
    
  2. 計算題變數產生組數預設為 1,10,20,30,40,50,60,70,80,90,100,增加 2,5 兩種組數。
    [root@dywang question]# diff -uN ../../moodle/question/type/calculated/datasetitems_form.php \
    type/calculated/datasetitems_form.php
    --- ../../moodle/question/type/calculated/datasetitems_form.php	2012-06-26 01:15:25.000000000 +0800
    +++ type/calculated/datasetitems_form.php	2014-10-29 10:11:06.779049544 +0800
    @@ -208,6 +208,8 @@
     
             $addremoveoptions = array();
             $addremoveoptions['1']='1';
    +        $addremoveoptions['2']='2';
    +        $addremoveoptions['5']='5';
             for ($i=10; $i<=100; $i+=10) {
                  $addremoveoptions["$i"]="$i";
             }
    



2017-08-04