Report Explanation

Report Explanation

by Mario Gharib -
Number of replies: 11

Dear Moodlers,

Could anyone help and explain what does the below report means ?

The course is open to all users (no need to enroll) and only contains labels. However, I keep seeing actions in the report such as the user "Khachab Youssef" with an event name Item deteld and Origin CLI. what does CLI means and what are these deleted items ?

Best regards.


Average of ratings: -
In reply to Mario Gharib

Re: Report Explanation

by Randy Thornton -
Picture of Documentation writers
Mario,

That is the logging for the Recycle bin in courses: what you are seeing here is the Recycle bins cleaning themselves out.

So every time a teacher deletes a course activity, it goes in the Recycle bin for a set amount of time (default is one week) for possible restoration, but at the end of that time is removed. CLI means "command line interface" since the Recycle bin cleaning is controlled in the background by cron. More info here: https://docs.moodle.org/37/en/Recycle_bin.

Randy
Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Report Explanation

by Mario Gharib -

Hello Randy,

Many thanks for your reply,

The thing is that in the report it shows that there two items that have been deleted related to participants (below is a report from the logstore_standard_log table). I just don't know what are these items that have been deleted. Is it possible that the users deleted items (knowing that they do not have the necessary role to do it).

Many thanks.

id eventname component action target objecttable objectid crud
17749797 \tool_recyclebin\event\course_bin_item_deleted tool_recyclebin deleted course_bin_item tool_recyclebin_course 17416 d
17834145 \tool_recyclebin\event\course_bin_item_deleted tool_recyclebin deleted course_bin_item tool_recyclebin_course 17457 d


edulevel contextid contextlevel contextinstanceid userid userName courseid anonymous other timecreated origin
0 825008 50 6239 677421 Yammine Yammine 6239 0 N; 1573121110 cli
0 825008 50 6239 667617 Khachab Youssef 6239 0 N; 1573473907 cli

In reply to Mario Gharib

Re: Report Explanation

by Randy Thornton -
Picture of Documentation writers
Mario,

That is what it looks like, yes, since that Userid is the person who deleted the activity.

There should be two entries in the logs for each course activity deletion: one for the original deletion, of which the very last entry in your screenshot is an example: user Course Manager deleted a label with id 74328. Unless such an activity is later restored from the bin back to the course, then the Recycle bin will then delete it one week (by default) later, shown in the other lines.

So, if those first two users should not be be in roles to delete course activities, then you can find the original deletion of the item earlier in the logs by filtering on Action=delete and investigate which course is involved and which items were deleted and what roles they have, because the logs indicates that they deleted some activity.

Randy
Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Report Explanation

by Mario Gharib -
Thanks

Here is what I have found the course manager created an element and after almost 7 days the user deleted, noting that the origin of this action is the CLI (see table below). Any idea what does that mean ? and how can I found what are these items that have been created and deleted  ?

Date Nam Event context Component Event name Description Origine
7 Nov 19, 12:05 Yammine Yammine Cours: USJ hors murs Recycle bin Item deleted Item with ID 17416 deleted cli
31 Oct 19, 11:09 Course Manager Cours: USJ hors murs Recycle bin element created
Item with ID 17416 created cli
11 Nov 19, 14:05 Khachab Youssef Cours: USJ hors murs Recycle bin Item deleted Item with ID 17457 deleted cli
4 Nov 19, 13:10 Course Manager Cours: USJ hors murs Recycle bin element created
Item with ID 17457 created cli

In reply to Mario Gharib

Re: Report Explanation

by Mario Gharib -
Does anyone knows ?
In reply to Mario Gharib

Re: Report Explanation

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
that's coming from your cron process which runs all Moodle's scheduled tasks - there's one for recycle bin clean up, and you probably have the recycle bin set up in your site to delete stuff after 7 days.
Eg:
 user deleted something - Moodle took a backup of that thing and stored in the recycle bin.
7 days later (as you have configured) - Moodle's cron/scheduled task process deletes the item in the recycle bin..

More info on the recycle bin is here:
https://docs.moodle.org/38/en/Recycle_bin

does that help?
Average of ratings: Useful (1)
In reply to Dan Marsden

Re: Report Explanation

by Mario Gharib -

Thank you Dan from your reply,
Actually the thing is that I would like to know why it was a guest that has deleted the Item instead of the course manager ? For example, the Course Manager (with role Manager) created Item ID 17416 while Yammine Yammine (Guest) deleted this Item ID

Date     Nam     Event context     Component     Event name     Description     Origine
7 Nov 19, 12:05     Yammine Yammine     Cours: USJ hors murs     Recycle bin     Item deleted     Item with ID 17416 deleted     cli
31 Oct 19, 11:09     Course Manager     Cours: USJ hors murs     Recycle bin     element created   Item with ID 17416 created     cli

In reply to Mario Gharib

Re: Report Explanation

by Mario Gharib -
I was thinking about the cli thing. So anyone knows which cli could be that it run to execute these two command ?
In reply to Mario Gharib

Re: Report Explanation

by Ken Task -
Picture of Particularly helpful Moodlers

Think what you see is mis-leading.   When teacher (maybe student) deletes something from a course, it goes to recyclebin as a backup (.mbz).  Where it stays until X time has passed where the deleted item is moved to trash.  Where is stays for 4 more days before removed.  This 'moving' is done via backend/php scripts ... cronjob/task ... thus reference to cli.

So the 'cli' isn't that user executing something from cli it's an automated process that was triggered by user actions who really don't exercise control over.

Not a programmer myself ... just an 'observer'! smile

'SoS', Ken


In reply to Ken Task

Re: Report Explanation

by Mario Gharib -
Thanks @Ken for the reply smile

Well actually the weird thing, as you can see in the table below, is that I allowed guest access (to our university users) to this course.

So how is it possible a user (for example the user: Yammine Yammine) with only guest access to delete something (even though it is a 'cli') ???

========================================================

date Nam Event context Component Event name Description Origine
7 Nov 19, 12:05 Yammine Yammine Cours: USJ hors murs Recycle bin Item deleted Item with ID 17416 deleted cli
31 Oct 19, 11:09 Course Manager Cours: USJ hors murs Recycle bin element created Item with ID 17416 created cli
11 Nov 19, 14:05 Khachab Youssef Cours: USJ hors murs Recycle bin Item deleted Item with ID 17457 deleted cli
4 Nov 19, 13:10 Course Manager Cours: USJ hors murs Recycle bin element created Item with ID 17457 created cli

In reply to Mario Gharib

Re: Report Explanation

by Ken Task -
Picture of Particularly helpful Moodlers

Think you are going to have to take a deeper dive into the course.

Go go the course: USJ hors murs? and see what's in it.  And is it guest only with no other roles that can sign up?

Login as Yammine Yammine.   Go to this guest accessible course and see what user can do.  As well as what module is ID 17416 (mouse over whatever to see what url)

What system wide or course roll does Yammine Yammine have?
What is 'Item with ID 17416' ... a glossary where participants in course can add entires? (that's a guess)

'SoS', Ken