## Assignment

In previous version of Moodle 2.3, when you downloaded the students assignment, the students name and student ID was part of the word document name.  It does not do it in Moodle Version 2.4.4.

Can someone tell me how to get the unique studentID back into this process?  is there any coding that we could add back into this process?

We use this StudentID to automatically add grades into a gradebook.  The number associated with it now is either the posting submit number or something else.

Can we add the StudentID number into this file name?

Average of ratings: -

Under Site administration -> Users -> User policies there is a setting Show user identity. You can select which user fields you want in reports there.

Average of ratings: -

Tim:

I changed the user policy to include the student ID. However, here is a sample of the file that is downloaded from an assignment.  It does not include the studentID.

This is what is included when I click on an Assignment and choose Download Assignment.  This is inside the "zip" file of all the students assignments:

Example:

The StudentID is not included as part of the name of the file for this student.

Any ideas what I can do to add the StudentID into the name of the file?

Thanks!!

The StudentID is not included as part of the name of the file for this student.

Any ideas what I can do to add the StudentID into the name of the file?

Thanks!!

Average of ratings: -

Confirming Vicki,

Here's what I get.

Where BenTest-Test is the name of the course. Adv Uploading is the name of the Assignment. 44179 is the id number of the Assignment. CTYOnlineStudent2 is the student name. 8743 is a mysterious number

I had never attempted to upload a gradesheet until yesterday, and it failed to update the gradebook, saying there were no changes in the grades. But there were. This might be related to no ID numbers?

Average of ratings: -
The first part of the filename is the students name as determined by the fullnamedisplay admin setting.

The second part is an anonymous unique identifier generated by the assignment which is required and is what is used to identify students when re-uploading.

Average of ratings: -

The StudentID is not included as part of the name of the file for this student.

Any ideas what I can do to add the StudentID into the name of the file?

Has anyone found a way to include the studentID as part of the filename for assignments downloaded in a zip file?  As per Vicki's post.

Thanks

Average of ratings: -

There, at line 2300, you can change this statement $prefix = clean_filename($prefix . '_' . $this->get_uniqueid_for_user($userid) . '_') in order to add student id (or idnumber) like this " .$student->id" . So, you can edit that line with the this:$prefix = clean_filename($prefix . '_' . .$student->id . '_'); to have user id.

Is this a solution for you?

Average of ratings: -

Thanks very much That seems to work perfectly for what we need.  (still testing for any unforseen side affects)

I have changed the line to this;

$prefix = clean_filename($prefix . '_' . $student->idnumber . '_' .$this->get_uniqueid_for_user(\$userid) . '_');

And the result is;

Student Name_673306282_261448_assignsubmission_file_Second Revision Exercises.xls

Student Name_673306282 (Student Nos)_261448(unique system ID#)_filename.xls

Which is what we require.

Cheers

Average of ratings: -