Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-16793 Bulk user actions improvement
  3. MDL-17010

Plug-in bulk user actions architecture

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.9, 1.9.1, 1.9.2, 1.9.3
    • Administration, Usability
    • 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.

            Unassigned Unassigned
            argentum Vlas Voloshin (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.