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

Make sure repositories return correct supported_filetypes and apply filter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • BACKEND
    • 2.3, 4.1
    • Repositories
    • MOODLE_23_STABLE, MOODLE_401_STABLE

      1. All repositories need to filter their listings to return only files that are accepted by the current filepicker.

      2. If we know that repository can return only specific filetypes, it need to define function supported_returntypes()

      For example wikimedia lacks the code:

          public function supported_filetypes() {
              return array('web_image');
          }

      and therefore this repository is displayed when trying to insert media into text editor.
      Also, wikimedia lacks the filtering of the listing

      $ret['list'] = array_filter($list, array($this, 'filter'));

      which results in displaying images when looking for videos (and an error message when trying to embed it)

      Note that many repositories fail to filter results!

            Unassigned Unassigned
            marina Marina Glancy
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

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