Skip to content

Commit

Permalink
MDL-58501 mod_*: improved docs for new calendar callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Apr 12, 2017
1 parent 0714bcb commit 59391e8
Show file tree
Hide file tree
Showing 22 changed files with 96 additions and 26 deletions.
5 changes: 4 additions & 1 deletion mod/assign/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/book/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/chat/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/choice/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/data/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/feedback/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/folder/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/glossary/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/imscp/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/label/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/lesson/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/lti/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/page/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/quiz/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/resource/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/scorm/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/survey/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 12 additions & 5 deletions mod/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- 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.
* 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 ===

Expand Down
5 changes: 4 additions & 1 deletion mod/url/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion mod/wiki/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,10 @@ function mod_wiki_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
Expand Down
5 changes: 4 additions & 1 deletion mod/workshop/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,10 @@ function workshop_calendar_update(stdClass $workshop, $cmid) {
}

/**
* 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
Expand Down

0 comments on commit 59391e8

Please sign in to comment.