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

html_writer is used in mediaplugin but is not defined

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.9.11
    • 1.9.10
    • Filters
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Moderate

      Issue details:

      The filter_mediaplugin_ogg_callback(...) and filter_mediaplugin_ogv_callback(...) methods in filter/mediaplugin/filter.php reference the html_writer class, which is not defined in Moodle 1.9.10+ (build 20101103). This causes a fatal PHP error when those methods are called.

      Solution details:

      We added this custom class:

      /usr/share/php/html_writer.php:
      <?php
      class html_writer {
      function link($url, $text)

      { return '<a href="' . $url . '">' . $text . '</a>'; }

      }
      ?>

      (/usr/share/php is in our installation's include_path.)

      Then we added this to our Moodle installation's config.php:

      require_once 'html_writer.php';

      We chose to write this code instead of fully backporting the html_writer class and other required functions from Moodle 2.0 because only this code appears to be needed at this time.

            rwijaya Rossiani Wijaya
            vdighe Vikram Dighe (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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