Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Infected file report

Author: Nathan Nguyen <nathannguyen@catalyst-au.net>
Copyright: Catalyst IT
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 172 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider  - X-Ref

Infected file report

get_metadata(collection $collection)   X-Ref
This plugin stores the userid of infected users.

param: collection $collection the collection object to add data to.
return: collection The populated collection.

get_contexts_for_userid(int $userid)   X-Ref
This function gets the contexts containing data for a userid.

param: int $userid The userid to get contexts for.
return: request\contextlist the context list for the user.

export_user_data(request\approved_contextlist $contextlist)   X-Ref
This function exports user data on infected files from the contextlist provided.

param: request\approved_contextlist $contextlist
return: void

delete_data_for_all_users_in_context(\context $context)   X-Ref
As this report tracks potential attempted security violations,
This data should not be deleted at request. This would allow for an
avenue for a malicious user to cover their tracks. This function deliberately
does no deletes.

param: \context $context the context to delete for.
return: void

delete_data_for_user(request\approved_contextlist $contextlist)   X-Ref
As this report tracks potential attempted security violations,
This data should not be deleted at request. This would allow for an
avenue for a malicious user to cover their tracks. This function deliberately
does no deletes.

param: \core_privacy\local\request\approved_contextlist $contextlist the contextlist to delete for.
return: void

get_users_in_context(request\userlist $userlist)   X-Ref
This gets the list of users inside of the provided context. In this case, its only system context
which contains users.

param: \core_privacy\local\request\userlist $userlist
return: void

delete_data_for_users(request\approved_userlist $userlist)   X-Ref
As this report tracks potential attempted security violations,
This data should not be deleted at request. This would allow for an
avenue for a malicious user to cover their tracks. This function deliberately
does no deletes.

param: request\approved_userlist $userlist
return: void