Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28718

Block quiz results sometimes sometimes has no access to /mod/quiz/lib.php

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.3
    • Component/s: Blocks, Quiz
    • Labels:
    • Environment:
      Windows iis AND OSX server
    • Testing Instructions:
      Hide

      This only happens when logged in as non-admin. AND it never happens on the first visit to the course page containing the block.
      Logged in as student: go to the course -> no error. Do an activity, and return to the course-page -> get the above error.

      Show
      This only happens when logged in as non-admin. AND it never happens on the first visit to the course page containing the block. Logged in as student: go to the course -> no error. Do an activity, and return to the course-page -> get the above error.
    • Workaround:
      Hide

      I suggest inserting
      require_once $CFG->dirroot.'/mod/quiz/lib.php';
      at line 2 of /blocks/quiz_results/block_quiz_results.php

      Show
      I suggest inserting require_once $CFG->dirroot.'/mod/quiz/lib.php'; at line 2 of /blocks/quiz_results/block_quiz_results.php
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Don't understand why but block quiz results sometimes causes a undefined function error:

      Fatal error: Call to undefined function quiz_format_grade() in /var/www/moodletest/wwwroot/blocks/quiz_results/block_quiz_results.php on line 376

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  28/Nov/11