Moodle
  1. Moodle
  2. MDL-28072

Undefined function in course activity report

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.7, 2.1
    • Component/s: Course
    • Labels:
      None
    • Rank:
      17695

      Description

      Getting the following error when accessing /course/report/outline/index.php?id=2 (2 is a course ID on my system)

      Fatal error: Call to undefined function blog_get_associated_count() in /home/andrew/Desktop/git/head/course/report/outline/index.php on line 130

      The function exists in blog/lib.php. The addition of a require_once() should do the trick. Sam suggested that some optimizations were made elsewhere that reduced the number of php files included. Thus areas like this that aren't including the files they need will have problems.

        Issue Links

          Activity

          Hide
          Andrew Davis added a comment -

          Added missing require_once()

          Show
          Andrew Davis added a comment - Added missing require_once()
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Confirmed it was broken and fixed after patch. Passed!

          Show
          Eloy Lafuente (stronk7) added a comment - Confirmed it was broken and fixed after patch. Passed!
          Hide
          Eric Eberhardt added a comment -

          confirming that the require_once('../../../blog/lib.php') being added to course/report/outline/index.php fixes the problem.

          Show
          Eric Eberhardt added a comment - confirming that the require_once('../../../blog/lib.php') being added to course/report/outline/index.php fixes the problem.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yay, this is now part of the just released Moodle 2.1 ! Thanks for all the hard work!

          Show
          Eloy Lafuente (stronk7) added a comment - Yay, this is now part of the just released Moodle 2.1 ! Thanks for all the hard work!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Note: as of today, this has been backported to 20_STABLE (we missed to do so on July). Commit cherry-picked: 0958a64834a4e3d284183e0af19fed2f18db2da8

          Thanks to David for discovering it, from him: "I can confirm the backport works well on my local 2.0 so feel free to exceptionally merge it and consider it tested"

          So, done, thanks

          Show
          Eloy Lafuente (stronk7) added a comment - Note: as of today, this has been backported to 20_STABLE (we missed to do so on July). Commit cherry-picked: 0958a64834a4e3d284183e0af19fed2f18db2da8 Thanks to David for discovering it, from him: "I can confirm the backport works well on my local 2.0 so feel free to exceptionally merge it and consider it tested" So, done, thanks

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: