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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.4, 2.3.1
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Filepicker
    • Labels:
    • Testing Instructions:
      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.
    • Workaround:
      Hide

      Patch provided.

      Show
      Patch provided.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      wip-MDL-34669-master

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/12