Modify database enrolment execution log to show ID of course

Modify database enrolment execution log to show ID of course

by Jerry Lau -
Number of replies: 4

Hello folks

When I view the log of our database enrolment task in moodle, it only shows 2 things...the 

Userid of the user and

The name of the course the user is enrolled in.

Is it possible to modify the output to also show the Id of the course also? What happens when there are courses with the same name?


For example, I want to show it as:

enrolling: 159927 ==> MATH 1401 (Jan 2021) Pons CRN 11045 - ID of course: 9999 as student


Instead of existing 

enrolling: 159993 ==> MATH 1401 (Jan 2021) Pons CRN 11045 as student

...


Thanks





Average of ratings: -
In reply to Jerry Lau

Re: Modify database enrolment execution log to show ID of course

by Jerry Lau -
Can I do this...

Line 554 in lib.php

$trace->output("enrolling: $userid ==> $course->shortname ($course->id) as ".$allroles[$roleid]->shortname, 1);
In reply to Jerry Lau

Re: Modify database enrolment execution log to show ID of course

by Jerry Lau -
Where can I submit this enhancement for moodle to put in their core code? I don't want to do it on our platform and get it via git instead..

thanks
In reply to Jerry Lau

Re: Modify database enrolment execution log to show ID of course

by Séverin TERRIER -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi Jerry,

First, i personnaly think it would be a useful enhancement sourire

Unfortunatly, even for such a simple think as adding some characters to an existing line, i think you'll have to follow the complete process of creating a dedicating tracker issue, create a dedicated patch, and wait for it to follow the complete process before being integrated and validated.

Séverin
In reply to Séverin TERRIER

Re: Modify database enrolment execution log to show ID of course

by Jerry Lau -
Thank you.. this was the path I was inquiring about