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

Replace add_to_log with an event trigger - mod_folder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.7
    • Component/s: Events API, Logging
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course.
      2. Create a folder resource.
      3. Click on this folder resource.
      4. Change the view.php to index.php and the id to the id of the course.
      5. Edit the folder.
      6. Visit <yoursite>/report/log/index.php?id=1 and click 'Get these logs'.
      7. Ensure there are three events; viewing all folder instances, viewing an individual folder and editing a folder.
      8. Run "vendor/bin/phpunit mod/folder/tests/events_test.php" and check there are no issues.
      Show
      Create a course. Create a folder resource. Click on this folder resource. Change the view.php to index.php and the id to the id of the course. Edit the folder. Visit <yoursite>/report/log/index.php?id=1 and click 'Get these logs'. Ensure there are three events; viewing all folder instances, viewing an individual folder and editing a folder. Run "vendor/bin/phpunit mod/folder/tests/events_test.php" and check there are no issues.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-40922_master
    • Story Points:
      8
    • Sprint:
      BACKEND Sprint 8

      Description

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

      mod_folder
      /mod/folder/index.php:36: add_to_log($course->id, 'folder', 'view all', "index.php?id=$course->id", '');
      /mod/folder/edit.php:66: add_to_log($course->id, 'folder', 'edit', 'edit.php?id='.$cm->id, $folder->id, $cm->id);
      /mod/folder/view.php:53: add_to_log($course->id, 'folder', 'view', 'view.php?id='.$cm->id, $folder->id, $cm->id);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markn Mark Nelson
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Dan Poltawski
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14