mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 01:44:27 +02:00
MDL-80409 dataformat: final removal of deprecated download method.
This commit is contained in:
parent
aeb64dbfb5
commit
f75881f263
@ -1,45 +0,0 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* dataformatlib.php - Contains core dataformat related functions.
|
||||
*
|
||||
* @package core
|
||||
* @subpackage dataformat
|
||||
* @copyright 2016 Brendan Heywood (brendan@catalyst-au.net)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sends a formated data file to the browser
|
||||
*
|
||||
* @package core
|
||||
* @subpackage dataformat
|
||||
*
|
||||
* @param string $filename The base filename without an extension
|
||||
* @param string $dataformat A dataformat name
|
||||
* @param array $columns An ordered map of column keys and labels
|
||||
* @param Iterator $iterator An iterator over the records, usually a RecordSet
|
||||
* @param callable $callback An option function applied to each record before writing
|
||||
* @throws coding_exception
|
||||
*
|
||||
* @deprecated since Moodle 3.9 - MDL-68500 please use \core\dataformat::download_data
|
||||
*/
|
||||
function download_as_dataformat($filename, $dataformat, $columns, $iterator, $callback = null) {
|
||||
debugging('download_as_dataformat() is deprecated, please use \core\dataformat::download_data() instead', DEBUG_DEVELOPER);
|
||||
|
||||
\core\dataformat::download_data($filename, $dataformat, $columns, $iterator, $callback);
|
||||
}
|
@ -2080,11 +2080,9 @@ function get_records_csv() {
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 3.2
|
||||
* @see download_as_dataformat (lib/dataformatlib.php)
|
||||
*/
|
||||
function put_records_csv() {
|
||||
throw new coding_exception('put_records_csv() can not be used anymore. Please use ' .
|
||||
'lib/dataformatlib.php download_as_dataformat() instead.');
|
||||
throw new coding_exception(__FUNCTION__ . '() has been removed, please use \core\dataformat::download_data() instead');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2720,6 +2718,12 @@ function plagiarism_get_form_elements_module() {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Since Moodle 3.9 - MDL-68500 please use {@see \core\dataformat::download_data}
|
||||
*/
|
||||
function download_as_dataformat() {
|
||||
throw new coding_exception(__FUNCTION__ . '() has been removed, please use \core\dataformat::download_data() instead');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Moodle 3.10
|
||||
|
@ -53,7 +53,6 @@ return new class extends phpunit_coverage_info {
|
||||
'cronlib.php',
|
||||
'csslib.php',
|
||||
'customcheckslib.php',
|
||||
'dataformatlib.php',
|
||||
'datalib.php',
|
||||
'ddllib.php',
|
||||
'deprecatedlib.php',
|
||||
|
@ -14,6 +14,8 @@ information provided here is intended especially for developers.
|
||||
* New return value 'icon' has been added to the 'external_files' webservice structure. This return value represents the
|
||||
relative path to the relevant file type icon based on the file's mime type.
|
||||
* Removed the sesskey passed from manageauths and manageenrols to their respective test_settings.php pages.
|
||||
* The following previously deprecated methods have been removed and can no longer be used:
|
||||
- `download_as_dataformat`
|
||||
* In enrollib.php, the method enrol_get_course_users() got an optional 5th parameter $usergroups that
|
||||
defaults to an empty array. Here, user group ids can be provided, to select enrolled users in a course
|
||||
that are also members of these groups.
|
||||
|
Loading…
x
Reference in New Issue
Block a user