next up previous contents
Next: quiz/override.php 作答次數 Up: 試題編輯 Previous: quiz/edit.php 題目編輯修改   Contents

quiz/eccessrule/securewindow/rule.php 存取規則

  1. 測驗導覽中按下「完成檢閱」,出現 Not Found。此現象只出現在測驗瀏覽器安全性設定為:「全螢幕彈出視窗伴隨一些JavaScript安全技術」時。若設定自動登入為「訪客」,且要開啟自動登入,一般訪客瀏覽系網頁時,才不會出現登入畫面,且第一次連線時不會變成空白頁。
    [root@dywang moodle23]# diff -urNwbBE ../moodle/mod/quiz/accessrule/securewindow/rule.php mod/quiz/accessrule/securewindow/rule.php
    --- ../moodle/mod/quiz/accessrule/securewindow/rule.php	2012-06-26 01:15:22.000000000 +0800
    +++ mod/quiz/accessrule/securewindow/rule.php	2015-03-11 10:37:40.227756868 +0800
    @@ -54,7 +54,8 @@
     
         public static function make(quiz $quizobj, $timenow, $canignoretimelimits) {
     
    -        if ($quizobj->get_quiz()->browsersecurity !== 'securewindow') {
    +if (($quizobj->get_quiz()->browsersecurity !== 'securewindow') || has_capability('mod/quiz:viewreports', $quizobj->get_context())) {
                 return null;
             }
    



2018-08-14