Moodle
  1. Moodle
  2. MDL-34061

File resources added by drag & drop onto course page don't have text filters applied

    Details

    • Testing Instructions:
      Hide

      Steps to reproduce:
      1. Enable Autolink filter for site and course
      2. Add a target activity/resource for autolink to pick up
      3. Create an HTML page with the title of the target resource from #2
      4. Enable editing on Course
      5. Drag HTML page into course
      6. Click "Add an activity or resource", and add the HTML page via the form

      Expected results:

      Both copies of the HTML page autolink to the target resource

      Show
      Steps to reproduce: 1. Enable Autolink filter for site and course 2. Add a target activity/resource for autolink to pick up 3. Create an HTML page with the title of the target resource from #2 4. Enable editing on Course 5. Drag HTML page into course 6. Click "Add an activity or resource", and add the HTML page via the form Expected results: Both copies of the HTML page autolink to the target resource
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
    • Rank:
      42364

      Description

      Adding a HTML file by dragging and dropping onto the course pages adds the file, but the autolink text filter is not applied.
      Adding the same file via the "Add an activity or resource" dialog and form adds the file and sets it so filters are applied.

      Checking the database, resource.filterfiles is set as "0" on the course page drag and drop add, but "2" for the form add.

      Steps to reproduce:
      1. Enable Autolink filter for site and course
      2. Add a target activity/resource for autolink to pick up
      3. Create an HTML page with the title of the target resource from #2
      4. Enable editing on Course
      5. Drag HTML page into course
      6. Click "Add an activity or resource", and add the HTML page via the form

      Expected results:

      • Both copies of the HTML page autolink to the target resource

      Actual results:

      • Only the HTML page added via form in #6 autolinks to the target resource

      Workaround:

      • Always use the dialog and form.

        Activity

        Hide
        Dan Poltawski added a comment -

        Ah, the main point here is that its not picking up the defaults from the site-level settings.

        Show
        Dan Poltawski added a comment - Ah, the main point here is that its not picking up the defaults from the site-level settings.
        Hide
        Dan Poltawski added a comment -

        What do you think, Davo?

        Show
        Dan Poltawski added a comment - What do you think, Davo?
        Hide
        Davo Smith added a comment -

        That's exactly the fix I would propose - appears to work as expected.

        Copying the testing instructions from the original issue.

        Show
        Davo Smith added a comment - That's exactly the fix I would propose - appears to work as expected. Copying the testing instructions from the original issue.
        Hide
        Sam Hemelryk added a comment -

        Thanks guys, this has been integrated now.
        I've cherry-picked the patch to 2.3 as well.

        Cheers
        Sam

        Show
        Sam Hemelryk added a comment - Thanks guys, this has been integrated now. I've cherry-picked the patch to 2.3 as well. Cheers Sam
        Hide
        Frédéric Massart added a comment -

        All good! Thanks guys!

        Show
        Frédéric Massart added a comment - All good! Thanks guys!
        Hide
        Dan Poltawski added a comment -

        Congratulations!

        You've made it into the weekly release!

        Thanks for your contribution - here are some random drummers to keep you inspired for the next week!
        http://www.youtube.com/watch?v=_QhpHUmVCmY

        Show
        Dan Poltawski added a comment - Congratulations! You've made it into the weekly release! Thanks for your contribution - here are some random drummers to keep you inspired for the next week! http://www.youtube.com/watch?v=_QhpHUmVCmY

          People

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

            Dates

            • Created:
              Updated:
              Resolved: