-
Sub-task
-
Resolution: Won't Fix
-
Minor
-
None
-
1.9, 1.9.1, 1.9.2, 1.9.3
-
None
-
MOODLE_19_STABLE
The updated tool has plugin structure, very similar to gradebook reports structure - it was the base to start from. All actions are stored in /admin/user/actions/ folder; each action has its own folder with index.php, other scripts if necessary, and lang folder to store strings.
Updated user_bulk.php and user_bulk_forms.php now generate a list of actions from the list of folders in /action/, and the names of plug-ins are fetched from their corresponding string files.
When the user selects the action, the script redirects browser to /actions/[action_folder]/index.php - it's the main action page. The list of users to manipulate is still taken from $SESSION->bulk_users variable, and each action uses it as necessary. Any action-specific language strings can be stored in /lang/ subfolder of the action.
Implementing new actions are much easier:
1. Create new folder /actions/[actionname]/
2. Put index.php there to run the action
3. Put version.php with datestamps
4. Create /lang/en_utf8/ (and other language directories if necessary) subfolders
5. Put bulkuseractions_[actionname].php string file to language subfolders. The string file must include "pluginname" string to identify the action in action list.
The "standard" actions were reorganized to comply to this structure - in fact, they were just put to their corresponding folders and slightly edited.
Attached archive contains a patch which converts bulk user actions tool to plug-in architecture. It deletes standard actions and re-creates them in their corresponding folders.
- has been marked as being related by
-
MDL-38511 Plugins should be able to define new bulk user actions
-
- Closed
-
- will help resolve
-
CONTRIB-1656 Bulk user action: News
-
- Closed
-