next up previous contents
Next: 問題四 Up: 問題解決 Previous: 問題二   Contents

問題三

  1. bug3: 測驗導覽中按下「完成檢閱」,出現 Not Found。此現象只出現在測驗瀏覽器安全性設定為:「全螢幕彈出視窗伴隨一些JavaScript安全技術」時。
    The requested URL /mod/quiz/0 was not found on this server.
    
  2. answer3:設定自動登入為「訪客」,且要開啟自動登入。做這樣的設定,一般訪客瀏覽系網頁時,才不會出現登入畫面,且第一次連線時不會變成空白頁。
    [root@moodle html]# diff -urNwbBE moodle/mod/quiz/accessrule/securewindow/rule.php moodle23/mod/quiz/accessrule/securewindow/rule.php
    --- moodle/mod/quiz/accessrule/securewindow/rule.php	2012-06-26 01:15:22.000000000 +0800
    +++ moodle23/mod/quiz/accessrule/securewindow/rule.php	2014-03-28 11:56:55.139140001 +0800
    @@ -54,7 +54,7 @@
     
         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;
             }
    


2017-08-04