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

Replace add_to_log with an event trigger - Blog

    XMLWordPrintable

    Details

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

      Test 1

      1. Go to a course and add a blog menu block
      2. click on "Add an entry about this course" and add a blog
      3. Make sure 2 blog 'add association'log entries are created with correct data. (I don't know why we designed that way, but that is the way it is)
      4. Repeat this for a module

      Test 2

      1. Create following types of blogs(you can use blog menu blockto help you create these):-
        1. Course associated blog
        2. Module associated blog
        3. Blog with tags
      2. Now visit blog/index.php with various combination of these params:-
        1. tag = tag (string)
        2. tagid= ?
        3. courseid = ?
        4. userid = ?
        5. groupid = ?
        6. modid = ?
        7. search = search string
        8. entryid = ?
      3. For each visit make sure a log entry is created with correct details.
      Show
      Test 1 Go to a course and add a blog menu block click on "Add an entry about this course" and add a blog Make sure 2 blog 'add association'log entries are created with correct data. (I don't know why we designed that way, but that is the way it is) Repeat this for a module Test 2 Create following types of blogs(you can use blog menu blockto help you create these):- Course associated blog Module associated blog Blog with tags Now visit blog/index.php with various combination of these params:- tag = tag (string) tagid= ? courseid = ? userid = ? groupid = ? modid = ? search = search string entryid = ? For each visit make sure a log entry is created with correct details.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-40040-master
    • Story Points:
      20
    • Sprint:
      BACKEND Sprint 7

      Description

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

      blog/ (6 calls)
      /blog/index.php:227: add_to_log($courseid, 'blog', 'view', 'index.php?entryid='.$entryid.'&tagid='.@$tagid.'&tag='.$tag, 'view blog entry');
      /blog/locallib.php:262: add_to_log(SITEID, 'blog', 'add', 'index.php?userid='.$this->userid.'&entryid='.$this->id, $this->subject);
      /blog/locallib.php:299: add_to_log(SITEID, 'blog', 'update', 'index.php?userid='.$USER->id.'&entryid='.$entry->id, $entry->subject);
      /blog/locallib.php:317: add_to_log(SITEID, 'blog', 'delete', 'index.php?userid='. $this->userid, 'deleted blog entry with entry id# '. $this->id);
      /blog/locallib.php:356: add_to_log($courseid, 'blog', $action, 'index.php?userid='.$this->userid.'&entryid='.$this->id, $this->subject);
      /blog/locallib.php:360: add_to_log($cm->course, 'blog', $action, 'index.php?userid='.$this->userid.'&entryid='.$this->id, $this->subject, $cm->id, $this->userid);

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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