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

Replace add_to_log with an event trigger - message

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7
    • 2.6
    • Messages
    • MOODLE_26_STABLE
    • MOODLE_27_STABLE
    • MDL-40913_master
    • Hide
      Test 1
      1. Run the phpunit tests in message/tests/events_test.php and ensure all passes as expected.
      Test 2
      1. Open up <yoursite>/report/log/index.php in another tab and use this page to check that there is a log when asked.
      2. Log into a site that has at least two users.
      3. Click on your name to take you to your profile.
      4. Click on 'My profile' then 'Messages'.
      5. Type the name of another user and click 'Search people and messages'.
      6. Click on the '+' next to the name and check that there is a log entry 'message add contact'.
      7. Click 'Block contact' on the right and check that there is a 'message block contact' log entry.
      8. Click 'Unblock the contact' and check that there is a 'message unblock contact' log entry.
      9. Send the user a message and check that there is a 'message write' log entry.
      10. Remove the contact and check that there is a 'message remove contact' log entry.
      Show
      Test 1 Run the phpunit tests in message/tests/events_test.php and ensure all passes as expected. Test 2 Open up <yoursite>/report/log/index.php in another tab and use this page to check that there is a log when asked. Log into a site that has at least two users. Click on your name to take you to your profile. Click on 'My profile' then 'Messages'. Type the name of another user and click 'Search people and messages'. Click on the '+' next to the name and check that there is a log entry 'message add contact'. Click 'Block contact' on the right and check that there is a 'message block contact' log entry. Click 'Unblock the contact' and check that there is a 'message unblock contact' log entry. Send the user a message and check that there is a 'message write' log entry. Remove the contact and check that there is a 'message remove contact' log entry.
    • 20
    • BACKEND Sprint 11

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

      message
      /message/index.php:134: add_to_log(SITEID, 'message', 'add contact', 'index.php?user1='.$addcontact.'&user2='.$USER->id, $addcontact);
      /message/index.php:139: add_to_log(SITEID, 'message', 'remove contact', 'index.php?user1='.$removecontact.'&user2='.$USER->id, $removecontact);
      /message/index.php:143: add_to_log(SITEID, 'message', 'block contact', 'index.php?user1='.$blockcontact.'&user2='.$USER->id, $blockcontact);
      /message/index.php:147: add_to_log(SITEID, 'message', 'unblock contact', 'index.php?user1='.$unblockcontact.'&user2='.$USER->id, $unblockcontact);
      /message/index.php:184: add_to_log(SITEID, 'message', 'write', 'index.php?user='.$user1->id.'&id='.$user2->id.'&history=1#m'.$messageid, $user1->id);
      /message/lib.php:132: add_to_log(SITEID, 'message', 'view', 'index.php', $viewing);

            markn Mark Nelson
            abgreeve Adrian Greeve
            Petr Skoda Petr Skoda
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.