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

Legacy course files are not shown in editor filepicker (context issue)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.4, 2.3.1
    • 2.2.5, 2.3.2
    • Filepicker
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • wip-MDL-34669-master
    • Hide

      Patch provided.

      Show
      Patch provided.
    • Hide

      1. Enable course files in a course (set legacyfiles to 2 in 'course' table).
      2. Enable Legacy course files repository.
      3. Add come course files via Course admin -> Legacy course files menu.
      4. Go to Add post to a forum in the course.
      5. In TinyMCE filepicker, select Legacy course files to get empty list.

      Show
      1. Enable course files in a course (set legacyfiles to 2 in 'course' table). 2. Enable Legacy course files repository. 3. Add come course files via Course admin -> Legacy course files menu. 4. Go to Add post to a forum in the course. 5. In TinyMCE filepicker, select Legacy course files to get empty list.

    Description

      When called from editor instance on some pages (e.g. adding post to forum),
      filepicker is showing empty list of legacy course files.

      This is happening because context is not set properly for editor which forces
      lib/form/editor.php to fallback to system context.

      I'll provide with patch which changes this behavior to make editor use page context
      instead, and only if it fails, then set context to context_system.

      Attachments

        Activity

          People

            marina Marina Glancy
            badblock Kirill Astashov
            Dan Poltawski Dan Poltawski
            Ankit Agarwal Ankit Agarwal
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10/Sep/12