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

Show/Hide course section button doesn't trigger event

    XMLWordPrintable

    Details

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

      Master

      • Observe the live log report to ensure that logs are fired
      1. From the course page, hide a section
      2. Make sure a new log entry was created for the section visibility (course_section_updated)
      3. Show the section
      4. Check for the event again
      5. Disable JS
      6. Hide the section
      7. Check for the event again
      8. Show the section
      9. Check for the event again
      10. Edit the section (using the cog) and save
      11. Check for the event again
      12. Run the courselib Unit tests: mdk phpunit -t core_course_courselib_testcase

      2.6

      1. Edit a section (using the cog) and save
      2. Make sure the event was fired (check log entries)
      3. Run the courselib Unit tests: mdk phpunit -t core_course_courselib_testcase
      Show
      Master Observe the live log report to ensure that logs are fired From the course page, hide a section Make sure a new log entry was created for the section visibility (course_section_updated) Show the section Check for the event again Disable JS Hide the section Check for the event again Show the section Check for the event again Edit the section (using the cog) and save Check for the event again Run the courselib Unit tests: mdk phpunit -t core_course_courselib_testcase 2.6 Edit a section (using the cog) and save Make sure the event was fired (check log entries) Run the courselib Unit tests: mdk phpunit -t core_course_courselib_testcase
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-45229-master

      Description

      When you go to a course and click to hide a section using the eye icon on upper right corner
      and check the Reports > Logs you will notice that the event was not created.
      Probably it's better create new events for section_updated because API in set_section_visible() is not ready
      to be used with create_from_cm() because the $cm object there does not contain some of the properties required by the event.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fred Frédéric Massart
              Reporter:
              lameze Simey Lameze
              Peer reviewer:
              Petr Skoda
              Integrator:
              Sam Hemelryk
              Tester:
              Sam Hemelryk
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

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