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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1
    • 2.1.3
    • Blocks, Quiz
    • Windows iis AND OSX server
    • MOODLE_21_STABLE
    • MOODLE_21_STABLE
    • 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
    • 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.

    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

      Attachments

        Activity

          People

            timhunt Tim Hunt
            michielb Michiel Boerman
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28/Nov/11