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

Replace add_to_log with an event trigger - mod_glossary

    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
      1. As admin enable completion, enable glossary autolinking filter
      2. Create a course with a glossary module, without autoapproval, with completion on view
      3. Create another module with completion on posting of entry
      4. Add 'Activities' block
      5. As a student view glossary, click on 'Glossaries' link from activities block
      6. As a student add entry, edit, delete
      7. As a teacher approve entry, disapprove entry
      8. Make sure student completion is reflected properly
      9. As a teacher open glossary, click 'Browse by category', then button 'Edit categories'; Add, edit, delete categories
      10. As a teacher create a label with text containing glossary entry.
      11. Make sure you can view autolinked glossary entry with JS on and off

      P.S. Almost everything from this list is covered by behat tests.

      Show
      As admin enable completion, enable glossary autolinking filter Create a course with a glossary module, without autoapproval, with completion on view Create another module with completion on posting of entry Add 'Activities' block As a student view glossary, click on 'Glossaries' link from activities block As a student add entry, edit, delete As a teacher approve entry, disapprove entry Make sure student completion is reflected properly As a teacher open glossary, click 'Browse by category', then button 'Edit categories'; Add, edit, delete categories As a teacher create a label with text containing glossary entry. Make sure you can view autolinked glossary entry with JS on and off P.S. Almost everything from this list is covered by behat tests.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      wip-MDL-40059-master
    • Story Points:
      40
    • Sprint:
      BACKEND Sprint 11

      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/glossary (13 calls)
      /mod/glossary/deleteentry.php:116: add_to_log($course->id, "glossary", "delete entry", "view.php?id=$cm->id&mode=$prevmode&hook=$hook", $entry->id,$cm->id);
      /mod/glossary/index.php:23: add_to_log($course->id, "glossary", "view all", "index.php?id=$course->id", "");
      /mod/glossary/import.php:168: add_to_log($course->id, "course", "add mod",
      /mod/glossary/import.php:171: add_to_log($course->id, $mod->modulename, "add",
      /mod/glossary/showentry.php:64: add_to_log($entry->courseid, 'glossary', 'view entry', "showentry.php?eid=$entry->id", $entry->id, $entry->cmid);
      /mod/glossary/showentry_ajax.php:80: add_to_log($entry->courseid, 'glossary', 'view entry', "showentry.php?eid=$entry->id", $entry->id, $entry->cmid);
      /mod/glossary/edit.php:129: add_to_log($course->id, "glossary", "add entry",
      /mod/glossary/edit.php:135: add_to_log($course->id, "glossary", "update entry",
      /mod/glossary/editcategories.php:106: add_to_log($course->id, "glossary", "edit category", "editcategories.php?id=$cm->id", $hook,$cm->id);
      /mod/glossary/editcategories.php:127: add_to_log($course->id, "glossary", "delete category", "editcategories.php?id=$cm->id", $hook,$cm->id);
      /mod/glossary/editcategories.php:191: add_to_log($course->id, "glossary", "add category", "editcategories.php?id=$cm->id", $cat->id,$cm->id);
      /mod/glossary/approve.php:37: add_to_log($course->id, "glossary", "approve entry", "showentry.php?id=$cm->id&eid=$eid", "$eid", $cm->id);
      /mod/glossary/view.php:127: add_to_log($course->id, "glossary", "view", "view.php?id=$cm->id&tab=$tab", $glossary->id, $cm->id);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              abgreeve Adrian Greeve
              Peer reviewer:
              Mark Nelson Mark Nelson
              Integrator:
              Sam Hemelryk Sam Hemelryk
              Tester:
              Andrew Davis Andrew Davis
              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:
              7 Start watching this issue

                Dates

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