next up previous contents
Next: 代數題新增計算函式 Up: 其他小修改 Previous: 簡答及數字答案輸入   Contents

簡單計算題變數產生

  1. 簡單計算題變數產生個數,預設為 1,10,20,30,40,50,60,70,80,90,100,沒有其他個位數可以選擇。加上 2,5 兩種選擇。
    [root@moodle question]# diff -uN ../../moodle/question/type/calculatedsimple/edit_calculatedsimple_form.php ./type/calculatedsimple/edit_calculatedsimple_form.php
    --- ../../moodle/question/type/calculatedsimple/edit_calculatedsimple_form.php	2012-06-26 01:15:26.000000000 +0800
    +++ ./type/calculatedsimple/edit_calculatedsimple_form.php	2014-09-22 08:29:27.039220516 +0800
    @@ -438,6 +438,8 @@
     
                 $addoptions = Array();
                 $addoptions['1'] = '1';
    +            $addoptions['2'] = '2';
    +            $addoptions['5'] = '5';
                 for ($i = 10; $i <= 100; $i += 10) {
                     $addoptions["$i"] = "$i";
                 }
    



2017-08-04