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

Replace add_to_log with an event trigger - course

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5
    • 2.6
    • Events API, Logging
    • MOODLE_25_STABLE
    • MOODLE_26_STABLE
    • wip-mdl-40043
    • 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.
    • 20
    • 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

              rajeshtaneja Rajesh Taneja
              abgreeve Adrian Greeve
              Ankit Agarwal Ankit Agarwal
              Damyon Wiese Damyon Wiese
              David Monllaó David Monllaó
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13