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

html_writer is used in mediaplugin but is not defined

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.9.10
    • 1.9.11
    • Filters
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Moderate

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              rwijaya Rossiani Wijaya
              vdighe Vikram Dighe
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                21/Feb/11