[3.9.1]Course modules deleted from cli

[3.9.1]Course modules deleted from cli

by Richard van Iwaarden -
Number of replies: 4
Picture of Particularly helpful Moodlers

Since our upgrade from 3.7.1 to 3.9.1 teachers had mentioned that sections in a course sometimes 'disappear'. Usually I do not believe them and it always seems to be user error.

However, I have seen some strange things in the log-files of a course:



Course modules are deleted from Command Line Interface (cli) without an IP address. These are regular teachers, 100% only using the web-interface of Moodle. No CLI.

Can anyone explain what these logfiles mean and how can it be that Course modules are deleted using CLI?

Can I still find the mentioned module ID's in the database or Moodle temp? I want to know what is disappearing here.

Average of ratings: -
In reply to Richard van Iwaarden

Re: [3.9.1]Course modules deleted from cli

by Ken Task -
Picture of Particularly helpful Moodlers
Need to find out who the user ID's are - the user ID performing the deletion.
In your screen snap, 3983. Role of that user is?

To find out what: mdl_course_modules table for the ID number.
187867 as example:
Finding just one of those will show course ID number.
CLI could be a device ... using web app.

'SoS', Ken
In reply to Ken Task

Re: [3.9.1]Course modules deleted from cli

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

I know the users, they have editing teacher role. So they are able to delete modules.

However, I got confused by the 'CLI' and the fact that there's no IP address.

CLI could be a device ... using web app

So that would mean they are working using the normal web interface? If so, I don't really see a problem. I just don't understand why some log entries show 'WEB' and IP number and some show 'CLI' and no IP number.

In reply to Richard van Iwaarden

Re: [3.9.1]Course modules deleted from cli

by Ken Task -
Picture of Particularly helpful Moodlers

Ok ... clarification ... I provided incorrect/bad example ...

In your version of Moodle there is now recyclebin.  Teacher deletes a course module, that module is stored in mdl_files + moodledata/filedir/ as a backup (.mbz file) for the length of time moodle is set to move recyclebin backups to trashdir where it remains for X number of days more before finally being deleted.

CLI is an indication of an automated process done by clean up task/cron.   So no human is actually doing anything ... check the user id's and should note it's an admin level account.  The reason or no IP address ... it is a process that never leaves the server thus no network/IP address involved thus no IP to report.

That help?

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: [3.9.1]Course modules deleted from cli

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
That helps a lot Ken. What you're saying makes perfect sense, and I think this is actually the case.

I had not thought about the recycle bin. Items in there are deleted after 30 days.

Thanks again for your wisdom 😀