Moodle

Add optional logging of admin changes to Moodle

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 2.0
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

Proposed modification allows for actions and site changes in the admin section to be logged. This is very helpful in tracking down configuration problems, especially in the environment with several independent admins.

All entries are in the format "setting_name: 'old value' => 'new value'", and can be seen in log reports at /admin/report/log/index.php.

Patches contained in the attached file cover site settings saved in mdl_config, mdl_config_plugins, mdl_backup_config and the site course record (mdl_course where id=SITEID). It can be expanded to cover changes in roles and other settings. Patches were developed on 1.8.2.

Important: add $CFG->admin_log_enabled=true; to config.php to enable the feature.

It is preferred to keep the flag in config.php, as opposed to an option in the /admin GUI, to prevent admins from disabling it, wreaking havoc on the system, and re-enabling it again. All in a good cause, of course.

Activity

Hide
Andy Braden added a comment -

Particularly useful in hosted environments for trouble shooting, providing a way to clearly indicate that the problem is not a bug or failure of Moodle, but user(admin) error. Without the log record to point to it can degenerate into a game of blaming the software for the confused actions of multiple admins.

Andy Braden
Moodlerooms

Show
Andy Braden added a comment - Particularly useful in hosted environments for trouble shooting, providing a way to clearly indicate that the problem is not a bug or failure of Moodle, but user(admin) error. Without the log record to point to it can degenerate into a game of blaming the software for the confused actions of multiple admins. Andy Braden Moodlerooms
Hide
Martin Dougiamas added a comment -

Something for later, Petr (2.0 and maybe backport to 1.9).

Show
Martin Dougiamas added a comment - Something for later, Petr (2.0 and maybe backport to 1.9).
Hide
Martin Dougiamas added a comment -

Why make this optional? We could log it all the time I think.

Show
Martin Dougiamas added a comment - Why make this optional? We could log it all the time I think.
Hide
Daniel Neis added a comment -

Hello,

i have not seen the patch yet, but thinks like delete a user doesn't seem to be logged too.
it would be good to have this logged in 1.9 as it seems to be simple patchs with add_to_log().

Show
Daniel Neis added a comment - Hello, i have not seen the patch yet, but thinks like delete a user doesn't seem to be logged too. it would be good to have this logged in 1.9 as it seems to be simple patchs with add_to_log().
Hide
Helen Foster added a comment -

Just to note that a log of config changes has been implemented in 2.0.

Site Administration > Reports > Config changes

See http://qa.moodle.net/admin/report/configlog/index.php

Show
Helen Foster added a comment - Just to note that a log of config changes has been implemented in 2.0. Site Administration > Reports > Config changes See http://qa.moodle.net/admin/report/configlog/index.php
Hide
Helen Foster added a comment -

Thanks for everyone's interest and votes. This feature is included in Moodle 2.0.

Show
Helen Foster added a comment - Thanks for everyone's interest and votes. This feature is included in Moodle 2.0.

People

Vote (34)
Watch (14)

Dates

  • Created:
    Updated:
    Resolved: