Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 289 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: downloader  - X-Ref

Class to download user submissions.

__construct(assign $manager, ?array $userids = null)   X-Ref
Class constructor.

param: assign $manager the instance manager
param: array|null $userids the user ids to download.

load_filelist()   X-Ref
Load the filelist.

return: bool true if there are some files to zip.

load_student_filelist(stdClass $student)   X-Ref
Load an individual student filelist.

param: stdClass $student the user record

get_student_submission(stdClass $student)   X-Ref
Return the student submission if any.

param: stdClass $student the user record
return: stdClass|null the user submission or null if none

get_student_prefix(stdClass $student)   X-Ref
Return the file prefix used to generate the each submission folder or file.

param: stdClass $student the user record
return: string the submission prefix

load_submissionplugin_filelist(stdClass $student,assign_plugin $plugin,stdClass $submission,string $prefix)   X-Ref
Load a submission plugin filelist for a specific user.

param: stdClass $student the user record
param: assign_plugin $plugin the submission plugin instance
param: stdClass $submission the submission object
param: string $prefix the files prefix

download_zip()   X-Ref
Download the exported zip.

This method will terminate the current script when the file is send.

get_zip_filename()   X-Ref
Generate the zip filename.

return: string the zip filename