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

Replace add_to_log with an event trigger - mod_wiki

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.7
    • Component/s: Events API, Logging
    • Labels:
    • Testing Instructions:
      Hide

      Test 1

      1. Run phpunit mod/wiki/tests/events_test.php

      Test 2:

      • Check live logs and make sure what you do now is added to logs.
      1. Create wiki activity
      2. Create wiki page and modify it to add few versions
      3. Go to admin tab and delete some versions and make sure only selected versions are deleted
      4. Check history tab
      5. Restore page version and make sure page is restored to selected version
      6. Go to history tab and see diff of two version
      7. Go to Maps tab and check, you should not see any error
      8. Add/delete/update comments and make sure you don't get any error

      Test 3:

      • Explore wiki and make sure you don't see behaviour change or encounter any new error.
      Show
      Test 1 Run phpunit mod/wiki/tests/events_test.php Test 2: Check live logs and make sure what you do now is added to logs. Create wiki activity Create wiki page and modify it to add few versions Go to admin tab and delete some versions and make sure only selected versions are deleted Check history tab Restore page version and make sure page is restored to selected version Go to history tab and see diff of two version Go to Maps tab and check, you should not see any error Add/delete/update comments and make sure you don't get any error Test 3: Explore wiki and make sure you don't see behaviour change or encounter any new error.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      wip-mdl-40058
    • Story Points:
      40
    • 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/wiki (17 calls)
      /mod/wiki/overridelocks.php:80: add_to_log($course->id, "wiki", "overridelocks", "view.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/restoreversion.php:78: add_to_log($course->id, "wiki", "restore", "view.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/history.php:64: add_to_log($course->id, 'wiki', 'history', "history.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/admin.php:62: add_to_log($course->id, "wiki", "admin", "admin.php?pageid=".$page->id, $page->id, $cm->id);
      /mod/wiki/map.php:61: add_to_log($course->id, "wiki", "map", "map.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/index.php:48: add_to_log($course->id, 'wiki', 'view', "index.php?id=".$id, "");
      /mod/wiki/diff.php:76: add_to_log($course->id, "wiki", "diff", "diff.php?pageid=".$pageid."&comparewith=".$comparewith."&compare=".$compare, $pageid, $cm->id);
      /mod/wiki/create.php:110: add_to_log($course->id, 'wiki', 'add page', "view.php?pageid=".$newpageid, $newpageid, $cm->id);
      /mod/wiki/create.php:117: add_to_log($course->id, 'wiki', 'add page', "view.php?pageid=".$newpageid, $newpageid, $cm->id);
      /mod/wiki/edit.php:88: add_to_log($course->id, 'wiki', 'edit', "view.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/viewversion.php:68: add_to_log($course->id, "wiki", "history", "viewversion.php?pageid=".$pageid."&versionid=".$versionid, $pageid, $cm->id);
      /mod/wiki/instancecomments.php:102: add_to_log($course->id, 'wiki', 'comment', "comments.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/view.php:292: add_to_log($course->id, 'wiki', 'view', "view.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/view.php:294: add_to_log($course->id, 'wiki', 'view', "view.php?id=".$id, $id, $cm->id);
      /mod/wiki/view.php:296: add_to_log($course->id, 'wiki', 'view', "view.php?wid=".$wid."&title=".$title, $wid, $cm->id);
      /mod/wiki/prettyview.php:62: add_to_log($course->id, "wiki", "view", "prettyview.php?pageid=".$pageid, $pageid, $cm->id);
      /mod/wiki/comments.php:62: add_to_log($course->id, 'wiki', 'comments', "comments.php?pageid=".$pageid, $pageid, $cm->id);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Adrian Greeve Adrian Greeve
              Integrator:
              Marina Glancy Marina Glancy
              Tester:
              Jérôme Mouneyrac Jérôme Mouneyrac
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

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