Skip to content

Commit

Permalink
Merge pull request #19 from stopfstedt/18_download_as_dataformat
Browse files Browse the repository at this point in the history
replaced call to deprecated download_as_dataformat() function with supported equivalent.
  • Loading branch information
ctam authored Dec 8, 2024
2 parents 2b3bfd1 + 646e5ba commit 5d247bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions user_bulk_download.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
define('NO_OUTPUT_BUFFERING', true);
require_once('../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/dataformatlib.php');
require_once($CFG->dirroot . '/user/lib.php');
require_once($CFG->dirroot . '/user/profile/lib.php');

Expand Down Expand Up @@ -83,7 +82,7 @@
$downloadusers = new ArrayObject($bulkusers);
$iterator = $downloadusers->getIterator();

download_as_dataformat($filename, $dataformat, $fields, $iterator, function ($userid) use ($extrafields, $fields) {
\core\dataformat::download_data($filename, $dataformat, $fields, $iterator, function($userid) use ($extrafields, $fields) {
global $DB;
$row = [];
if (!$user = $DB->get_record('user', ['id' => $userid])) {
Expand Down

0 comments on commit 5d247bc

Please sign in to comment.