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

2.0 Lesson module :: cannot remove a "mediafile"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.3.3
    • Fix Version/s: 2.3.4
    • Component/s: Lesson
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a few lesson activities in a course with different file types BEFORE applying this patch.
      2. Apply this patch and check that those lesson activities still show the file you uploaded earlier when editing them.
      3. Create new lesson activities, some with no file, others with a file. Choose multiple file types (pdf, txt, jpg etc). Try and upload more than one file per lesson (should only ever been one file allowed at one time).
      4. Save and check that the files are still there.
      5. Look at the database table 'lesson' and ensure the mediafile column is being generated correctly (should be a '/' with the filename afterwards or blank for no file)
      6. In the lesson settings delete the files for those activities that contain files and save.
      7. Look at the database table 'lesson' and ensure the mediafile column is an empty string.
      8. Check the files have been deleted from the 'files' table as well.
      9. Click back on the settings and ensure the file is not there.
      10. Make sure there are no error messages during these steps.
      Show
      Create a few lesson activities in a course with different file types BEFORE applying this patch. Apply this patch and check that those lesson activities still show the file you uploaded earlier when editing them. Create new lesson activities, some with no file, others with a file. Choose multiple file types (pdf, txt, jpg etc). Try and upload more than one file per lesson (should only ever been one file allowed at one time). Save and check that the files are still there. Look at the database table 'lesson' and ensure the mediafile column is being generated correctly (should be a '/' with the filename afterwards or blank for no file) In the lesson settings delete the files for those activities that contain files and save. Look at the database table 'lesson' and ensure the mediafile column is an empty string. Check the files have been deleted from the 'files' table as well. Click back on the settings and ensure the file is not there. Make sure there are no error messages during these steps.
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-25552_master

      Description

      1. In the Lesson Pop-up to file or web page section of the settings, once you have selected a file, you can no longer remove it on subsequent edits of that Lesson settings.

      2.- The attached patch (lesson_mediafile20.txt) provides a solution by making a Delete button available.
      Please note that if you want to replace an existing file with another you first have to tick the Delete box, save the settings and re-edit the settings and load the new file.

      3.- Please note
      a. that it should really be called Pop-up to a media file since it can not link to a Web page at all.
      b. the only type of media file it actually accepts is an image (no texts, HTML files, the audio player does not work, etc.
      c. In the longer term, that Pop-up to file or web page feature should probably be removed, as it can be replaced by using an HTML block.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  18 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/Jan/13