id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
219,200
moodle/moodle
lib/classes/task/manager.php
manager.adhoc_task_from_record
public static function adhoc_task_from_record($record) { $classname = self::get_canonical_class_name($record->classname); if (!class_exists($classname)) { debugging("Failed to load task: " . $classname, DEBUG_DEVELOPER); return false; } $task = new $classname; ...
php
public static function adhoc_task_from_record($record) { $classname = self::get_canonical_class_name($record->classname); if (!class_exists($classname)) { debugging("Failed to load task: " . $classname, DEBUG_DEVELOPER); return false; } $task = new $classname; ...
[ "public", "static", "function", "adhoc_task_from_record", "(", "$", "record", ")", "{", "$", "classname", "=", "self", "::", "get_canonical_class_name", "(", "$", "record", "->", "classname", ")", ";", "if", "(", "!", "class_exists", "(", "$", "classname", "...
Utility method to create an adhoc task from a DB record. @param \stdClass $record @return \core\task\adhoc_task
[ "Utility", "method", "to", "create", "an", "adhoc", "task", "from", "a", "DB", "record", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L286-L315
219,201
moodle/moodle
lib/classes/task/manager.php
manager.scheduled_task_from_record
public static function scheduled_task_from_record($record) { $classname = self::get_canonical_class_name($record->classname); if (!class_exists($classname)) { debugging("Failed to load task: " . $classname, DEBUG_DEVELOPER); return false; } /** @var \core\task\sch...
php
public static function scheduled_task_from_record($record) { $classname = self::get_canonical_class_name($record->classname); if (!class_exists($classname)) { debugging("Failed to load task: " . $classname, DEBUG_DEVELOPER); return false; } /** @var \core\task\sch...
[ "public", "static", "function", "scheduled_task_from_record", "(", "$", "record", ")", "{", "$", "classname", "=", "self", "::", "get_canonical_class_name", "(", "$", "record", "->", "classname", ")", ";", "if", "(", "!", "class_exists", "(", "$", "classname",...
Utility method to create a task from a DB record. @param \stdClass $record @return \core\task\scheduled_task
[ "Utility", "method", "to", "create", "a", "task", "from", "a", "DB", "record", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L323-L367
219,202
moodle/moodle
lib/classes/task/manager.php
manager.load_scheduled_tasks_for_component
public static function load_scheduled_tasks_for_component($componentname) { global $DB; $tasks = array(); // We are just reading - so no locks required. $records = $DB->get_records('task_scheduled', array('component' => $componentname), 'classname', '*', IGNORE_MISSING); foreach...
php
public static function load_scheduled_tasks_for_component($componentname) { global $DB; $tasks = array(); // We are just reading - so no locks required. $records = $DB->get_records('task_scheduled', array('component' => $componentname), 'classname', '*', IGNORE_MISSING); foreach...
[ "public", "static", "function", "load_scheduled_tasks_for_component", "(", "$", "componentname", ")", "{", "global", "$", "DB", ";", "$", "tasks", "=", "array", "(", ")", ";", "// We are just reading - so no locks required.", "$", "records", "=", "$", "DB", "->", ...
Given a component name, will load the list of tasks from the scheduled_tasks table for that component. Do not execute tasks loaded from this function - they have not been locked. @param string $componentname - The name of the component to load the tasks for. @return \core\task\scheduled_task[]
[ "Given", "a", "component", "name", "will", "load", "the", "list", "of", "tasks", "from", "the", "scheduled_tasks", "table", "for", "that", "component", ".", "Do", "not", "execute", "tasks", "loaded", "from", "this", "function", "-", "they", "have", "not", ...
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L375-L390
219,203
moodle/moodle
lib/classes/task/manager.php
manager.get_scheduled_task
public static function get_scheduled_task($classname) { global $DB; $classname = self::get_canonical_class_name($classname); // We are just reading - so no locks required. $record = $DB->get_record('task_scheduled', array('classname'=>$classname), '*', IGNORE_MISSING); if (!$rec...
php
public static function get_scheduled_task($classname) { global $DB; $classname = self::get_canonical_class_name($classname); // We are just reading - so no locks required. $record = $DB->get_record('task_scheduled', array('classname'=>$classname), '*', IGNORE_MISSING); if (!$rec...
[ "public", "static", "function", "get_scheduled_task", "(", "$", "classname", ")", "{", "global", "$", "DB", ";", "$", "classname", "=", "self", "::", "get_canonical_class_name", "(", "$", "classname", ")", ";", "// We are just reading - so no locks required.", "$", ...
This function load the scheduled task details for a given classname. @param string $classname @return \core\task\scheduled_task or false
[ "This", "function", "load", "the", "scheduled", "task", "details", "for", "a", "given", "classname", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L398-L408
219,204
moodle/moodle
lib/classes/task/manager.php
manager.get_adhoc_tasks
public static function get_adhoc_tasks($classname) { global $DB; $classname = self::get_canonical_class_name($classname); // We are just reading - so no locks required. $records = $DB->get_records('task_adhoc', array('classname' => $classname)); return array_map(function($recor...
php
public static function get_adhoc_tasks($classname) { global $DB; $classname = self::get_canonical_class_name($classname); // We are just reading - so no locks required. $records = $DB->get_records('task_adhoc', array('classname' => $classname)); return array_map(function($recor...
[ "public", "static", "function", "get_adhoc_tasks", "(", "$", "classname", ")", "{", "global", "$", "DB", ";", "$", "classname", "=", "self", "::", "get_canonical_class_name", "(", "$", "classname", ")", ";", "// We are just reading - so no locks required.", "$", "...
This function load the adhoc tasks for a given classname. @param string $classname @return \core\task\adhoc_task[]
[ "This", "function", "load", "the", "adhoc", "tasks", "for", "a", "given", "classname", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L416-L426
219,205
moodle/moodle
lib/classes/task/manager.php
manager.get_default_scheduled_task
public static function get_default_scheduled_task($classname) { $task = self::get_scheduled_task($classname); $componenttasks = array(); // Safety check in case no task was found for the given classname. if ($task) { $componenttasks = self::load_default_scheduled_tasks_for_c...
php
public static function get_default_scheduled_task($classname) { $task = self::get_scheduled_task($classname); $componenttasks = array(); // Safety check in case no task was found for the given classname. if ($task) { $componenttasks = self::load_default_scheduled_tasks_for_c...
[ "public", "static", "function", "get_default_scheduled_task", "(", "$", "classname", ")", "{", "$", "task", "=", "self", "::", "get_scheduled_task", "(", "$", "classname", ")", ";", "$", "componenttasks", "=", "array", "(", ")", ";", "// Safety check in case no ...
This function load the default scheduled task details for a given classname. @param string $classname @return \core\task\scheduled_task or false
[ "This", "function", "load", "the", "default", "scheduled", "task", "details", "for", "a", "given", "classname", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L434-L450
219,206
moodle/moodle
lib/classes/task/manager.php
manager.get_all_scheduled_tasks
public static function get_all_scheduled_tasks() { global $DB; $records = $DB->get_records('task_scheduled', null, 'component, classname', '*', IGNORE_MISSING); $tasks = array(); foreach ($records as $record) { $task = self::scheduled_task_from_record($record); ...
php
public static function get_all_scheduled_tasks() { global $DB; $records = $DB->get_records('task_scheduled', null, 'component, classname', '*', IGNORE_MISSING); $tasks = array(); foreach ($records as $record) { $task = self::scheduled_task_from_record($record); ...
[ "public", "static", "function", "get_all_scheduled_tasks", "(", ")", "{", "global", "$", "DB", ";", "$", "records", "=", "$", "DB", "->", "get_records", "(", "'task_scheduled'", ",", "null", ",", "'component, classname'", ",", "'*'", ",", "IGNORE_MISSING", ")"...
This function will return a list of all the scheduled tasks that exist in the database. @return \core\task\scheduled_task[]
[ "This", "function", "will", "return", "a", "list", "of", "all", "the", "scheduled", "tasks", "that", "exist", "in", "the", "database", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L457-L472
219,207
moodle/moodle
lib/classes/task/manager.php
manager.adhoc_task_failed
public static function adhoc_task_failed(adhoc_task $task) { global $DB; $delay = $task->get_fail_delay(); // Reschedule task with exponential fall off for failing tasks. if (empty($delay)) { $delay = 60; } else { $delay *= 2; } // Max of...
php
public static function adhoc_task_failed(adhoc_task $task) { global $DB; $delay = $task->get_fail_delay(); // Reschedule task with exponential fall off for failing tasks. if (empty($delay)) { $delay = 60; } else { $delay *= 2; } // Max of...
[ "public", "static", "function", "adhoc_task_failed", "(", "adhoc_task", "$", "task", ")", "{", "global", "$", "DB", ";", "$", "delay", "=", "$", "task", "->", "get_fail_delay", "(", ")", ";", "// Reschedule task with exponential fall off for failing tasks.", "if", ...
This function indicates that an adhoc task was not completed successfully and should be retried. @param \core\task\adhoc_task $task
[ "This", "function", "indicates", "that", "an", "adhoc", "task", "was", "not", "completed", "successfully", "and", "should", "be", "retried", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L601-L631
219,208
moodle/moodle
lib/classes/task/manager.php
manager.adhoc_task_complete
public static function adhoc_task_complete(adhoc_task $task) { global $DB; // Finalise the log output. logmanager::finalise_log(); // Delete the adhoc task record - it is finished. $DB->delete_records('task_adhoc', array('id' => $task->get_id())); // Reschedule and the...
php
public static function adhoc_task_complete(adhoc_task $task) { global $DB; // Finalise the log output. logmanager::finalise_log(); // Delete the adhoc task record - it is finished. $DB->delete_records('task_adhoc', array('id' => $task->get_id())); // Reschedule and the...
[ "public", "static", "function", "adhoc_task_complete", "(", "adhoc_task", "$", "task", ")", "{", "global", "$", "DB", ";", "// Finalise the log output.", "logmanager", "::", "finalise_log", "(", ")", ";", "// Delete the adhoc task record - it is finished.", "$", "DB", ...
This function indicates that an adhoc task was completed successfully. @param \core\task\adhoc_task $task
[ "This", "function", "indicates", "that", "an", "adhoc", "task", "was", "completed", "successfully", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L638-L652
219,209
moodle/moodle
lib/classes/task/manager.php
manager.scheduled_task_failed
public static function scheduled_task_failed(scheduled_task $task) { global $DB; $delay = $task->get_fail_delay(); // Reschedule task with exponential fall off for failing tasks. if (empty($delay)) { $delay = 60; } else { $delay *= 2; } ...
php
public static function scheduled_task_failed(scheduled_task $task) { global $DB; $delay = $task->get_fail_delay(); // Reschedule task with exponential fall off for failing tasks. if (empty($delay)) { $delay = 60; } else { $delay *= 2; } ...
[ "public", "static", "function", "scheduled_task_failed", "(", "scheduled_task", "$", "task", ")", "{", "global", "$", "DB", ";", "$", "delay", "=", "$", "task", "->", "get_fail_delay", "(", ")", ";", "// Reschedule task with exponential fall off for failing tasks.", ...
This function indicates that a scheduled task was not completed successfully and should be retried. @param \core\task\scheduled_task $task
[ "This", "function", "indicates", "that", "a", "scheduled", "task", "was", "not", "completed", "successfully", "and", "should", "be", "retried", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L659-L690
219,210
moodle/moodle
lib/classes/task/manager.php
manager.clear_fail_delay
public static function clear_fail_delay(scheduled_task $task) { global $DB; $record = new \stdClass(); $record->id = $DB->get_field('task_scheduled', 'id', ['classname' => self::get_canonical_class_name($task)]); $record->nextruntime = $task->get_next_scheduled_time(); ...
php
public static function clear_fail_delay(scheduled_task $task) { global $DB; $record = new \stdClass(); $record->id = $DB->get_field('task_scheduled', 'id', ['classname' => self::get_canonical_class_name($task)]); $record->nextruntime = $task->get_next_scheduled_time(); ...
[ "public", "static", "function", "clear_fail_delay", "(", "scheduled_task", "$", "task", ")", "{", "global", "$", "DB", ";", "$", "record", "=", "new", "\\", "stdClass", "(", ")", ";", "$", "record", "->", "id", "=", "$", "DB", "->", "get_field", "(", ...
Clears the fail delay for the given task and updates its next run time based on the schedule. @param scheduled_task $task Task to reset @throws \dml_exception If there is a database error
[ "Clears", "the", "fail", "delay", "for", "the", "given", "task", "and", "updates", "its", "next", "run", "time", "based", "on", "the", "schedule", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L698-L707
219,211
moodle/moodle
lib/classes/task/manager.php
manager.scheduled_task_complete
public static function scheduled_task_complete(scheduled_task $task) { global $DB; // Finalise the log output. logmanager::finalise_log(); $classname = self::get_canonical_class_name($task); $record = $DB->get_record('task_scheduled', array('classname' => $classname)); ...
php
public static function scheduled_task_complete(scheduled_task $task) { global $DB; // Finalise the log output. logmanager::finalise_log(); $classname = self::get_canonical_class_name($task); $record = $DB->get_record('task_scheduled', array('classname' => $classname)); ...
[ "public", "static", "function", "scheduled_task_complete", "(", "scheduled_task", "$", "task", ")", "{", "global", "$", "DB", ";", "// Finalise the log output.", "logmanager", "::", "finalise_log", "(", ")", ";", "$", "classname", "=", "self", "::", "get_canonical...
This function indicates that a scheduled task was completed successfully and should be rescheduled. @param \core\task\scheduled_task $task
[ "This", "function", "indicates", "that", "a", "scheduled", "task", "was", "completed", "successfully", "and", "should", "be", "rescheduled", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L714-L735
219,212
moodle/moodle
lib/classes/task/manager.php
manager.get_canonical_class_name
protected static function get_canonical_class_name($taskorstring) { if (is_string($taskorstring)) { $classname = $taskorstring; } else { $classname = get_class($taskorstring); } if (strpos($classname, '\\') !== 0) { $classname = '\\' . $classname; ...
php
protected static function get_canonical_class_name($taskorstring) { if (is_string($taskorstring)) { $classname = $taskorstring; } else { $classname = get_class($taskorstring); } if (strpos($classname, '\\') !== 0) { $classname = '\\' . $classname; ...
[ "protected", "static", "function", "get_canonical_class_name", "(", "$", "taskorstring", ")", "{", "if", "(", "is_string", "(", "$", "taskorstring", ")", ")", "{", "$", "classname", "=", "$", "taskorstring", ";", "}", "else", "{", "$", "classname", "=", "g...
Gets class name for use in database table. Always begins with a \. @param string|task_base $taskorstring Task object or a string
[ "Gets", "class", "name", "for", "use", "in", "database", "table", ".", "Always", "begins", "with", "a", "\\", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/task/manager.php#L773-L783
219,213
moodle/moodle
lib/grade/grade_object.php
grade_object.fetch_all_helper
public static function fetch_all_helper($table, $classname, $params) { global $DB; // Need to introspect DB here. $instance = new $classname(); $classvars = (array)$instance; $params = (array)$params; $wheresql = array(); $newparams = array(); $columns = $D...
php
public static function fetch_all_helper($table, $classname, $params) { global $DB; // Need to introspect DB here. $instance = new $classname(); $classvars = (array)$instance; $params = (array)$params; $wheresql = array(); $newparams = array(); $columns = $D...
[ "public", "static", "function", "fetch_all_helper", "(", "$", "table", ",", "$", "classname", ",", "$", "params", ")", "{", "global", "$", "DB", ";", "// Need to introspect DB here.", "$", "instance", "=", "new", "$", "classname", "(", ")", ";", "$", "clas...
Factory method which uses the parameters to retrieve all matching instances from the database @param string $table The table to retrieve from @param string $classname The name of the class to instantiate @param array $params An array of conditions like $fieldname => $fieldvalue @return array|bool Array of object insta...
[ "Factory", "method", "which", "uses", "the", "parameters", "to", "retrieve", "all", "matching", "instances", "from", "the", "database" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/grade/grade_object.php#L179-L235
219,214
moodle/moodle
admin/tool/usertours/classes/external/tour.php
tour.fetch_and_start_tour
public static function fetch_and_start_tour($tourid, $context, $pageurl) { global $PAGE; $params = self::validate_parameters(self::fetch_and_start_tour_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, ]...
php
public static function fetch_and_start_tour($tourid, $context, $pageurl) { global $PAGE; $params = self::validate_parameters(self::fetch_and_start_tour_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, ]...
[ "public", "static", "function", "fetch_and_start_tour", "(", "$", "tourid", ",", "$", "context", ",", "$", "pageurl", ")", "{", "global", "$", "PAGE", ";", "$", "params", "=", "self", "::", "validate_parameters", "(", "self", "::", "fetch_and_start_tour_parame...
Fetch the tour configuration for the specified tour. @param int $tourid The ID of the tour to fetch. @param int $context The Context ID of the current page. @param string $pageurl The path of the current page. @return array As described in fetch_and_start_tour_returns
[ "Fetch", "the", "tour", "configuration", "for", "the", "specified", "tour", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/external/tour.php#L52-L82
219,215
moodle/moodle
admin/tool/usertours/classes/external/tour.php
tour.reset_tour
public static function reset_tour($tourid, $context, $pageurl) { $params = self::validate_parameters(self::reset_tour_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, ]); $context = \context_helper::ins...
php
public static function reset_tour($tourid, $context, $pageurl) { $params = self::validate_parameters(self::reset_tour_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, ]); $context = \context_helper::ins...
[ "public", "static", "function", "reset_tour", "(", "$", "tourid", ",", "$", "context", ",", "$", "pageurl", ")", "{", "$", "params", "=", "self", "::", "validate_parameters", "(", "self", "::", "reset_tour_parameters", "(", ")", ",", "[", "'tourid'", "=>",...
Reset the specified tour for the current user. @param int $tourid The ID of the tour. @param int $context The Context ID of the current page. @param string $pageurl The path of the current page requesting the reset. @return array As described in reset_tour_returns
[ "Reset", "the", "specified", "tour", "for", "the", "current", "user", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/external/tour.php#L119-L150
219,216
moodle/moodle
admin/tool/usertours/classes/external/tour.php
tour.complete_tour
public static function complete_tour($tourid, $context, $pageurl, $stepid, $stepindex) { $params = self::validate_parameters(self::complete_tour_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, 'stepid' =...
php
public static function complete_tour($tourid, $context, $pageurl, $stepid, $stepindex) { $params = self::validate_parameters(self::complete_tour_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, 'stepid' =...
[ "public", "static", "function", "complete_tour", "(", "$", "tourid", ",", "$", "context", ",", "$", "pageurl", ",", "$", "stepid", ",", "$", "stepindex", ")", "{", "$", "params", "=", "self", "::", "validate_parameters", "(", "self", "::", "complete_tour_p...
Mark the specified tour as completed for the current user. @param int $tourid The ID of the tour. @param int $context The Context ID of the current page. @param string $pageurl The path of the current page. @param int $stepid The step id @param int $stepindex The step index @r...
[ "Mark", "the", "specified", "tour", "as", "completed", "for", "the", "current", "user", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/external/tour.php#L186-L212
219,217
moodle/moodle
admin/tool/usertours/classes/external/tour.php
tour.complete_tour_parameters
public static function complete_tour_parameters() { return new external_function_parameters([ 'tourid' => new external_value(PARAM_INT, 'Tour ID'), 'context' => new external_value(PARAM_INT, 'Context ID'), 'pageurl' => new external_value(PARAM_LOCALURL, 'Page URL'), ...
php
public static function complete_tour_parameters() { return new external_function_parameters([ 'tourid' => new external_value(PARAM_INT, 'Tour ID'), 'context' => new external_value(PARAM_INT, 'Context ID'), 'pageurl' => new external_value(PARAM_LOCALURL, 'Page URL'), ...
[ "public", "static", "function", "complete_tour_parameters", "(", ")", "{", "return", "new", "external_function_parameters", "(", "[", "'tourid'", "=>", "new", "external_value", "(", "PARAM_INT", ",", "'Tour ID'", ")", ",", "'context'", "=>", "new", "external_value",...
The parameters for complete_tour. @return external_function_parameters
[ "The", "parameters", "for", "complete_tour", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/external/tour.php#L219-L227
219,218
moodle/moodle
admin/tool/usertours/classes/external/tour.php
tour.step_shown
public static function step_shown($tourid, $context, $pageurl, $stepid, $stepindex) { $params = self::validate_parameters(self::step_shown_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, 'stepid' => $ste...
php
public static function step_shown($tourid, $context, $pageurl, $stepid, $stepindex) { $params = self::validate_parameters(self::step_shown_parameters(), [ 'tourid' => $tourid, 'context' => $context, 'pageurl' => $pageurl, 'stepid' => $ste...
[ "public", "static", "function", "step_shown", "(", "$", "tourid", ",", "$", "context", ",", "$", "pageurl", ",", "$", "stepid", ",", "$", "stepindex", ")", "{", "$", "params", "=", "self", "::", "validate_parameters", "(", "self", "::", "step_shown_paramet...
Mark the specified toru step as shown for the current user. @param int $tourid The ID of the tour. @param int $context The Context ID of the current page. @param string $pageurl The path of the current page. @param int $stepid The step id @param int $stepindex The step index @...
[ "Mark", "the", "specified", "toru", "step", "as", "shown", "for", "the", "current", "user", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/external/tour.php#L248-L277
219,219
moodle/moodle
admin/tool/usertours/classes/external/tour.php
tour.step_shown_parameters
public static function step_shown_parameters() { return new external_function_parameters([ 'tourid' => new external_value(PARAM_INT, 'Tour ID'), 'context' => new external_value(PARAM_INT, 'Context ID'), 'pageurl' => new external_value(PARAM_URL, 'Page URL'), ...
php
public static function step_shown_parameters() { return new external_function_parameters([ 'tourid' => new external_value(PARAM_INT, 'Tour ID'), 'context' => new external_value(PARAM_INT, 'Context ID'), 'pageurl' => new external_value(PARAM_URL, 'Page URL'), ...
[ "public", "static", "function", "step_shown_parameters", "(", ")", "{", "return", "new", "external_function_parameters", "(", "[", "'tourid'", "=>", "new", "external_value", "(", "PARAM_INT", ",", "'Tour ID'", ")", ",", "'context'", "=>", "new", "external_value", ...
The parameters for step_shown. @return external_function_parameters
[ "The", "parameters", "for", "step_shown", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/external/tour.php#L284-L292
219,220
moodle/moodle
admin/tool/usertours/classes/external/tour.php
tour.step_structure_returns
public static function step_structure_returns() { return new external_single_structure([ 'title' => new external_value(PARAM_RAW, 'Step Title'), 'content' => new external_value(PARAM_RAW, 'Step Content'), 'element'...
php
public static function step_structure_returns() { return new external_single_structure([ 'title' => new external_value(PARAM_RAW, 'Step Title'), 'content' => new external_value(PARAM_RAW, 'Step Content'), 'element'...
[ "public", "static", "function", "step_structure_returns", "(", ")", "{", "return", "new", "external_single_structure", "(", "[", "'title'", "=>", "new", "external_value", "(", "PARAM_RAW", ",", "'Step Title'", ")", ",", "'content'", "=>", "new", "external_value", ...
The standard return structure for a step. @return external_multiple_structure
[ "The", "standard", "return", "structure", "for", "a", "step", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/external/tour.php#L308-L329
219,221
moodle/moodle
mod/quiz/classes/form/randomquestion_form.php
randomquestion_form.definition
public function definition() { $mform = $this->_form; $contexts = $this->_customdata['contexts']; $usablecontexts = $contexts->having_cap('moodle/question:useall'); // Standard fields at the start of the form. $mform->addElement('header', 'generalheader', get_string("general", ...
php
public function definition() { $mform = $this->_form; $contexts = $this->_customdata['contexts']; $usablecontexts = $contexts->having_cap('moodle/question:useall'); // Standard fields at the start of the form. $mform->addElement('header', 'generalheader', get_string("general", ...
[ "public", "function", "definition", "(", ")", "{", "$", "mform", "=", "$", "this", "->", "_form", ";", "$", "contexts", "=", "$", "this", "->", "_customdata", "[", "'contexts'", "]", ";", "$", "usablecontexts", "=", "$", "contexts", "->", "having_cap", ...
Form definiton.
[ "Form", "definiton", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/quiz/classes/form/randomquestion_form.php#L43-L83
219,222
moodle/moodle
lib/classes/hub/registration.php
registration.get_registration
protected static function get_registration($confirmed = true) { global $DB; if (self::$registration === null) { self::$registration = $DB->get_record('registration_hubs', ['huburl' => HUB_MOODLEORGHUBURL]); } if (self::$registration && (bool)self::$registration->confirmed =...
php
protected static function get_registration($confirmed = true) { global $DB; if (self::$registration === null) { self::$registration = $DB->get_record('registration_hubs', ['huburl' => HUB_MOODLEORGHUBURL]); } if (self::$registration && (bool)self::$registration->confirmed =...
[ "protected", "static", "function", "get_registration", "(", "$", "confirmed", "=", "true", ")", "{", "global", "$", "DB", ";", "if", "(", "self", "::", "$", "registration", "===", "null", ")", "{", "self", "::", "$", "registration", "=", "$", "DB", "->...
Get site registration @param bool $confirmed @return stdClass|null
[ "Get", "site", "registration" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L81-L93
219,223
moodle/moodle
lib/classes/hub/registration.php
registration.require_registration
public static function require_registration() { if ($registration = self::get_registration()) { return $registration; } if (has_capability('moodle/site:config', context_system::instance())) { throw new moodle_exception('registrationwarning', 'admin', new moodle_url('/admi...
php
public static function require_registration() { if ($registration = self::get_registration()) { return $registration; } if (has_capability('moodle/site:config', context_system::instance())) { throw new moodle_exception('registrationwarning', 'admin', new moodle_url('/admi...
[ "public", "static", "function", "require_registration", "(", ")", "{", "if", "(", "$", "registration", "=", "self", "::", "get_registration", "(", ")", ")", "{", "return", "$", "registration", ";", "}", "if", "(", "has_capability", "(", "'moodle/site:config'",...
Same as get_registration except it throws exception if site not registered @return stdClass @throws \moodle_exception
[ "Same", "as", "get_registration", "except", "it", "throws", "exception", "if", "site", "not", "registered" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L101-L110
219,224
moodle/moodle
lib/classes/hub/registration.php
registration.get_token
public static function get_token($strictness = IGNORE_MISSING) { if ($strictness == MUST_EXIST) { $registration = self::require_registration(); } else if (!$registration = self::get_registration()) { return null; } return $registration->token; }
php
public static function get_token($strictness = IGNORE_MISSING) { if ($strictness == MUST_EXIST) { $registration = self::require_registration(); } else if (!$registration = self::get_registration()) { return null; } return $registration->token; }
[ "public", "static", "function", "get_token", "(", "$", "strictness", "=", "IGNORE_MISSING", ")", "{", "if", "(", "$", "strictness", "==", "MUST_EXIST", ")", "{", "$", "registration", "=", "self", "::", "require_registration", "(", ")", ";", "}", "else", "i...
Returns registration token @param int $strictness if set to MUST_EXIST and site is not registered will throw an exception @return null @throws moodle_exception
[ "Returns", "registration", "token" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L128-L135
219,225
moodle/moodle
lib/classes/hub/registration.php
registration.get_site_info
public static function get_site_info($defaults = []) { global $CFG, $DB; require_once($CFG->libdir . '/badgeslib.php'); require_once($CFG->dirroot . "/course/lib.php"); $siteinfo = array(); $cleanhuburl = clean_param(HUB_MOODLEORGHUBURL, PARAM_ALPHANUMEXT); foreach (self...
php
public static function get_site_info($defaults = []) { global $CFG, $DB; require_once($CFG->libdir . '/badgeslib.php'); require_once($CFG->dirroot . "/course/lib.php"); $siteinfo = array(); $cleanhuburl = clean_param(HUB_MOODLEORGHUBURL, PARAM_ALPHANUMEXT); foreach (self...
[ "public", "static", "function", "get_site_info", "(", "$", "defaults", "=", "[", "]", ")", "{", "global", "$", "CFG", ",", "$", "DB", ";", "require_once", "(", "$", "CFG", "->", "libdir", ".", "'/badgeslib.php'", ")", ";", "require_once", "(", "$", "CF...
Calculates and prepares site information to send to moodle.net as part of registration or update @param array $defaults default values for inputs in the registration form (if site was never registered before) @return array site info
[ "Calculates", "and", "prepares", "site", "information", "to", "send", "to", "moodle", ".", "net", "as", "part", "of", "registration", "or", "update" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L155-L210
219,226
moodle/moodle
lib/classes/hub/registration.php
registration.get_stats_summary
public static function get_stats_summary($siteinfo) { $fieldsneedconfirm = self::get_new_registration_fields(); $summary = html_writer::tag('p', get_string('sendfollowinginfo_help', 'hub')) . html_writer::start_tag('ul'); $mobileservicesenabled = $siteinfo['mobileservicesenabled'] ?...
php
public static function get_stats_summary($siteinfo) { $fieldsneedconfirm = self::get_new_registration_fields(); $summary = html_writer::tag('p', get_string('sendfollowinginfo_help', 'hub')) . html_writer::start_tag('ul'); $mobileservicesenabled = $siteinfo['mobileservicesenabled'] ?...
[ "public", "static", "function", "get_stats_summary", "(", "$", "siteinfo", ")", "{", "$", "fieldsneedconfirm", "=", "self", "::", "get_new_registration_fields", "(", ")", ";", "$", "summary", "=", "html_writer", "::", "tag", "(", "'p'", ",", "get_string", "(",...
Human-readable summary of data that will be sent to moodle.net @param array $siteinfo result of get_site_info() @return string
[ "Human", "-", "readable", "summary", "of", "data", "that", "will", "be", "sent", "to", "moodle", ".", "net" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L218-L259
219,227
moodle/moodle
lib/classes/hub/registration.php
registration.save_site_info
public static function save_site_info($formdata) { $cleanhuburl = clean_param(HUB_MOODLEORGHUBURL, PARAM_ALPHANUMEXT); foreach (self::FORM_FIELDS as $field) { set_config('site_' . $field . '_' . $cleanhuburl, $formdata->$field, 'hub'); } // Even if the the connection with moo...
php
public static function save_site_info($formdata) { $cleanhuburl = clean_param(HUB_MOODLEORGHUBURL, PARAM_ALPHANUMEXT); foreach (self::FORM_FIELDS as $field) { set_config('site_' . $field . '_' . $cleanhuburl, $formdata->$field, 'hub'); } // Even if the the connection with moo...
[ "public", "static", "function", "save_site_info", "(", "$", "formdata", ")", "{", "$", "cleanhuburl", "=", "clean_param", "(", "HUB_MOODLEORGHUBURL", ",", "PARAM_ALPHANUMEXT", ")", ";", "foreach", "(", "self", "::", "FORM_FIELDS", "as", "$", "field", ")", "{",...
Save registration info locally so it can be retrieved when registration needs to be updated @param stdClass $formdata data from {@link site_registration_form}
[ "Save", "registration", "info", "locally", "so", "it", "can", "be", "retrieved", "when", "registration", "needs", "to", "be", "updated" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L266-L274
219,228
moodle/moodle
lib/classes/hub/registration.php
registration.update_manual
public static function update_manual() { global $DB; if (!$registration = self::get_registration()) { return false; } $siteinfo = self::get_site_info(); try { api::update_registration($siteinfo); } catch (moodle_exception $e) { if (!s...
php
public static function update_manual() { global $DB; if (!$registration = self::get_registration()) { return false; } $siteinfo = self::get_site_info(); try { api::update_registration($siteinfo); } catch (moodle_exception $e) { if (!s...
[ "public", "static", "function", "update_manual", "(", ")", "{", "global", "$", "DB", ";", "if", "(", "!", "$", "registration", "=", "self", "::", "get_registration", "(", ")", ")", "{", "return", "false", ";", "}", "$", "siteinfo", "=", "self", "::", ...
Updates site registration when "Update reigstration" button is clicked by admin
[ "Updates", "site", "registration", "when", "Update", "reigstration", "button", "is", "clicked", "by", "admin" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L279-L304
219,229
moodle/moodle
lib/classes/hub/registration.php
registration.update_cron
public static function update_cron() { global $DB; if (!$registration = self::get_registration()) { mtrace(get_string('registrationwarning', 'admin')); return; } if (self::get_new_registration_fields()) { mtrace(get_string('pleaserefreshregistrationn...
php
public static function update_cron() { global $DB; if (!$registration = self::get_registration()) { mtrace(get_string('registrationwarning', 'admin')); return; } if (self::get_new_registration_fields()) { mtrace(get_string('pleaserefreshregistrationn...
[ "public", "static", "function", "update_cron", "(", ")", "{", "global", "$", "DB", ";", "if", "(", "!", "$", "registration", "=", "self", "::", "get_registration", "(", ")", ")", "{", "mtrace", "(", "get_string", "(", "'registrationwarning'", ",", "'admin'...
Updates site registration via cron @throws moodle_exception
[ "Updates", "site", "registration", "via", "cron" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L311-L329
219,230
moodle/moodle
lib/classes/hub/registration.php
registration.confirm_registration
public static function confirm_registration($token, $newtoken, $hubname) { global $DB; $registration = self::get_registration(false); if (!$registration || $registration->token !== $token) { throw new moodle_exception('wrongtoken', 'hub', new moodle_url('/admin/registration/index.ph...
php
public static function confirm_registration($token, $newtoken, $hubname) { global $DB; $registration = self::get_registration(false); if (!$registration || $registration->token !== $token) { throw new moodle_exception('wrongtoken', 'hub', new moodle_url('/admin/registration/index.ph...
[ "public", "static", "function", "confirm_registration", "(", "$", "token", ",", "$", "newtoken", ",", "$", "hubname", ")", "{", "global", "$", "DB", ";", "$", "registration", "=", "self", "::", "get_registration", "(", "false", ")", ";", "if", "(", "!", ...
Confirms registration by moodle.net @param string $token @param string $newtoken @param string $hubname @throws moodle_exception
[ "Confirms", "registration", "by", "moodle", ".", "net" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L339-L353
219,231
moodle/moodle
lib/classes/hub/registration.php
registration.site_privacy_options
public static function site_privacy_options() { return [ self::HUB_SITENOTPUBLISHED => get_string('siteprivacynotpublished', 'hub'), self::HUB_SITENAMEPUBLISHED => get_string('siteprivacypublished', 'hub'), self::HUB_SITELINKPUBLISHED => get_string('siteprivacylinked', 'hub')...
php
public static function site_privacy_options() { return [ self::HUB_SITENOTPUBLISHED => get_string('siteprivacynotpublished', 'hub'), self::HUB_SITENAMEPUBLISHED => get_string('siteprivacypublished', 'hub'), self::HUB_SITELINKPUBLISHED => get_string('siteprivacylinked', 'hub')...
[ "public", "static", "function", "site_privacy_options", "(", ")", "{", "return", "[", "self", "::", "HUB_SITENOTPUBLISHED", "=>", "get_string", "(", "'siteprivacynotpublished'", ",", "'hub'", ")", ",", "self", "::", "HUB_SITENAMEPUBLISHED", "=>", "get_string", "(", ...
Retrieve the options for site privacy form element to use in registration form @return array
[ "Retrieve", "the", "options", "for", "site", "privacy", "form", "element", "to", "use", "in", "registration", "form" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L359-L365
219,232
moodle/moodle
lib/classes/hub/registration.php
registration.register
public static function register($returnurl) { global $DB, $SESSION; if (self::is_registered()) { // Caller of this method must make sure that site is not registered. throw new \coding_exception('Site already registered'); } $hub = self::get_registration(false); ...
php
public static function register($returnurl) { global $DB, $SESSION; if (self::is_registered()) { // Caller of this method must make sure that site is not registered. throw new \coding_exception('Site already registered'); } $hub = self::get_registration(false); ...
[ "public", "static", "function", "register", "(", "$", "returnurl", ")", "{", "global", "$", "DB", ",", "$", "SESSION", ";", "if", "(", "self", "::", "is_registered", "(", ")", ")", "{", "// Caller of this method must make sure that site is not registered.", "throw...
Registers a site This method will make sure that unconfirmed registration record is created and then redirect to registration script on https://moodle.net Moodle.net will check that the site is accessible, register it and redirect back to /admin/registration/confirmregistration.php @param string $returnurl @throws \c...
[ "Registers", "a", "site" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L378-L405
219,233
moodle/moodle
lib/classes/hub/registration.php
registration.reset_token
public static function reset_token() { global $DB; if (!$hub = self::get_registration()) { return true; } $DB->delete_records('registration_hubs', array('id' => $hub->id)); self::$registration = null; }
php
public static function reset_token() { global $DB; if (!$hub = self::get_registration()) { return true; } $DB->delete_records('registration_hubs', array('id' => $hub->id)); self::$registration = null; }
[ "public", "static", "function", "reset_token", "(", ")", "{", "global", "$", "DB", ";", "if", "(", "!", "$", "hub", "=", "self", "::", "get_registration", "(", ")", ")", "{", "return", "true", ";", "}", "$", "DB", "->", "delete_records", "(", "'regis...
Resets the registration token without changing site identifier so site can be re-registered @return bool
[ "Resets", "the", "registration", "token", "without", "changing", "site", "identifier", "so", "site", "can", "be", "re", "-", "registered" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L453-L460
219,234
moodle/moodle
lib/classes/hub/registration.php
registration.reset_site_identifier
public static function reset_site_identifier($token) { global $DB, $CFG; $registration = self::get_registration(false); if (!$registration || $registration->token != $token) { throw new moodle_exception('wrongtoken', 'hub', new moodle_url('/admin/registration/index.ph...
php
public static function reset_site_identifier($token) { global $DB, $CFG; $registration = self::get_registration(false); if (!$registration || $registration->token != $token) { throw new moodle_exception('wrongtoken', 'hub', new moodle_url('/admin/registration/index.ph...
[ "public", "static", "function", "reset_site_identifier", "(", "$", "token", ")", "{", "global", "$", "DB", ",", "$", "CFG", ";", "$", "registration", "=", "self", "::", "get_registration", "(", "false", ")", ";", "if", "(", "!", "$", "registration", "||"...
Generate a new token for the site that is not registered @param string $token @throws moodle_exception
[ "Generate", "a", "new", "token", "for", "the", "site", "that", "is", "not", "registered" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L468-L482
219,235
moodle/moodle
lib/classes/hub/registration.php
registration.show_after_install
public static function show_after_install($markasviewed = null) { global $CFG; if (self::is_registered()) { $showregistration = false; $markasviewed = true; } else { $showregistration = !empty($CFG->registrationpending); if ($showregistration && !s...
php
public static function show_after_install($markasviewed = null) { global $CFG; if (self::is_registered()) { $showregistration = false; $markasviewed = true; } else { $showregistration = !empty($CFG->registrationpending); if ($showregistration && !s...
[ "public", "static", "function", "show_after_install", "(", "$", "markasviewed", "=", "null", ")", "{", "global", "$", "CFG", ";", "if", "(", "self", "::", "is_registered", "(", ")", ")", "{", "$", "showregistration", "=", "false", ";", "$", "markasviewed",...
Does admin need to be redirected to the registration page after install? @param bool|null $markasviewed if set to true will mark the registration form as viewed and admin will not be redirected to the registration form again (regardless of whether the site was registered or not). @return bool
[ "Does", "admin", "need", "to", "be", "redirected", "to", "the", "registration", "page", "after", "install?" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L520-L537
219,236
moodle/moodle
lib/classes/hub/registration.php
registration.get_new_registration_fields
public static function get_new_registration_fields() { $fieldsneedconfirm = []; if (!self::is_registered()) { // Nothing to update if site is not registered. return $fieldsneedconfirm; } $cleanhuburl = clean_param(HUB_MOODLEORGHUBURL, PARAM_ALPHANUMEXT); ...
php
public static function get_new_registration_fields() { $fieldsneedconfirm = []; if (!self::is_registered()) { // Nothing to update if site is not registered. return $fieldsneedconfirm; } $cleanhuburl = clean_param(HUB_MOODLEORGHUBURL, PARAM_ALPHANUMEXT); ...
[ "public", "static", "function", "get_new_registration_fields", "(", ")", "{", "$", "fieldsneedconfirm", "=", "[", "]", ";", "if", "(", "!", "self", "::", "is_registered", "(", ")", ")", "{", "// Nothing to update if site is not registered.", "return", "$", "fields...
Returns the list of the fields in the registration form that were added since registration or last manual update If this list is not empty the scheduled task will be paused and admin will be reminded to update registration manually. @return array
[ "Returns", "the", "list", "of", "the", "fields", "in", "the", "registration", "form", "that", "were", "added", "since", "registration", "or", "last", "manual", "update" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L546-L561
219,237
moodle/moodle
lib/classes/hub/registration.php
registration.registration_reminder
public static function registration_reminder($url) { if (defined('BEHAT_SITE_RUNNING') && BEHAT_SITE_RUNNING) { // No redirection during behat runs. return; } if (!has_capability('moodle/site:config', context_system::instance())) { return; } if...
php
public static function registration_reminder($url) { if (defined('BEHAT_SITE_RUNNING') && BEHAT_SITE_RUNNING) { // No redirection during behat runs. return; } if (!has_capability('moodle/site:config', context_system::instance())) { return; } if...
[ "public", "static", "function", "registration_reminder", "(", "$", "url", ")", "{", "if", "(", "defined", "(", "'BEHAT_SITE_RUNNING'", ")", "&&", "BEHAT_SITE_RUNNING", ")", "{", "// No redirection during behat runs.", "return", ";", "}", "if", "(", "!", "has_capab...
Redirect to the site registration form if it's a new install or registration needs updating @param string|moodle_url $url
[ "Redirect", "to", "the", "site", "registration", "form", "if", "it", "s", "a", "new", "install", "or", "registration", "needs", "updating" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/registration.php#L568-L580
219,238
moodle/moodle
lib/pear/HTML/QuickForm/radio.php
HTML_QuickForm_radio.exportValue
function exportValue(&$submitValues, $assoc = false) { $value = $this->_findValue($submitValues); if (null === $value) { $value = $this->getChecked()? $this->getValue(): null; } elseif ($value != $this->getValue()) { $value = null; } return $this->_pre...
php
function exportValue(&$submitValues, $assoc = false) { $value = $this->_findValue($submitValues); if (null === $value) { $value = $this->getChecked()? $this->getValue(): null; } elseif ($value != $this->getValue()) { $value = null; } return $this->_pre...
[ "function", "exportValue", "(", "&", "$", "submitValues", ",", "$", "assoc", "=", "false", ")", "{", "$", "value", "=", "$", "this", "->", "_findValue", "(", "$", "submitValues", ")", ";", "if", "(", "null", "===", "$", "value", ")", "{", "$", "val...
Returns the value attribute if the radio is checked, null if it is not
[ "Returns", "the", "value", "attribute", "if", "the", "radio", "is", "checked", "null", "if", "it", "is", "not" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/HTML/QuickForm/radio.php#L255-L264
219,239
moodle/moodle
mod/lti/edit_form.php
mod_lti_edit_types_form.get_data
public function get_data() { $data = parent::get_data(); if ($data && !empty($this->_customdata->istool)) { // Content item checkbox is disabled in tool settings, so this cannot be edited. Just unset it. unset($data->lti_contentitem); } return $data; }
php
public function get_data() { $data = parent::get_data(); if ($data && !empty($this->_customdata->istool)) { // Content item checkbox is disabled in tool settings, so this cannot be edited. Just unset it. unset($data->lti_contentitem); } return $data; }
[ "public", "function", "get_data", "(", ")", "{", "$", "data", "=", "parent", "::", "get_data", "(", ")", ";", "if", "(", "$", "data", "&&", "!", "empty", "(", "$", "this", "->", "_customdata", "->", "istool", ")", ")", "{", "// Content item checkbox is...
Retrieves the data of the submitted form. @return stdClass
[ "Retrieves", "the", "data", "of", "the", "submitted", "form", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/lti/edit_form.php#L277-L284
219,240
moodle/moodle
mod/lti/edit_form.php
mod_lti_edit_types_form.get_lti_advantage_services
public function get_lti_advantage_services(&$mform) { // For each service add the label and get the array of configuration. $services = lti_get_services(); $mform->addElement('header', 'services', get_string('services', 'lti')); foreach ($services as $service) { /** @var \mod...
php
public function get_lti_advantage_services(&$mform) { // For each service add the label and get the array of configuration. $services = lti_get_services(); $mform->addElement('header', 'services', get_string('services', 'lti')); foreach ($services as $service) { /** @var \mod...
[ "public", "function", "get_lti_advantage_services", "(", "&", "$", "mform", ")", "{", "// For each service add the label and get the array of configuration.", "$", "services", "=", "lti_get_services", "(", ")", ";", "$", "mform", "->", "addElement", "(", "'header'", ","...
Generates the lti advantage extra configuration adding it to the mform @param MoodleQuickForm $mform
[ "Generates", "the", "lti", "advantage", "extra", "configuration", "adding", "it", "to", "the", "mform" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/lti/edit_form.php#L291-L299
219,241
moodle/moodle
search/classes/external.php
external.get_relevant_users
public static function get_relevant_users($query, $courseid) { global $CFG, $PAGE; // Validate parameter. self::validate_parameters(self::get_relevant_users_parameters(), ['query' => $query, 'courseid' => $courseid]); // Validate the context (search page is always syste...
php
public static function get_relevant_users($query, $courseid) { global $CFG, $PAGE; // Validate parameter. self::validate_parameters(self::get_relevant_users_parameters(), ['query' => $query, 'courseid' => $courseid]); // Validate the context (search page is always syste...
[ "public", "static", "function", "get_relevant_users", "(", "$", "query", ",", "$", "courseid", ")", "{", "global", "$", "CFG", ",", "$", "PAGE", ";", "// Validate parameter.", "self", "::", "validate_parameters", "(", "self", "::", "get_relevant_users_parameters",...
Searches for users given a query, taking into account the current user's permissions and possibly a course to check within. @param string $query Query text @param int $courseid Course id or 0 if no restriction @return array Defined return structure
[ "Searches", "for", "users", "given", "a", "query", "taking", "into", "account", "the", "current", "user", "s", "permissions", "and", "possibly", "a", "course", "to", "check", "within", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/search/classes/external.php#L80-L118
219,242
moodle/moodle
analytics/classes/prediction.php
prediction.action_executed
public function action_executed($actionname, \core_analytics\local\target\base $target) { global $USER, $DB; $context = \context::instance_by_id($this->get_prediction_data()->contextid, IGNORE_MISSING); if (!$context) { throw new \moodle_exception('errorpredictioncontextnotavailable...
php
public function action_executed($actionname, \core_analytics\local\target\base $target) { global $USER, $DB; $context = \context::instance_by_id($this->get_prediction_data()->contextid, IGNORE_MISSING); if (!$context) { throw new \moodle_exception('errorpredictioncontextnotavailable...
[ "public", "function", "action_executed", "(", "$", "actionname", ",", "\\", "core_analytics", "\\", "local", "\\", "target", "\\", "base", "$", "target", ")", "{", "global", "$", "USER", ",", "$", "DB", ";", "$", "context", "=", "\\", "context", "::", ...
Stores the executed action. Prediction instances should be retrieved using \core_analytics\manager::get_prediction, It is the caller responsability to check that the user can see the prediction. @param string $actionname @param \core_analytics\local\target\base $target
[ "Stores", "the", "executed", "action", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/analytics/classes/prediction.php#L124-L158
219,243
moodle/moodle
user/selector/lib.php
user_selector_base.get_selected_users
public function get_selected_users() { // Do a lazy load. if (is_null($this->selected)) { $this->selected = $this->load_selected_users(); } return $this->selected; }
php
public function get_selected_users() { // Do a lazy load. if (is_null($this->selected)) { $this->selected = $this->load_selected_users(); } return $this->selected; }
[ "public", "function", "get_selected_users", "(", ")", "{", "// Do a lazy load.", "if", "(", "is_null", "(", "$", "this", "->", "selected", ")", ")", "{", "$", "this", "->", "selected", "=", "$", "this", "->", "load_selected_users", "(", ")", ";", "}", "r...
The users that were selected. This is a more sophisticated version of optional_param($this->name, array(), PARAM_INT) that validates the returned list of ids against the rules for this user selector. @return array of user objects.
[ "The", "users", "that", "were", "selected", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L171-L177
219,244
moodle/moodle
user/selector/lib.php
user_selector_base.display
public function display($return = false) { global $PAGE; // Get the list of requested users. $search = optional_param($this->name . '_searchtext', '', PARAM_RAW); if (optional_param($this->name . '_clearbutton', false, PARAM_BOOL)) { $search = ''; } $groupedu...
php
public function display($return = false) { global $PAGE; // Get the list of requested users. $search = optional_param($this->name . '_searchtext', '', PARAM_RAW); if (optional_param($this->name . '_clearbutton', false, PARAM_BOOL)) { $search = ''; } $groupedu...
[ "public", "function", "display", "(", "$", "return", "=", "false", ")", "{", "global", "$", "PAGE", ";", "// Get the list of requested users.", "$", "search", "=", "optional_param", "(", "$", "this", "->", "name", ".", "'_searchtext'", ",", "''", ",", "PARAM...
Output this user_selector as HTML. @param boolean $return if true, return the HTML as a string instead of outputting it. @return mixed if $return is true, returns the HTML as a string, otherwise returns nothing.
[ "Output", "this", "user_selector", "as", "HTML", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L217-L277
219,245
moodle/moodle
user/selector/lib.php
user_selector_base.load_selected_users
protected function load_selected_users() { // See if we got anything. if ($this->multiselect) { $userids = optional_param_array($this->name, array(), PARAM_INT); } else if ($userid = optional_param($this->name, 0, PARAM_INT)) { $userids = array($userid); } ...
php
protected function load_selected_users() { // See if we got anything. if ($this->multiselect) { $userids = optional_param_array($this->name, array(), PARAM_INT); } else if ($userid = optional_param($this->name, 0, PARAM_INT)) { $userids = array($userid); } ...
[ "protected", "function", "load_selected_users", "(", ")", "{", "// See if we got anything.", "if", "(", "$", "this", "->", "multiselect", ")", "{", "$", "userids", "=", "optional_param_array", "(", "$", "this", "->", "name", ",", "array", "(", ")", ",", "PAR...
Get the list of users that were selected by doing optional_param then validating the result. @return array of user objects.
[ "Get", "the", "list", "of", "users", "that", "were", "selected", "by", "doing", "optional_param", "then", "validating", "the", "result", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L394-L427
219,246
moodle/moodle
user/selector/lib.php
user_selector_base.required_fields_sql
protected function required_fields_sql($u) { // Raw list of fields. $fields = array('id'); // Add additional name fields. $fields = array_merge($fields, get_all_user_name_fields(), $this->extrafields); // Prepend the table alias. if ($u) { foreach ($fields as...
php
protected function required_fields_sql($u) { // Raw list of fields. $fields = array('id'); // Add additional name fields. $fields = array_merge($fields, get_all_user_name_fields(), $this->extrafields); // Prepend the table alias. if ($u) { foreach ($fields as...
[ "protected", "function", "required_fields_sql", "(", "$", "u", ")", "{", "// Raw list of fields.", "$", "fields", "=", "array", "(", "'id'", ")", ";", "// Add additional name fields.", "$", "fields", "=", "array_merge", "(", "$", "fields", ",", "get_all_user_name_...
Returns SQL to select required fields. @param string $u the table alias for the user table in the query being built. May be ''. @return string fragment of SQL to go in the select list of the query.
[ "Returns", "SQL", "to", "select", "required", "fields", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L436-L449
219,247
moodle/moodle
user/selector/lib.php
user_selector_base.search_sql
protected function search_sql($search, $u) { return users_search_sql($search, $u, $this->searchanywhere, $this->extrafields, $this->exclude, $this->validatinguserids); }
php
protected function search_sql($search, $u) { return users_search_sql($search, $u, $this->searchanywhere, $this->extrafields, $this->exclude, $this->validatinguserids); }
[ "protected", "function", "search_sql", "(", "$", "search", ",", "$", "u", ")", "{", "return", "users_search_sql", "(", "$", "search", ",", "$", "u", ",", "$", "this", "->", "searchanywhere", ",", "$", "this", "->", "extrafields", ",", "$", "this", "->"...
Returns an array with SQL to perform a search and the params that go into it. @param string $search the text to search for. @param string $u the table alias for the user table in the query being built. May be ''. @return array an array with two elements, a fragment of SQL to go in the where clause the query, and an ar...
[ "Returns", "an", "array", "with", "SQL", "to", "perform", "a", "search", "and", "the", "params", "that", "go", "into", "it", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L461-L464
219,248
moodle/moodle
user/selector/lib.php
user_selector_base.too_many_results
protected function too_many_results($search, $count) { if ($search) { $a = new stdClass; $a->count = $count; $a->search = $search; return array(get_string('toomanyusersmatchsearch', '', $a) => array(), get_string('pleasesearchmore') => array())...
php
protected function too_many_results($search, $count) { if ($search) { $a = new stdClass; $a->count = $count; $a->search = $search; return array(get_string('toomanyusersmatchsearch', '', $a) => array(), get_string('pleasesearchmore') => array())...
[ "protected", "function", "too_many_results", "(", "$", "search", ",", "$", "count", ")", "{", "if", "(", "$", "search", ")", "{", "$", "a", "=", "new", "stdClass", ";", "$", "a", "->", "count", "=", "$", "count", ";", "$", "a", "->", "search", "=...
Used to generate a nice message when there are too many users to show. The message includes the number of users that currently match, and the text of the message depends on whether the search term is non-blank. @param string $search the search term, as passed in to the find users method. @param int $count the number ...
[ "Used", "to", "generate", "a", "nice", "message", "when", "there", "are", "too", "many", "users", "to", "show", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L476-L487
219,249
moodle/moodle
user/selector/lib.php
user_selector_base.output_optgroup
protected function output_optgroup($groupname, $users, $select) { if (!empty($users)) { $output = ' <optgroup label="' . htmlspecialchars($groupname) . ' (' . count($users) . ')">' . "\n"; foreach ($users as $user) { $attributes = ''; if (!empty($user->di...
php
protected function output_optgroup($groupname, $users, $select) { if (!empty($users)) { $output = ' <optgroup label="' . htmlspecialchars($groupname) . ' (' . count($users) . ')">' . "\n"; foreach ($users as $user) { $attributes = ''; if (!empty($user->di...
[ "protected", "function", "output_optgroup", "(", "$", "groupname", ",", "$", "users", ",", "$", "select", ")", "{", "if", "(", "!", "empty", "(", "$", "users", ")", ")", "{", "$", "output", "=", "' <optgroup label=\"'", ".", "htmlspecialchars", "(", "$"...
Output one particular optgroup. Used by the preceding function output_options. @param string $groupname the label for this optgroup. @param array $users the users to put in this optgroup. @param boolean $select if true, select the users in this group. @return string HTML code.
[ "Output", "one", "particular", "optgroup", ".", "Used", "by", "the", "preceding", "function", "output_options", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L546-L571
219,250
moodle/moodle
user/selector/lib.php
user_selector_base.output_user
public function output_user($user) { $out = fullname($user, $this->viewfullnames); if ($this->extrafields) { $displayfields = array(); foreach ($this->extrafields as $field) { $displayfields[] = $user->{$field}; } $out .= ' (' . implode(', ...
php
public function output_user($user) { $out = fullname($user, $this->viewfullnames); if ($this->extrafields) { $displayfields = array(); foreach ($this->extrafields as $field) { $displayfields[] = $user->{$field}; } $out .= ' (' . implode(', ...
[ "public", "function", "output_user", "(", "$", "user", ")", "{", "$", "out", "=", "fullname", "(", "$", "user", ",", "$", "this", "->", "viewfullnames", ")", ";", "if", "(", "$", "this", "->", "extrafields", ")", "{", "$", "displayfields", "=", "arra...
Convert a user object to a string suitable for displaying as an option in the list box. @param object $user the user to display. @return string a string representation of the user.
[ "Convert", "a", "user", "object", "to", "a", "string", "suitable", "for", "displaying", "as", "an", "option", "in", "the", "list", "box", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L579-L589
219,251
moodle/moodle
user/selector/lib.php
user_selector_base.initialise_option
private function initialise_option($name, $default) { $param = optional_param($name, null, PARAM_BOOL); if (is_null($param)) { return get_user_preferences($name, $default); } else { set_user_preference($name, $param); return $param; } }
php
private function initialise_option($name, $default) { $param = optional_param($name, null, PARAM_BOOL); if (is_null($param)) { return get_user_preferences($name, $default); } else { set_user_preference($name, $param); return $param; } }
[ "private", "function", "initialise_option", "(", "$", "name", ",", "$", "default", ")", "{", "$", "param", "=", "optional_param", "(", "$", "name", ",", "null", ",", "PARAM_BOOL", ")", ";", "if", "(", "is_null", "(", "$", "param", ")", ")", "{", "ret...
Initialise one of the option checkboxes, either from the request, or failing that from the user_preferences table, or finally from the given default. @param string $name @param mixed $default @return mixed|null|string
[ "Initialise", "one", "of", "the", "option", "checkboxes", "either", "from", "the", "request", "or", "failing", "that", "from", "the", "user_preferences", "table", "or", "finally", "from", "the", "given", "default", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L608-L616
219,252
moodle/moodle
user/selector/lib.php
user_selector_base.option_checkbox
private function option_checkbox($name, $on, $label) { if ($on) { $checked = ' checked="checked"'; } else { $checked = ''; } $name = 'userselector_' . $name; // For the benefit of brain-dead IE, the id must be different from the name of the hidden form fie...
php
private function option_checkbox($name, $on, $label) { if ($on) { $checked = ' checked="checked"'; } else { $checked = ''; } $name = 'userselector_' . $name; // For the benefit of brain-dead IE, the id must be different from the name of the hidden form fie...
[ "private", "function", "option_checkbox", "(", "$", "name", ",", "$", "on", ",", "$", "label", ")", "{", "if", "(", "$", "on", ")", "{", "$", "checked", "=", "' checked=\"checked\"'", ";", "}", "else", "{", "$", "checked", "=", "''", ";", "}", "$",...
Output one of the options checkboxes. @param string $name @param string $on @param string $label @return string
[ "Output", "one", "of", "the", "options", "checkboxes", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L626-L643
219,253
moodle/moodle
user/selector/lib.php
user_selector_base.initialise_javascript
protected function initialise_javascript($search) { global $USER, $PAGE, $OUTPUT; $output = ''; // Put the options into the session, to allow search.php to respond to the ajax requests. $options = $this->get_options(); $hash = md5(serialize($options)); $USER->userselecto...
php
protected function initialise_javascript($search) { global $USER, $PAGE, $OUTPUT; $output = ''; // Put the options into the session, to allow search.php to respond to the ajax requests. $options = $this->get_options(); $hash = md5(serialize($options)); $USER->userselecto...
[ "protected", "function", "initialise_javascript", "(", "$", "search", ")", "{", "global", "$", "USER", ",", "$", "PAGE", ",", "$", "OUTPUT", ";", "$", "output", "=", "''", ";", "// Put the options into the session, to allow search.php to respond to the ajax requests.", ...
Initialises JS for this control. @param string $search @return string any HTML needed here.
[ "Initialises", "JS", "for", "this", "control", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L651-L668
219,254
moodle/moodle
user/selector/lib.php
groups_user_selector_base.get_options
protected function get_options() { $options = parent::get_options(); $options['groupid'] = $this->groupid; $options['courseid'] = $this->courseid; return $options; }
php
protected function get_options() { $options = parent::get_options(); $options['groupid'] = $this->groupid; $options['courseid'] = $this->courseid; return $options; }
[ "protected", "function", "get_options", "(", ")", "{", "$", "options", "=", "parent", "::", "get_options", "(", ")", ";", "$", "options", "[", "'groupid'", "]", "=", "$", "this", "->", "groupid", ";", "$", "options", "[", "'courseid'", "]", "=", "$", ...
Returns options for this selector. @return array
[ "Returns", "options", "for", "this", "selector", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L702-L707
219,255
moodle/moodle
user/selector/lib.php
groups_user_selector_base.convert_array_format
protected function convert_array_format($roles, $search) { if (empty($roles)) { $roles = array(); } $groupedusers = array(); foreach ($roles as $role) { if ($search) { $a = new stdClass; $a->role = $role->name; $a->s...
php
protected function convert_array_format($roles, $search) { if (empty($roles)) { $roles = array(); } $groupedusers = array(); foreach ($roles as $role) { if ($search) { $a = new stdClass; $a->role = $role->name; $a->s...
[ "protected", "function", "convert_array_format", "(", "$", "roles", ",", "$", "search", ")", "{", "if", "(", "empty", "(", "$", "roles", ")", ")", "{", "$", "roles", "=", "array", "(", ")", ";", "}", "$", "groupedusers", "=", "array", "(", ")", ";"...
Creates an organised array from given data. @param array $roles array in the format returned by groups_calculate_role_people. @param string $search @return array array in the format find_users is supposed to return.
[ "Creates", "an", "organised", "array", "from", "given", "data", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L716-L741
219,256
moodle/moodle
user/selector/lib.php
group_non_members_selector.get_user_summaries
public function get_user_summaries($courseid) { global $DB; $usersummaries = array(); // Get other groups user already belongs to. $usergroups = array(); $potentialmembersids = $this->potentialmembersids; if (empty($potentialmembersids) == false) { list($mem...
php
public function get_user_summaries($courseid) { global $DB; $usersummaries = array(); // Get other groups user already belongs to. $usergroups = array(); $potentialmembersids = $this->potentialmembersids; if (empty($potentialmembersids) == false) { list($mem...
[ "public", "function", "get_user_summaries", "(", "$", "courseid", ")", "{", "global", "$", "DB", ";", "$", "usersummaries", "=", "array", "(", ")", ";", "// Get other groups user already belongs to.", "$", "usergroups", "=", "array", "(", ")", ";", "$", "poten...
Construct HTML lists of group-memberships of the current set of users. Used in user/selector/search.php to repopulate the userSummaries JS global that is created in self::print_user_summaries() above. @param int $courseid The course @return string[] Array of HTML lists of groups.
[ "Construct", "HTML", "lists", "of", "group", "-", "memberships", "of", "the", "current", "set", "of", "users", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/selector/lib.php#L829-L865
219,257
moodle/moodle
cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php
CollectionWrapper.deleteFileAndChunksById
public function deleteFileAndChunksById($id) { $this->filesCollection->deleteOne(['_id' => $id]); $this->chunksCollection->deleteMany(['files_id' => $id]); }
php
public function deleteFileAndChunksById($id) { $this->filesCollection->deleteOne(['_id' => $id]); $this->chunksCollection->deleteMany(['files_id' => $id]); }
[ "public", "function", "deleteFileAndChunksById", "(", "$", "id", ")", "{", "$", "this", "->", "filesCollection", "->", "deleteOne", "(", "[", "'_id'", "=>", "$", "id", "]", ")", ";", "$", "this", "->", "chunksCollection", "->", "deleteMany", "(", "[", "'...
Deletes a GridFS file and related chunks by ID. @param mixed $id
[ "Deletes", "a", "GridFS", "file", "and", "related", "chunks", "by", "ID", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php#L74-L78
219,258
moodle/moodle
cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php
CollectionWrapper.findFileByFilenameAndRevision
public function findFileByFilenameAndRevision($filename, $revision) { $filename = (string) $filename; $revision = (integer) $revision; if ($revision < 0) { $skip = abs($revision) - 1; $sortOrder = -1; } else { $skip = $revision; $sortO...
php
public function findFileByFilenameAndRevision($filename, $revision) { $filename = (string) $filename; $revision = (integer) $revision; if ($revision < 0) { $skip = abs($revision) - 1; $sortOrder = -1; } else { $skip = $revision; $sortO...
[ "public", "function", "findFileByFilenameAndRevision", "(", "$", "filename", ",", "$", "revision", ")", "{", "$", "filename", "=", "(", "string", ")", "$", "filename", ";", "$", "revision", "=", "(", "integer", ")", "$", "revision", ";", "if", "(", "$", ...
Finds a GridFS file document for a given filename and revision. Revision numbers are defined as follows: * 0 = the original stored file * 1 = the first revision * 2 = the second revision * etc… * -2 = the second most recent revision * -1 = the most recent revision @see Bucket::downloadToStreamByName() @see Bucket::o...
[ "Finds", "a", "GridFS", "file", "document", "for", "a", "given", "filename", "and", "revision", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php#L128-L149
219,259
moodle/moodle
cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php
CollectionWrapper.insertChunk
public function insertChunk($chunk) { if ( ! $this->checkedIndexes) { $this->ensureIndexes(); } $this->chunksCollection->insertOne($chunk); }
php
public function insertChunk($chunk) { if ( ! $this->checkedIndexes) { $this->ensureIndexes(); } $this->chunksCollection->insertOne($chunk); }
[ "public", "function", "insertChunk", "(", "$", "chunk", ")", "{", "if", "(", "!", "$", "this", "->", "checkedIndexes", ")", "{", "$", "this", "->", "ensureIndexes", "(", ")", ";", "}", "$", "this", "->", "chunksCollection", "->", "insertOne", "(", "$",...
Inserts a document into the chunks collection. @param array|object $chunk Chunk document
[ "Inserts", "a", "document", "into", "the", "chunks", "collection", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php#L235-L242
219,260
moodle/moodle
cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php
CollectionWrapper.insertFile
public function insertFile($file) { if ( ! $this->checkedIndexes) { $this->ensureIndexes(); } $this->filesCollection->insertOne($file); }
php
public function insertFile($file) { if ( ! $this->checkedIndexes) { $this->ensureIndexes(); } $this->filesCollection->insertOne($file); }
[ "public", "function", "insertFile", "(", "$", "file", ")", "{", "if", "(", "!", "$", "this", "->", "checkedIndexes", ")", "{", "$", "this", "->", "ensureIndexes", "(", ")", ";", "}", "$", "this", "->", "filesCollection", "->", "insertOne", "(", "$", ...
Inserts a document into the files collection. The file document should be inserted after all chunks have been inserted. @param array|object $file File document
[ "Inserts", "a", "document", "into", "the", "files", "collection", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php#L251-L258
219,261
moodle/moodle
cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php
CollectionWrapper.ensureChunksIndex
private function ensureChunksIndex() { foreach ($this->chunksCollection->listIndexes() as $index) { if ($index->isUnique() && $index->getKey() === ['files_id' => 1, 'n' => 1]) { return; } } $this->chunksCollection->createIndex(['files_id' => 1, 'n' =>...
php
private function ensureChunksIndex() { foreach ($this->chunksCollection->listIndexes() as $index) { if ($index->isUnique() && $index->getKey() === ['files_id' => 1, 'n' => 1]) { return; } } $this->chunksCollection->createIndex(['files_id' => 1, 'n' =>...
[ "private", "function", "ensureChunksIndex", "(", ")", "{", "foreach", "(", "$", "this", "->", "chunksCollection", "->", "listIndexes", "(", ")", "as", "$", "index", ")", "{", "if", "(", "$", "index", "->", "isUnique", "(", ")", "&&", "$", "index", "->"...
Create an index on the chunks collection if it does not already exist.
[ "Create", "an", "index", "on", "the", "chunks", "collection", "if", "it", "does", "not", "already", "exist", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php#L278-L287
219,262
moodle/moodle
cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php
CollectionWrapper.ensureFilesIndex
private function ensureFilesIndex() { foreach ($this->filesCollection->listIndexes() as $index) { if ($index->getKey() === ['filename' => 1, 'uploadDate' => 1]) { return; } } $this->filesCollection->createIndex(['filename' => 1, 'uploadDate' => 1]); ...
php
private function ensureFilesIndex() { foreach ($this->filesCollection->listIndexes() as $index) { if ($index->getKey() === ['filename' => 1, 'uploadDate' => 1]) { return; } } $this->filesCollection->createIndex(['filename' => 1, 'uploadDate' => 1]); ...
[ "private", "function", "ensureFilesIndex", "(", ")", "{", "foreach", "(", "$", "this", "->", "filesCollection", "->", "listIndexes", "(", ")", "as", "$", "index", ")", "{", "if", "(", "$", "index", "->", "getKey", "(", ")", "===", "[", "'filename'", "=...
Create an index on the files collection if it does not already exist.
[ "Create", "an", "index", "on", "the", "files", "collection", "if", "it", "does", "not", "already", "exist", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php#L292-L301
219,263
moodle/moodle
cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php
CollectionWrapper.ensureIndexes
private function ensureIndexes() { if ($this->checkedIndexes) { return; } $this->checkedIndexes = true; if ( ! $this->isFilesCollectionEmpty()) { return; } $this->ensureFilesIndex(); $this->ensureChunksIndex(); }
php
private function ensureIndexes() { if ($this->checkedIndexes) { return; } $this->checkedIndexes = true; if ( ! $this->isFilesCollectionEmpty()) { return; } $this->ensureFilesIndex(); $this->ensureChunksIndex(); }
[ "private", "function", "ensureIndexes", "(", ")", "{", "if", "(", "$", "this", "->", "checkedIndexes", ")", "{", "return", ";", "}", "$", "this", "->", "checkedIndexes", "=", "true", ";", "if", "(", "!", "$", "this", "->", "isFilesCollectionEmpty", "(", ...
Ensure indexes on the files and chunks collections exist. This method is called once before the first write operation on a GridFS bucket. Indexes are only be created if the files collection is empty.
[ "Ensure", "indexes", "on", "the", "files", "and", "chunks", "collections", "exist", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/GridFS/CollectionWrapper.php#L309-L323
219,264
moodle/moodle
badges/related_form.php
edit_relatedbadge_form.get_badges_option
public function get_badges_option($badge) { global $DB; $sql = "SELECT b.id, b.name, b.version, b.language, b.type FROM {badge} b WHERE b.id <> :badgeid AND b.id NOT IN ( SELECT DISTINCT b.id ...
php
public function get_badges_option($badge) { global $DB; $sql = "SELECT b.id, b.name, b.version, b.language, b.type FROM {badge} b WHERE b.id <> :badgeid AND b.id NOT IN ( SELECT DISTINCT b.id ...
[ "public", "function", "get_badges_option", "(", "$", "badge", ")", "{", "global", "$", "DB", ";", "$", "sql", "=", "\"SELECT b.id, b.name, b.version, b.language, b.type\n FROM {badge} b\n WHERE b.id <> :badgeid\n AND b.id NOT IN (\...
Return list badge of a course or list badge site. @param object $badge Badge object. @return array $options An array the badges.
[ "Return", "list", "badge", "of", "a", "course", "or", "list", "badge", "site", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/badges/related_form.php#L80-L108
219,265
moodle/moodle
lib/form/modgrade.php
MoodleQuickForm_modgrade.exportValue
public function exportValue(&$submitvalues, $notused = false) { global $COURSE; // Get the values from all the child elements. $vals = array(); foreach ($this->_elements as $element) { $thisexport = $element->exportValue($submitvalues[$this->getName()], true); if...
php
public function exportValue(&$submitvalues, $notused = false) { global $COURSE; // Get the values from all the child elements. $vals = array(); foreach ($this->_elements as $element) { $thisexport = $element->exportValue($submitvalues[$this->getName()], true); if...
[ "public", "function", "exportValue", "(", "&", "$", "submitvalues", ",", "$", "notused", "=", "false", ")", "{", "global", "$", "COURSE", ";", "// Get the values from all the child elements.", "$", "vals", "=", "array", "(", ")", ";", "foreach", "(", "$", "t...
Calculate the output value for the element as a whole. @param array $submitvalues The incoming values from the form. @param bool $notused Not used. @return array Return value for the element, formatted like field name => value.
[ "Calculate", "the", "output", "value", "for", "the", "element", "as", "a", "whole", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/modgrade.php#L255-L274
219,266
moodle/moodle
lib/form/modgrade.php
MoodleQuickForm_modgrade.process_value
protected function process_value($type='none', $scale=null, $point=null, $rescalegrades=null) { global $COURSE; $val = 0; if ($this->isupdate && $this->hasgrades && $this->canrescale && $this->currentgradetype == 'point' && empty($rescalegrades)) { // If the maxgrade field is disable...
php
protected function process_value($type='none', $scale=null, $point=null, $rescalegrades=null) { global $COURSE; $val = 0; if ($this->isupdate && $this->hasgrades && $this->canrescale && $this->currentgradetype == 'point' && empty($rescalegrades)) { // If the maxgrade field is disable...
[ "protected", "function", "process_value", "(", "$", "type", "=", "'none'", ",", "$", "scale", "=", "null", ",", "$", "point", "=", "null", ",", "$", "rescalegrades", "=", "null", ")", "{", "global", "$", "COURSE", ";", "$", "val", "=", "0", ";", "i...
Process the value for the group based on the selected grade type, and the input for the scale and point elements. @param string $type The value of the grade type select box. Can be 'none', 'scale', or 'point' @param string|int $scale The value of the scale select box. @param string|int $point The value of the point...
[ "Process", "the", "value", "for", "the", "group", "based", "on", "the", "selected", "grade", "type", "and", "the", "input", "for", "the", "scale", "and", "point", "elements", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/modgrade.php#L285-L307
219,267
moodle/moodle
lib/form/modgrade.php
MoodleQuickForm_modgrade.validate_scale
protected function validate_scale($val) { global $COURSE; $scales = get_scales_menu($COURSE->id); return (!empty($val) && isset($scales[(int)$val])) ? true : false; }
php
protected function validate_scale($val) { global $COURSE; $scales = get_scales_menu($COURSE->id); return (!empty($val) && isset($scales[(int)$val])) ? true : false; }
[ "protected", "function", "validate_scale", "(", "$", "val", ")", "{", "global", "$", "COURSE", ";", "$", "scales", "=", "get_scales_menu", "(", "$", "COURSE", "->", "id", ")", ";", "return", "(", "!", "empty", "(", "$", "val", ")", "&&", "isset", "("...
Determines whether a given value is a valid scale selection. @param string|int $val The value to test. @return bool Valid or invalid
[ "Determines", "whether", "a", "given", "value", "is", "a", "valid", "scale", "selection", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/modgrade.php#L315-L319
219,268
moodle/moodle
lib/form/modgrade.php
MoodleQuickForm_modgrade.validate_point
protected function validate_point($val) { if (empty($val)) { return false; } $maxgrade = (int)get_config('core', 'gradepointmax'); $isintlike = ((string)(int)$val === $val) ? true : false; return ($isintlike === true && $val > 0 && $val <= $maxgrade) ? true : false; ...
php
protected function validate_point($val) { if (empty($val)) { return false; } $maxgrade = (int)get_config('core', 'gradepointmax'); $isintlike = ((string)(int)$val === $val) ? true : false; return ($isintlike === true && $val > 0 && $val <= $maxgrade) ? true : false; ...
[ "protected", "function", "validate_point", "(", "$", "val", ")", "{", "if", "(", "empty", "(", "$", "val", ")", ")", "{", "return", "false", ";", "}", "$", "maxgrade", "=", "(", "int", ")", "get_config", "(", "'core'", ",", "'gradepointmax'", ")", ";...
Determines whether a given value is a valid point selection. @param string|int $val The value to test. @return bool Valid or invalid
[ "Determines", "whether", "a", "given", "value", "is", "a", "valid", "point", "selection", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/modgrade.php#L327-L334
219,269
moodle/moodle
lib/form/modgrade.php
MoodleQuickForm_modgrade.generate_modgrade_subelement_id
protected function generate_modgrade_subelement_id($subname) { $gid = str_replace(array('[', ']'), array('_', ''), $this->getName()); return clean_param('id_'.$gid.'_'.$subname, PARAM_ALPHANUMEXT); }
php
protected function generate_modgrade_subelement_id($subname) { $gid = str_replace(array('[', ']'), array('_', ''), $this->getName()); return clean_param('id_'.$gid.'_'.$subname, PARAM_ALPHANUMEXT); }
[ "protected", "function", "generate_modgrade_subelement_id", "(", "$", "subname", ")", "{", "$", "gid", "=", "str_replace", "(", "array", "(", "'['", ",", "']'", ")", ",", "array", "(", "'_'", ",", "''", ")", ",", "$", "this", "->", "getName", "(", ")",...
Generates the id attribute for the subelement of the modgrade group. Uses algorithm similar to what {@link HTML_QuickForm_element::_generateId()} does but takes the name of the wrapping modgrade group into account. @param string $subname the name of the HTML_QuickForm_element in this modgrade group @return string
[ "Generates", "the", "id", "attribute", "for", "the", "subelement", "of", "the", "modgrade", "group", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/modgrade.php#L532-L535
219,270
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.management_heading
public function management_heading($heading, $viewmode = null, $categoryid = null) { $html = html_writer::start_div('coursecat-management-header clearfix'); if (!empty($heading)) { $html .= $this->heading($heading); } if ($viewmode !== null) { $html .= html_writer...
php
public function management_heading($heading, $viewmode = null, $categoryid = null) { $html = html_writer::start_div('coursecat-management-header clearfix'); if (!empty($heading)) { $html .= $this->heading($heading); } if ($viewmode !== null) { $html .= html_writer...
[ "public", "function", "management_heading", "(", "$", "heading", ",", "$", "viewmode", "=", "null", ",", "$", "categoryid", "=", "null", ")", "{", "$", "html", "=", "html_writer", "::", "start_div", "(", "'coursecat-management-header clearfix'", ")", ";", "if"...
Displays a heading for the management pages. @param string $heading The heading to display @param string|null $viewmode The current view mode if there are options. @param int|null $categoryid The currently selected category if there is one. @return string
[ "Displays", "a", "heading", "for", "the", "management", "pages", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L72-L94
219,271
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.management_form_start
public function management_form_start() { $form = array('action' => $this->page->url->out(), 'method' => 'POST', 'id' => 'coursecat-management'); $html = html_writer::start_tag('form', $form); $html .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey', 'value' => ses...
php
public function management_form_start() { $form = array('action' => $this->page->url->out(), 'method' => 'POST', 'id' => 'coursecat-management'); $html = html_writer::start_tag('form', $form); $html .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey', 'value' => ses...
[ "public", "function", "management_form_start", "(", ")", "{", "$", "form", "=", "array", "(", "'action'", "=>", "$", "this", "->", "page", "->", "url", "->", "out", "(", ")", ",", "'method'", "=>", "'POST'", ",", "'id'", "=>", "'coursecat-management'", "...
Prepares the form element for the course category listing bulk actions. @return string
[ "Prepares", "the", "form", "element", "for", "the", "course", "category", "listing", "bulk", "actions", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L101-L108
219,272
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.category_listing
public function category_listing(core_course_category $category = null) { if ($category === null) { $selectedparents = array(); $selectedcategory = null; } else { $selectedparents = $category->get_parents(); $selectedparents[] = $category->id; ...
php
public function category_listing(core_course_category $category = null) { if ($category === null) { $selectedparents = array(); $selectedcategory = null; } else { $selectedparents = $category->get_parents(); $selectedparents[] = $category->id; ...
[ "public", "function", "category_listing", "(", "core_course_category", "$", "category", "=", "null", ")", "{", "if", "(", "$", "category", "===", "null", ")", "{", "$", "selectedparents", "=", "array", "(", ")", ";", "$", "selectedcategory", "=", "null", "...
Presents a course category listing. @param core_course_category $category The currently selected category. Also the category to highlight in the listing. @return string
[ "Presents", "a", "course", "category", "listing", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L125-L172
219,273
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.category_listing_actions
public function category_listing_actions(core_course_category $category = null) { $actions = array(); $cancreatecategory = $category && $category->can_create_subcategory(); $cancreatecategory = $cancreatecategory || core_course_category::can_create_top_level_category(); if ($category ==...
php
public function category_listing_actions(core_course_category $category = null) { $actions = array(); $cancreatecategory = $category && $category->can_create_subcategory(); $cancreatecategory = $cancreatecategory || core_course_category::can_create_top_level_category(); if ($category ==...
[ "public", "function", "category_listing_actions", "(", "core_course_category", "$", "category", "=", "null", ")", "{", "$", "actions", "=", "array", "(", ")", ";", "$", "cancreatecategory", "=", "$", "category", "&&", "$", "category", "->", "can_create_subcatego...
Renderers the actions that are possible for the course category listing. These are not the actions associated with an individual category listing. That happens through category_listitem_actions. @param core_course_category $category @return string
[ "Renderers", "the", "actions", "that", "are", "possible", "for", "the", "course", "category", "listing", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L324-L344
219,274
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.category_listitem_actions
public function category_listitem_actions(core_course_category $category, array $actions = null) { if ($actions === null) { $actions = \core_course\management\helper::get_category_listitem_actions($category); } $menu = new action_menu(); $menu->attributes['class'] .= ' catego...
php
public function category_listitem_actions(core_course_category $category, array $actions = null) { if ($actions === null) { $actions = \core_course\management\helper::get_category_listitem_actions($category); } $menu = new action_menu(); $menu->attributes['class'] .= ' catego...
[ "public", "function", "category_listitem_actions", "(", "core_course_category", "$", "category", ",", "array", "$", "actions", "=", "null", ")", "{", "if", "(", "$", "actions", "===", "null", ")", "{", "$", "actions", "=", "\\", "core_course", "\\", "managem...
Renderers the actions for individual category list items. @param core_course_category $category @param array $actions @return string
[ "Renderers", "the", "actions", "for", "individual", "category", "list", "items", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L353-L374
219,275
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.course_listing
public function course_listing(core_course_category $category = null, core_course_list_element $course = null, $page = 0, $perpage = 20, $viewmode = 'default') { if ($category === null) { $html = html_writer::start_div('select-a-category'); $html .= html_writer::tag('h3', ge...
php
public function course_listing(core_course_category $category = null, core_course_list_element $course = null, $page = 0, $perpage = 20, $viewmode = 'default') { if ($category === null) { $html = html_writer::start_div('select-a-category'); $html .= html_writer::tag('h3', ge...
[ "public", "function", "course_listing", "(", "core_course_category", "$", "category", "=", "null", ",", "core_course_list_element", "$", "course", "=", "null", ",", "$", "page", "=", "0", ",", "$", "perpage", "=", "20", ",", "$", "viewmode", "=", "'default'"...
Renders a course listing. @param core_course_category $category The currently selected category. This is what the listing is focused on. @param core_course_list_element $course The currently selected course. @param int $page The page being displayed. @param int $perpage The number of courses to display per page. @para...
[ "Renders", "a", "course", "listing", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L494-L548
219,276
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.listing_pagination
protected function listing_pagination(core_course_category $category, $page, $perpage, $showtotals = false, $viewmode = 'default') { $html = ''; $totalcourses = $category->get_courses_count(); $totalpages = ceil($totalcourses / $perpage); if ($sh...
php
protected function listing_pagination(core_course_category $category, $page, $perpage, $showtotals = false, $viewmode = 'default') { $html = ''; $totalcourses = $category->get_courses_count(); $totalpages = ceil($totalcourses / $perpage); if ($sh...
[ "protected", "function", "listing_pagination", "(", "core_course_category", "$", "category", ",", "$", "page", ",", "$", "perpage", ",", "$", "showtotals", "=", "false", ",", "$", "viewmode", "=", "'default'", ")", "{", "$", "html", "=", "''", ";", "$", ...
Renders pagination for a course listing. @param core_course_category $category The category to produce pagination for. @param int $page The current page. @param int $perpage The number of courses to display per page. @param bool $showtotals Set to true to show the total number of courses and what is being displayed. @...
[ "Renders", "pagination", "for", "a", "course", "listing", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L560-L589
219,277
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.course_listitem
public function course_listitem(core_course_category $category, core_course_list_element $course, $selectedcourse) { $text = $course->get_formatted_name(); $attributes = array( 'class' => 'listitem listitem-course list-group-item list-group-item-action', 'data-id' => $co...
php
public function course_listitem(core_course_category $category, core_course_list_element $course, $selectedcourse) { $text = $course->get_formatted_name(); $attributes = array( 'class' => 'listitem listitem-course list-group-item list-group-item-action', 'data-id' => $co...
[ "public", "function", "course_listitem", "(", "core_course_category", "$", "category", ",", "core_course_list_element", "$", "course", ",", "$", "selectedcourse", ")", "{", "$", "text", "=", "$", "course", "->", "get_formatted_name", "(", ")", ";", "$", "attribu...
Renderers a course list item. This function will be called for every course being displayed by course_listing. @param core_course_category $category The currently selected category and the category the course belongs to. @param core_course_list_element $course The course to produce HTML for. @param int $selectedcours...
[ "Renderers", "a", "course", "list", "item", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L601-L647
219,278
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.course_bulk_actions
public function course_bulk_actions(core_course_category $category) { $html = html_writer::start_div('course-bulk-actions bulk-actions'); if ($category->can_move_courses_out_of()) { $html .= html_writer::div(get_string('coursebulkaction'), 'accesshide', array('tabindex' => '0')); ...
php
public function course_bulk_actions(core_course_category $category) { $html = html_writer::start_div('course-bulk-actions bulk-actions'); if ($category->can_move_courses_out_of()) { $html .= html_writer::div(get_string('coursebulkaction'), 'accesshide', array('tabindex' => '0')); ...
[ "public", "function", "course_bulk_actions", "(", "core_course_category", "$", "category", ")", "{", "$", "html", "=", "html_writer", "::", "start_div", "(", "'course-bulk-actions bulk-actions'", ")", ";", "if", "(", "$", "category", "->", "can_move_courses_out_of", ...
Renderers bulk actions that can be performed on courses. @param core_course_category $category The currently selected category and the category in which courses that are selectable belong. @return string
[ "Renderers", "bulk", "actions", "that", "can", "be", "performed", "on", "courses", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L757-L778
219,279
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.course_search_bulk_actions
public function course_search_bulk_actions() { $html = html_writer::start_div('course-bulk-actions bulk-actions'); $html .= html_writer::div(get_string('coursebulkaction'), 'accesshide', array('tabindex' => '0')); $options = core_course_category::make_categories_list('moodle/category:manage'); ...
php
public function course_search_bulk_actions() { $html = html_writer::start_div('course-bulk-actions bulk-actions'); $html .= html_writer::div(get_string('coursebulkaction'), 'accesshide', array('tabindex' => '0')); $options = core_course_category::make_categories_list('moodle/category:manage'); ...
[ "public", "function", "course_search_bulk_actions", "(", ")", "{", "$", "html", "=", "html_writer", "::", "start_div", "(", "'course-bulk-actions bulk-actions'", ")", ";", "$", "html", ".=", "html_writer", "::", "div", "(", "get_string", "(", "'coursebulkaction'", ...
Renderers bulk actions that can be performed on courses in search returns @return string
[ "Renderers", "bulk", "actions", "that", "can", "be", "performed", "on", "courses", "in", "search", "returns" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L785-L804
219,280
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.course_detail
public function course_detail(core_course_list_element $course) { $details = \core_course\management\helper::get_course_detail_array($course); $fullname = $details['fullname']['value']; $html = html_writer::start_div('course-detail card'); $html .= html_writer::start_div('card-header');...
php
public function course_detail(core_course_list_element $course) { $details = \core_course\management\helper::get_course_detail_array($course); $fullname = $details['fullname']['value']; $html = html_writer::start_div('course-detail card'); $html .= html_writer::start_div('card-header');...
[ "public", "function", "course_detail", "(", "core_course_list_element", "$", "course", ")", "{", "$", "details", "=", "\\", "core_course", "\\", "management", "\\", "helper", "::", "get_course_detail_array", "(", "$", "course", ")", ";", "$", "fullname", "=", ...
Renderers detailed course information. @param core_course_list_element $course The course to display details for. @return string
[ "Renderers", "detailed", "course", "information", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L812-L829
219,281
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.detail_pair
protected function detail_pair($key, $value, $class ='') { $html = html_writer::start_div('detail-pair row yui3-g '.preg_replace('#[^a-zA-Z0-9_\-]#', '-', $class)); $html .= html_writer::div(html_writer::span($key), 'pair-key col-md-3 yui3-u-1-4 font-weight-bold'); $html .= html_writer::div(html...
php
protected function detail_pair($key, $value, $class ='') { $html = html_writer::start_div('detail-pair row yui3-g '.preg_replace('#[^a-zA-Z0-9_\-]#', '-', $class)); $html .= html_writer::div(html_writer::span($key), 'pair-key col-md-3 yui3-u-1-4 font-weight-bold'); $html .= html_writer::div(html...
[ "protected", "function", "detail_pair", "(", "$", "key", ",", "$", "value", ",", "$", "class", "=", "''", ")", "{", "$", "html", "=", "html_writer", "::", "start_div", "(", "'detail-pair row yui3-g '", ".", "preg_replace", "(", "'#[^a-zA-Z0-9_\\-]#'", ",", "...
Renderers a key value pair of information for display. @param string $key @param string $value @param string $class @return string
[ "Renderers", "a", "key", "value", "pair", "of", "information", "for", "display", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L839-L845
219,282
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.course_detail_actions
public function course_detail_actions(core_course_list_element $course) { $actions = \core_course\management\helper::get_course_detail_actions($course); if (empty($actions)) { return ''; } $options = array(); foreach ($actions as $action) { $options[] = $t...
php
public function course_detail_actions(core_course_list_element $course) { $actions = \core_course\management\helper::get_course_detail_actions($course); if (empty($actions)) { return ''; } $options = array(); foreach ($actions as $action) { $options[] = $t...
[ "public", "function", "course_detail_actions", "(", "core_course_list_element", "$", "course", ")", "{", "$", "actions", "=", "\\", "core_course", "\\", "management", "\\", "helper", "::", "get_course_detail_actions", "(", "$", "course", ")", ";", "if", "(", "em...
A collection of actions for a course. @param core_course_list_element $course The course to display actions for. @return string
[ "A", "collection", "of", "actions", "for", "a", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L853-L864
219,283
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.grid_start
public function grid_start($id = null, $class = null) { $gridclass = 'grid-start grid-row-r d-flex flex-wrap row'; if (is_null($class)) { $class = $gridclass; } else { $class .= ' ' . $gridclass; } $attributes = array(); if (!is_null($id)) { ...
php
public function grid_start($id = null, $class = null) { $gridclass = 'grid-start grid-row-r d-flex flex-wrap row'; if (is_null($class)) { $class = $gridclass; } else { $class .= ' ' . $gridclass; } $attributes = array(); if (!is_null($id)) { ...
[ "public", "function", "grid_start", "(", "$", "id", "=", "null", ",", "$", "class", "=", "null", ")", "{", "$", "gridclass", "=", "'grid-start grid-row-r d-flex flex-wrap row'", ";", "if", "(", "is_null", "(", "$", "class", ")", ")", "{", "$", "class", "...
Opens a grid. Call {@link core_course_management_renderer::grid_column_start()} to create columns. @param string $id An id to give this grid. @param string $class A class to give this grid. @return string
[ "Opens", "a", "grid", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L907-L919
219,284
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.grid_column_start
public function grid_column_start($size, $id = null, $class = null) { if ($id == 'course-detail') { $size = 12; $bootstrapclass = 'col-md-'.$size; } else { $bootstrapclass = 'd-flex flex-wrap px-3 mb-3'; } $yuigridclass = "col-sm"; if (is_nu...
php
public function grid_column_start($size, $id = null, $class = null) { if ($id == 'course-detail') { $size = 12; $bootstrapclass = 'col-md-'.$size; } else { $bootstrapclass = 'd-flex flex-wrap px-3 mb-3'; } $yuigridclass = "col-sm"; if (is_nu...
[ "public", "function", "grid_column_start", "(", "$", "size", ",", "$", "id", "=", "null", ",", "$", "class", "=", "null", ")", "{", "if", "(", "$", "id", "==", "'course-detail'", ")", "{", "$", "size", "=", "12", ";", "$", "bootstrapclass", "=", "'...
Opens a grid column @param int $size The number of segments this column should span. @param string $id An id to give the column. @param string $class A class to give the column. @return string
[ "Opens", "a", "grid", "column" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L938-L959
219,285
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.action_icon
public function action_icon($url, pix_icon $pixicon, component_action $action = null, array $attributes = null, $linktext = false) { if (!($url instanceof moodle_url)) { $url = new moodle_url($url); } $attributes = (array)$attributes; if (empt...
php
public function action_icon($url, pix_icon $pixicon, component_action $action = null, array $attributes = null, $linktext = false) { if (!($url instanceof moodle_url)) { $url = new moodle_url($url); } $attributes = (array)$attributes; if (empt...
[ "public", "function", "action_icon", "(", "$", "url", ",", "pix_icon", "$", "pixicon", ",", "component_action", "$", "action", "=", "null", ",", "array", "$", "attributes", "=", "null", ",", "$", "linktext", "=", "false", ")", "{", "if", "(", "!", "(",...
Renders an action_icon. This function uses the {@link core_renderer::action_link()} method for the most part. What it does different is prepare the icon as HTML and use it as the link text. @param string|moodle_url $url A string URL or moodel_url @param pix_icon $pixicon @param component_action $action @param array $...
[ "Renders", "an", "action_icon", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L984-L1005
219,286
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.view_mode_selector
public function view_mode_selector(array $modes, $currentmode, moodle_url $url = null, $param = 'view') { if ($url === null) { $url = $this->page->url; } $menu = new action_menu; $menu->attributes['class'] .= ' view-mode-selector vms ml-1'; $selected = null; ...
php
public function view_mode_selector(array $modes, $currentmode, moodle_url $url = null, $param = 'view') { if ($url === null) { $url = $this->page->url; } $menu = new action_menu; $menu->attributes['class'] .= ' view-mode-selector vms ml-1'; $selected = null; ...
[ "public", "function", "view_mode_selector", "(", "array", "$", "modes", ",", "$", "currentmode", ",", "moodle_url", "$", "url", "=", "null", ",", "$", "param", "=", "'view'", ")", "{", "if", "(", "$", "url", "===", "null", ")", "{", "$", "url", "=", ...
Displays a view mode selector. @param array $modes An array of view modes. @param string $currentmode The current view mode. @param moodle_url $url The URL to use when changing actions. Defaults to the page URL. @param string $param The param name. @return string
[ "Displays", "a", "view", "mode", "selector", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L1016-L1051
219,287
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.search_listing
public function search_listing(array $courses, $totalcourses, core_course_list_element $course = null, $page = 0, $perpage = 20, $search = '') { $page = max($page, 0); $perpage = max($perpage, 2); $totalpages = ceil($totalcourses / $perpage); if ($page > $totalpages - 1) { ...
php
public function search_listing(array $courses, $totalcourses, core_course_list_element $course = null, $page = 0, $perpage = 20, $search = '') { $page = max($page, 0); $perpage = max($perpage, 2); $totalpages = ceil($totalcourses / $perpage); if ($page > $totalpages - 1) { ...
[ "public", "function", "search_listing", "(", "array", "$", "courses", ",", "$", "totalcourses", ",", "core_course_list_element", "$", "course", "=", "null", ",", "$", "page", "=", "0", ",", "$", "perpage", "=", "20", ",", "$", "search", "=", "''", ")", ...
Displays a search result listing. @param array $courses The courses to display. @param int $totalcourses The total number of courses to display. @param core_course_list_element $course The currently selected course if there is one. @param int $page The current page, starting at 0. @param int $perpage The number of cou...
[ "Displays", "a", "search", "result", "listing", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L1064-L1099
219,288
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.search_listitem
public function search_listitem(core_course_list_element $course, $selectedcourse) { $text = $course->get_formatted_name(); $attributes = array( 'class' => 'listitem listitem-course list-group-item list-group-item-action', 'data-id' => $course->id, 'data-...
php
public function search_listitem(core_course_list_element $course, $selectedcourse) { $text = $course->get_formatted_name(); $attributes = array( 'class' => 'listitem listitem-course list-group-item list-group-item-action', 'data-id' => $course->id, 'data-...
[ "public", "function", "search_listitem", "(", "core_course_list_element", "$", "course", ",", "$", "selectedcourse", ")", "{", "$", "text", "=", "$", "course", "->", "get_formatted_name", "(", ")", ";", "$", "attributes", "=", "array", "(", "'class'", "=>", ...
Renderers a search result course list item. This function will be called for every course being displayed by course_listing. @param core_course_list_element $course The course to produce HTML for. @param int $selectedcourse The id of the currently selected course. @return string
[ "Renderers", "a", "search", "result", "course", "list", "item", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L1176-L1215
219,289
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.course_search_form
public function course_search_form($value = '', $format = 'plain') { static $count = 0; $formid = 'coursesearch'; if ((++$count) > 1) { $formid .= $count; } switch ($format) { case 'navbar' : $formid = 'coursesearchnavbar'; ...
php
public function course_search_form($value = '', $format = 'plain') { static $count = 0; $formid = 'coursesearch'; if ((++$count) > 1) { $formid .= $count; } switch ($format) { case 'navbar' : $formid = 'coursesearchnavbar'; ...
[ "public", "function", "course_search_form", "(", "$", "value", "=", "''", ",", "$", "format", "=", "'plain'", ")", "{", "static", "$", "count", "=", "0", ";", "$", "formid", "=", "'coursesearch'", ";", "if", "(", "(", "++", "$", "count", ")", ">", ...
Renders html to display a course search form @param string $value default value to populate the search field @param string $format display format - 'plain' (default), 'short' or 'navbar' @return string
[ "Renders", "html", "to", "display", "a", "course", "search", "form" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L1277-L1324
219,290
moodle/moodle
course/classes/management_renderer.php
core_course_management_renderer.accessible_skipto_links
public function accessible_skipto_links($displaycategorylisting, $displaycourselisting, $displaycoursedetail) { $html = html_writer::start_div('skiplinks accesshide'); $url = new moodle_url($this->page->url); if ($displaycategorylisting) { $url->set_anchor('category-listing'); ...
php
public function accessible_skipto_links($displaycategorylisting, $displaycourselisting, $displaycoursedetail) { $html = html_writer::start_div('skiplinks accesshide'); $url = new moodle_url($this->page->url); if ($displaycategorylisting) { $url->set_anchor('category-listing'); ...
[ "public", "function", "accessible_skipto_links", "(", "$", "displaycategorylisting", ",", "$", "displaycourselisting", ",", "$", "displaycoursedetail", ")", "{", "$", "html", "=", "html_writer", "::", "start_div", "(", "'skiplinks accesshide'", ")", ";", "$", "url",...
Creates access hidden skip to links for the displayed sections. @param bool $displaycategorylisting @param bool $displaycourselisting @param bool $displaycoursedetail @return string
[ "Creates", "access", "hidden", "skip", "to", "links", "for", "the", "displayed", "sections", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/classes/management_renderer.php#L1334-L1351
219,291
moodle/moodle
lib/spout/src/Spout/Writer/ODS/Internal/Worksheet.php
Worksheet.getTableElementStartAsString
public function getTableElementStartAsString() { $escapedSheetName = $this->stringsEscaper->escape($this->externalSheet->getName()); $tableStyleName = 'ta' . ($this->externalSheet->getIndex() + 1); $tableElement = '<table:table table:style-name="' . $tableStyleName . '" table:name="' . $es...
php
public function getTableElementStartAsString() { $escapedSheetName = $this->stringsEscaper->escape($this->externalSheet->getName()); $tableStyleName = 'ta' . ($this->externalSheet->getIndex() + 1); $tableElement = '<table:table table:style-name="' . $tableStyleName . '" table:name="' . $es...
[ "public", "function", "getTableElementStartAsString", "(", ")", "{", "$", "escapedSheetName", "=", "$", "this", "->", "stringsEscaper", "->", "escape", "(", "$", "this", "->", "externalSheet", "->", "getName", "(", ")", ")", ";", "$", "tableStyleName", "=", ...
Returns the table XML root node as string. @return string <table> node as string
[ "Returns", "the", "table", "XML", "root", "node", "as", "string", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Internal/Worksheet.php#L98-L107
219,292
moodle/moodle
lib/spout/src/Spout/Writer/ODS/Internal/Worksheet.php
Worksheet.getCellXML
protected function getCellXML($cellValue, $styleIndex, $numTimesValueRepeated) { $data = '<table:table-cell table:style-name="ce' . $styleIndex . '"'; if ($numTimesValueRepeated !== 1) { $data .= ' table:number-columns-repeated="' . $numTimesValueRepeated . '"'; } if (C...
php
protected function getCellXML($cellValue, $styleIndex, $numTimesValueRepeated) { $data = '<table:table-cell table:style-name="ce' . $styleIndex . '"'; if ($numTimesValueRepeated !== 1) { $data .= ' table:number-columns-repeated="' . $numTimesValueRepeated . '"'; } if (C...
[ "protected", "function", "getCellXML", "(", "$", "cellValue", ",", "$", "styleIndex", ",", "$", "numTimesValueRepeated", ")", "{", "$", "data", "=", "'<table:table-cell table:style-name=\"ce'", ".", "$", "styleIndex", ".", "'\"'", ";", "if", "(", "$", "numTimesV...
Returns the cell XML content, given its value. @param mixed $cellValue The value to be written @param int $styleIndex Index of the used style @param int $numTimesValueRepeated Number of times the value is consecutively repeated @return string The cell XML content @throws \Box\Spout\Common\Exception\InvalidArgumentExce...
[ "Returns", "the", "cell", "XML", "content", "given", "its", "value", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Internal/Worksheet.php#L186-L218
219,293
moodle/moodle
admin/tool/dataprivacy/classes/output/renderer.php
renderer.render_my_data_requests_page
public function render_my_data_requests_page(my_data_requests_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/my_data_requests', $data); }
php
public function render_my_data_requests_page(my_data_requests_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/my_data_requests', $data); }
[ "public", "function", "render_my_data_requests_page", "(", "my_data_requests_page", "$", "page", ")", "{", "$", "data", "=", "$", "page", "->", "export_for_template", "(", "$", "this", ")", ";", "return", "parent", "::", "render_from_template", "(", "'tool_datapri...
Render the user's data requests page. @param my_data_requests_page $page @return string html for the page @throws moodle_exception
[ "Render", "the", "user", "s", "data", "requests", "page", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/renderer.php#L50-L53
219,294
moodle/moodle
admin/tool/dataprivacy/classes/output/renderer.php
renderer.render_data_requests_page
public function render_data_requests_page(data_requests_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_requests', $data); }
php
public function render_data_requests_page(data_requests_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_requests', $data); }
[ "public", "function", "render_data_requests_page", "(", "data_requests_page", "$", "page", ")", "{", "$", "data", "=", "$", "page", "->", "export_for_template", "(", "$", "this", ")", ";", "return", "parent", "::", "render_from_template", "(", "'tool_dataprivacy/d...
Render the data requests page for the DPO. @param data_requests_page $page @return string html for the page @throws moodle_exception
[ "Render", "the", "data", "requests", "page", "for", "the", "DPO", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/renderer.php#L78-L81
219,295
moodle/moodle
admin/tool/dataprivacy/classes/output/renderer.php
renderer.render_data_registry_page
public function render_data_registry_page(data_registry_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_registry', $data); }
php
public function render_data_registry_page(data_registry_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_registry', $data); }
[ "public", "function", "render_data_registry_page", "(", "data_registry_page", "$", "page", ")", "{", "$", "data", "=", "$", "page", "->", "export_for_template", "(", "$", "this", ")", ";", "return", "parent", "::", "render_from_template", "(", "'tool_dataprivacy/d...
Render the data registry. @param data_registry_page $page @return string html for the page @throws moodle_exception
[ "Render", "the", "data", "registry", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/renderer.php#L90-L93
219,296
moodle/moodle
admin/tool/dataprivacy/classes/output/renderer.php
renderer.render_data_registry_compliance_page
public function render_data_registry_compliance_page(data_registry_compliance_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_registry_compliance', $data); }
php
public function render_data_registry_compliance_page(data_registry_compliance_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_registry_compliance', $data); }
[ "public", "function", "render_data_registry_compliance_page", "(", "data_registry_compliance_page", "$", "page", ")", "{", "$", "data", "=", "$", "page", "->", "export_for_template", "(", "$", "this", ")", ";", "return", "parent", "::", "render_from_template", "(", ...
Render the data compliance registry. @param data_registry_compliance_page $page @return string html for the page @throws moodle_exception
[ "Render", "the", "data", "compliance", "registry", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/renderer.php#L102-L105
219,297
moodle/moodle
admin/tool/dataprivacy/classes/output/renderer.php
renderer.render_purposes
public function render_purposes(purposes $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/purposes', $data); }
php
public function render_purposes(purposes $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/purposes', $data); }
[ "public", "function", "render_purposes", "(", "purposes", "$", "page", ")", "{", "$", "data", "=", "$", "page", "->", "export_for_template", "(", "$", "this", ")", ";", "return", "parent", "::", "render_from_template", "(", "'tool_dataprivacy/purposes'", ",", ...
Render the purposes management page. @param purposes $page @return string html for the page @throws moodle_exception
[ "Render", "the", "purposes", "management", "page", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/renderer.php#L114-L117
219,298
moodle/moodle
admin/tool/dataprivacy/classes/output/renderer.php
renderer.render_categories
public function render_categories(categories $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/categories', $data); }
php
public function render_categories(categories $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/categories', $data); }
[ "public", "function", "render_categories", "(", "categories", "$", "page", ")", "{", "$", "data", "=", "$", "page", "->", "export_for_template", "(", "$", "this", ")", ";", "return", "parent", "::", "render_from_template", "(", "'tool_dataprivacy/categories'", "...
Render the categories management page. @param categories $page @return string html for the page @throws moodle_exception
[ "Render", "the", "categories", "management", "page", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/renderer.php#L126-L129
219,299
moodle/moodle
admin/tool/dataprivacy/classes/output/renderer.php
renderer.render_data_deletion_page
public function render_data_deletion_page(data_deletion_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_deletion', $data); }
php
public function render_data_deletion_page(data_deletion_page $page) { $data = $page->export_for_template($this); return parent::render_from_template('tool_dataprivacy/data_deletion', $data); }
[ "public", "function", "render_data_deletion_page", "(", "data_deletion_page", "$", "page", ")", "{", "$", "data", "=", "$", "page", "->", "export_for_template", "(", "$", "this", ")", ";", "return", "parent", "::", "render_from_template", "(", "'tool_dataprivacy/d...
Render the review page for the deletion of expired contexts. @param data_deletion_page $page @return string html for the page @throws moodle_exception
[ "Render", "the", "review", "page", "for", "the", "deletion", "of", "expired", "contexts", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/renderer.php#L138-L141