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

Include and require bug

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9.10
    • 1.9.8
    • SCORM
    • None
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      Hi,

      I've encountered a bug while using a plugin (CICEI Implementation of Conditional Activities).
      When viewing the quiz/view.php page, the plugin checks for rights to see the activity making multiple includes of mod files.
      One of the include was scorm/lib.php, in a function this one includes scorm/locallib.php by calling require_once('locallib.php').
      The problem is that php tries to include quiz/locallib.php and not scorm/locallib.php.
      To prevent this i suggest using the complete path to the include file ( require_once($CFG->dirroot.'/mod/scorm/locallib.php') ).
      I've attached a patch to correct this in all mod/scorm files.

      Valérian

            danmarsden Dan Marsden
            valerian valerian (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.