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
217,300
moodle/moodle
competency/classes/api.php
api.list_evidence_in_course
public static function list_evidence_in_course($userid = 0, $courseid = 0, $competencyid = 0, $sort = 'timecreated', $order = 'DESC', $skip = 0, $limit = 0) { static::require_enabled(); if (!user_competency::can_read_user_in_course($userid, $courseid))...
php
public static function list_evidence_in_course($userid = 0, $courseid = 0, $competencyid = 0, $sort = 'timecreated', $order = 'DESC', $skip = 0, $limit = 0) { static::require_enabled(); if (!user_competency::can_read_user_in_course($userid, $courseid))...
[ "public", "static", "function", "list_evidence_in_course", "(", "$", "userid", "=", "0", ",", "$", "courseid", "=", "0", ",", "$", "competencyid", "=", "0", ",", "$", "sort", "=", "'timecreated'", ",", "$", "order", "=", "'DESC'", ",", "$", "skip", "="...
List all the evidence for a user competency in a course. @param int $userid The user ID. @param int $courseid The course ID. @param int $competencyid The competency ID. @param string $sort The field to sort the evidence by. @param string $order The ordering of the sorting. @param int $skip Number of records to skip. @...
[ "List", "all", "the", "evidence", "for", "a", "user", "competency", "in", "a", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4213-L4229
217,301
moodle/moodle
competency/classes/api.php
api.read_evidence
public static function read_evidence($evidenceid) { static::require_enabled(); $evidence = new evidence($evidenceid); $uc = new user_competency($evidence->get('usercompetencyid')); if (!$uc->can_read()) { throw new required_capability_exception($uc->get_context(), 'moodle/co...
php
public static function read_evidence($evidenceid) { static::require_enabled(); $evidence = new evidence($evidenceid); $uc = new user_competency($evidence->get('usercompetencyid')); if (!$uc->can_read()) { throw new required_capability_exception($uc->get_context(), 'moodle/co...
[ "public", "static", "function", "read_evidence", "(", "$", "evidenceid", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "$", "evidence", "=", "new", "evidence", "(", "$", "evidenceid", ")", ";", "$", "uc", "=", "new", "user_competency", "(", ...
Read an evidence. @param int $evidenceid The evidence ID. @return evidence
[ "Read", "an", "evidence", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4487-L4498
217,302
moodle/moodle
competency/classes/api.php
api.delete_evidence
public static function delete_evidence($evidenceorid) { $evidence = $evidenceorid; if (!is_object($evidence)) { $evidence = new evidence($evidenceorid); } $uc = new user_competency($evidence->get('usercompetencyid')); if (!evidence::can_delete_user($uc->get('userid')...
php
public static function delete_evidence($evidenceorid) { $evidence = $evidenceorid; if (!is_object($evidence)) { $evidence = new evidence($evidenceorid); } $uc = new user_competency($evidence->get('usercompetencyid')); if (!evidence::can_delete_user($uc->get('userid')...
[ "public", "static", "function", "delete_evidence", "(", "$", "evidenceorid", ")", "{", "$", "evidence", "=", "$", "evidenceorid", ";", "if", "(", "!", "is_object", "(", "$", "evidence", ")", ")", "{", "$", "evidence", "=", "new", "evidence", "(", "$", ...
Delete an evidence. @param evidence|int $evidenceorid The evidence, or its ID. @return bool
[ "Delete", "an", "evidence", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4506-L4518
217,303
moodle/moodle
competency/classes/api.php
api.apply_competency_rules_from_usercompetency
protected static function apply_competency_rules_from_usercompetency(user_competency $usercompetency, competency $competency = null) { // Perform some basic checks. if (!$usercompetency->get('proficiency')) { throw new...
php
protected static function apply_competency_rules_from_usercompetency(user_competency $usercompetency, competency $competency = null) { // Perform some basic checks. if (!$usercompetency->get('proficiency')) { throw new...
[ "protected", "static", "function", "apply_competency_rules_from_usercompetency", "(", "user_competency", "$", "usercompetency", ",", "competency", "$", "competency", "=", "null", ")", "{", "// Perform some basic checks.", "if", "(", "!", "$", "usercompetency", "->", "ge...
Apply the competency rules from a user competency. The user competency passed should be one that was recently marked as complete. A user competency is considered 'complete' when it's proficiency value is true. This method will check if the parent of this usercompetency's competency has any rules and if so will see if...
[ "Apply", "the", "competency", "rules", "from", "a", "user", "competency", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4534-L4604
217,304
moodle/moodle
competency/classes/api.php
api.observe_course_module_completion_updated
public static function observe_course_module_completion_updated(\core\event\course_module_completion_updated $event) { if (!static::is_enabled()) { return; } $eventdata = $event->get_record_snapshot('course_modules_completion', $event->objectid); if ($eventdata->completions...
php
public static function observe_course_module_completion_updated(\core\event\course_module_completion_updated $event) { if (!static::is_enabled()) { return; } $eventdata = $event->get_record_snapshot('course_modules_completion', $event->objectid); if ($eventdata->completions...
[ "public", "static", "function", "observe_course_module_completion_updated", "(", "\\", "core", "\\", "event", "\\", "course_module_completion_updated", "$", "event", ")", "{", "if", "(", "!", "static", "::", "is_enabled", "(", ")", ")", "{", "return", ";", "}", ...
Observe when a course module is marked as completed. Note that the user being logged in while this happens may be anyone. Do not rely on capability checks here! @param \core\event\course_module_completion_updated $event @return void
[ "Observe", "when", "a", "course", "module", "is", "marked", "as", "completed", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4615-L4665
217,305
moodle/moodle
competency/classes/api.php
api.observe_course_completed
public static function observe_course_completed(\core\event\course_completed $event) { if (!static::is_enabled()) { return; } $sql = 'courseid = :courseid AND ruleoutcome != :nooutcome'; $params = array( 'courseid' => $event->courseid, 'nooutcome' => ...
php
public static function observe_course_completed(\core\event\course_completed $event) { if (!static::is_enabled()) { return; } $sql = 'courseid = :courseid AND ruleoutcome != :nooutcome'; $params = array( 'courseid' => $event->courseid, 'nooutcome' => ...
[ "public", "static", "function", "observe_course_completed", "(", "\\", "core", "\\", "event", "\\", "course_completed", "$", "event", ")", "{", "if", "(", "!", "static", "::", "is_enabled", "(", ")", ")", "{", "return", ";", "}", "$", "sql", "=", "'cours...
Observe when a course is marked as completed. Note that the user being logged in while this happens may be anyone. Do not rely on capability checks here! @param \core\event\course_completed $event @return void
[ "Observe", "when", "a", "course", "is", "marked", "as", "completed", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4676-L4724
217,306
moodle/moodle
competency/classes/api.php
api.hook_course_module_deleted
public static function hook_course_module_deleted(stdClass $cm) { global $DB; $DB->delete_records(course_module_competency::TABLE, array('cmid' => $cm->id)); }
php
public static function hook_course_module_deleted(stdClass $cm) { global $DB; $DB->delete_records(course_module_competency::TABLE, array('cmid' => $cm->id)); }
[ "public", "static", "function", "hook_course_module_deleted", "(", "stdClass", "$", "cm", ")", "{", "global", "$", "DB", ";", "$", "DB", "->", "delete_records", "(", "course_module_competency", "::", "TABLE", ",", "array", "(", "'cmid'", "=>", "$", "cm", "->...
Action to perform when a course module is deleted. Do not call this directly, this is reserved for core use. @param stdClass $cm The CM object. @return void
[ "Action", "to", "perform", "when", "a", "course", "module", "is", "deleted", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4734-L4737
217,307
moodle/moodle
competency/classes/api.php
api.hook_course_deleted
public static function hook_course_deleted(stdClass $course) { global $DB; $DB->delete_records(course_competency::TABLE, array('courseid' => $course->id)); $DB->delete_records(course_competency_settings::TABLE, array('courseid' => $course->id)); $DB->delete_records(user_competency_course...
php
public static function hook_course_deleted(stdClass $course) { global $DB; $DB->delete_records(course_competency::TABLE, array('courseid' => $course->id)); $DB->delete_records(course_competency_settings::TABLE, array('courseid' => $course->id)); $DB->delete_records(user_competency_course...
[ "public", "static", "function", "hook_course_deleted", "(", "stdClass", "$", "course", ")", "{", "global", "$", "DB", ";", "$", "DB", "->", "delete_records", "(", "course_competency", "::", "TABLE", ",", "array", "(", "'courseid'", "=>", "$", "course", "->",...
Action to perform when a course is deleted. Do not call this directly, this is reserved for core use. @param stdClass $course The course object. @return void
[ "Action", "to", "perform", "when", "a", "course", "is", "deleted", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4747-L4752
217,308
moodle/moodle
competency/classes/api.php
api.hook_cohort_deleted
public static function hook_cohort_deleted(\stdClass $cohort) { global $DB; $DB->delete_records(template_cohort::TABLE, array('cohortid' => $cohort->id)); }
php
public static function hook_cohort_deleted(\stdClass $cohort) { global $DB; $DB->delete_records(template_cohort::TABLE, array('cohortid' => $cohort->id)); }
[ "public", "static", "function", "hook_cohort_deleted", "(", "\\", "stdClass", "$", "cohort", ")", "{", "global", "$", "DB", ";", "$", "DB", "->", "delete_records", "(", "template_cohort", "::", "TABLE", ",", "array", "(", "'cohortid'", "=>", "$", "cohort", ...
Action to perform when a cohort is deleted. Do not call this directly, this is reserved for core use. @param \stdClass $cohort The cohort object. @return void
[ "Action", "to", "perform", "when", "a", "cohort", "is", "deleted", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4775-L4778
217,309
moodle/moodle
competency/classes/api.php
api.grade_competency
public static function grade_competency($userid, $competencyid, $grade, $note = null) { global $USER; static::require_enabled(); $uc = static::get_user_competency($userid, $competencyid); $context = $uc->get_context(); if (!user_competency::can_grade_user($uc->get('userid'))) { ...
php
public static function grade_competency($userid, $competencyid, $grade, $note = null) { global $USER; static::require_enabled(); $uc = static::get_user_competency($userid, $competencyid); $context = $uc->get_context(); if (!user_competency::can_grade_user($uc->get('userid'))) { ...
[ "public", "static", "function", "grade_competency", "(", "$", "userid", ",", "$", "competencyid", ",", "$", "grade", ",", "$", "note", "=", "null", ")", "{", "global", "$", "USER", ";", "static", "::", "require_enabled", "(", ")", ";", "$", "uc", "=", ...
Manually grade a user competency. @param int $userid @param int $competencyid @param int $grade @param string $note A note to attach to the evidence @return array of \core_competency\user_competency
[ "Manually", "grade", "a", "user", "competency", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4789-L4828
217,310
moodle/moodle
competency/classes/api.php
api.grade_competency_in_plan
public static function grade_competency_in_plan($planorid, $competencyid, $grade, $note = null) { global $USER; static::require_enabled(); $plan = $planorid; if (!is_object($planorid)) { $plan = new plan($planorid); } $context = $plan->get_context(); ...
php
public static function grade_competency_in_plan($planorid, $competencyid, $grade, $note = null) { global $USER; static::require_enabled(); $plan = $planorid; if (!is_object($planorid)) { $plan = new plan($planorid); } $context = $plan->get_context(); ...
[ "public", "static", "function", "grade_competency_in_plan", "(", "$", "planorid", ",", "$", "competencyid", ",", "$", "grade", ",", "$", "note", "=", "null", ")", "{", "global", "$", "USER", ";", "static", "::", "require_enabled", "(", ")", ";", "$", "pl...
Manually grade a user competency from the plans page. @param mixed $planorid @param int $competencyid @param int $grade @param string $note A note to attach to the evidence @return array of \core_competency\user_competency
[ "Manually", "grade", "a", "user", "competency", "from", "the", "plans", "page", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4839-L4882
217,311
moodle/moodle
competency/classes/api.php
api.grade_competency_in_course
public static function grade_competency_in_course($courseorid, $userid, $competencyid, $grade, $note = null) { global $USER, $DB; static::require_enabled(); $course = $courseorid; if (!is_object($courseorid)) { $course = $DB->get_record('course', array('id' => $courseorid));...
php
public static function grade_competency_in_course($courseorid, $userid, $competencyid, $grade, $note = null) { global $USER, $DB; static::require_enabled(); $course = $courseorid; if (!is_object($courseorid)) { $course = $DB->get_record('course', array('id' => $courseorid));...
[ "public", "static", "function", "grade_competency_in_course", "(", "$", "courseorid", ",", "$", "userid", ",", "$", "competencyid", ",", "$", "grade", ",", "$", "note", "=", "null", ")", "{", "global", "$", "USER", ",", "$", "DB", ";", "static", "::", ...
Manually grade a user course competency from the course page. This may push the rating to the user competency if the course is configured this way. @param mixed $courseorid @param int $userid @param int $competencyid @param int $grade @param string $note A note to attach to the evidence @return array of \core_compete...
[ "Manually", "grade", "a", "user", "course", "competency", "from", "the", "course", "page", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4897-L4952
217,312
moodle/moodle
competency/classes/api.php
api.count_plans_for_template
public static function count_plans_for_template($templateorid, $status = 0) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. if (!$template->can_rea...
php
public static function count_plans_for_template($templateorid, $status = 0) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. if (!$template->can_rea...
[ "public", "static", "function", "count_plans_for_template", "(", "$", "templateorid", ",", "$", "status", "=", "0", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "$", "template", "=", "$", "templateorid", ";", "if", "(", "!", "is_object", "("...
Count the plans in the template, filtered by status. Requires moodle/competency:templateview capability at the system context. @param mixed $templateorid The id or the template. @param int $status One of the plan status constants (or 0 for all plans). @return int
[ "Count", "the", "plans", "in", "the", "template", "filtered", "by", "status", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4963-L4977
217,313
moodle/moodle
competency/classes/api.php
api.count_user_competency_plans_for_template
public static function count_user_competency_plans_for_template($templateorid, $proficiency = null) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. ...
php
public static function count_user_competency_plans_for_template($templateorid, $proficiency = null) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. ...
[ "public", "static", "function", "count_user_competency_plans_for_template", "(", "$", "templateorid", ",", "$", "proficiency", "=", "null", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "$", "template", "=", "$", "templateorid", ";", "if", "(", "...
Count the user-completency-plans in the template, optionally filtered by proficiency. Requires moodle/competency:templateview capability at the system context. @param mixed $templateorid The id or the template. @param mixed $proficiency If true, filter by proficiency, if false filter by not proficient, if null - no f...
[ "Count", "the", "user", "-", "completency", "-", "plans", "in", "the", "template", "optionally", "filtered", "by", "proficiency", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L4988-L5002
217,314
moodle/moodle
competency/classes/api.php
api.list_plans_for_template
public static function list_plans_for_template($templateorid, $status = 0, $skip = 0, $limit = 100) { $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. if (!$template->can_read()) { ...
php
public static function list_plans_for_template($templateorid, $status = 0, $skip = 0, $limit = 100) { $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. if (!$template->can_read()) { ...
[ "public", "static", "function", "list_plans_for_template", "(", "$", "templateorid", ",", "$", "status", "=", "0", ",", "$", "skip", "=", "0", ",", "$", "limit", "=", "100", ")", "{", "$", "template", "=", "$", "templateorid", ";", "if", "(", "!", "i...
List the plans in the template, filtered by status. Requires moodle/competency:templateview capability at the system context. @param mixed $templateorid The id or the template. @param int $status One of the plan status constants (or 0 for all plans). @param int $skip The number of records to skip @param int $limit Th...
[ "List", "the", "plans", "in", "the", "template", "filtered", "by", "status", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L5015-L5028
217,315
moodle/moodle
competency/classes/api.php
api.get_least_proficient_competencies_for_course
public static function get_least_proficient_competencies_for_course($courseid, $skip = 0, $limit = 100) { static::require_enabled(); $coursecontext = context_course::instance($courseid); if (!has_any_capability(array('moodle/competency:coursecompetencyview', 'moodle/competency:coursecompetencym...
php
public static function get_least_proficient_competencies_for_course($courseid, $skip = 0, $limit = 100) { static::require_enabled(); $coursecontext = context_course::instance($courseid); if (!has_any_capability(array('moodle/competency:coursecompetencyview', 'moodle/competency:coursecompetencym...
[ "public", "static", "function", "get_least_proficient_competencies_for_course", "(", "$", "courseid", ",", "$", "skip", "=", "0", ",", "$", "limit", "=", "100", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "$", "coursecontext", "=", "context_cou...
Get the most often not completed competency for this course. Requires moodle/competency:coursecompetencyview capability at the course context. @param int $courseid The course id @param int $skip The number of records to skip @param int $limit The max number of records to return @return competency[]
[ "Get", "the", "most", "often", "not", "completed", "competency", "for", "this", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L5040-L5050
217,316
moodle/moodle
competency/classes/api.php
api.get_least_proficient_competencies_for_template
public static function get_least_proficient_competencies_for_template($templateorid, $skip = 0, $limit = 100) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions chec...
php
public static function get_least_proficient_competencies_for_template($templateorid, $skip = 0, $limit = 100) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions chec...
[ "public", "static", "function", "get_least_proficient_competencies_for_template", "(", "$", "templateorid", ",", "$", "skip", "=", "0", ",", "$", "limit", "=", "100", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "$", "template", "=", "$", "tem...
Get the most often not completed competency for this template. Requires moodle/competency:templateview capability at the system context. @param mixed $templateorid The id or the template. @param int $skip The number of records to skip @param int $limit The max number of records to return @return competency[]
[ "Get", "the", "most", "often", "not", "completed", "competency", "for", "this", "template", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L5062-L5076
217,317
moodle/moodle
competency/classes/api.php
api.template_viewed
public static function template_viewed($templateorid) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. if (!$template->can_read()) { thr...
php
public static function template_viewed($templateorid) { static::require_enabled(); $template = $templateorid; if (!is_object($template)) { $template = new template($template); } // First we do a permissions check. if (!$template->can_read()) { thr...
[ "public", "static", "function", "template_viewed", "(", "$", "templateorid", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "$", "template", "=", "$", "templateorid", ";", "if", "(", "!", "is_object", "(", "$", "template", ")", ")", "{", "$"...
Template event viewed. Requires moodle/competency:templateview capability at the system context. @param mixed $templateorid The id or the template. @return boolean
[ "Template", "event", "viewed", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L5086-L5103
217,318
moodle/moodle
competency/classes/api.php
api.read_course_competency_settings
public static function read_course_competency_settings($courseid) { static::require_enabled(); // First we do a permissions check. if (!course_competency_settings::can_read($courseid)) { $context = context_course::instance($courseid); throw new required_capability_except...
php
public static function read_course_competency_settings($courseid) { static::require_enabled(); // First we do a permissions check. if (!course_competency_settings::can_read($courseid)) { $context = context_course::instance($courseid); throw new required_capability_except...
[ "public", "static", "function", "read_course_competency_settings", "(", "$", "courseid", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "// First we do a permissions check.", "if", "(", "!", "course_competency_settings", "::", "can_read", "(", "$", "cours...
Get the competency settings for a course. Requires moodle/competency:coursecompetencyview capability at the course context. @param int $courseid The course id @return course_competency_settings
[ "Get", "the", "competency", "settings", "for", "a", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L5113-L5123
217,319
moodle/moodle
competency/classes/api.php
api.update_course_competency_settings
public static function update_course_competency_settings($courseid, $settings) { static::require_enabled(); $settings = (object) $settings; // Get all the valid settings. $pushratingstouserplans = isset($settings->pushratingstouserplans) ? $settings->pushratingstouserplans : false; ...
php
public static function update_course_competency_settings($courseid, $settings) { static::require_enabled(); $settings = (object) $settings; // Get all the valid settings. $pushratingstouserplans = isset($settings->pushratingstouserplans) ? $settings->pushratingstouserplans : false; ...
[ "public", "static", "function", "update_course_competency_settings", "(", "$", "courseid", ",", "$", "settings", ")", "{", "static", "::", "require_enabled", "(", ")", ";", "$", "settings", "=", "(", "object", ")", "$", "settings", ";", "// Get all the valid set...
Update the competency settings for a course. Requires moodle/competency:coursecompetencyconfigure capability at the course context. @param int $courseid The course id @param stdClass $settings List of settings. The only valid setting ATM is pushratginstouserplans (boolean). @return bool
[ "Update", "the", "competency", "settings", "for", "a", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/competency/classes/api.php#L5134-L5161
217,320
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.progress_bar
public function progress_bar(array $items) { foreach ($items as &$item) { $text = $item['text']; unset($item['text']); if (array_key_exists('link', $item)) { $link = $item['link']; unset($item['link']); $item = html_writer::link...
php
public function progress_bar(array $items) { foreach ($items as &$item) { $text = $item['text']; unset($item['text']); if (array_key_exists('link', $item)) { $link = $item['link']; unset($item['link']); $item = html_writer::link...
[ "public", "function", "progress_bar", "(", "array", "$", "items", ")", "{", "foreach", "(", "$", "items", "as", "&", "$", "item", ")", "{", "$", "text", "=", "$", "item", "[", "'text'", "]", ";", "unset", "(", "$", "item", "[", "'text'", "]", ")"...
Renderers a progress bar for the backup or restore given the items that make it up. @param array $items An array of items @return string
[ "Renderers", "a", "progress", "bar", "for", "the", "backup", "or", "restore", "given", "the", "items", "that", "make", "it", "up", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L52-L65
217,321
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.backup_details_nonstandard
public function backup_details_nonstandard($nextstageurl, array $details) { $html = html_writer::start_tag('div', array('class' => 'backup-restore nonstandardformat')); $html .= html_writer::start_tag('div', array('class' => 'backup-section')); $html .= $this->output->heading(get_string('backu...
php
public function backup_details_nonstandard($nextstageurl, array $details) { $html = html_writer::start_tag('div', array('class' => 'backup-restore nonstandardformat')); $html .= html_writer::start_tag('div', array('class' => 'backup-section')); $html .= $this->output->heading(get_string('backu...
[ "public", "function", "backup_details_nonstandard", "(", "$", "nextstageurl", ",", "array", "$", "details", ")", "{", "$", "html", "=", "html_writer", "::", "start_tag", "(", "'div'", ",", "array", "(", "'class'", "=>", "'backup-restore nonstandardformat'", ")", ...
Displays the general information about a backup file with non-standard format @param moodle_url $nextstageurl URL to send user to @param array $details basic info about the file (format, type) @return string HTML code to display
[ "Displays", "the", "general", "information", "about", "a", "backup", "file", "with", "non", "-", "standard", "format" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L209-L226
217,322
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.backup_details_unknown
public function backup_details_unknown(moodle_url $nextstageurl) { $html = html_writer::start_div('unknownformat'); $html .= $this->output->heading(get_string('errorinvalidformat', 'backup'), 2); $html .= $this->output->notification(get_string('errorinvalidformatinfo', 'backup'), 'notifyproble...
php
public function backup_details_unknown(moodle_url $nextstageurl) { $html = html_writer::start_div('unknownformat'); $html .= $this->output->heading(get_string('errorinvalidformat', 'backup'), 2); $html .= $this->output->notification(get_string('errorinvalidformatinfo', 'backup'), 'notifyproble...
[ "public", "function", "backup_details_unknown", "(", "moodle_url", "$", "nextstageurl", ")", "{", "$", "html", "=", "html_writer", "::", "start_div", "(", "'unknownformat'", ")", ";", "$", "html", ".=", "$", "this", "->", "output", "->", "heading", "(", "get...
Displays the general information about a backup file with unknown format @param moodle_url $nextstageurl URL to send user to @return string HTML code to display
[ "Displays", "the", "general", "information", "about", "a", "backup", "file", "with", "unknown", "format" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L234-L243
217,323
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.import_course_selector
public function import_course_selector(moodle_url $nextstageurl, import_course_search $courses = null) { $html = html_writer::start_tag('div', array('class' => 'import-course-selector backup-restore')); $html .= html_writer::start_tag('form', array('method' => 'post', 'action' => $nextstageurl->out_omi...
php
public function import_course_selector(moodle_url $nextstageurl, import_course_search $courses = null) { $html = html_writer::start_tag('div', array('class' => 'import-course-selector backup-restore')); $html .= html_writer::start_tag('form', array('method' => 'post', 'action' => $nextstageurl->out_omi...
[ "public", "function", "import_course_selector", "(", "moodle_url", "$", "nextstageurl", ",", "import_course_search", "$", "courses", "=", "null", ")", "{", "$", "html", "=", "html_writer", "::", "start_tag", "(", "'div'", ",", "array", "(", "'class'", "=>", "'...
Displays the import course selector @param moodle_url $nextstageurl @param import_course_search $courses @return string
[ "Displays", "the", "import", "course", "selector" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L372-L389
217,324
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.backup_detail_input
protected function backup_detail_input($label, $type, $name, $value, array $attributes = array(), $description = null) { if (!empty($description)) { $description = html_writer::tag('span', $description, array('class' => 'description')); } else { $description = ''; } ...
php
protected function backup_detail_input($label, $type, $name, $value, array $attributes = array(), $description = null) { if (!empty($description)) { $description = html_writer::tag('span', $description, array('class' => 'description')); } else { $description = ''; } ...
[ "protected", "function", "backup_detail_input", "(", "$", "label", ",", "$", "type", ",", "$", "name", ",", "$", "value", ",", "array", "$", "attributes", "=", "array", "(", ")", ",", "$", "description", "=", "null", ")", "{", "if", "(", "!", "empty"...
Created a detailed pairing with an input @param string $label @param string $type @param string $name @param string $value @param array $attributes @param string|null $description @return string
[ "Created", "a", "detailed", "pairing", "with", "an", "input" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L420-L430
217,325
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.backup_detail_select
protected function backup_detail_select($label, $name, $options, $selected = '', $nothing = false, array $attributes = array(), $description = null) { if (!empty ($description)) { $description = html_writer::tag('span', $description, array('class' => 'description')); } else { $de...
php
protected function backup_detail_select($label, $name, $options, $selected = '', $nothing = false, array $attributes = array(), $description = null) { if (!empty ($description)) { $description = html_writer::tag('span', $description, array('class' => 'description')); } else { $de...
[ "protected", "function", "backup_detail_select", "(", "$", "label", ",", "$", "name", ",", "$", "options", ",", "$", "selected", "=", "''", ",", "$", "nothing", "=", "false", ",", "array", "$", "attributes", "=", "array", "(", ")", ",", "$", "descripti...
Creates a detailed pairing with a select @param string $label @param string $name @param array $options @param string $selected @param bool $nothing @param array $attributes @param string|null $description @return string
[ "Creates", "a", "detailed", "pairing", "with", "a", "select" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L444-L451
217,326
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.precheck_notices
public function precheck_notices($results) { $output = html_writer::start_tag('div', array('class' => 'restore-precheck-notices')); if (array_key_exists('errors', $results)) { foreach ($results['errors'] as $error) { $output .= $this->output->notification($error); ...
php
public function precheck_notices($results) { $output = html_writer::start_tag('div', array('class' => 'restore-precheck-notices')); if (array_key_exists('errors', $results)) { foreach ($results['errors'] as $error) { $output .= $this->output->notification($error); ...
[ "public", "function", "precheck_notices", "(", "$", "results", ")", "{", "$", "output", "=", "html_writer", "::", "start_tag", "(", "'div'", ",", "array", "(", "'class'", "=>", "'restore-precheck-notices'", ")", ")", ";", "if", "(", "array_key_exists", "(", ...
Displays precheck notices @param array $results @return string
[ "Displays", "precheck", "notices" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L459-L472
217,327
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.substage_buttons
public function substage_buttons($haserrors) { $output = html_writer::start_tag('div', array('continuebutton')); if (!$haserrors) { $attrs = array('type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary'); $output .= html_writer::empty_tag('input', $at...
php
public function substage_buttons($haserrors) { $output = html_writer::start_tag('div', array('continuebutton')); if (!$haserrors) { $attrs = array('type' => 'submit', 'value' => get_string('continue'), 'class' => 'btn btn-primary'); $output .= html_writer::empty_tag('input', $at...
[ "public", "function", "substage_buttons", "(", "$", "haserrors", ")", "{", "$", "output", "=", "html_writer", "::", "start_tag", "(", "'div'", ",", "array", "(", "'continuebutton'", ")", ")", ";", "if", "(", "!", "$", "haserrors", ")", "{", "$", "attrs",...
Displays substage buttons @param bool $haserrors @return string
[ "Displays", "substage", "buttons" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L480-L490
217,328
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.role_mappings
public function role_mappings($rolemappings, $roles) { $roles[0] = get_string('none'); $output = html_writer::start_tag('div', array('class' => 'restore-rolemappings')); $output .= $this->output->heading(get_string('restorerolemappings', 'backup'), 2); foreach ($rolemappings as $id => $...
php
public function role_mappings($rolemappings, $roles) { $roles[0] = get_string('none'); $output = html_writer::start_tag('div', array('class' => 'restore-rolemappings')); $output .= $this->output->heading(get_string('restorerolemappings', 'backup'), 2); foreach ($rolemappings as $id => $...
[ "public", "function", "role_mappings", "(", "$", "rolemappings", ",", "$", "roles", ")", "{", "$", "roles", "[", "0", "]", "=", "get_string", "(", "'none'", ")", ";", "$", "output", "=", "html_writer", "::", "start_tag", "(", "'div'", ",", "array", "("...
Displays a role mapping interface @param array $rolemappings @param array $roles @return string
[ "Displays", "a", "role", "mapping", "interface" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L499-L511
217,329
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.continue_button
public function continue_button($url, $method = 'post') { if (!($url instanceof moodle_url)) { $url = new moodle_url($url); } if ($method != 'post') { $method = 'get'; } $url->param('sesskey', sesskey()); $button = new single_button($url, get_strin...
php
public function continue_button($url, $method = 'post') { if (!($url instanceof moodle_url)) { $url = new moodle_url($url); } if ($method != 'post') { $method = 'get'; } $url->param('sesskey', sesskey()); $button = new single_button($url, get_strin...
[ "public", "function", "continue_button", "(", "$", "url", ",", "$", "method", "=", "'post'", ")", "{", "if", "(", "!", "(", "$", "url", "instanceof", "moodle_url", ")", ")", "{", "$", "url", "=", "new", "moodle_url", "(", "$", "url", ")", ";", "}",...
Displays a continue button @param string|moodle_url $url @param string $method @return string
[ "Displays", "a", "continue", "button" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L520-L531
217,330
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.get_status_display
public function get_status_display($statuscode, $backupid) { if ($statuscode == backup::STATUS_AWAITING || $statuscode == backup::STATUS_EXECUTING) { // Inprogress. $progresssetup = array( 'backupid' => $backupid, 'width' => '100' ); $...
php
public function get_status_display($statuscode, $backupid) { if ($statuscode == backup::STATUS_AWAITING || $statuscode == backup::STATUS_EXECUTING) { // Inprogress. $progresssetup = array( 'backupid' => $backupid, 'width' => '100' ); $...
[ "public", "function", "get_status_display", "(", "$", "statuscode", ",", "$", "backupid", ")", "{", "if", "(", "$", "statuscode", "==", "backup", "::", "STATUS_AWAITING", "||", "$", "statuscode", "==", "backup", "::", "STATUS_EXECUTING", ")", "{", "// Inprogre...
Generate the status indicator markup for display in the backup restore file area UI. @param int $statuscode The status code of the backup. @param string $backupid The backup record id. @return string|boolean $status The status indicator for the operation.
[ "Generate", "the", "status", "indicator", "markup", "for", "display", "in", "the", "backup", "restore", "file", "area", "UI", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L550-L566
217,331
moodle/moodle
backup/util/ui/renderer.php
core_backup_renderer.restore_progress_viewer
public function restore_progress_viewer ($userid, $context) { $tablehead = array(get_string('course'), get_string('time'), get_string('status', 'backup')); $table = new html_table(); $table->attributes['class'] = 'backup-files-table generaltable'; $table->head = $tablehead; $tab...
php
public function restore_progress_viewer ($userid, $context) { $tablehead = array(get_string('course'), get_string('time'), get_string('status', 'backup')); $table = new html_table(); $table->attributes['class'] = 'backup-files-table generaltable'; $table->head = $tablehead; $tab...
[ "public", "function", "restore_progress_viewer", "(", "$", "userid", ",", "$", "context", ")", "{", "$", "tablehead", "=", "array", "(", "get_string", "(", "'course'", ")", ",", "get_string", "(", "'time'", ")", ",", "get_string", "(", "'status'", ",", "'b...
Get markup to render table for all of a users async in progress restores. @param int $userid The Moodle user id. @param \context $context The Moodle context for these restores. @return string $html The table HTML.
[ "Get", "markup", "to", "render", "table", "for", "all", "of", "a", "users", "async", "in", "progress", "restores", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/ui/renderer.php#L925-L951
217,332
moodle/moodle
tag/classes/collection.php
core_tag_collection.get_collections
public static function get_collections($onlysearchable = false) { global $DB; $cache = cache::make('core', 'tags'); if (($tagcolls = $cache->get('tag_coll')) === false) { // Retrieve records from DB and create a default one if it is not present. $tagcolls = $DB->get_recor...
php
public static function get_collections($onlysearchable = false) { global $DB; $cache = cache::make('core', 'tags'); if (($tagcolls = $cache->get('tag_coll')) === false) { // Retrieve records from DB and create a default one if it is not present. $tagcolls = $DB->get_recor...
[ "public", "static", "function", "get_collections", "(", "$", "onlysearchable", "=", "false", ")", "{", "global", "$", "DB", ";", "$", "cache", "=", "cache", "::", "make", "(", "'core'", ",", "'tags'", ")", ";", "if", "(", "(", "$", "tagcolls", "=", "...
Returns the list of tag collections defined in the system. @param bool $onlysearchable only return collections that can be searched. @return array array of objects where each object has properties: id, name, isdefault, itemtypes, sortorder
[ "Returns", "the", "list", "of", "tag", "collections", "defined", "in", "the", "system", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L45-L78
217,333
moodle/moodle
tag/classes/collection.php
core_tag_collection.get_by_id
public static function get_by_id($tagcollid) { $tagcolls = self::get_collections(); if (array_key_exists($tagcollid, $tagcolls)) { return $tagcolls[$tagcollid]; } return null; }
php
public static function get_by_id($tagcollid) { $tagcolls = self::get_collections(); if (array_key_exists($tagcollid, $tagcolls)) { return $tagcolls[$tagcollid]; } return null; }
[ "public", "static", "function", "get_by_id", "(", "$", "tagcollid", ")", "{", "$", "tagcolls", "=", "self", "::", "get_collections", "(", ")", ";", "if", "(", "array_key_exists", "(", "$", "tagcollid", ",", "$", "tagcolls", ")", ")", "{", "return", "$", ...
Returns the tag collection object @param int $tagcollid @return stdClass
[ "Returns", "the", "tag", "collection", "object" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L86-L92
217,334
moodle/moodle
tag/classes/collection.php
core_tag_collection.get_collections_menu
public static function get_collections_menu($unlockedonly = false, $onlysearchable = false, $selectalllabel = null) { $tagcolls = self::get_collections($onlysearchable); $options = array(); foreach ($tagcolls as $id => $tagcoll) { if (!$unlockedonly || empty($tagcoll->com...
php
public static function get_collections_menu($unlockedonly = false, $onlysearchable = false, $selectalllabel = null) { $tagcolls = self::get_collections($onlysearchable); $options = array(); foreach ($tagcolls as $id => $tagcoll) { if (!$unlockedonly || empty($tagcoll->com...
[ "public", "static", "function", "get_collections_menu", "(", "$", "unlockedonly", "=", "false", ",", "$", "onlysearchable", "=", "false", ",", "$", "selectalllabel", "=", "null", ")", "{", "$", "tagcolls", "=", "self", "::", "get_collections", "(", "$", "onl...
Returns the list of existing tag collections as id=>name @param bool $unlockedonly @param bool $onlysearchable @param string $selectalllabel @return array
[ "Returns", "the", "list", "of", "existing", "tag", "collections", "as", "id", "=", ">", "name" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L102-L115
217,335
moodle/moodle
tag/classes/collection.php
core_tag_collection.display_name
public static function display_name($record) { $syscontext = context_system::instance(); if (!empty($record->component)) { $identifier = 'tagcollection_' . clean_param($record->name, PARAM_STRINGID); $component = $record->component; if ($component ...
php
public static function display_name($record) { $syscontext = context_system::instance(); if (!empty($record->component)) { $identifier = 'tagcollection_' . clean_param($record->name, PARAM_STRINGID); $component = $record->component; if ($component ...
[ "public", "static", "function", "display_name", "(", "$", "record", ")", "{", "$", "syscontext", "=", "context_system", "::", "instance", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "record", "->", "component", ")", ")", "{", "$", "identifier", "...
Returns formatted name of the tag collection @param stdClass $record record from DB table tag_coll @return string
[ "Returns", "formatted", "name", "of", "the", "tag", "collection" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L134-L152
217,336
moodle/moodle
tag/classes/collection.php
core_tag_collection.get_areas
public static function get_areas($tagcollid) { $allitemtypes = core_tag_area::get_areas($tagcollid, true); $itemtypes = array(); foreach ($allitemtypes as $itemtype => $it) { foreach ($it as $component => $v) { $itemtypes[$v->id] = $v; } } ...
php
public static function get_areas($tagcollid) { $allitemtypes = core_tag_area::get_areas($tagcollid, true); $itemtypes = array(); foreach ($allitemtypes as $itemtype => $it) { foreach ($it as $component => $v) { $itemtypes[$v->id] = $v; } } ...
[ "public", "static", "function", "get_areas", "(", "$", "tagcollid", ")", "{", "$", "allitemtypes", "=", "core_tag_area", "::", "get_areas", "(", "$", "tagcollid", ",", "true", ")", ";", "$", "itemtypes", "=", "array", "(", ")", ";", "foreach", "(", "$", ...
Returns all tag areas in the given tag collection @param int $tagcollid @return array
[ "Returns", "all", "tag", "areas", "in", "the", "given", "tag", "collection" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L160-L169
217,337
moodle/moodle
tag/classes/collection.php
core_tag_collection.create
public static function create($data) { global $DB; $data = (object)$data; $tagcolls = self::get_collections(); $tagcoll = (object)array( 'name' => $data->name, 'isdefault' => 0, 'component' => !empty($data->component) ? $data->component : null, ...
php
public static function create($data) { global $DB; $data = (object)$data; $tagcolls = self::get_collections(); $tagcoll = (object)array( 'name' => $data->name, 'isdefault' => 0, 'component' => !empty($data->component) ? $data->component : null, ...
[ "public", "static", "function", "create", "(", "$", "data", ")", "{", "global", "$", "DB", ";", "$", "data", "=", "(", "object", ")", "$", "data", ";", "$", "tagcolls", "=", "self", "::", "get_collections", "(", ")", ";", "$", "tagcoll", "=", "(", ...
Creates a new tag collection @param stdClass $data data from form core_tag_collection_form @return int|false id of created tag collection or false if failed
[ "Creates", "a", "new", "tag", "collection" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L194-L213
217,338
moodle/moodle
tag/classes/collection.php
core_tag_collection.update
public static function update($tagcoll, $data) { global $DB; $defaulttagcollid = self::get_default(); $allowedfields = array('name', 'searchable', 'customurl'); if ($tagcoll->id == $defaulttagcollid) { $allowedfields = array('name'); } $updatedata = array(); ...
php
public static function update($tagcoll, $data) { global $DB; $defaulttagcollid = self::get_default(); $allowedfields = array('name', 'searchable', 'customurl'); if ($tagcoll->id == $defaulttagcollid) { $allowedfields = array('name'); } $updatedata = array(); ...
[ "public", "static", "function", "update", "(", "$", "tagcoll", ",", "$", "data", ")", "{", "global", "$", "DB", ";", "$", "defaulttagcollid", "=", "self", "::", "get_default", "(", ")", ";", "$", "allowedfields", "=", "array", "(", "'name'", ",", "'sea...
Updates the tag collection information @param stdClass $tagcoll existing record in DB table tag_coll @param stdClass $data data to update @return bool wether the record was updated
[ "Updates", "the", "tag", "collection", "information" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L222-L258
217,339
moodle/moodle
tag/classes/collection.php
core_tag_collection.delete
public static function delete($tagcoll) { global $DB, $CFG; $defaulttagcollid = self::get_default(); if ($tagcoll->id == $defaulttagcollid) { return false; } // Move all tags from this tag collection to the default one. $allitemtypes = core_tag_area::get_are...
php
public static function delete($tagcoll) { global $DB, $CFG; $defaulttagcollid = self::get_default(); if ($tagcoll->id == $defaulttagcollid) { return false; } // Move all tags from this tag collection to the default one. $allitemtypes = core_tag_area::get_are...
[ "public", "static", "function", "delete", "(", "$", "tagcoll", ")", "{", "global", "$", "DB", ",", "$", "CFG", ";", "$", "defaulttagcollid", "=", "self", "::", "get_default", "(", ")", ";", "if", "(", "$", "tagcoll", "->", "id", "==", "$", "defaultta...
Deletes a custom tag collection @param stdClass $tagcoll existing record in DB table tag_coll @return bool wether the tag collection was deleted
[ "Deletes", "a", "custom", "tag", "collection" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L266-L294
217,340
moodle/moodle
tag/classes/collection.php
core_tag_collection.change_sortorder
public static function change_sortorder($tagcoll, $direction) { global $DB; if ($direction != -1 && $direction != 1) { throw new coding_exception('Second argument in tag_coll_change_sortorder() can be only 1 or -1'); } $tagcolls = self::get_collections(); $keys = arra...
php
public static function change_sortorder($tagcoll, $direction) { global $DB; if ($direction != -1 && $direction != 1) { throw new coding_exception('Second argument in tag_coll_change_sortorder() can be only 1 or -1'); } $tagcolls = self::get_collections(); $keys = arra...
[ "public", "static", "function", "change_sortorder", "(", "$", "tagcoll", ",", "$", "direction", ")", "{", "global", "$", "DB", ";", "if", "(", "$", "direction", "!=", "-", "1", "&&", "$", "direction", "!=", "1", ")", "{", "throw", "new", "coding_except...
Moves the tag collection in the list one position up or down @param stdClass $tagcoll existing record in DB table tag_coll @param int $direction move direction: +1 or -1 @return bool
[ "Moves", "the", "tag", "collection", "in", "the", "list", "one", "position", "up", "or", "down" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L303-L320
217,341
moodle/moodle
tag/classes/collection.php
core_tag_collection.cleanup_unused_tags
public static function cleanup_unused_tags($collections = null) { global $DB, $CFG; $params = array(); $sql = "SELECT tg.id FROM {tag} tg LEFT OUTER JOIN {tag_instance} ti ON ti.tagid = tg.id WHERE ti.id IS NULL AND tg.isstandard = 0"; if ($collections) { lis...
php
public static function cleanup_unused_tags($collections = null) { global $DB, $CFG; $params = array(); $sql = "SELECT tg.id FROM {tag} tg LEFT OUTER JOIN {tag_instance} ti ON ti.tagid = tg.id WHERE ti.id IS NULL AND tg.isstandard = 0"; if ($collections) { lis...
[ "public", "static", "function", "cleanup_unused_tags", "(", "$", "collections", "=", "null", ")", "{", "global", "$", "DB", ",", "$", "CFG", ";", "$", "params", "=", "array", "(", ")", ";", "$", "sql", "=", "\"SELECT tg.id FROM {tag} tg LEFT OUTER JOIN {tag_in...
Permanently deletes all non-standard tags that no longer have any instances pointing to them @param array $collections optional list of tag collections ids to cleanup
[ "Permanently", "deletes", "all", "non", "-", "standard", "tags", "that", "no", "longer", "have", "any", "instances", "pointing", "to", "them" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L327-L340
217,342
moodle/moodle
tag/classes/collection.php
core_tag_collection.get_tag_cloud
public static function get_tag_cloud($tagcollid, $isstandard = false, $limit = 150, $sort = 'name', $search = '', $fromctx = 0, $ctx = 0, $rec = 1) { global $DB; $fromclause = 'FROM {tag_instance} ti JOIN {tag} tg ON tg.id = ti.tagid'; $whereclause = 'WHERE ti.itemtype <> \'tag\''; ...
php
public static function get_tag_cloud($tagcollid, $isstandard = false, $limit = 150, $sort = 'name', $search = '', $fromctx = 0, $ctx = 0, $rec = 1) { global $DB; $fromclause = 'FROM {tag_instance} ti JOIN {tag} tg ON tg.id = ti.tagid'; $whereclause = 'WHERE ti.itemtype <> \'tag\''; ...
[ "public", "static", "function", "get_tag_cloud", "(", "$", "tagcollid", ",", "$", "isstandard", "=", "false", ",", "$", "limit", "=", "150", ",", "$", "sort", "=", "'name'", ",", "$", "search", "=", "''", ",", "$", "fromctx", "=", "0", ",", "$", "c...
Returns the list of tags with number of items tagged @param int $tagcollid @param null|bool $isstandard return only standard tags @param int $limit maximum number of tags to retrieve, tags are sorted by the instance count descending here regardless of $sort parameter @param string $sort sort order for display, default...
[ "Returns", "the", "list", "of", "tags", "with", "number", "of", "items", "tagged" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L356-L398
217,343
moodle/moodle
tag/classes/collection.php
core_tag_collection.cloud_sort
public static function cloud_sort($a, $b) { $tagsort = self::$cloudsortfield ?: 'name'; if (is_numeric($a->$tagsort)) { return ($a->$tagsort == $b->$tagsort) ? 0 : ($a->$tagsort > $b->$tagsort) ? 1 : -1; } else if (is_string($a->$tagsort)) { return strcmp($a->$tagsort, $...
php
public static function cloud_sort($a, $b) { $tagsort = self::$cloudsortfield ?: 'name'; if (is_numeric($a->$tagsort)) { return ($a->$tagsort == $b->$tagsort) ? 0 : ($a->$tagsort > $b->$tagsort) ? 1 : -1; } else if (is_string($a->$tagsort)) { return strcmp($a->$tagsort, $...
[ "public", "static", "function", "cloud_sort", "(", "$", "a", ",", "$", "b", ")", "{", "$", "tagsort", "=", "self", "::", "$", "cloudsortfield", "?", ":", "'name'", ";", "if", "(", "is_numeric", "(", "$", "a", "->", "$", "tagsort", ")", ")", "{", ...
This function is used to sort the tags in the cloud. @param string $a Tag name to compare against $b @param string $b Tag name to compare against $a @return int The result of the comparison/validation 1, 0 or -1
[ "This", "function", "is", "used", "to", "sort", "the", "tags", "in", "the", "cloud", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/tag/classes/collection.php#L407-L417
217,344
moodle/moodle
privacy/classes/local/request/helper.php
helper.export_data_for_null_provider
public static function export_data_for_null_provider(approved_contextlist $contextlist) { $user = $contextlist->get_user(); foreach ($contextlist as $context) { $data = static::get_context_data($context, $user); static::export_context_files($context, $user); writer::...
php
public static function export_data_for_null_provider(approved_contextlist $contextlist) { $user = $contextlist->get_user(); foreach ($contextlist as $context) { $data = static::get_context_data($context, $user); static::export_context_files($context, $user); writer::...
[ "public", "static", "function", "export_data_for_null_provider", "(", "approved_contextlist", "$", "contextlist", ")", "{", "$", "user", "=", "$", "contextlist", "->", "get_user", "(", ")", ";", "foreach", "(", "$", "contextlist", "as", "$", "context", ")", "{...
Handle export of standard data for a plugin which implements the null provider and does not normally store data of its own. This is used in cases such as activities like mod_resource, which do not store their own data, but may still have data on them (like Activity Completion). Any context provided in a contextlist s...
[ "Handle", "export", "of", "standard", "data", "for", "a", "plugin", "which", "implements", "the", "null", "provider", "and", "does", "not", "normally", "store", "data", "of", "its", "own", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/privacy/classes/local/request/helper.php#L86-L94
217,345
moodle/moodle
privacy/classes/local/request/helper.php
helper.get_context_data
public static function get_context_data(\context $context, \stdClass $user) : \stdClass { global $DB; $basedata = (object) []; if ($context instanceof \context_module) { return static::get_context_module_data($context, $user); } if ($context instanceof \context_block...
php
public static function get_context_data(\context $context, \stdClass $user) : \stdClass { global $DB; $basedata = (object) []; if ($context instanceof \context_module) { return static::get_context_module_data($context, $user); } if ($context instanceof \context_block...
[ "public", "static", "function", "get_context_data", "(", "\\", "context", "$", "context", ",", "\\", "stdClass", "$", "user", ")", ":", "\\", "stdClass", "{", "global", "$", "DB", ";", "$", "basedata", "=", "(", "object", ")", "[", "]", ";", "if", "(...
Get all general data for this context. @param \context $context The context to retrieve data for. @param \stdClass $user The user being written. @return \stdClass
[ "Get", "all", "general", "data", "for", "this", "context", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/privacy/classes/local/request/helper.php#L130-L142
217,346
moodle/moodle
privacy/classes/local/request/helper.php
helper.export_context_files
public static function export_context_files(\context $context, \stdClass $user) { if ($context instanceof \context_module) { return static::export_context_module_files($context, $user); } }
php
public static function export_context_files(\context $context, \stdClass $user) { if ($context instanceof \context_module) { return static::export_context_module_files($context, $user); } }
[ "public", "static", "function", "export_context_files", "(", "\\", "context", "$", "context", ",", "\\", "stdClass", "$", "user", ")", "{", "if", "(", "$", "context", "instanceof", "\\", "context_module", ")", "{", "return", "static", "::", "export_context_mod...
Export all files for this context. @param \context $context The context to export files for. @param \stdClass $user The user being written. @return \stdClass
[ "Export", "all", "files", "for", "this", "context", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/privacy/classes/local/request/helper.php#L151-L155
217,347
moodle/moodle
privacy/classes/local/request/helper.php
helper.get_context_block_data
protected static function get_context_block_data(\context_block $context, \stdClass $user) : \stdClass { global $DB; $block = $DB->get_record('block_instances', ['id' => $context->instanceid]); $basedata = (object) [ 'blocktype' => get_string('pluginname', 'block_' . $block->blockn...
php
protected static function get_context_block_data(\context_block $context, \stdClass $user) : \stdClass { global $DB; $block = $DB->get_record('block_instances', ['id' => $context->instanceid]); $basedata = (object) [ 'blocktype' => get_string('pluginname', 'block_' . $block->blockn...
[ "protected", "static", "function", "get_context_block_data", "(", "\\", "context_block", "$", "context", ",", "\\", "stdClass", "$", "user", ")", ":", "\\", "stdClass", "{", "global", "$", "DB", ";", "$", "block", "=", "$", "DB", "->", "get_record", "(", ...
Get all general data for the block at this context. @param \context_block $context The context to retrieve data for. @param \stdClass $user The user being written. @return \stdClass General data about this block instance.
[ "Get", "all", "general", "data", "for", "the", "block", "at", "this", "context", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/privacy/classes/local/request/helper.php#L243-L253
217,348
moodle/moodle
privacy/classes/local/request/helper.php
helper.delete_data_for_all_users_in_context_course_module
public static function delete_data_for_all_users_in_context_course_module(string $component, \context $context) { global $DB; if ($context instanceof \context_module) { // Delete course completion data for this context. \core_completion\privacy\provider::delete_completion(null, ...
php
public static function delete_data_for_all_users_in_context_course_module(string $component, \context $context) { global $DB; if ($context instanceof \context_module) { // Delete course completion data for this context. \core_completion\privacy\provider::delete_completion(null, ...
[ "public", "static", "function", "delete_data_for_all_users_in_context_course_module", "(", "string", "$", "component", ",", "\\", "context", "$", "context", ")", "{", "global", "$", "DB", ";", "if", "(", "$", "context", "instanceof", "\\", "context_module", ")", ...
Handle removal of 'standard' data for course modules. This will handle deletion for things such as activity completion. @param string $component The component being deleted for. @param \context $context The context to delete all data for.
[ "Handle", "removal", "of", "standard", "data", "for", "course", "modules", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/privacy/classes/local/request/helper.php#L281-L288
217,349
moodle/moodle
privacy/classes/local/request/helper.php
helper.delete_data_for_user_in_course_module
protected static function delete_data_for_user_in_course_module(approved_contextlist $contextlist) { global $DB; foreach ($contextlist as $context) { if ($context instanceof \context_module) { // Delete course completion data for this context. \core_completio...
php
protected static function delete_data_for_user_in_course_module(approved_contextlist $contextlist) { global $DB; foreach ($contextlist as $context) { if ($context instanceof \context_module) { // Delete course completion data for this context. \core_completio...
[ "protected", "static", "function", "delete_data_for_user_in_course_module", "(", "approved_contextlist", "$", "contextlist", ")", "{", "global", "$", "DB", ";", "foreach", "(", "$", "contextlist", "as", "$", "context", ")", "{", "if", "(", "$", "context", "insta...
Delete all 'standard' user data for the specified user in course modules. This will handle deletion for things such as activity completion. @param approved_contextlist $contextlist The approved contexts and user information to delete information for.
[ "Delete", "all", "standard", "user", "data", "for", "the", "specified", "user", "in", "course", "modules", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/privacy/classes/local/request/helper.php#L297-L307
217,350
moodle/moodle
mod/quiz/report/attemptsreport_options.php
mod_quiz_attempts_report_options.get_url_params
protected function get_url_params() { $params = array( 'id' => $this->cm->id, 'mode' => $this->mode, 'attempts' => $this->attempts, 'onlygraded' => $this->onlygraded, ); if ($this->states) { $params['states'] = implode(...
php
protected function get_url_params() { $params = array( 'id' => $this->cm->id, 'mode' => $this->mode, 'attempts' => $this->attempts, 'onlygraded' => $this->onlygraded, ); if ($this->states) { $params['states'] = implode(...
[ "protected", "function", "get_url_params", "(", ")", "{", "$", "params", "=", "array", "(", "'id'", "=>", "$", "this", "->", "cm", "->", "id", ",", "'mode'", "=>", "$", "this", "->", "mode", ",", "'attempts'", "=>", "$", "this", "->", "attempts", ","...
Get the URL parameters required to show the report with these options. @return array URL parameter name => value.
[ "Get", "the", "URL", "parameters", "required", "to", "show", "the", "report", "with", "these", "options", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/quiz/report/attemptsreport_options.php#L115-L131
217,351
moodle/moodle
mod/quiz/report/attemptsreport_options.php
mod_quiz_attempts_report_options.get_initial_form_data
public function get_initial_form_data() { $toform = new stdClass(); $toform->attempts = $this->attempts; $toform->onlygraded = $this->onlygraded; $toform->pagesize = $this->pagesize; if ($this->states) { foreach (self::$statefields as $field => $state) { ...
php
public function get_initial_form_data() { $toform = new stdClass(); $toform->attempts = $this->attempts; $toform->onlygraded = $this->onlygraded; $toform->pagesize = $this->pagesize; if ($this->states) { foreach (self::$statefields as $field => $state) { ...
[ "public", "function", "get_initial_form_data", "(", ")", "{", "$", "toform", "=", "new", "stdClass", "(", ")", ";", "$", "toform", "->", "attempts", "=", "$", "this", "->", "attempts", ";", "$", "toform", "->", "onlygraded", "=", "$", "this", "->", "on...
Get the current value of the settings to pass to the settings form.
[ "Get", "the", "current", "value", "of", "the", "settings", "to", "pass", "to", "the", "settings", "form", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/quiz/report/attemptsreport_options.php#L166-L179
217,352
moodle/moodle
mod/quiz/report/attemptsreport_options.php
mod_quiz_attempts_report_options.setup_from_form_data
public function setup_from_form_data($fromform) { $this->attempts = $fromform->attempts; $this->group = groups_get_activity_group($this->cm, true); $this->onlygraded = !empty($fromform->onlygraded); $this->pagesize = $fromform->pagesize; $this->states = array(); ...
php
public function setup_from_form_data($fromform) { $this->attempts = $fromform->attempts; $this->group = groups_get_activity_group($this->cm, true); $this->onlygraded = !empty($fromform->onlygraded); $this->pagesize = $fromform->pagesize; $this->states = array(); ...
[ "public", "function", "setup_from_form_data", "(", "$", "fromform", ")", "{", "$", "this", "->", "attempts", "=", "$", "fromform", "->", "attempts", ";", "$", "this", "->", "group", "=", "groups_get_activity_group", "(", "$", "this", "->", "cm", ",", "true...
Set the fields of this object from the form data. @param object $fromform The data from $mform->get_data() from the settings form.
[ "Set", "the", "fields", "of", "this", "object", "from", "the", "form", "data", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/quiz/report/attemptsreport_options.php#L185-L197
217,353
moodle/moodle
mod/quiz/report/attemptsreport_options.php
mod_quiz_attempts_report_options.setup_from_params
public function setup_from_params() { $this->attempts = optional_param('attempts', $this->attempts, PARAM_ALPHAEXT); $this->group = groups_get_activity_group($this->cm, true); $this->onlygraded = optional_param('onlygraded', $this->onlygraded, PARAM_BOOL); $this->pagesize = opti...
php
public function setup_from_params() { $this->attempts = optional_param('attempts', $this->attempts, PARAM_ALPHAEXT); $this->group = groups_get_activity_group($this->cm, true); $this->onlygraded = optional_param('onlygraded', $this->onlygraded, PARAM_BOOL); $this->pagesize = opti...
[ "public", "function", "setup_from_params", "(", ")", "{", "$", "this", "->", "attempts", "=", "optional_param", "(", "'attempts'", ",", "$", "this", "->", "attempts", ",", "PARAM_ALPHAEXT", ")", ";", "$", "this", "->", "group", "=", "groups_get_activity_group"...
Set the fields of this object from the URL parameters.
[ "Set", "the", "fields", "of", "this", "object", "from", "the", "URL", "parameters", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/quiz/report/attemptsreport_options.php#L202-L214
217,354
moodle/moodle
mod/quiz/report/attemptsreport_options.php
mod_quiz_attempts_report_options.resolve_dependencies
public function resolve_dependencies() { if ($this->group) { // Default for when a group is selected. if ($this->attempts === null || $this->attempts == quiz_attempts_report::ALL_WITH) { $this->attempts = quiz_attempts_report::ENROLLED_WITH; } } else ...
php
public function resolve_dependencies() { if ($this->group) { // Default for when a group is selected. if ($this->attempts === null || $this->attempts == quiz_attempts_report::ALL_WITH) { $this->attempts = quiz_attempts_report::ENROLLED_WITH; } } else ...
[ "public", "function", "resolve_dependencies", "(", ")", "{", "if", "(", "$", "this", "->", "group", ")", "{", "// Default for when a group is selected.", "if", "(", "$", "this", "->", "attempts", "===", "null", "||", "$", "this", "->", "attempts", "==", "qui...
Check the settings, and remove any 'impossible' combinations.
[ "Check", "the", "settings", "and", "remove", "any", "impossible", "combinations", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/quiz/report/attemptsreport_options.php#L235-L282
217,355
moodle/moodle
user/profile/field/textarea/field.class.php
profile_field_textarea.edit_field_add
public function edit_field_add($mform) { // Create the form field. $mform->addElement('editor', $this->inputname, format_string($this->field->name), null, null); $mform->setType($this->inputname, PARAM_RAW); // We MUST clean this before display! }
php
public function edit_field_add($mform) { // Create the form field. $mform->addElement('editor', $this->inputname, format_string($this->field->name), null, null); $mform->setType($this->inputname, PARAM_RAW); // We MUST clean this before display! }
[ "public", "function", "edit_field_add", "(", "$", "mform", ")", "{", "// Create the form field.", "$", "mform", "->", "addElement", "(", "'editor'", ",", "$", "this", "->", "inputname", ",", "format_string", "(", "$", "this", "->", "field", "->", "name", ")"...
Adds elements for this field type to the edit form. @param moodleform $mform
[ "Adds", "elements", "for", "this", "field", "type", "to", "the", "edit", "form", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/profile/field/textarea/field.class.php#L37-L41
217,356
moodle/moodle
user/profile/field/textarea/field.class.php
profile_field_textarea.edit_save_data_preprocess
public function edit_save_data_preprocess($data, $datarecord) { if (is_array($data)) { $datarecord->dataformat = $data['format']; $data = $data['text']; } return $data; }
php
public function edit_save_data_preprocess($data, $datarecord) { if (is_array($data)) { $datarecord->dataformat = $data['format']; $data = $data['text']; } return $data; }
[ "public", "function", "edit_save_data_preprocess", "(", "$", "data", ",", "$", "datarecord", ")", "{", "if", "(", "is_array", "(", "$", "data", ")", ")", "{", "$", "datarecord", "->", "dataformat", "=", "$", "data", "[", "'format'", "]", ";", "$", "dat...
Process incoming data for the field. @param stdClass $data @param stdClass $datarecord @return mixed|stdClass
[ "Process", "incoming", "data", "for", "the", "field", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/profile/field/textarea/field.class.php#L57-L63
217,357
moodle/moodle
user/profile/field/textarea/field.class.php
profile_field_textarea.edit_load_user_data
public function edit_load_user_data($user) { if ($this->data !== null) { $this->data = clean_text($this->data, $this->dataformat); $user->{$this->inputname} = array('text' => $this->data, 'format' => $this->dataformat); } }
php
public function edit_load_user_data($user) { if ($this->data !== null) { $this->data = clean_text($this->data, $this->dataformat); $user->{$this->inputname} = array('text' => $this->data, 'format' => $this->dataformat); } }
[ "public", "function", "edit_load_user_data", "(", "$", "user", ")", "{", "if", "(", "$", "this", "->", "data", "!==", "null", ")", "{", "$", "this", "->", "data", "=", "clean_text", "(", "$", "this", "->", "data", ",", "$", "this", "->", "dataformat"...
Load user data for this profile field, ready for editing. @param stdClass $user
[ "Load", "user", "data", "for", "this", "profile", "field", "ready", "for", "editing", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/user/profile/field/textarea/field.class.php#L69-L74
217,358
moodle/moodle
lib/mlbackend/php/phpml/src/Phpml/Math/Matrix.php
Matrix._add
protected function _add(Matrix $other, $sign = 1) { $a1 = $this->toArray(); $a2 = $other->toArray(); $newMatrix = []; for ($i = 0; $i < $this->rows; ++$i) { for ($k = 0; $k < $this->columns; ++$k) { $newMatrix[$i][$k] = $a1[$i][$k] + $sign * $a2[$i][$k]; ...
php
protected function _add(Matrix $other, $sign = 1) { $a1 = $this->toArray(); $a2 = $other->toArray(); $newMatrix = []; for ($i = 0; $i < $this->rows; ++$i) { for ($k = 0; $k < $this->columns; ++$k) { $newMatrix[$i][$k] = $a1[$i][$k] + $sign * $a2[$i][$k]; ...
[ "protected", "function", "_add", "(", "Matrix", "$", "other", ",", "$", "sign", "=", "1", ")", "{", "$", "a1", "=", "$", "this", "->", "toArray", "(", ")", ";", "$", "a2", "=", "$", "other", "->", "toArray", "(", ")", ";", "$", "newMatrix", "="...
Element-wise addition or substraction depending on the given sign parameter @param Matrix $other @param int $sign @return Matrix
[ "Element", "-", "wise", "addition", "or", "substraction", "depending", "on", "the", "given", "sign", "parameter" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/mlbackend/php/phpml/src/Phpml/Math/Matrix.php#L264-L277
217,359
moodle/moodle
admin/tool/messageinbound/classes/privacy/provider.php
provider.delete_user_data
protected static function delete_user_data($userid) { global $DB; $DB->delete_records_select('messageinbound_messagelist', 'userid = :userid', ['userid' => $userid]); \core_userkey\privacy\provider::delete_userkeys('messageinbound_handler', $userid); }
php
protected static function delete_user_data($userid) { global $DB; $DB->delete_records_select('messageinbound_messagelist', 'userid = :userid', ['userid' => $userid]); \core_userkey\privacy\provider::delete_userkeys('messageinbound_handler', $userid); }
[ "protected", "static", "function", "delete_user_data", "(", "$", "userid", ")", "{", "global", "$", "DB", ";", "$", "DB", "->", "delete_records_select", "(", "'messageinbound_messagelist'", ",", "'userid = :userid'", ",", "[", "'userid'", "=>", "$", "userid", "]...
Delete a user's data. @param int $userid The user ID. @return void
[ "Delete", "a", "user", "s", "data", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/messageinbound/classes/privacy/provider.php#L195-L199
217,360
moodle/moodle
admin/tool/messageinbound/classes/privacy/provider.php
provider.approved_contextlist_contains_my_context
protected static function approved_contextlist_contains_my_context(approved_contextlist $contextlist) { $userid = $contextlist->get_user()->id; foreach ($contextlist->get_contexts() as $context) { if ($context->contextlevel == CONTEXT_USER && $context->instanceid == $userid) { ...
php
protected static function approved_contextlist_contains_my_context(approved_contextlist $contextlist) { $userid = $contextlist->get_user()->id; foreach ($contextlist->get_contexts() as $context) { if ($context->contextlevel == CONTEXT_USER && $context->instanceid == $userid) { ...
[ "protected", "static", "function", "approved_contextlist_contains_my_context", "(", "approved_contextlist", "$", "contextlist", ")", "{", "$", "userid", "=", "$", "contextlist", "->", "get_user", "(", ")", "->", "id", ";", "foreach", "(", "$", "contextlist", "->",...
Return whether the contextlist contains our own context. @param approved_contextlist $contextlist The contextlist @return bool
[ "Return", "whether", "the", "contextlist", "contains", "our", "own", "context", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/messageinbound/classes/privacy/provider.php#L207-L215
217,361
moodle/moodle
admin/tool/uploadcourse/classes/course.php
tool_uploadcourse_course.can_create
public function can_create() { return in_array($this->mode, array(tool_uploadcourse_processor::MODE_CREATE_ALL, tool_uploadcourse_processor::MODE_CREATE_NEW, tool_uploadcourse_processor::MODE_CREATE_OR_UPDATE) ); }
php
public function can_create() { return in_array($this->mode, array(tool_uploadcourse_processor::MODE_CREATE_ALL, tool_uploadcourse_processor::MODE_CREATE_NEW, tool_uploadcourse_processor::MODE_CREATE_OR_UPDATE) ); }
[ "public", "function", "can_create", "(", ")", "{", "return", "in_array", "(", "$", "this", "->", "mode", ",", "array", "(", "tool_uploadcourse_processor", "::", "MODE_CREATE_ALL", ",", "tool_uploadcourse_processor", "::", "MODE_CREATE_NEW", ",", "tool_uploadcourse_pro...
Does the mode allow for course creation? @return bool
[ "Does", "the", "mode", "allow", "for", "course", "creation?" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/uploadcourse/classes/course.php#L159-L164
217,362
moodle/moodle
admin/tool/uploadcourse/classes/course.php
tool_uploadcourse_course.can_update
public function can_update() { return in_array($this->mode, array( tool_uploadcourse_processor::MODE_UPDATE_ONLY, tool_uploadcourse_processor::MODE_CREATE_OR_UPDATE) ) && $this->updatemode != tool_uploadcourse_processor::UPDATE_NOTHING; ...
php
public function can_update() { return in_array($this->mode, array( tool_uploadcourse_processor::MODE_UPDATE_ONLY, tool_uploadcourse_processor::MODE_CREATE_OR_UPDATE) ) && $this->updatemode != tool_uploadcourse_processor::UPDATE_NOTHING; ...
[ "public", "function", "can_update", "(", ")", "{", "return", "in_array", "(", "$", "this", "->", "mode", ",", "array", "(", "tool_uploadcourse_processor", "::", "MODE_UPDATE_ONLY", ",", "tool_uploadcourse_processor", "::", "MODE_CREATE_OR_UPDATE", ")", ")", "&&", ...
Does the mode allow for course update? @return bool
[ "Does", "the", "mode", "allow", "for", "course", "update?" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/uploadcourse/classes/course.php#L208-L214
217,363
moodle/moodle
admin/tool/uploadcourse/classes/course.php
tool_uploadcourse_course.delete
protected function delete() { global $DB; $this->id = $DB->get_field_select('course', 'id', 'shortname = :shortname', array('shortname' => $this->shortname), MUST_EXIST); return delete_course($this->id, false); }
php
protected function delete() { global $DB; $this->id = $DB->get_field_select('course', 'id', 'shortname = :shortname', array('shortname' => $this->shortname), MUST_EXIST); return delete_course($this->id, false); }
[ "protected", "function", "delete", "(", ")", "{", "global", "$", "DB", ";", "$", "this", "->", "id", "=", "$", "DB", "->", "get_field_select", "(", "'course'", ",", "'id'", ",", "'shortname = :shortname'", ",", "array", "(", "'shortname'", "=>", "$", "th...
Delete the current course. @return bool
[ "Delete", "the", "current", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/uploadcourse/classes/course.php#L231-L236
217,364
moodle/moodle
admin/tool/uploadcourse/classes/course.php
tool_uploadcourse_course.exists
protected function exists($shortname = null) { global $DB; if (is_null($shortname)) { $shortname = $this->shortname; } if (!empty($shortname) || is_numeric($shortname)) { return $DB->record_exists('course', array('shortname' => $shortname)); } retu...
php
protected function exists($shortname = null) { global $DB; if (is_null($shortname)) { $shortname = $this->shortname; } if (!empty($shortname) || is_numeric($shortname)) { return $DB->record_exists('course', array('shortname' => $shortname)); } retu...
[ "protected", "function", "exists", "(", "$", "shortname", "=", "null", ")", "{", "global", "$", "DB", ";", "if", "(", "is_null", "(", "$", "shortname", ")", ")", "{", "$", "shortname", "=", "$", "this", "->", "shortname", ";", "}", "if", "(", "!", ...
Return whether the course exists or not. @param string $shortname the shortname to use to check if the course exists. Falls back on $this->shortname if empty. @return bool
[ "Return", "whether", "the", "course", "exists", "or", "not", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/uploadcourse/classes/course.php#L258-L267
217,365
moodle/moodle
admin/tool/uploadcourse/classes/course.php
tool_uploadcourse_course.proceed
public function proceed() { global $CFG, $USER; if (!$this->prepared) { throw new coding_exception('The course has not been prepared.'); } else if ($this->has_errors()) { throw new moodle_exception('Cannot proceed, errors were detected.'); } else if ($this->proce...
php
public function proceed() { global $CFG, $USER; if (!$this->prepared) { throw new coding_exception('The course has not been prepared.'); } else if ($this->has_errors()) { throw new moodle_exception('Cannot proceed, errors were detected.'); } else if ($this->proce...
[ "public", "function", "proceed", "(", ")", "{", "global", "$", "CFG", ",", "$", "USER", ";", "if", "(", "!", "$", "this", "->", "prepared", ")", "{", "throw", "new", "coding_exception", "(", "'The course has not been prepared.'", ")", ";", "}", "else", "...
Proceed with the import of the course. @return void
[ "Proceed", "with", "the", "import", "of", "the", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/uploadcourse/classes/course.php#L751-L816
217,366
moodle/moodle
admin/tool/uploadcourse/classes/course.php
tool_uploadcourse_course.reset
protected function reset($course) { global $DB; $resetdata = new stdClass(); $resetdata->id = $course->id; $resetdata->reset_start_date = time(); $resetdata->reset_events = true; $resetdata->reset_notes = true; $resetdata->delete_blog_associations = true; ...
php
protected function reset($course) { global $DB; $resetdata = new stdClass(); $resetdata->id = $course->id; $resetdata->reset_start_date = time(); $resetdata->reset_events = true; $resetdata->reset_notes = true; $resetdata->delete_blog_associations = true; ...
[ "protected", "function", "reset", "(", "$", "course", ")", "{", "global", "$", "DB", ";", "$", "resetdata", "=", "new", "stdClass", "(", ")", ";", "$", "resetdata", "->", "id", "=", "$", "course", "->", "id", ";", "$", "resetdata", "->", "reset_start...
Reset the current course. This does not reset any of the content of the activities. @param stdClass $course the course object of the course to reset. @return array status array of array component, item, error.
[ "Reset", "the", "current", "course", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/uploadcourse/classes/course.php#L932-L968
217,367
moodle/moodle
admin/tool/uploadcourse/classes/course.php
tool_uploadcourse_course.status
protected function status($code, lang_string $message) { if (array_key_exists($code, $this->statuses)) { throw new coding_exception('Status code already defined'); } $this->statuses[$code] = $message; }
php
protected function status($code, lang_string $message) { if (array_key_exists($code, $this->statuses)) { throw new coding_exception('Status code already defined'); } $this->statuses[$code] = $message; }
[ "protected", "function", "status", "(", "$", "code", ",", "lang_string", "$", "message", ")", "{", "if", "(", "array_key_exists", "(", "$", "code", ",", "$", "this", "->", "statuses", ")", ")", "{", "throw", "new", "coding_exception", "(", "'Status code al...
Log a status @param string $code status code. @param lang_string $message status message. @return void
[ "Log", "a", "status" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/uploadcourse/classes/course.php#L977-L982
217,368
moodle/moodle
question/type/ddimageortext/question.php
qtype_ddimageortext_drop_zone.summarise
public function summarise() { if (trim($this->text) != '') { $summariseplace = get_string('summariseplace', 'qtype_ddimageortext', $this); } else { $summariseplace = get_string('summariseplaceno', 'qtype_ddimageortext', $this->no); ...
php
public function summarise() { if (trim($this->text) != '') { $summariseplace = get_string('summariseplace', 'qtype_ddimageortext', $this); } else { $summariseplace = get_string('summariseplaceno', 'qtype_ddimageortext', $this->no); ...
[ "public", "function", "summarise", "(", ")", "{", "if", "(", "trim", "(", "$", "this", "->", "text", ")", "!=", "''", ")", "{", "$", "summariseplace", "=", "get_string", "(", "'summariseplace'", ",", "'qtype_ddimageortext'", ",", "$", "this", ")", ";", ...
Creates summary text of for the drop zone @return string
[ "Creates", "summary", "text", "of", "for", "the", "drop", "zone" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/ddimageortext/question.php#L143-L152
217,369
moodle/moodle
mod/scorm/renderer.php
mod_scorm_renderer.render_mod_scorm_attempt_bar
protected function render_mod_scorm_attempt_bar(mod_scorm_attempt_bar $attemptbar) { $output = ''; $attemptbar = clone($attemptbar); $attemptbar->prepare($this, $this->page, $this->target); if (count($attemptbar->attemptids) > 1) { $output .= get_string('attempt', 'scorm') ....
php
protected function render_mod_scorm_attempt_bar(mod_scorm_attempt_bar $attemptbar) { $output = ''; $attemptbar = clone($attemptbar); $attemptbar->prepare($this, $this->page, $this->target); if (count($attemptbar->attemptids) > 1) { $output .= get_string('attempt', 'scorm') ....
[ "protected", "function", "render_mod_scorm_attempt_bar", "(", "mod_scorm_attempt_bar", "$", "attemptbar", ")", "{", "$", "output", "=", "''", ";", "$", "attemptbar", "=", "clone", "(", "$", "attemptbar", ")", ";", "$", "attemptbar", "->", "prepare", "(", "$", ...
scorm attempt bar renderer @param mod_scorm_attempt_bar $attemptbar @return string
[ "scorm", "attempt", "bar", "renderer" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/renderer.php#L55-L77
217,370
moodle/moodle
mod/scorm/renderer.php
mod_scorm_attempt_bar.prepare
public function prepare(renderer_base $output, moodle_page $page, $target) { if (empty($this->attemptids)) { throw new coding_exception('mod_scorm_attempt_bar requires a attemptids value.'); } if (!isset($this->attempt) || is_null($this->attempt)) { throw new coding_excep...
php
public function prepare(renderer_base $output, moodle_page $page, $target) { if (empty($this->attemptids)) { throw new coding_exception('mod_scorm_attempt_bar requires a attemptids value.'); } if (!isset($this->attempt) || is_null($this->attempt)) { throw new coding_excep...
[ "public", "function", "prepare", "(", "renderer_base", "$", "output", ",", "moodle_page", "$", "page", ",", "$", "target", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "attemptids", ")", ")", "{", "throw", "new", "coding_exception", "(", "'mod_s...
Prepares the scorm attempt bar for output. This method validates the arguments set up for the scorm attempt bar and then produces fragments of HTML to assist display later on. @param renderer_base $output @param moodle_page $page @param string $target @throws coding_exception
[ "Prepares", "the", "scorm", "attempt", "bar", "for", "output", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/renderer.php#L155-L201
217,371
moodle/moodle
backup/util/xml/parser/processors/grouped_parser_processor.class.php
grouped_parser_processor.before_path
public function before_path($path) { if ($this->path_is_grouped($path) and !isset($this->currentdata[$path])) { // If the grouped element itself does not contain any final tags, // we would not get any chunk data for it. So we add an artificial // empty data chunk here that w...
php
public function before_path($path) { if ($this->path_is_grouped($path) and !isset($this->currentdata[$path])) { // If the grouped element itself does not contain any final tags, // we would not get any chunk data for it. So we add an artificial // empty data chunk here that w...
[ "public", "function", "before_path", "(", "$", "path", ")", "{", "if", "(", "$", "this", "->", "path_is_grouped", "(", "$", "path", ")", "and", "!", "isset", "(", "$", "this", "->", "currentdata", "[", "$", "path", "]", ")", ")", "{", "// If the grou...
The parser fires this each time one path is going to be parsed @param string $path xml path which parsing has started
[ "The", "parser", "fires", "this", "each", "time", "one", "path", "is", "going", "to", "be", "parsed" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/xml/parser/processors/grouped_parser_processor.class.php#L117-L132
217,372
moodle/moodle
backup/util/xml/parser/processors/grouped_parser_processor.class.php
grouped_parser_processor.grouped_parent_exists
protected function grouped_parent_exists($path) { // Search the tree structure to find out if one of the paths // above the $path is a grouped path. $patharray = explode('/', $this->get_parent_path($path)); $groupedpath = ''; $currentpos = &$this->groupedparentprefixtree; ...
php
protected function grouped_parent_exists($path) { // Search the tree structure to find out if one of the paths // above the $path is a grouped path. $patharray = explode('/', $this->get_parent_path($path)); $groupedpath = ''; $currentpos = &$this->groupedparentprefixtree; ...
[ "protected", "function", "grouped_parent_exists", "(", "$", "path", ")", "{", "// Search the tree structure to find out if one of the paths", "// above the $path is a grouped path.", "$", "patharray", "=", "explode", "(", "'/'", ",", "$", "this", "->", "get_parent_path", "(...
Function that will look for any grouped parent for the given path, returning it if found, false if not
[ "Function", "that", "will", "look", "for", "any", "grouped", "parent", "for", "the", "given", "path", "returning", "it", "if", "found", "false", "if", "not" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/xml/parser/processors/grouped_parser_processor.class.php#L191-L217
217,373
moodle/moodle
backup/util/xml/parser/processors/grouped_parser_processor.class.php
grouped_parser_processor.get_parent_path
protected function get_parent_path($path) { if (!isset($this->parentcache[$path])) { $this->parentcache[$path] = progressive_parser::dirname($path); $this->parentcacheavailablesize--; if ($this->parentcacheavailablesize < 0) { // Older first is cheaper than LR...
php
protected function get_parent_path($path) { if (!isset($this->parentcache[$path])) { $this->parentcache[$path] = progressive_parser::dirname($path); $this->parentcacheavailablesize--; if ($this->parentcacheavailablesize < 0) { // Older first is cheaper than LR...
[ "protected", "function", "get_parent_path", "(", "$", "path", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "parentcache", "[", "$", "path", "]", ")", ")", "{", "$", "this", "->", "parentcache", "[", "$", "path", "]", "=", "progressive_p...
Get the parent path using a local cache for performance. @param $path string The pathname you wish to obtain the parent name for. @return string The parent pathname.
[ "Get", "the", "parent", "path", "using", "a", "local", "cache", "for", "performance", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/xml/parser/processors/grouped_parser_processor.class.php#L225-L240
217,374
moodle/moodle
backup/util/xml/parser/processors/grouped_parser_processor.class.php
grouped_parser_processor.grouped_child_exists
protected function grouped_child_exists($path) { $childpath = $path . '/'; foreach ($this->groupedpaths as $groupedpath => $set) { if (strpos($groupedpath, $childpath) === 0) { return $groupedpath; } } return false; }
php
protected function grouped_child_exists($path) { $childpath = $path . '/'; foreach ($this->groupedpaths as $groupedpath => $set) { if (strpos($groupedpath, $childpath) === 0) { return $groupedpath; } } return false; }
[ "protected", "function", "grouped_child_exists", "(", "$", "path", ")", "{", "$", "childpath", "=", "$", "path", ".", "'/'", ";", "foreach", "(", "$", "this", "->", "groupedpaths", "as", "$", "groupedpath", "=>", "$", "set", ")", "{", "if", "(", "strpo...
Function that will look for any grouped child for the given path, returning it if found, false if not
[ "Function", "that", "will", "look", "for", "any", "grouped", "child", "for", "the", "given", "path", "returning", "it", "if", "found", "false", "if", "not" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/xml/parser/processors/grouped_parser_processor.class.php#L248-L256
217,375
moodle/moodle
backup/util/xml/parser/processors/grouped_parser_processor.class.php
grouped_parser_processor.build_currentdata
protected function build_currentdata($grouped, $data) { // Check the grouped already exists into currentdata if (!is_array($this->currentdata) or !array_key_exists($grouped, $this->currentdata)) { $a = new stdclass(); $a->grouped = $grouped; $a->child = $data['path'];...
php
protected function build_currentdata($grouped, $data) { // Check the grouped already exists into currentdata if (!is_array($this->currentdata) or !array_key_exists($grouped, $this->currentdata)) { $a = new stdclass(); $a->grouped = $grouped; $a->child = $data['path'];...
[ "protected", "function", "build_currentdata", "(", "$", "grouped", ",", "$", "data", ")", "{", "// Check the grouped already exists into currentdata", "if", "(", "!", "is_array", "(", "$", "this", "->", "currentdata", ")", "or", "!", "array_key_exists", "(", "$", ...
This function will accumulate the chunk into the specified grouped element for later dispatching once it is complete
[ "This", "function", "will", "accumulate", "the", "chunk", "into", "the", "specified", "grouped", "element", "for", "later", "dispatching", "once", "it", "is", "complete" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/xml/parser/processors/grouped_parser_processor.class.php#L262-L271
217,376
moodle/moodle
backup/util/xml/parser/processors/grouped_parser_processor.class.php
grouped_parser_processor.add_missing_sub
protected function add_missing_sub($grouped, $path, $tags) { // Remember tag being processed $processedtag = basename($path); $info =& $this->currentdata[$grouped]['tags']; $hierarchyarr = explode('/', str_replace($grouped . '/', '', $path)); $previouselement = ''; $cu...
php
protected function add_missing_sub($grouped, $path, $tags) { // Remember tag being processed $processedtag = basename($path); $info =& $this->currentdata[$grouped]['tags']; $hierarchyarr = explode('/', str_replace($grouped . '/', '', $path)); $previouselement = ''; $cu...
[ "protected", "function", "add_missing_sub", "(", "$", "grouped", ",", "$", "path", ",", "$", "tags", ")", "{", "// Remember tag being processed", "$", "processedtag", "=", "basename", "(", "$", "path", ")", ";", "$", "info", "=", "&", "$", "this", "->", ...
Add non-existing subarray elements
[ "Add", "non", "-", "existing", "subarray", "elements" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/xml/parser/processors/grouped_parser_processor.class.php#L276-L325
217,377
moodle/moodle
mod/data/classes/external.php
mod_data_external.get_databases_by_courses
public static function get_databases_by_courses($courseids = array()) { global $PAGE; $params = self::validate_parameters(self::get_databases_by_courses_parameters(), array('courseids' => $courseids)); $warnings = array(); $mycourses = array(); if (empty($params['courseids'])) ...
php
public static function get_databases_by_courses($courseids = array()) { global $PAGE; $params = self::validate_parameters(self::get_databases_by_courses_parameters(), array('courseids' => $courseids)); $warnings = array(); $mycourses = array(); if (empty($params['courseids'])) ...
[ "public", "static", "function", "get_databases_by_courses", "(", "$", "courseids", "=", "array", "(", ")", ")", "{", "global", "$", "PAGE", ";", "$", "params", "=", "self", "::", "validate_parameters", "(", "self", "::", "get_databases_by_courses_parameters", "(...
Returns a list of databases in a provided list of courses, if no list is provided all databases that the user can view will be returned. @param array $courseids the course ids @return array the database details @since Moodle 2.9
[ "Returns", "a", "list", "of", "databases", "in", "a", "provided", "list", "of", "courses", "if", "no", "list", "is", "provided", "all", "databases", "that", "the", "user", "can", "view", "will", "be", "returned", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L73-L136
217,378
moodle/moodle
mod/data/classes/external.php
mod_data_external.validate_database
protected static function validate_database($databaseid) { global $DB; // Request and permission validation. $database = $DB->get_record('data', array('id' => $databaseid), '*', MUST_EXIST); list($course, $cm) = get_course_and_cm_from_instance($database, 'data'); $context = con...
php
protected static function validate_database($databaseid) { global $DB; // Request and permission validation. $database = $DB->get_record('data', array('id' => $databaseid), '*', MUST_EXIST); list($course, $cm) = get_course_and_cm_from_instance($database, 'data'); $context = con...
[ "protected", "static", "function", "validate_database", "(", "$", "databaseid", ")", "{", "global", "$", "DB", ";", "// Request and permission validation.", "$", "database", "=", "$", "DB", "->", "get_record", "(", "'data'", ",", "array", "(", "'id'", "=>", "$...
Utility function for validating a database. @param int $databaseid database instance id @return array array containing the database object, course, context and course module objects @since Moodle 3.3
[ "Utility", "function", "for", "validating", "a", "database", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L163-L175
217,379
moodle/moodle
mod/data/classes/external.php
mod_data_external.get_data_access_information
public static function get_data_access_information($databaseid, $groupid = 0) { $params = array('databaseid' => $databaseid, 'groupid' => $groupid); $params = self::validate_parameters(self::get_data_access_information_parameters(), $params); $warnings = array(); list($database, $cours...
php
public static function get_data_access_information($databaseid, $groupid = 0) { $params = array('databaseid' => $databaseid, 'groupid' => $groupid); $params = self::validate_parameters(self::get_data_access_information_parameters(), $params); $warnings = array(); list($database, $cours...
[ "public", "static", "function", "get_data_access_information", "(", "$", "databaseid", ",", "$", "groupid", "=", "0", ")", "{", "$", "params", "=", "array", "(", "'databaseid'", "=>", "$", "databaseid", ",", "'groupid'", "=>", "$", "groupid", ")", ";", "$"...
Return access information for a given database. @param int $databaseid the database instance id @param int $groupid (optional) group id, 0 means that the function will determine the user group @return array of warnings and access information @since Moodle 3.3 @throws moodle_exception
[ "Return", "access", "information", "for", "a", "given", "database", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L255-L300
217,380
moodle/moodle
mod/data/classes/external.php
mod_data_external.get_entry
public static function get_entry($entryid, $returncontents = false) { global $PAGE, $DB; $params = array('entryid' => $entryid, 'returncontents' => $returncontents); $params = self::validate_parameters(self::get_entry_parameters(), $params); $warnings = array(); $record = $DB->...
php
public static function get_entry($entryid, $returncontents = false) { global $PAGE, $DB; $params = array('entryid' => $entryid, 'returncontents' => $returncontents); $params = self::validate_parameters(self::get_entry_parameters(), $params); $warnings = array(); $record = $DB->...
[ "public", "static", "function", "get_entry", "(", "$", "entryid", ",", "$", "returncontents", "=", "false", ")", "{", "global", "$", "PAGE", ",", "$", "DB", ";", "$", "params", "=", "array", "(", "'entryid'", "=>", "$", "entryid", ",", "'returncontents'"...
Return one entry record from the database, including contents optionally. @param int $entryid the record entry id id @param bool $returncontents whether to return the entries contents or not @return array of warnings and the entries @since Moodle 3.3 @throws moodle_exception
[ "Return", "one", "entry", "record", "from", "the", "database", "including", "contents", "optionally", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L502-L548
217,381
moodle/moodle
mod/data/classes/external.php
mod_data_external.get_fields
public static function get_fields($databaseid) { global $PAGE; $params = array('databaseid' => $databaseid); $params = self::validate_parameters(self::get_fields_parameters(), $params); $fields = $warnings = array(); list($database, $course, $cm, $context) = self::validate_data...
php
public static function get_fields($databaseid) { global $PAGE; $params = array('databaseid' => $databaseid); $params = self::validate_parameters(self::get_fields_parameters(), $params); $fields = $warnings = array(); list($database, $course, $cm, $context) = self::validate_data...
[ "public", "static", "function", "get_fields", "(", "$", "databaseid", ")", "{", "global", "$", "PAGE", ";", "$", "params", "=", "array", "(", "'databaseid'", "=>", "$", "databaseid", ")", ";", "$", "params", "=", "self", "::", "validate_parameters", "(", ...
Return the list of configured fields for the given database. @param int $databaseid the database id @return array of warnings and the fields @since Moodle 3.3 @throws moodle_exception
[ "Return", "the", "list", "of", "configured", "fields", "for", "the", "given", "database", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L589-L622
217,382
moodle/moodle
mod/data/classes/external.php
mod_data_external.approve_entry
public static function approve_entry($entryid, $approve = true) { global $PAGE, $DB; $params = array('entryid' => $entryid, 'approve' => $approve); $params = self::validate_parameters(self::approve_entry_parameters(), $params); $warnings = array(); $record = $DB->get_record('da...
php
public static function approve_entry($entryid, $approve = true) { global $PAGE, $DB; $params = array('entryid' => $entryid, 'approve' => $approve); $params = self::validate_parameters(self::approve_entry_parameters(), $params); $warnings = array(); $record = $DB->get_record('da...
[ "public", "static", "function", "approve_entry", "(", "$", "entryid", ",", "$", "approve", "=", "true", ")", "{", "global", "$", "PAGE", ",", "$", "DB", ";", "$", "params", "=", "array", "(", "'entryid'", "=>", "$", "entryid", ",", "'approve'", "=>", ...
Approves or unapproves an entry. @param int $entryid the record entry id id @param bool $approve whether to approve (true) or unapprove the entry @return array of warnings and the entries @since Moodle 3.3 @throws moodle_exception
[ "Approves", "or", "unapproves", "an", "entry", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L837-L858
217,383
moodle/moodle
mod/data/classes/external.php
mod_data_external.delete_entry
public static function delete_entry($entryid) { global $PAGE, $DB; $params = array('entryid' => $entryid); $params = self::validate_parameters(self::delete_entry_parameters(), $params); $warnings = array(); $record = $DB->get_record('data_records', array('id' => $params['entryi...
php
public static function delete_entry($entryid) { global $PAGE, $DB; $params = array('entryid' => $entryid); $params = self::validate_parameters(self::delete_entry_parameters(), $params); $warnings = array(); $record = $DB->get_record('data_records', array('id' => $params['entryi...
[ "public", "static", "function", "delete_entry", "(", "$", "entryid", ")", "{", "global", "$", "PAGE", ",", "$", "DB", ";", "$", "params", "=", "array", "(", "'entryid'", "=>", "$", "entryid", ")", ";", "$", "params", "=", "self", "::", "validate_parame...
Deletes an entry. @param int $entryid the record entry id @return array of warnings success status @since Moodle 3.3 @throws moodle_exception
[ "Deletes", "an", "entry", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L897-L918
217,384
moodle/moodle
mod/data/classes/external.php
mod_data_external.add_entry
public static function add_entry($databaseid, $groupid, $data) { global $DB; $params = array('databaseid' => $databaseid, 'groupid' => $groupid, 'data' => $data); $params = self::validate_parameters(self::add_entry_parameters(), $params); $warnings = array(); $fieldnotifications...
php
public static function add_entry($databaseid, $groupid, $data) { global $DB; $params = array('databaseid' => $databaseid, 'groupid' => $groupid, 'data' => $data); $params = self::validate_parameters(self::add_entry_parameters(), $params); $warnings = array(); $fieldnotifications...
[ "public", "static", "function", "add_entry", "(", "$", "databaseid", ",", "$", "groupid", ",", "$", "data", ")", "{", "global", "$", "DB", ";", "$", "params", "=", "array", "(", "'databaseid'", "=>", "$", "databaseid", ",", "'groupid'", "=>", "$", "gro...
Adds a new entry to a database @param int $databaseid the data instance id @param int $groupid (optional) group id, 0 means that the function will determine the user group @param array $data the fields data to be created @return array of warnings and status result @since Moodle 3.3 @throws moodle_exception
[ "Adds", "a", "new", "entry", "to", "a", "database" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L970-L1035
217,385
moodle/moodle
mod/data/classes/external.php
mod_data_external.update_entry
public static function update_entry($entryid, $data) { global $DB; $params = array('entryid' => $entryid, 'data' => $data); $params = self::validate_parameters(self::update_entry_parameters(), $params); $warnings = array(); $fieldnotifications = array(); $updated = false...
php
public static function update_entry($entryid, $data) { global $DB; $params = array('entryid' => $entryid, 'data' => $data); $params = self::validate_parameters(self::update_entry_parameters(), $params); $warnings = array(); $fieldnotifications = array(); $updated = false...
[ "public", "static", "function", "update_entry", "(", "$", "entryid", ",", "$", "data", ")", "{", "global", "$", "DB", ";", "$", "params", "=", "array", "(", "'entryid'", "=>", "$", "entryid", ",", "'data'", "=>", "$", "data", ")", ";", "$", "params",...
Updates an existing entry. @param int $entryid the data instance id @param array $data the fields data to be created @return array of warnings and status result @since Moodle 3.3 @throws moodle_exception
[ "Updates", "an", "existing", "entry", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/data/classes/external.php#L1095-L1149
217,386
moodle/moodle
mod/lti/backup/moodle2/restore_lti_stepslib.php
restore_lti_activity_structure_step.process_ltitype
protected function process_ltitype($data) { global $DB, $USER; $data = (object)$data; $oldid = $data->id; if (!empty($data->createdby)) { $data->createdby = $this->get_mappingid('user', $data->createdby) ?: $USER->id; } $courseid = $this->get_courseid(); ...
php
protected function process_ltitype($data) { global $DB, $USER; $data = (object)$data; $oldid = $data->id; if (!empty($data->createdby)) { $data->createdby = $this->get_mappingid('user', $data->createdby) ?: $USER->id; } $courseid = $this->get_courseid(); ...
[ "protected", "function", "process_ltitype", "(", "$", "data", ")", "{", "global", "$", "DB", ",", "$", "USER", ";", "$", "data", "=", "(", "object", ")", "$", "data", ";", "$", "oldid", "=", "$", "data", "->", "id", ";", "if", "(", "!", "empty", ...
Process an lti type restore @param mixed $data The data from backup XML file @return void
[ "Process", "an", "lti", "type", "restore" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/lti/backup/moodle2/restore_lti_stepslib.php#L119-L144
217,387
moodle/moodle
mod/lti/backup/moodle2/restore_lti_stepslib.php
restore_lti_activity_structure_step.find_existing_lti_type
protected function find_existing_lti_type($data) { global $DB; if ($ltitypeid = $this->get_mappingid('ltitype', $data->id)) { return $ltitypeid; } $ltitype = null; $params = (array)$data; if ($this->task->is_samesite()) { // If we are restoring on...
php
protected function find_existing_lti_type($data) { global $DB; if ($ltitypeid = $this->get_mappingid('ltitype', $data->id)) { return $ltitypeid; } $ltitype = null; $params = (array)$data; if ($this->task->is_samesite()) { // If we are restoring on...
[ "protected", "function", "find_existing_lti_type", "(", "$", "data", ")", "{", "global", "$", "DB", ";", "if", "(", "$", "ltitypeid", "=", "$", "this", "->", "get_mappingid", "(", "'ltitype'", ",", "$", "data", "->", "id", ")", ")", "{", "return", "$",...
Attempts to find existing record in lti_type @param stdClass $data @return int|null field lti_types.id or null if tool is not found
[ "Attempts", "to", "find", "existing", "record", "in", "lti_type" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/lti/backup/moodle2/restore_lti_stepslib.php#L151-L190
217,388
moodle/moodle
lib/horde/framework/Horde/Support/Numerizer/Locale/De.php
Horde_Support_Numerizer_Locale_De._replaceTenPrefixes
protected function _replaceTenPrefixes($string) { foreach ($this->TEN_PREFIXES as $tp => $tp_replacement) { $string = preg_replace_callback( "/(?:$tp)( *\d(?=[^\d]|\$))*/i", function ($m) use ($tp_replacement) { return $tp_replacement + (isset(...
php
protected function _replaceTenPrefixes($string) { foreach ($this->TEN_PREFIXES as $tp => $tp_replacement) { $string = preg_replace_callback( "/(?:$tp)( *\d(?=[^\d]|\$))*/i", function ($m) use ($tp_replacement) { return $tp_replacement + (isset(...
[ "protected", "function", "_replaceTenPrefixes", "(", "$", "string", ")", "{", "foreach", "(", "$", "this", "->", "TEN_PREFIXES", "as", "$", "tp", "=>", "$", "tp_replacement", ")", "{", "$", "string", "=", "preg_replace_callback", "(", "\"/(?:$tp)( *\\d(?=[^\\d]|...
ten, twenty, etc.
[ "ten", "twenty", "etc", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Support/Numerizer/Locale/De.php#L84-L96
217,389
moodle/moodle
lib/horde/framework/Horde/Support/Numerizer/Locale/De.php
Horde_Support_Numerizer_Locale_De._replaceBigPrefixes
protected function _replaceBigPrefixes($string) { foreach ($this->BIG_PREFIXES as $bp => $bp_replacement) { $string = preg_replace_callback( '/(\d*) *' . $bp . '(\d?)/i', function ($m) use ($bp_replacement) { $factor = (int)$m[1]; ...
php
protected function _replaceBigPrefixes($string) { foreach ($this->BIG_PREFIXES as $bp => $bp_replacement) { $string = preg_replace_callback( '/(\d*) *' . $bp . '(\d?)/i', function ($m) use ($bp_replacement) { $factor = (int)$m[1]; ...
[ "protected", "function", "_replaceBigPrefixes", "(", "$", "string", ")", "{", "foreach", "(", "$", "this", "->", "BIG_PREFIXES", "as", "$", "bp", "=>", "$", "bp_replacement", ")", "{", "$", "string", "=", "preg_replace_callback", "(", "'/(\\d*) *'", ".", "$"...
hundreds, thousands, millions, etc.
[ "hundreds", "thousands", "millions", "etc", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Support/Numerizer/Locale/De.php#L101-L120
217,390
moodle/moodle
question/classes/bank/column_base.php
column_base.display_header
public function display_header() { echo '<th class="header ' . $this->get_classes() . '" scope="col">'; $sortable = $this->is_sortable(); $name = get_class($this); $title = $this->get_title(); $tip = $this->get_title_tip(); if (is_array($sortable)) { if ($titl...
php
public function display_header() { echo '<th class="header ' . $this->get_classes() . '" scope="col">'; $sortable = $this->is_sortable(); $name = get_class($this); $title = $this->get_title(); $tip = $this->get_title_tip(); if (is_array($sortable)) { if ($titl...
[ "public", "function", "display_header", "(", ")", "{", "echo", "'<th class=\"header '", ".", "$", "this", "->", "get_classes", "(", ")", ".", "'\" scope=\"col\">'", ";", "$", "sortable", "=", "$", "this", "->", "is_sortable", "(", ")", ";", "$", "name", "=...
Output the column header cell.
[ "Output", "the", "column", "header", "cell", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/classes/bank/column_base.php#L74-L102
217,391
moodle/moodle
question/classes/bank/column_base.php
column_base.make_sort_link
protected function make_sort_link($sort, $title, $tip, $defaultreverse = false) { $currentsort = $this->qbank->get_primary_sort_order($sort); $newsortreverse = $defaultreverse; if ($currentsort) { $newsortreverse = $currentsort > 0; } if (!$tip) { $tip = $...
php
protected function make_sort_link($sort, $title, $tip, $defaultreverse = false) { $currentsort = $this->qbank->get_primary_sort_order($sort); $newsortreverse = $defaultreverse; if ($currentsort) { $newsortreverse = $currentsort > 0; } if (!$tip) { $tip = $...
[ "protected", "function", "make_sort_link", "(", "$", "sort", ",", "$", "title", ",", "$", "tip", ",", "$", "defaultreverse", "=", "false", ")", "{", "$", "currentsort", "=", "$", "this", "->", "qbank", "->", "get_primary_sort_order", "(", "$", "sort", ")...
Get a link that changes the sort order, and indicates the current sort state. @param $name internal name used for this type of sorting. @param $currentsort the current sort order -1, 0, 1 for descending, none, ascending. @param $title the link text. @param $defaultreverse whether the default sort order for this column ...
[ "Get", "a", "link", "that", "changes", "the", "sort", "order", "and", "indicates", "the", "current", "sort", "state", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/classes/bank/column_base.php#L127-L148
217,392
moodle/moodle
question/classes/bank/column_base.php
column_base.get_sort_icon
protected function get_sort_icon($reverse) { global $OUTPUT; if ($reverse) { return $OUTPUT->pix_icon('t/sort_desc', get_string('desc'), '', array('class' => 'iconsort')); } else { return $OUTPUT->pix_icon('t/sort_asc', get_string('asc'), '', array('class' => 'iconsort'))...
php
protected function get_sort_icon($reverse) { global $OUTPUT; if ($reverse) { return $OUTPUT->pix_icon('t/sort_desc', get_string('desc'), '', array('class' => 'iconsort')); } else { return $OUTPUT->pix_icon('t/sort_asc', get_string('asc'), '', array('class' => 'iconsort'))...
[ "protected", "function", "get_sort_icon", "(", "$", "reverse", ")", "{", "global", "$", "OUTPUT", ";", "if", "(", "$", "reverse", ")", "{", "return", "$", "OUTPUT", "->", "pix_icon", "(", "'t/sort_desc'", ",", "get_string", "(", "'desc'", ")", ",", "''",...
Get an icon representing the corrent sort state. @param $reverse sort is descending, not ascending. @return string HTML image tag.
[ "Get", "an", "icon", "representing", "the", "corrent", "sort", "state", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/classes/bank/column_base.php#L155-L162
217,393
moodle/moodle
question/classes/bank/column_base.php
column_base.display
public function display($question, $rowclasses) { $this->display_start($question, $rowclasses); $this->display_content($question, $rowclasses); $this->display_end($question, $rowclasses); }
php
public function display($question, $rowclasses) { $this->display_start($question, $rowclasses); $this->display_content($question, $rowclasses); $this->display_end($question, $rowclasses); }
[ "public", "function", "display", "(", "$", "question", ",", "$", "rowclasses", ")", "{", "$", "this", "->", "display_start", "(", "$", "question", ",", "$", "rowclasses", ")", ";", "$", "this", "->", "display_content", "(", "$", "question", ",", "$", "...
Output this column. @param object $question the row from the $question table, augmented with extra information. @param string $rowclasses CSS class names that should be applied to this row of output.
[ "Output", "this", "column", "." ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/classes/bank/column_base.php#L169-L173
217,394
moodle/moodle
question/classes/bank/column_base.php
column_base.display_end
protected function display_end($question, $rowclasses) { $tag = 'td'; if ($this->isheading) { $tag = 'th'; } echo \html_writer::end_tag($tag); }
php
protected function display_end($question, $rowclasses) { $tag = 'td'; if ($this->isheading) { $tag = 'th'; } echo \html_writer::end_tag($tag); }
[ "protected", "function", "display_end", "(", "$", "question", ",", "$", "rowclasses", ")", "{", "$", "tag", "=", "'td'", ";", "if", "(", "$", "this", "->", "isheading", ")", "{", "$", "tag", "=", "'th'", ";", "}", "echo", "\\", "html_writer", "::", ...
Output the closing column tag @param object $question @param string $rowclasses
[ "Output", "the", "closing", "column", "tag" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/classes/bank/column_base.php#L227-L233
217,395
moodle/moodle
blocks/online_users/classes/fetcher.php
fetcher.get_users
public function get_users($userlimit = 0) { global $DB; $users = $DB->get_records_sql($this->sql, $this->params, 0, $userlimit); return $users; }
php
public function get_users($userlimit = 0) { global $DB; $users = $DB->get_records_sql($this->sql, $this->params, 0, $userlimit); return $users; }
[ "public", "function", "get_users", "(", "$", "userlimit", "=", "0", ")", "{", "global", "$", "DB", ";", "$", "users", "=", "$", "DB", "->", "get_records_sql", "(", "$", "this", "->", "sql", ",", "$", "this", "->", "params", ",", "0", ",", "$", "u...
Get a list of the most recent online users @param int $userlimit The maximum number of users that will be returned (optional, unlimited if not set) @return array
[ "Get", "a", "list", "of", "the", "most", "recent", "online", "users" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/blocks/online_users/classes/fetcher.php#L175-L179
217,396
moodle/moodle
mod/lesson/backup/moodle1/lib.php
moodle1_mod_lesson_handler.write_single_page_xml
protected function write_single_page_xml($page, $prevpageid=0, $nextpageid=0) { //mince nextpageid and prevpageid $page->data['nextpageid'] = $nextpageid; $page->data['prevpageid'] = $prevpageid; // write out each page data $this->xmlwriter->begin_tag('page', array('id' => $page...
php
protected function write_single_page_xml($page, $prevpageid=0, $nextpageid=0) { //mince nextpageid and prevpageid $page->data['nextpageid'] = $nextpageid; $page->data['prevpageid'] = $prevpageid; // write out each page data $this->xmlwriter->begin_tag('page', array('id' => $page...
[ "protected", "function", "write_single_page_xml", "(", "$", "page", ",", "$", "prevpageid", "=", "0", ",", "$", "nextpageid", "=", "0", ")", "{", "//mince nextpageid and prevpageid", "$", "page", "->", "data", "[", "'nextpageid'", "]", "=", "$", "nextpageid", ...
writes out the given page into the open xml handle @param type $page @param type $prevpageid @param type $nextpageid
[ "writes", "out", "the", "given", "page", "into", "the", "open", "xml", "handle" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/lesson/backup/moodle1/lib.php#L262-L302
217,397
moodle/moodle
lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php
HTMLPurifier_Printer_HTMLDefinition.renderDoctype
protected function renderDoctype() { $doctype = $this->def->doctype; $ret = ''; $ret .= $this->start('table'); $ret .= $this->element('caption', 'Doctype'); $ret .= $this->row('Name', $doctype->name); $ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No'); $r...
php
protected function renderDoctype() { $doctype = $this->def->doctype; $ret = ''; $ret .= $this->start('table'); $ret .= $this->element('caption', 'Doctype'); $ret .= $this->row('Name', $doctype->name); $ret .= $this->row('XML', $doctype->xml ? 'Yes' : 'No'); $r...
[ "protected", "function", "renderDoctype", "(", ")", "{", "$", "doctype", "=", "$", "this", "->", "def", "->", "doctype", ";", "$", "ret", "=", "''", ";", "$", "ret", ".=", "$", "this", "->", "start", "(", "'table'", ")", ";", "$", "ret", ".=", "$...
Renders the Doctype table @return string
[ "Renders", "the", "Doctype", "table" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php#L38-L50
217,398
moodle/moodle
lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php
HTMLPurifier_Printer_HTMLDefinition.renderEnvironment
protected function renderEnvironment() { $def = $this->def; $ret = ''; $ret .= $this->start('table'); $ret .= $this->element('caption', 'Environment'); $ret .= $this->row('Parent of fragment', $def->info_parent); $ret .= $this->renderChildren($def->info_parent_def-...
php
protected function renderEnvironment() { $def = $this->def; $ret = ''; $ret .= $this->start('table'); $ret .= $this->element('caption', 'Environment'); $ret .= $this->row('Parent of fragment', $def->info_parent); $ret .= $this->renderChildren($def->info_parent_def-...
[ "protected", "function", "renderEnvironment", "(", ")", "{", "$", "def", "=", "$", "this", "->", "def", ";", "$", "ret", "=", "''", ";", "$", "ret", ".=", "$", "this", "->", "start", "(", "'table'", ")", ";", "$", "ret", ".=", "$", "this", "->", ...
Renders environment table, which is miscellaneous info @return string
[ "Renders", "environment", "table", "which", "is", "miscellaneous", "info" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php#L57-L97
217,399
moodle/moodle
lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php
HTMLPurifier_Printer_HTMLDefinition.renderContentSets
protected function renderContentSets() { $ret = ''; $ret .= $this->start('table'); $ret .= $this->element('caption', 'Content Sets'); foreach ($this->def->info_content_sets as $name => $lookup) { $ret .= $this->heavyHeader($name); $ret .= $this->start('tr'); ...
php
protected function renderContentSets() { $ret = ''; $ret .= $this->start('table'); $ret .= $this->element('caption', 'Content Sets'); foreach ($this->def->info_content_sets as $name => $lookup) { $ret .= $this->heavyHeader($name); $ret .= $this->start('tr'); ...
[ "protected", "function", "renderContentSets", "(", ")", "{", "$", "ret", "=", "''", ";", "$", "ret", ".=", "$", "this", "->", "start", "(", "'table'", ")", ";", "$", "ret", ".=", "$", "this", "->", "element", "(", "'caption'", ",", "'Content Sets'", ...
Renders the Content Sets table @return string
[ "Renders", "the", "Content", "Sets", "table" ]
a411b499b98afc9901c24a9466c7e322946a04aa
https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/Printer/HTMLDefinition.php#L103-L116