Modify assignment submission page to show user ID rather than full name

Modify assignment submission page to show user ID rather than full name

by John Skelton -
Number of replies: 2
Is it possible to achieve this? Our students use their matriculation number as a login. We would like this to be visible as a column in the submitted assignments view instead of their name.

Could someone point me towards the files I would have to edit to achieve this?

Thanks
Average of ratings: -
In reply to John Skelton

Re: Modify assignment submission page to show user ID rather than full name

by Muhammad Ajmal -
Hi John

You can change two lines of codes in /mod/assignment/lib.php.

Line 1151 in display_submissions()
Add your desired username or idnumber in the sql command.

$select = 'SELECT u.id, u.firstname, u.lastname, u.username, u.picture, u.imagealt,

Line 1302 in display_submissions()

change the below line

$userlink = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $auser->id . '&amp;course=' . $course->id . '">' . $auser->username . '</a>';

Then you will have username instead of fullname.

Best regards

Muhammad Ajmal
Average of ratings: Useful (1)
In reply to Muhammad Ajmal

Re: Modify Assignment Submission Page

by Johnny Zephyr -
Hi Muhammad

is it possible to add a section to the submissions page?

i want to add a custom link on this page but an get it to work.

i have looked at the code and it looks to me it will be placed just underneath the view_intro but can't get it to work.

do you just edit the lib file or is there more? could you outline some steps please?

Best Regards

JZ