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

Move the calendar_event class

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      Test 1
      1. Ensure all unit tests pass.
      Test 2
      1. Create a calendar event for every activity module and ensure it gets created without issues.
      2. Create user and group overrides for assign, lesson and quiz and ensure they work fine.
      Test 3
      1. Grep the codebase for the deprecated class 'calendar_event' and ensure it is not used.
      Test 4
      1. Set $CFG->calendar to 'banana' in your config.php.
      2. Add the file calendar/banana/lib.php to your wwwroot.
      3. Put the below code in the file created above.
      4. Add an event.
      5. Ensure the event details are displayed.

      <?php
       
      function banana_add_event($event) {
          print_object($event);
          exit();
      }
      

      Test 5
      1. Put the below code in test.php in your wwwroot.
      2. Visit <yoursite>/test.php.
      3. Ensure you get a debugging message about the calendar_event class being deprecated.

      <?php
       
      require_once('config.php');
       
      $a = new calendar_event();
      

      Show
      Test 1 Ensure all unit tests pass. Test 2 Create a calendar event for every activity module and ensure it gets created without issues. Create user and group overrides for assign, lesson and quiz and ensure they work fine. Test 3 Grep the codebase for the deprecated class 'calendar_event' and ensure it is not used. Test 4 Set $CFG->calendar to 'banana' in your config.php. Add the file calendar/banana/lib.php to your wwwroot. Put the below code in the file created above. Add an event. Ensure the event details are displayed. <?php   function banana_add_event($event) { print_object($event); exit(); } Test 5 Put the below code in test.php in your wwwroot. Visit <yoursite>/test.php. Ensure you get a debugging message about the calendar_event class being deprecated. <?php   require_once('config.php');   $a = new calendar_event();
    • Affected Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57497_master
    • Sprint:
      3.3 Project Team Sprint 1

      Description

      We need to move this class so that it uses namespacing and allows us to further customise/extend it ready for myoverview events.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markn Mark Nelson
              Reporter:
              fred Frédéric Massart
              Peer reviewer:
              Ryan Wyllie
              Participants:
              Component watchers:
              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: