Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Student enrolments analyser.

Copyright: 2016 David Monllao {@link http://www.davidmonllao.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 251 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: student_enrolments  - X-Ref

Student enrolments analyser.

It does return all student enrolments including the suspended ones.

get_samples_origin()   X-Ref
Defines the origin of the samples in the database.

return: string

sample_access_context($sampleid)   X-Ref
Returns the student enrolment course context.

param: int $sampleid
return: \context

get_sample_analysable($sampleid)   X-Ref
Returns the student enrolment course.

param: int $sampleid
return: \core_analytics\analysable

provided_sample_data()   X-Ref
Data provided by get_all_samples & get_samples.

return: string[]

processes_user_data()   X-Ref
We need to delete associated data if a user requests his data to be deleted.

return: bool

join_sample_user($sampletablealias)   X-Ref
Join the samples origin table with the user id table.

param: string $sampletablealias
return: string

get_all_samples(\core_analytics\analysable $course)   X-Ref
All course student enrolments.

It does return all student enrolments including the suspended ones.

param: \core_analytics\analysable $course
return: array

get_samples($sampleids)   X-Ref
Returns all samples from the samples ids.

param: int[] $sampleids
return: array

get_sample_courseid($sampleid)   X-Ref
Returns the student enrolment course id.

param: int $sampleid
return: int

sample_description($sampleid, $contextid, $sampledata)   X-Ref
Returns the visible name of a sample + a renderable to display as sample picture.

param: int $sampleid
param: int $contextid
param: array $sampledata
return: array array(string, \renderable)