MDL-73756 lib: deprecate modinfo parameter from get_data

This commit is contained in:
Simey Lameze 2022-02-21 15:08:50 +08:00
parent 9cd77c4130
commit fe4fd6d817
2 changed files with 8 additions and 5 deletions

View File

@ -1014,16 +1014,18 @@ class completion_info {
* fill the cache, retrieves information from the entire course not just for
* this one activity
* @param int $userid User ID or 0 (default) for current user
* @param array $modinfo Supply the value here - this is used for unit
* testing and so that it can be called recursively from within
* get_fast_modinfo. (Needs only list of all CMs with IDs.)
* Otherwise the method calls get_fast_modinfo itself.
* @param null $unused This parameter has been deprecated since 4.0 and should not be used anymore.
* @return object Completion data. Record from course_modules_completion plus other completion statuses such as
* - Completion status for 'must-receive-grade' completion rule.
* - Custom completion statuses defined by the activity module plugin.
*/
public function get_data($cm, $wholecourse = false, $userid = 0, $modinfo = null) {
public function get_data($cm, $wholecourse = false, $userid = 0, $unused = null) {
global $USER, $DB;
if ($unused !== null) {
debugging('Deprecated argument passed to ' . __FUNCTION__, DEBUG_DEVELOPER);
}
$completioncache = cache::make('core', 'completion');
// Get user ID

View File

@ -233,6 +233,7 @@ value to get the list of blocks that won't be displayed for a theme.
$strength passed to it.
* A new method get_page() has been added to the settings_navigation class. This method can be used to obtain the
moodle_page object associated to the settings navigation.
* The parameter $modinfo of the get_data method in completion_info class has been deprecated and is not used anymore.
=== 3.11.4 ===
* A new option dontforcesvgdownload has been added to the $options parameter of the send_file() function.