next up previous contents
Next: quiz/eccessrule/securewindow/rule.php 存取規則 Up: 試題編輯 Previous: edit_question_form.php 編輯格式修改   Contents

quiz/edit.php 題目編輯修改

  1. 隨機題數選擇,預設 20 題以上時間隔 10 題,改成 15 題到 50 題間隔 5 題。
    [root@dywang moodle23]# diff -urNwbBE ../moodle/mod/quiz/edit.php mod/quiz/edit.php
    --- ../moodle/mod/quiz/edit.php	2012-06-26 01:15:22.000000000 +0800
    +++ mod/quiz/edit.php	2015-04-22 14:05:35.882172373 +0800
    @@ -88,7 +88,10 @@
                 for ($i = 1; $i <= min(10, $maxrand); $i++) {
                     $randomcount[$i] = $i;
                 }
    -            for ($i = 20; $i <= min(100, $maxrand); $i += 10) {
    +            for ($i = 15; $i <= min(50, $maxrand); $i += 5) {
    +                $randomcount[$i] = $i;
    +            }
    +            for ($i = 60; $i <= min(100, $maxrand); $i += 10) {
                     $randomcount[$i] = $i;
                 }
             } else {
    



2017-08-04