Modify database enrolment execution log to show ID of course

Modify database enrolment execution log to show ID of course

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





དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to Jerry Lau

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

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

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

Séverin TERRIER གིས-
Documentation writers གི་པར Particularly helpful Moodlers གི་པར Testers གི་པར 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