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

Replace add_to_log with an event trigger - course

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: Events API, Logging
    • Labels:
    • Testing Instructions:
      Hide
      1. Run phpunit lib/tests/sessionlib_test.php
      2. Run phpunit course/tests/courselib_test.php
      3. Edit course section (Rename and edit section description) and make sure no error occurs
      4. Login as different user and make sure you can do it without any problem.
      Show
      Run phpunit lib/tests/sessionlib_test.php Run phpunit course/tests/courselib_test.php Edit course section (Rename and edit section description) and make sure no error occurs Login as different user and make sure you can do it without any problem.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      wip-mdl-40043
    • Story Points:
      20
    • Sprint:
      BACKEND Sprint 3

      Description

      Replace the add_to_log calls in the following directories, with new events which contains the same information:

      Course
      /course/recent.php:41: add_to_log($course->id, "course", "recent", "recent.php?id=$course->id", $course->id);
      /course/delete.php:68: add_to_log(SITEID, "course", "delete", "view.php?id=$course->id", "$course->fullname (ID $course->id)");
      /course/manage.php:252: add_to_log($course->id, "course", ($visible ? 'show' : 'hide'), "edit.php?id=$course->id", $course->id);
      /course/manage.php:280: add_to_log($movecourse->id, "course", "move", "edit.php?id=$movecourse->id", $movecourse->id);
      /course/lib.php:2041: add_to_log($course->id, "course", "move", "edit.php?id=$course->id", $course->id);
      /course/lib.php:2291: add_to_log(SITEID, 'course', 'new', 'view.php?id='.$course->id, $data->fullname.' (ID '.$course->id.')');
      /course/lib.php:2380: add_to_log($course->id, "course", "update", "edit.php?id=$course->id", $course->id);
      /course/user.php:108: add_to_log($course->id, "course", "user report", "user.php?id=$course->id&user=$user->id&mode=$mode", "$user->id");
      /course/editsection.php:72: add_to_log($course->id, "course", "editsection", "editsection.php?id=$id", "$sectionnum");
      /course/view.php:117: add_to_log($course->id, 'course', $loglabel, "view.php?". $logparam, $infoid);
      /course/loginas.php:70: add_to_log($course->id, "course", "loginas", "../user/view.php?id=$course->id&user=$userid", "$oldfullname -> $newfullname");

      /index.php:79: add_to_log(SITEID, 'course', 'view', 'view.php?id='.SITEID, SITEID);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Damyon Wiese
              Tester:
              David Monllaó
              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:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13