detailed log of admins/teacher FOR admin

detailed log of admins/teacher FOR admin

by Direktorat Digitalisasi Pembelajaran -
Number of replies: 3
Hi there, I was wondering does moodle support to have a more detailed log of activity of admin/teacher activity for admin.
example :
  1. Log of the changes an admin do that can be compared: before and after, such as changing the quiz start date, activate or deactivate an activity or resource. with the previous value and after value.
  2. Log of the teacher do that can be traced: hiding or unhiding a resource.
I have tried to analyze the moodle table : logstore_standard_log, and tried to analyze the difference when hide or unhide an activity.
this is the example of log  when a teacher hide and unhide a quiz:
FROM_UNIXTIME(timecreated)    id    eventname    component    action    target    objecttable    objectid    crud    edulevel    contextid    contextlevel    contextinstanceid    userid    courseid    relateduserid    anonymous    other    timecreated    origin    ip    realuserid
2023-08-02 10:54:22    253000718    \\core\\event\\grade_item_updated    core    updated    grade_item    grade_items    399928    u    0    2207364    50    19806    141    19806    \N    0    a:3:{s:8:"itemname";s:8:"POSTTEST";s:8:"itemtype";s:3:"mod";s:10:"itemmodule";s:4:"quiz";}    1690948462    web    101.-    \N
2023-08-02 10:54:12    253000700    \\core\\event\\grade_item_updated    core    updated    grade_item    grade_items    399928    u    0    2207364    50    19806    141    19806    \N    0    a:3:{s:8:"itemname";s:8:"POSTTEST";s:8:"itemtype";s:3:"mod";s:10:"itemmodule";s:4:"quiz";}    1690948452    web    101.-    \N

from the log I can deduce that user id 141 does update to activity "POSTTEST" at certain time, but whats missing is the information of what changed.

Anyone know how to get the detailed information?

Appreciated the time and answers.
Average of ratings: -
In reply to Direktorat Digitalisasi Pembelajaran

Re: detailed log of admins/teacher FOR admin

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
If I were trying to track who, what, when, and where types of log entry changes, I think I would set up one browser running Live Logs, and then in another browser go and make changes while watching for the results in the Live Log view. I think that would help take out some of the guess work of what entry belongs to an event.

As to the, "information of what changed" depending on the activity/plugin you want to monitor, that would probably require code changes to the files in the activity/plugins ...classes/event/filenamexxx.php files. You can go look at those event files and see how they are all "worded" for what goes into the logs.
Average of ratings: Useful (1)
In reply to Direktorat Digitalisasi Pembelajaran

Re: detailed log of admins/teacher FOR admin

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Al has provided some suggestions about following the live logs. I have done this a little different, similar to what you have done. I open Moodle in one browser and phpmyadmin in another. Then I do something in Moodle and query the logstore_standard_log table to see what got recorded. So, I think that you are starting at the right point.

However, to get more detail, you need to run queries joining the logstore data to other tables. This is how relational databases work. There are field in logstore that are important, but the average person wouldn't know it because they are not clear what they mean. For example: crud, contextid, contextinstanceid, etc.). Off the top of my head, I can't tell you what these fields do, but I do know they used to link to other tables.

So to get more detail, you will need to dig deeper. Some of these fields you might find point to other tables that then point to even other tables.
Average of ratings: Useful (1)
In reply to Direktorat Digitalisasi Pembelajaran

Re: detailed log of admins/teacher FOR admin

by Direktorat Digitalisasi Pembelajaran -
Thanks you all for the replies. I see that this feature need deep dive into the code and figuring what (code) does what. Maybe in the future someone could come up with more easier solution, or included as log option (such as verbose-informational-error,etc) in the moodle core system.