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

Replace add_to_log with an event trigger - Blog

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 2.7
    • 2.5, 2.6
    • Events API, Logging
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_27_STABLE
    • MDL-40040-master
    • 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.
    • 20
    • 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

              ankit_frenz Ankit Agarwal
              abgreeve Adrian Greeve
              Adrian Greeve Adrian Greeve
              Damyon Wiese Damyon Wiese
              Rajesh Taneja Rajesh Taneja
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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