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

Replace add_to_log with an event trigger - course module

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.7
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Create course and some resources in it
      2. Add 'Activities' block to the course, click on 'Resources' link in it.
      3. Make sure that bunch of entries were written to the LEGACY log (through log report), for example 'book', 'view_all'. At the same time only one entry is written to the standard log.
      4. Create and edit module, again, should be 2 entries in legacy and one in standard
      Show
      Create course and some resources in it Add 'Activities' block to the course, click on 'Resources' link in it. Make sure that bunch of entries were written to the LEGACY log (through log report), for example 'book', 'view_all'. At the same time only one entry is written to the standard log. Create and edit module, again, should be 2 entries in legacy and one in standard
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      wip-MDL-40907-master
    • Story Points:
      30
    • Sprint:
      BACKEND Sprint 11

      Description

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

      Course / module
      /course/modlib.php:145: add_to_log($course->id, "course", "add mod",
      /course/modlib.php:148: add_to_log($course->id, $moduleinfo->modulename, "add",
      /course/modlib.php:493: add_to_log($course->id, "course", "update mod",
      /course/modlib.php:496: add_to_log($course->id, $moduleinfo->modulename, "update",
      /course/lib.php:1561: add_to_log($cm->course, 'course', "delete mod",
      /course/dnduploadlib.php:716: add_to_log($this->course->id, "course", "add mod",
      /course/dnduploadlib.php:719: add_to_log($this->course->id, $mod->modname, "add",
      /course/resources.php:51: add_to_log($course->id, $modname, 'view all', "index.php?id=$course->id", '');

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Damyon Wiese
              Tester:
              Jetha Chan
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

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