Assignment

 
 
Picture of Vicki Dunnam
Downloading student assignment does not have StudentID.. HELP!!
 

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: -
Tim at Lone Pine Koala Sanctuary
Re: Downloading student assignment does not have StudentID.. HELP!!
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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: -
Picture of Vicki Dunnam
Re: Downloading student assignment does not have StudentID.. HELP!!
 

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: -
Ben talking on the phone beside a monitor
Re: Downloading student assignment does not have StudentID.. HELP!!
Group Particularly helpful MoodlersGroup Testers

Confirming Vicki,

Here's what I get.
BenTest-Test Adv Uploading--44179\CTYOnline Student2_8743_assignsubmission_file_GenericFile.docx"

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: -
Me!
Re: Downloading student assignment does not have StudentID.. HELP!!
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
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.

In order to upload grades - you must first download the grading worksheet for the assignment and edit that one - don't try and create your own.
 
Average of ratings: -
Picture of Fred Weiss
Re: Downloading student assignment does not have StudentID.. HELP!!
 

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: -
Picture of Andreas Panagiotopoulos
Re: Downloading student assignment does not have StudentID.. HELP!!
 

Using moodle 2.5, you can edit function download_submissions() in mod/assign/locallib.php file.

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: -
Picture of Fred Weiss
Re: Downloading student assignment does not have StudentID.. HELP!!
 

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: -