Search moodle.org's
Developer Documentation

  • Bug fixes for general core bugs in 3.7.x will end 11 May 2020 (12 months).
  • Bug fixes for security issues in 3.7.x will end 9 November 2020 (18 months) - Support has ended.
  • minimum PHP 7.1.0 Note: minimum PHP version has increased since Moodle 3.6. PHP 7.2.x and 7.3.x are supported too. PHP 7.x could have some engine limitations.

  • Class: core_calendar_container_testcase  - X-Ref

    Core container testcase.

    setUp()   X-Ref
    Test setup.


    test_get_event_factory()   X-Ref
    Test getting the event factory.


    test_event_factory_create_instance($dbrow)   X-Ref
    Test that the event factory correctly creates instances of events.

    param: \stdClass $dbrow Row from the "database".

    test_event_factory_when_module_visibility_is_toggled_as_admin($dbrow)   X-Ref
    Test that the event factory deals with invisible modules properly as admin.

    param: \stdClass $dbrow Row from the "database".

    test_event_factory_when_module_visibility_is_toggled_as_guest($dbrow)   X-Ref
    Test that the event factory deals with invisible modules properly as a guest.

    param: \stdClass $dbrow Row from the "database".

    test_event_factory_when_course_visibility_is_toggled_as_admin($dbrow)   X-Ref
    Test that the event factory deals with invisible courses as an admin.

    param: \stdClass $dbrow Row from the "database".

    test_event_factory_when_course_visibility_is_toggled_as_student($dbrow)   X-Ref
    Test that the event factory deals with invisible courses as a student.

    param: \stdClass $dbrow Row from the "database".

    test_event_factory_when_category_visibility_is_toggled_as_admin()   X-Ref
    Test that the event factory deals with invisible categorys as an admin.


    test_event_factory_when_category_visibility_is_toggled_as_user()   X-Ref
    Test that the event factory deals with invisible categorys as an user.


    test_event_factory_when_category_visibility_is_toggled_as_guest()   X-Ref
    Test that the event factory deals with invisible categorys as an guest.


    test_event_factory_with_completion_related_event()   X-Ref
    Test that the event factory deals with completion related events properly.


    test_event_factory_unenrolled_user()   X-Ref
    Test that the event factory only returns an event if the logged in user
    is enrolled in the course.


    test_delete_module_delete_events()   X-Ref
    Test that when course module is deleted all events are also deleted.


    test_get_event_mapper()   X-Ref
    Test getting the event mapper.


    get_event_factory_testcases()   X-Ref
    Test cases for the get event factory test.


    create_event($properties = [])   X-Ref
    Helper function to create calendar events using the old code.

    return: calendar_event|bool
    param: array $properties A list of calendar event properties to set

    get_dbrow_from_skeleton($skeleton)   X-Ref
    Pad out a basic DB row with basic information.

    return: \stdClass
    param: \stdClass   $skeleton the current skeleton