Commit 59391e80 authored by Mark Nelson's avatar Mark Nelson
Browse files

MDL-58501 mod_*: improved docs for new calendar callbacks

parent 0714bcb2
......@@ -1775,7 +1775,10 @@ function mod_assign_core_calendar_is_event_visible(calendar_event $event) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -711,7 +711,10 @@ function mod_book_get_fontawesome_icon_map() {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -1408,7 +1408,10 @@ function chat_view($chat, $course, $cm, $context) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -1183,7 +1183,10 @@ function choice_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -4287,7 +4287,10 @@ function data_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -3419,7 +3419,10 @@ function feedback_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -777,7 +777,10 @@ function folder_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -8150,7 +8150,10 @@ function mod_forum_core_calendar_event_action_shows_item_count(calendar_event $e
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -4171,7 +4171,10 @@ function forum_get_fontawesome_icon_map() {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -474,7 +474,10 @@ function imscp_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -351,7 +351,10 @@ function label_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -1617,7 +1617,10 @@ function lesson_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -649,7 +649,10 @@ function mod_lti_get_fontawesome_icon_map() {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -538,7 +538,10 @@ function page_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -2106,7 +2106,10 @@ function mod_quiz_get_fontawesome_icon_map() {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -553,7 +553,10 @@ function resource_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -1616,7 +1616,10 @@ function scorm_refresh_events($courseid = 0) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -1110,7 +1110,10 @@ function survey_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
......@@ -3,11 +3,18 @@ information provided here is intended especially for developers.
=== 3.3 ===
* External functions that were returning file information now return the following additional file fields:
* External functions that were returning file information now return the following additional file fields:
- mimetype (the file mime type)
- isexternalfile (if is a file reference to a external repository)
- repositorytype (the repository name in case is a external file)
Those fields are VALUE_OPTIONAL for backwards compatibility.
* The block_course_overview has been removed and the related core module *_print_overview functions have been deprecated.
* The block_myoverview has replaced block_course_overview to provide better information to students. To support this,
actions can now be attached to calendar events. Documentation for the following new API callbacks introduced in
MDL-55611 can be found at https://docs.moodle.org/dev/Calendar_API. The 3 new callbacks are:
- mod_<modname>_core_calendar_is_event_visible
- mod_<modname>_core_calendar_provide_event_action
- mod_<modname>_core_calendar_event_action_show_items_acount
=== 3.2 ===
......
......@@ -376,7 +376,10 @@ function url_check_updates_since(cm_info $cm, $from, $filter = array()) {
}
/**
* Handles creating actions for events.
* This function receives a calendar event and returns the action associated with it, or null if there is none.
*
* This is used by block_myoverview in order to display the event appropriately. If null is returned then the event
* is not displayed on the block.
*
* @param calendar_event $event
* @param \core_calendar\action_factory $factory
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment