those "seemingly random" ids at the end before the ext are actually the "id" field from the user table - so you can match up the exact user that relates to this particular submission - we don't use usernames in the filenames as this is "private" data that shoudn't be disclosed by moodle. It renames the file by adding the users fullname to the beginning of the file as the should help to make the filenames unique - otherwise 2 students might submit the file "assignment1" - adding the userid at the end before the file ext means we can eventually create a function that allows a teacher to upload a package of files after reviewing the changes instead of uploading one at a time. Unfortunately this means the filedates will change in the newly packaged file. I don't think there's a way around this except by modifying the packaged zip to include an "info" file - which could be an xml/csv that contains the upload date of the files from the users and any extra information that an external grading system might require.
In any case - your external grading scripts will need a rewrite.
good luck!
Wow - you seem rather upset....
you can still require your students to include the username in the filename - Moodle includes the original filename in the submission - it just doesn't automatically add the username as "Moodle" treats the username as "private" - you mention "automated grading" - presumably someone needed to write this tool in the first place - you can't expect Moodle to work with this tool during upgrades...espeicially major upgrades! - you will need to pay/bribe/convince someone to help to rewrite your tool - there are a range of different ways to make it work - by modifying Moodle to suit your needs or modify your grading tool.
If you have some funding you could throw at your problem there are a range of Moodle Partners that could help... (or you could turn it into a Student programming project)
Good luck!
The automated grading script is a fairly simple shell script, which will now have to become a somewhat less simple one, but that's fine... I certainly don't need to pay somebody to help me rewrite it. The main problem now is that I will have to manually look at all the submission dates on Moodle, as they can no longer be dealt with programmatically at all. This seems like something that could in fact be fixed on the Moodle side, as there should really be no need to change those dates when zipping up the files.
Moreover, the particular way the filenames are munged is somewhat odd, since extra stuff is added both at the beginning and in the middle (which is why I didn't recognize the original filenames at first glance). It seems like it would make more sense to add all the extra stuff at the beginning, thereby preserving the entire submitted filename (including its extension, which is part of the filename) as a unit at the end that could be easily de-munged. As it is now, one has to chop off the user's full name from the beginning, then go to where the extension is, backtrack over the ID number, and chop that out of the middle; an inordinate amount of processing when one could instead have a distinctive sequence of characters (two or three underscores, for instance, or something similarly unlikely to occur in a user-submitted filename) separating the Moodle-added part of the filename from the user-submitted part of the filename, which could be easily grepped for and acted on accordingly.
are you using group mode in the course? - is it only downloading the files from the group selected?
I am not using any group mode - I want to download the assignments for all the students enrolled in the course.
I want to know if this is a limitation of moodle that all the assignments are not getting downloaded or is there any other solution to this.
shouldn't be a limitation there - I've just had another quick look at the code and can't see any limitations on submissions. Can't help much further sorry!
Dan,
I've similar kind of problem. One of the teachers is asking me if there is a way to append other user fields, other than student's FN and LN, to the file name when using down all option?