Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40044

Replace add_to_log with an event trigger - role

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.6
    • Events API, Logging
    • MOODLE_25_STABLE
    • MOODLE_26_STABLE
    • wip-mdl-40044
    • Hide
      1. Run phpunit lib/tests/accesslib_test.php
      2. Go to Define roles page (Site administration -> Users -> Permissions -> Define roles). Try change and save settings in each tab. You should not see any problem.
      3. Try change roles capability in course and system level and make sure you don't get any error/notice.
      Show
      Run phpunit lib/tests/accesslib_test.php Go to Define roles page (Site administration -> Users -> Permissions -> Define roles). Try change and save settings in each tab . You should not see any problem. Try change roles capability in course and system level and make sure you don't get any error/notice.
    • 13
    • BACKEND Sprint 3

    Description

      Replace the add_to_log calls for the following area, with a call to the get_legacy_logdata function in the event class.

      role
      /admin/roles/manage.php:93: add_to_log(SITEID, 'role', 'delete', 'admin/roles/manage.php', $roles[$roleid]>localname, '', $USER>id);
      /admin/roles/override.php:128: add_to_log($course->id, 'role', 'override', 'admin/roles/override.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
      /admin/roles/assign.php:114: add_to_log($course->id, 'role', 'assign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
      /admin/roles/assign.php:134: add_to_log($course->id, 'role', 'unassign', 'admin/roles/assign.php?contextid='.$context->id.'&roleid='.$roleid, $rolename, '', $USER->id);
      /admin/roles/define.php:199: add_to_log(SITEID, 'role', $action, 'admin/roles/define.php?action=view&roleid=' .
      /admin/roles/allow.php:49: add_to_log(SITEID, 'role', 'edit allow ' . $mode, str_replace($CFG->wwwroot . '/', '', $baseurl), '', '', $USER->id);
      /lib/accesslib.php:1524: add_to_log(SITEID, 'role', 'delete', 'admin/roles/action=delete&roleid='.$roleid, $rolename, '');

      Attachments

        Issue Links

          Activity

            People

              rajeshtaneja Rajesh Taneja
              abgreeve Adrian Greeve
              Frédéric Massart Frédéric Massart
              Dan Poltawski Dan Poltawski
              Sam Hemelryk Sam Hemelryk
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13