Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

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.

return: \context
param: int $sampleid

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

return: \core_analytics\analysable
param: int $sampleid

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.

return: string
param: string $sampletablealias

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

It does return all student enrolments including the suspended ones.

return: array
param: \core_analytics\analysable $course

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

return: array
param: int[] $sampleids

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

return: int
param: int $sampleid

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

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