Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Calendar, Web Services
    • Labels:
    • Testing Instructions:
      Hide
      1. This is moderately difficult test, requires fair bit of time testing various logic flow paths.
      2. Run unit tests and make sure all is good
      3. Make sure the new calendar units tests are executed with the phpunit run. Check phpunit.xml and make sure there is an entry for calendar.
      4. Setup a ws client of your choice. (/moodle/admin/settings.php?section=webservicesoverview might help)
      5. User from now on refer's to an non-admin/managerial single user.
      6. create 6 calendar events (1 site, 1 course with 2 childern(using repeat in new event form), 1 group event, 1 user event)
      7. Goto event table in database using database browser of your choice and note the ids of each of them.
      8. Lets say the ids are 1, 2-3-4,5,6 respectively
      9. Assign a user the permission to make ws calls
      10. Make a call with params like this (Assuming your are using xmlrpc client) :-

                $events = array ('eventids' => array($siteevent->id), 'courseids' => array($course->id), 'groupids' => array($group->id));
                $options = array ('siteevents' => true, 'userevents' => true);
        

      11. Make sure only site event and user event is returned as, the user doesnot have permissions on other events.
      12. Make sure you get warnings for rest
      13. Enrol the user in the course and group
      14. Make call again with the same params and make sure you get 4 events (user, site, course, and group- one each)
      15. Change options to where time() represents the time the events where created and weeksecs is the number of secs in a week. Alternatively browse the database and find out the timestamp for the second course event that was created and use any timestamp greater than that.

                $options = array ('siteevents' => true, 'userevents' => true, 'timeend' => time() + 7*WEEKSECS);
        

      16. Make sure 5 events are returned (site, group, user -one each and 2 course events)
      17. This is how you can pass params in xml-rpc client

        $post = xmlrpc_encode_request($functionname, array( $events, $options));
        

      Show
      This is moderately difficult test, requires fair bit of time testing various logic flow paths. Run unit tests and make sure all is good Make sure the new calendar units tests are executed with the phpunit run. Check phpunit.xml and make sure there is an entry for calendar. Setup a ws client of your choice. (/moodle/admin/settings.php?section=webservicesoverview might help) User from now on refer's to an non-admin/managerial single user. create 6 calendar events (1 site, 1 course with 2 childern(using repeat in new event form), 1 group event, 1 user event) Goto event table in database using database browser of your choice and note the ids of each of them. Lets say the ids are 1, 2-3-4,5,6 respectively Assign a user the permission to make ws calls Make a call with params like this (Assuming your are using xmlrpc client) :- $events = array ('eventids' => array($siteevent->id), 'courseids' => array($course->id), 'groupids' => array($group->id)); $options = array ('siteevents' => true, 'userevents' => true); Make sure only site event and user event is returned as, the user doesnot have permissions on other events. Make sure you get warnings for rest Enrol the user in the course and group Make call again with the same params and make sure you get 4 events (user, site, course, and group- one each) Change options to where time() represents the time the events where created and weeksecs is the number of secs in a week. Alternatively browse the database and find out the timestamp for the second course event that was created and use any timestamp greater than that. $options = array ('siteevents' => true, 'userevents' => true, 'timeend' => time() + 7*WEEKSECS); Make sure 5 events are returned (site, group, user -one each and 2 course events) This is how you can pass params in xml-rpc client $post = xmlrpc_encode_request($functionname, array( $events, $options));
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-37100-master

      Description

      Implement core_calendar_delete_calendar_events()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/13