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

File resource changes "main file" without telling you when overwriting the existing one

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.1.2, 2.2.1
    • Fix Version/s: None
    • Component/s: Files API, Resource
    • Labels:
    • Testing Instructions:
      Hide

      1. Add a new File resource
      2. Using Add... button, upload 3 different files (A B and C).
      3. Set the file C to be the main file. Check its filename is now shown in bold.
      4. Save and return to course
      5. Update the File resource, and use Add... to re-attach the file A, overwriting the existing copy. Check filename of C is still bold.
      6. Save and display
      7. Check that file C is displayed as expected.

      Show
      1. Add a new File resource 2. Using Add... button, upload 3 different files (A B and C). 3. Set the file C to be the main file. Check its filename is now shown in bold. 4. Save and return to course 5. Update the File resource, and use Add... to re-attach the file A, overwriting the existing copy. Check filename of C is still bold. 6. Save and display 7. Check that file C is displayed as expected.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE

      Description

      In a File resource that contains more than one file, one of these files is designated the "main file" and is shown in bold type. If you upload a replacement for the main file, overwriting the existing one, it ceases to be the main file. None of the files is now shown in bold, indicating that no main file is set, and displaying the resource simply shows the first file uploaded.

      Steps to reproduce
      ==============
      1. Add a new File resource
      2. Using Add... button, upload 3 different files (A B and C).
      3. Set the file C to be the main file (its filename is now shown in bold)
      4. Save and return to course
      5. Update the File resource, and use Add... to re-attach the file C, overwriting the existing copy.
      6. Save and display

      Expected behaviour
      ==============
      File C should now be displayed, as I have not changed the main file designation.

      Actual behaviour
      ============
      File A is displayed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emerrill Eric Merrill
                Reporter:
                daveyboond Steve Bond
                Participants:
                Component watchers:
                Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: