Moodle

"Download all assignments as a zip" in assignments don't copy files with same name from the same student

Details

  • Testing Instructions:
    Hide

    1- Create a new assignment "Advanced uploading of files" in a course
    2- As a student, add 2 files with the same name, on in the root and another in a folder (See attachment)
    3- As the teacher, "Download all assignments as a zip" in "View submitted assignments" section
    4- You should only see both files in the folder.

    Show
    1- Create a new assignment "Advanced uploading of files" in a course 2- As a student, add 2 files with the same name, on in the root and another in a folder (See attachment) 3- As the teacher, "Download all assignments as a zip" in "View submitted assignments" section 4- You should only see both files in the folder.
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
  • Pull from Repository:
    git@github.com:StudiumDevel/moodle.git
  • Pull Master Branch:
    MDL-29343_folders_download_assignment

Description

Minor bug that causes files to be ignored when using "Download all assignments as a zip" in assignments because there's no consideration about files with same name for a same student in an assignment submission ("Advanced uploading of files" with subfolders).

Issue Links

Activity

Hide
Michael de Raadt added a comment -

Thanks for reporting that.

I've put that on the backlog.

In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

Show
Michael de Raadt added a comment - Thanks for reporting that. I've put that on the backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
Hide
Jean-Philippe Gaudreau added a comment -

Hi Michael,

Sure I have a patch but it's also integrating an improvement -> http://tracker.moodle.org/browse/MDL-29343

Anyway, I'll post the patch and if you think the improvement is a good idea (like I do) you could integrate it and fix the bug at the same time.

Thanks!

Show
Jean-Philippe Gaudreau added a comment - Hi Michael, Sure I have a patch but it's also integrating an improvement -> http://tracker.moodle.org/browse/MDL-29343 Anyway, I'll post the patch and if you think the improvement is a good idea (like I do) you could integrate it and fix the bug at the same time. Thanks!
Hide
Dan Marsden added a comment -

just saw this one - makes sense, but the dirname should be calculated using fullname instead of hardcoding the order. I'm also unsure if we should be saving the original filename into the directory or renaming it like we do with the old ones.

Show
Dan Marsden added a comment - just saw this one - makes sense, but the dirname should be calculated using fullname instead of hardcoding the order. I'm also unsure if we should be saving the original filename into the directory or renaming it like we do with the old ones.
Hide
Jean-Philippe Gaudreau added a comment -

Hi Dan.

I agree with you about using fullname function but I don't think it's a good idea to rename files because :

1. I don't see the point if we can identify the student at the root directory
2. Maybe (In some extreme cases) file could have internal references between them that would break if we do so (Ex. HTML documents referencing images by their names).

Show
Jean-Philippe Gaudreau added a comment - Hi Dan. I agree with you about using fullname function but I don't think it's a good idea to rename files because : 1. I don't see the point if we can identify the student at the root directory 2. Maybe (In some extreme cases) file could have internal references between them that would break if we do so (Ex. HTML documents referencing images by their names).
Hide
Jean-Philippe Gaudreau added a comment -

Hi Dan,

I've changed the code to use fullname function instead of hardcoding the order.

Show
Jean-Philippe Gaudreau added a comment - Hi Dan, I've changed the code to use fullname function instead of hardcoding the order.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: