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

Show/hide, edit title, group mode module buttons don't trigger course_module_updated event

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.7
    • Component/s: Course, Events API
    • Labels:
    • Testing Instructions:
      Hide

      To check if the course modules is triggering events follow these steps:
      1) Add a new course
      2) Add one or more activities (assignment, forum, quiz..)

      TEST VISIBILITY CHANGE EVENT
      1) Click Edit Menu and Hide the assignment using the Eye Icon
      3) Check the Reports > Logs to see if the event log entry was created
      4) Go back on Course Page, Click Edit Menu and Show the assignment using the Eye Icon
      5) Check the Reports > Logs to see if the event log was created

      TEST RENAME EVENT
      1) In the Course page, change the assignment name using the Pencil icon
      2) Check the Reports > Logs to see if the event log was created

      TEST GROUP MODE
      1) In course page, change the assignment group mode using the group icon
      2) Check the Reports > Logs to see if the event log was created

      TEST EDIT SETTINGS
      1) In the course page, click on Edit menu and Edit Settings option.
      2) Change the description and click Save and return to course
      3) Check the Reports > Logs to see if the event log was created

      TEST HIDE/SHOW SECTION GENERATE EVENTS FOR EACH MODULE
      1) In the course page, click on eye icon on upper right corner of the section.
      2) Check if the visibility of all modules of this section changed.
      3) Go to Reports > Logs and check if the events was created for each module
      (If you have 2 modules, must have 2 events created)

      TO TEST NON-AJAX CHANGES
      1) Disable JavaScript in your browser
      2) In the course page, click on Eye icon(Hide/Show).
      3) Check the Reports > Logs to see if the event log was created
      4) Change the Group mode using the person icon (Separate Groups/Visible Groups).
      5) Check the Reports > Logs to see if the event log was created
      6) Change the section visibility
      7) Go to Reports > Logs and check if the events was created for each module in the section

      Finally, run PHPUnit tests and check to see if doesn't fail:
      vendor/bin/phpunit core_course_courselib_testcase course/tests/courselib_test.php

      Show
      To check if the course modules is triggering events follow these steps: 1) Add a new course 2) Add one or more activities (assignment, forum, quiz..) TEST VISIBILITY CHANGE EVENT 1) Click Edit Menu and Hide the assignment using the Eye Icon 3) Check the Reports > Logs to see if the event log entry was created 4) Go back on Course Page, Click Edit Menu and Show the assignment using the Eye Icon 5) Check the Reports > Logs to see if the event log was created TEST RENAME EVENT 1) In the Course page, change the assignment name using the Pencil icon 2) Check the Reports > Logs to see if the event log was created TEST GROUP MODE 1) In course page, change the assignment group mode using the group icon 2) Check the Reports > Logs to see if the event log was created TEST EDIT SETTINGS 1) In the course page, click on Edit menu and Edit Settings option. 2) Change the description and click Save and return to course 3) Check the Reports > Logs to see if the event log was created TEST HIDE/SHOW SECTION GENERATE EVENTS FOR EACH MODULE 1) In the course page, click on eye icon on upper right corner of the section. 2) Check if the visibility of all modules of this section changed. 3) Go to Reports > Logs and check if the events was created for each module (If you have 2 modules, must have 2 events created) TO TEST NON-AJAX CHANGES 1) Disable JavaScript in your browser 2) In the course page, click on Eye icon(Hide/Show). 3) Check the Reports > Logs to see if the event log was created 4) Change the Group mode using the person icon (Separate Groups/Visible Groups). 5) Check the Reports > Logs to see if the event log was created 6) Change the section visibility 7) Go to Reports > Logs and check if the events was created for each module in the section Finally, run PHPUnit tests and check to see if doesn't fail: vendor/bin/phpunit core_course_courselib_testcase course/tests/courselib_test.php
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-44627-master
    • Story Points:
      8
    • Sprint:
      BACKEND Sprint 12

      Description

      If you edit course-module and change only visibility, there are \core\event\course_module_updated for this.

      However when module visibility changed on the course page via specical icon there is no similar event.

      This is inconsistence. It is creates problem for the module, trying to react on it's visibility status changes (for example we are trying to emit special event when student is able to see assignment text in our poasassignment module).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lameze Simey Lameze
              Reporter:
              oa_sychev Oleg Sychev
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Marina Glancy
              Tester:
              John Okely
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

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