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

Replace add_to_log with an event trigger - mod_chat

    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

      Pre-requisites

      1. Navigate to Home / Site administration / Plugins / Activity modules / Chat and restore the default values for General configuration. (chat_method should be Ajax)
      2. Have 2 sessions opened simultaneously, one with a student, one with the admin

      Test 1

      1. Keep an eye on the logs while doing the following (Home / Courses / Miscellaneous / YOUR COURSE / All participants, All days)
      2. Create a new chat activity with default settings
      3. Access it via both users
      4. Make sure you see the message when the user joins, but there is no log entry for that
      5. Make sure you can successfully send messages, beeps and targetted messages, and each of those create a new log entry 'chat talk'
      6. Make sure a user timing out will generate a leave message, but no log entry
      7. Repeat this test setting chat_method to 'Normal' and 'Daemon'

      Test 2

      1. View the past sessions of the chat, and make sure a new entry is added to the logs.
      2. View the index.php page (view all) for the chat and make sure a new entry is added to the logs.
      Show
      Pre-requisites Navigate to Home / Site administration / Plugins / Activity modules / Chat and restore the default values for General configuration . (chat_method should be Ajax) Have 2 sessions opened simultaneously, one with a student, one with the admin Test 1 Keep an eye on the logs while doing the following (Home / Courses / Miscellaneous / YOUR COURSE / All participants, All days) Create a new chat activity with default settings Access it via both users Make sure you see the message when the user joins, but there is no log entry for that Make sure you can successfully send messages, beeps and targetted messages, and each of those create a new log entry 'chat talk' Make sure a user timing out will generate a leave message, but no log entry Repeat this test setting chat_method to 'Normal' and 'Daemon' Test 2 View the past sessions of the chat, and make sure a new entry is added to the logs. View the index.php page (view all) for the chat and make sure a new entry is added to the logs.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-40048-master
    • Story Points:
      20
    • Sprint:
      BACKEND Sprint 5

      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/chat (6 calls)
      /mod/chat/chat_ajax.php:94: add_to_log($course->id, 'chat', 'talk', "view.php?id=$cm->id", $chat->id, $cm->id);
      /mod/chat/report.php:50: add_to_log($course->id, 'chat', 'report', "report.php?id=$cm->id", $chat->id, $cm->id);
      /mod/chat/index.php:17: add_to_log($course->id, 'chat', 'view all', "index.php?id=$course->id", '');
      /mod/chat/gui_header_js/insert.php:61: add_to_log($course->id, 'chat', 'talk', "view.php?id=$cm->id", $chat->id, $cm->id);
      /mod/chat/gui_basic/index.php:108: add_to_log($course->id, 'chat', 'talk', "view.php?id=$cm->id", $chat->id, $cm->id);
      /mod/chat/view.php:73: add_to_log($course->id, 'chat', 'view', "view.php?id=$cm->id", $chat->id, $cm->id);

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

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