How to auto generate and increment student ID

How to auto generate and increment student ID

by Zhi Kai -
Number of replies: 1

Hi there, 

Is there a plugin that aautomatically auto increment a student ID by year in the mdl_users table. so for example Student 1 has a student ID of 17000001, whereby 17 is the year (2017) and the rest of the number will increment when more students sign up. 

Any help is greatly appreciated. Thank you so much in advanced.

Average of ratings: -
In reply to Zhi Kai

Re: How to auto generate and increment student ID

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Zhi,

It really depends on what you are trying to accomplish. Moodle already has a student ID but it isn't in the format you want. However you can take a look at this thread to see if it might help.

https://moodle.org/mod/forum/discuss.php?d=312932

If not, post back here stating your objectives and give one or two examples of situations where it would be used.

Best regards,

Michael