Downloaded submissions prefixed with first name

Downloaded submissions prefixed with first name

by Steve Bond -
Number of replies: 6

Hello,

When I download submissions from an assignment, Moodle prepends the user's full name to the filename. So my own submission of "report.doc" becomes "Steve Bond_report.doc".

Is there a rationale for doing this as "firstname lastname" instead of "lastname firstname"? It doesn't seem to make sense, since you then cannot sort the files by last name, which is what I would have thought most users would want to be able to do.

I can't find any mention of this on forums or Tracker (except this related issue https://tracker.moodle.org/browse/MDL-29343) which is weird, because lots of our users complain about it. Makes me think I am missing something...

Steve

Average of ratings: Useful (1)
In reply to Steve Bond

Re: Downloaded submissions prefixed with first name

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Steve,

The name order is controlled by a setting at Site Administration > Users > Permissions > User Policies > Full Name Format.

I presently have mine set as: lastname alternatename firstname

When I download submissions they are in alphabetical order by last name, nickname, and then first name. Just be aware that this also sorts and lists them into last name order every other place students are listed.

HTH,

AL

Edit: Just went and took a quick look...I think you can also modify the language file, moodle.php located at yourmoodle/lang/en/moodle.php by changing the entry for fullnamedisplay and not making the entry I mention above.

Average of ratings: Useful (3)
In reply to AL Rachels

Re: Downloaded submissions prefixed with first name

by Steve Bond -

Hi AL

Thanks for this. I've had a look, but not sure if I want to go with this; as you say, it changes the layout in lots of other places. But not everywhere, which is weird - the name in the top right corner is still (firstname lastname), so are the names of course contacts listed on the category pages. Implementation of this feature seems a bit inconsistent. I assume the exceptions are old code where the fullname() function hasn't been used.

I might just go with a code change to sort this, reluctant though I am to touch core. It's only one line. The relevant code is in mod/assign/locallib.php where fullname() is used to rename the file.

Thanks

Steve

Average of ratings: Useful (1)
In reply to Steve Bond

Re: Downloaded submissions prefixed with first name

by Steve Ambro v3.8 -

I wonder if this corresponds to a dilemma I have with these downloads.

I designed format of the name of files to contain part of the student last name and initials.  Now when I download I get:

LastName-FirstName-Lastname-Firstname-filename.zip for each assignment downloaded.

So, a download for my project will be
Ambro-Steve_Ambr_Ste_FileName.zip

The first section is added by Moodle when I download.  Is there any way to prevent Moodle from doing this just for my courses?  I do not need Moodle to add any prefix to the file names while other teachers might want it.


In reply to Steve Ambro v3.8

Re: Downloaded submissions prefixed with first name

by Bernhard Weichel -

We have the same issue. We tell our students to use a particular filename for submissions. This is

<course>_<Lastname>_<firstname>_<assignment_id>

As a pity Moodle prepends it with <firstname>_<lastname>

Best would be if this could be configured system wide, per course, or per assignment.

I think changing the PHP code is not really an option.



In reply to Bernhard Weichel

Re: Downloaded submissions prefixed with first name

by Bernhard Weichel -

we now use a batch renamer to reconcile the filenames according to our needs.

 http://www.heise.de/download/renamer-4f0c16c21d793f44e1a79c84375504ff-1446044860-2651787.html 


1. installie
2. start
3. drag the files into the tool
4. Settings

image

In reply to Bernhard Weichel

Downloaded submissions file name

by T W -

Hi,

When I download submissions from an assignment, Moodle prepends the user name to the file,

But if in my course enrol two student with the same name, After download I don't know who owns the file,

Is there a way to add idnumber to the file name or any other solution?

Thanks