id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
219,900 | moodle/moodle | question/engine/datalib.php | question_engine_unit_of_work.save | public function save(question_engine_data_mapper $dm) {
$dm->delete_steps(array_keys($this->stepsdeleted), $this->quba->get_owning_context());
// Initially an array of array of question_attempt_step_objects.
// Built as a nested array for efficiency, then flattened.
$stepdata = array();... | php | public function save(question_engine_data_mapper $dm) {
$dm->delete_steps(array_keys($this->stepsdeleted), $this->quba->get_owning_context());
// Initially an array of array of question_attempt_step_objects.
// Built as a nested array for efficiency, then flattened.
$stepdata = array();... | [
"public",
"function",
"save",
"(",
"question_engine_data_mapper",
"$",
"dm",
")",
"{",
"$",
"dm",
"->",
"delete_steps",
"(",
"array_keys",
"(",
"$",
"this",
"->",
"stepsdeleted",
")",
",",
"$",
"this",
"->",
"quba",
"->",
"get_owning_context",
"(",
")",
")... | Write all the changes we have recorded to the database.
@param question_engine_data_mapper $dm the mapper to use to update the database. | [
"Write",
"all",
"the",
"changes",
"we",
"have",
"recorded",
"to",
"the",
"database",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/engine/datalib.php#L1540-L1593 |
219,901 | moodle/moodle | question/engine/datalib.php | question_file_saver.save_files | public function save_files($itemid, $context) {
file_save_draft_area_files($this->draftitemid, $context->id,
$this->component, $this->filearea, $itemid);
} | php | public function save_files($itemid, $context) {
file_save_draft_area_files($this->draftitemid, $context->id,
$this->component, $this->filearea, $itemid);
} | [
"public",
"function",
"save_files",
"(",
"$",
"itemid",
",",
"$",
"context",
")",
"{",
"file_save_draft_area_files",
"(",
"$",
"this",
"->",
"draftitemid",
",",
"$",
"context",
"->",
"id",
",",
"$",
"this",
"->",
"component",
",",
"$",
"this",
"->",
"fil... | Actually save the files.
@param integer $itemid the item id for the file area to save into. | [
"Actually",
"save",
"the",
"files",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/engine/datalib.php#L1700-L1703 |
219,902 | moodle/moodle | question/engine/datalib.php | question_file_saver.get_files | public function get_files() {
global $USER;
$fs = get_file_storage();
$usercontext = context_user::instance($USER->id);
return $fs->get_area_files($usercontext->id, 'user', 'draft',
$this->draftitemid, 'sortorder, filepath, filename', false);
} | php | public function get_files() {
global $USER;
$fs = get_file_storage();
$usercontext = context_user::instance($USER->id);
return $fs->get_area_files($usercontext->id, 'user', 'draft',
$this->draftitemid, 'sortorder, filepath, filename', false);
} | [
"public",
"function",
"get_files",
"(",
")",
"{",
"global",
"$",
"USER",
";",
"$",
"fs",
"=",
"get_file_storage",
"(",
")",
";",
"$",
"usercontext",
"=",
"context_user",
"::",
"instance",
"(",
"$",
"USER",
"->",
"id",
")",
";",
"return",
"$",
"fs",
"... | Get the files that were submitted.
@return array of stored_files objects. | [
"Get",
"the",
"files",
"that",
"were",
"submitted",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/engine/datalib.php#L1709-L1717 |
219,903 | moodle/moodle | mod/forum/classes/search/post.php | post.get_document | public function get_document($record, $options = array()) {
try {
$cm = $this->get_cm('forum', $record->forumid, $record->courseid);
$context = \context_module::instance($cm->id);
} catch (\dml_missing_record_exception $ex) {
// Notify it as we run here as admin, we ... | php | public function get_document($record, $options = array()) {
try {
$cm = $this->get_cm('forum', $record->forumid, $record->courseid);
$context = \context_module::instance($cm->id);
} catch (\dml_missing_record_exception $ex) {
// Notify it as we run here as admin, we ... | [
"public",
"function",
"get_document",
"(",
"$",
"record",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"try",
"{",
"$",
"cm",
"=",
"$",
"this",
"->",
"get_cm",
"(",
"'forum'",
",",
"$",
"record",
"->",
"forumid",
",",
"$",
"record",
"->",... | Returns the document associated with this post id.
@param stdClass $record Post info.
@param array $options
@return \core_search\document | [
"Returns",
"the",
"document",
"associated",
"with",
"this",
"post",
"id",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/search/post.php#L87-L125 |
219,904 | moodle/moodle | mod/forum/classes/search/post.php | post.attach_files | public function attach_files($document) {
global $DB;
$postid = $document->get('itemid');
try {
$post = $this->get_post($postid);
} catch (\dml_missing_record_exception $e) {
unset($this->postsdata[$postid]);
debugging('Could not get record to attach... | php | public function attach_files($document) {
global $DB;
$postid = $document->get('itemid');
try {
$post = $this->get_post($postid);
} catch (\dml_missing_record_exception $e) {
unset($this->postsdata[$postid]);
debugging('Could not get record to attach... | [
"public",
"function",
"attach_files",
"(",
"$",
"document",
")",
"{",
"global",
"$",
"DB",
";",
"$",
"postid",
"=",
"$",
"document",
"->",
"get",
"(",
"'itemid'",
")",
";",
"try",
"{",
"$",
"post",
"=",
"$",
"this",
"->",
"get_post",
"(",
"$",
"pos... | Add the forum post attachments.
@param document $document The current document
@return null | [
"Add",
"the",
"forum",
"post",
"attachments",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/search/post.php#L157-L189 |
219,905 | moodle/moodle | mod/forum/classes/search/post.php | post.get_doc_url | public function get_doc_url(\core_search\document $doc) {
// The post is already in static cache, we fetch it in self::search_access.
$post = $this->get_post($doc->get('itemid'));
return new \moodle_url('/mod/forum/discuss.php', array('d' => $post->discussion));
} | php | public function get_doc_url(\core_search\document $doc) {
// The post is already in static cache, we fetch it in self::search_access.
$post = $this->get_post($doc->get('itemid'));
return new \moodle_url('/mod/forum/discuss.php', array('d' => $post->discussion));
} | [
"public",
"function",
"get_doc_url",
"(",
"\\",
"core_search",
"\\",
"document",
"$",
"doc",
")",
"{",
"// The post is already in static cache, we fetch it in self::search_access.",
"$",
"post",
"=",
"$",
"this",
"->",
"get_post",
"(",
"$",
"doc",
"->",
"get",
"(",
... | Link to the forum post discussion
@param \core_search\document $doc
@return \moodle_url | [
"Link",
"to",
"the",
"forum",
"post",
"discussion"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/search/post.php#L232-L236 |
219,906 | moodle/moodle | mod/forum/classes/search/post.php | post.get_context_url | public function get_context_url(\core_search\document $doc) {
$contextmodule = \context::instance_by_id($doc->get('contextid'));
return new \moodle_url('/mod/forum/view.php', array('id' => $contextmodule->instanceid));
} | php | public function get_context_url(\core_search\document $doc) {
$contextmodule = \context::instance_by_id($doc->get('contextid'));
return new \moodle_url('/mod/forum/view.php', array('id' => $contextmodule->instanceid));
} | [
"public",
"function",
"get_context_url",
"(",
"\\",
"core_search",
"\\",
"document",
"$",
"doc",
")",
"{",
"$",
"contextmodule",
"=",
"\\",
"context",
"::",
"instance_by_id",
"(",
"$",
"doc",
"->",
"get",
"(",
"'contextid'",
")",
")",
";",
"return",
"new",... | Link to the forum.
@param \core_search\document $doc
@return \moodle_url | [
"Link",
"to",
"the",
"forum",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/search/post.php#L244-L247 |
219,907 | moodle/moodle | mod/forum/classes/search/post.php | post.get_post | protected function get_post($postid) {
if (empty($this->postsdata[$postid])) {
$this->postsdata[$postid] = forum_get_post_full($postid);
if (!$this->postsdata[$postid]) {
throw new \dml_missing_record_exception('forum_posts');
}
}
return $this-... | php | protected function get_post($postid) {
if (empty($this->postsdata[$postid])) {
$this->postsdata[$postid] = forum_get_post_full($postid);
if (!$this->postsdata[$postid]) {
throw new \dml_missing_record_exception('forum_posts');
}
}
return $this-... | [
"protected",
"function",
"get_post",
"(",
"$",
"postid",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"postsdata",
"[",
"$",
"postid",
"]",
")",
")",
"{",
"$",
"this",
"->",
"postsdata",
"[",
"$",
"postid",
"]",
"=",
"forum_get_post_full",
"... | Returns the specified forum post from its internal cache.
@throws \dml_missing_record_exception
@param int $postid
@return stdClass | [
"Returns",
"the",
"specified",
"forum",
"post",
"from",
"its",
"internal",
"cache",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/search/post.php#L256-L264 |
219,908 | moodle/moodle | mod/forum/classes/search/post.php | post.get_forum | protected function get_forum($forumid) {
global $DB;
if (empty($this->forumsdata[$forumid])) {
$this->forumsdata[$forumid] = $DB->get_record('forum', array('id' => $forumid), '*', MUST_EXIST);
}
return $this->forumsdata[$forumid];
} | php | protected function get_forum($forumid) {
global $DB;
if (empty($this->forumsdata[$forumid])) {
$this->forumsdata[$forumid] = $DB->get_record('forum', array('id' => $forumid), '*', MUST_EXIST);
}
return $this->forumsdata[$forumid];
} | [
"protected",
"function",
"get_forum",
"(",
"$",
"forumid",
")",
"{",
"global",
"$",
"DB",
";",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"forumsdata",
"[",
"$",
"forumid",
"]",
")",
")",
"{",
"$",
"this",
"->",
"forumsdata",
"[",
"$",
"forumid",
... | Returns the specified forum checking the internal cache.
Store minimal information as this might grow.
@throws \dml_exception
@param int $forumid
@return stdClass | [
"Returns",
"the",
"specified",
"forum",
"checking",
"the",
"internal",
"cache",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/search/post.php#L275-L282 |
219,909 | moodle/moodle | mod/forum/classes/search/post.php | post.get_discussion | protected function get_discussion($discussionid) {
global $DB;
if (empty($this->discussionsdata[$discussionid])) {
$this->discussionsdata[$discussionid] = $DB->get_record('forum_discussions',
array('id' => $discussionid), '*', MUST_EXIST);
}
return $this->dis... | php | protected function get_discussion($discussionid) {
global $DB;
if (empty($this->discussionsdata[$discussionid])) {
$this->discussionsdata[$discussionid] = $DB->get_record('forum_discussions',
array('id' => $discussionid), '*', MUST_EXIST);
}
return $this->dis... | [
"protected",
"function",
"get_discussion",
"(",
"$",
"discussionid",
")",
"{",
"global",
"$",
"DB",
";",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"discussionsdata",
"[",
"$",
"discussionid",
"]",
")",
")",
"{",
"$",
"this",
"->",
"discussionsdata",
"[... | Returns the discussion checking the internal cache.
@throws \dml_missing_record_exception
@param int $discussionid
@return stdClass | [
"Returns",
"the",
"discussion",
"checking",
"the",
"internal",
"cache",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/search/post.php#L291-L299 |
219,910 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_attempt_count_parameters | public static function get_scorm_attempt_count_parameters() {
return new external_function_parameters(
array(
'scormid' => new external_value(PARAM_INT, 'SCORM instance id'),
'userid' => new external_value(PARAM_INT, 'User id'),
'ignoremissingcompletio... | php | public static function get_scorm_attempt_count_parameters() {
return new external_function_parameters(
array(
'scormid' => new external_value(PARAM_INT, 'SCORM instance id'),
'userid' => new external_value(PARAM_INT, 'User id'),
'ignoremissingcompletio... | [
"public",
"static",
"function",
"get_scorm_attempt_count_parameters",
"(",
")",
"{",
"return",
"new",
"external_function_parameters",
"(",
"array",
"(",
"'scormid'",
"=>",
"new",
"external_value",
"(",
"PARAM_INT",
",",
"'SCORM instance id'",
")",
",",
"'userid'",
"=>... | Describes the parameters for get_scorm_attempt_count.
@return external_function_parameters
@since Moodle 3.0 | [
"Describes",
"the",
"parameters",
"for",
"get_scorm_attempt_count",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L113-L123 |
219,911 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_attempt_count | public static function get_scorm_attempt_count($scormid, $userid, $ignoremissingcompletion = false) {
global $USER, $DB;
$params = self::validate_parameters(self::get_scorm_attempt_count_parameters(),
array('scormid' => $scormid, 'userid' => $userid,
... | php | public static function get_scorm_attempt_count($scormid, $userid, $ignoremissingcompletion = false) {
global $USER, $DB;
$params = self::validate_parameters(self::get_scorm_attempt_count_parameters(),
array('scormid' => $scormid, 'userid' => $userid,
... | [
"public",
"static",
"function",
"get_scorm_attempt_count",
"(",
"$",
"scormid",
",",
"$",
"userid",
",",
"$",
"ignoremissingcompletion",
"=",
"false",
")",
"{",
"global",
"$",
"USER",
",",
"$",
"DB",
";",
"$",
"params",
"=",
"self",
"::",
"validate_parameter... | Return the number of attempts done by a user in the given SCORM.
@param int $scormid the scorm id
@param int $userid the user id
@param bool $ignoremissingcompletion ignores attempts that haven't reported a grade/completion
@return array of warnings and the attempts count
@since Moodle 3.0 | [
"Return",
"the",
"number",
"of",
"attempts",
"done",
"by",
"a",
"user",
"in",
"the",
"given",
"SCORM",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L134-L167 |
219,912 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_scoes | public static function get_scorm_scoes($scormid, $organization = '') {
global $DB;
$params = self::validate_parameters(self::get_scorm_scoes_parameters(),
array('scormid' => $scormid, 'organization' => $organization));
$scoes = array();
$warn... | php | public static function get_scorm_scoes($scormid, $organization = '') {
global $DB;
$params = self::validate_parameters(self::get_scorm_scoes_parameters(),
array('scormid' => $scormid, 'organization' => $organization));
$scoes = array();
$warn... | [
"public",
"static",
"function",
"get_scorm_scoes",
"(",
"$",
"scormid",
",",
"$",
"organization",
"=",
"''",
")",
"{",
"global",
"$",
"DB",
";",
"$",
"params",
"=",
"self",
"::",
"validate_parameters",
"(",
"self",
"::",
"get_scorm_scoes_parameters",
"(",
")... | Returns a list containing all the scoes data related to the given scorm id
@param int $scormid the scorm id
@param string $organization the organization id
@return array warnings and the scoes data
@since Moodle 3.0 | [
"Returns",
"a",
"list",
"containing",
"all",
"the",
"scoes",
"data",
"related",
"to",
"the",
"given",
"scorm",
"id"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L208-L250 |
219,913 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_scoes_returns | public static function get_scorm_scoes_returns() {
return new external_single_structure(
array(
'scoes' => new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_... | php | public static function get_scorm_scoes_returns() {
return new external_single_structure(
array(
'scoes' => new external_multiple_structure(
new external_single_structure(
array(
'id' => new external_value(PARAM_... | [
"public",
"static",
"function",
"get_scorm_scoes_returns",
"(",
")",
"{",
"return",
"new",
"external_single_structure",
"(",
"array",
"(",
"'scoes'",
"=>",
"new",
"external_multiple_structure",
"(",
"new",
"external_single_structure",
"(",
"array",
"(",
"'id'",
"=>",
... | Describes the get_scorm_scoes return value.
@return external_single_structure
@since Moodle 3.0 | [
"Describes",
"the",
"get_scorm_scoes",
"return",
"value",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L258-L289 |
219,914 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_user_data | public static function get_scorm_user_data($scormid, $attempt) {
global $CFG, $DB;
$params = self::validate_parameters(self::get_scorm_user_data_parameters(),
array('scormid' => $scormid, 'attempt' => $attempt));
$data = array();
$warnings = ... | php | public static function get_scorm_user_data($scormid, $attempt) {
global $CFG, $DB;
$params = self::validate_parameters(self::get_scorm_user_data_parameters(),
array('scormid' => $scormid, 'attempt' => $attempt));
$data = array();
$warnings = ... | [
"public",
"static",
"function",
"get_scorm_user_data",
"(",
"$",
"scormid",
",",
"$",
"attempt",
")",
"{",
"global",
"$",
"CFG",
",",
"$",
"DB",
";",
"$",
"params",
"=",
"self",
"::",
"validate_parameters",
"(",
"self",
"::",
"get_scorm_user_data_parameters",
... | Retrieves user tracking and SCO data and default SCORM values
@param int $scormid the scorm id
@param int $attempt the attempt number
@return array warnings and the scoes data
@throws moodle_exception
@since Moodle 3.0 | [
"Retrieves",
"user",
"tracking",
"and",
"SCO",
"data",
"and",
"default",
"SCORM",
"values"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L315-L376 |
219,915 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_user_data_returns | public static function get_scorm_user_data_returns() {
return new external_single_structure(
array(
'data' => new external_multiple_structure(
new external_single_structure(
array(
'scoid' => new external_value(... | php | public static function get_scorm_user_data_returns() {
return new external_single_structure(
array(
'data' => new external_multiple_structure(
new external_single_structure(
array(
'scoid' => new external_value(... | [
"public",
"static",
"function",
"get_scorm_user_data_returns",
"(",
")",
"{",
"return",
"new",
"external_single_structure",
"(",
"array",
"(",
"'data'",
"=>",
"new",
"external_multiple_structure",
"(",
"new",
"external_single_structure",
"(",
"array",
"(",
"'scoid'",
... | Describes the get_scorm_user_data return value.
@return external_single_structure
@since Moodle 3.0 | [
"Describes",
"the",
"get_scorm_user_data",
"return",
"value",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L384-L414 |
219,916 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.insert_scorm_tracks_parameters | public static function insert_scorm_tracks_parameters() {
return new external_function_parameters(
array(
'scoid' => new external_value(PARAM_INT, 'SCO id'),
'attempt' => new external_value(PARAM_INT, 'attempt number'),
'tracks' => new external_multipl... | php | public static function insert_scorm_tracks_parameters() {
return new external_function_parameters(
array(
'scoid' => new external_value(PARAM_INT, 'SCO id'),
'attempt' => new external_value(PARAM_INT, 'attempt number'),
'tracks' => new external_multipl... | [
"public",
"static",
"function",
"insert_scorm_tracks_parameters",
"(",
")",
"{",
"return",
"new",
"external_function_parameters",
"(",
"array",
"(",
"'scoid'",
"=>",
"new",
"external_value",
"(",
"PARAM_INT",
",",
"'SCO id'",
")",
",",
"'attempt'",
"=>",
"new",
"e... | Describes the parameters for insert_scorm_tracks.
@return external_function_parameters
@since Moodle 3.0 | [
"Describes",
"the",
"parameters",
"for",
"insert_scorm_tracks",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L422-L437 |
219,917 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.insert_scorm_tracks | public static function insert_scorm_tracks($scoid, $attempt, $tracks) {
global $USER, $DB;
$params = self::validate_parameters(self::insert_scorm_tracks_parameters(),
array('scoid' => $scoid, 'attempt' => $attempt, 'tracks' => $tracks));
$trackids = ... | php | public static function insert_scorm_tracks($scoid, $attempt, $tracks) {
global $USER, $DB;
$params = self::validate_parameters(self::insert_scorm_tracks_parameters(),
array('scoid' => $scoid, 'attempt' => $attempt, 'tracks' => $tracks));
$trackids = ... | [
"public",
"static",
"function",
"insert_scorm_tracks",
"(",
"$",
"scoid",
",",
"$",
"attempt",
",",
"$",
"tracks",
")",
"{",
"global",
"$",
"USER",
",",
"$",
"DB",
";",
"$",
"params",
"=",
"self",
"::",
"validate_parameters",
"(",
"self",
"::",
"insert_s... | Saves a SCORM tracking record.
It will overwrite any existing tracking data for this attempt.
Validation should be performed before running the function to ensure the user will not lose any existing attempt data.
@param int $scoid the SCO id
@param string $attempt the attempt number
@param array $tracks the track reco... | [
"Saves",
"a",
"SCORM",
"tracking",
"record",
".",
"It",
"will",
"overwrite",
"any",
"existing",
"tracking",
"data",
"for",
"this",
"attempt",
".",
"Validation",
"should",
"be",
"performed",
"before",
"running",
"the",
"function",
"to",
"ensure",
"the",
"user",... | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L451-L499 |
219,918 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_sco_tracks | public static function get_scorm_sco_tracks($scoid, $userid, $attempt = 0) {
global $USER, $DB;
$params = self::validate_parameters(self::get_scorm_sco_tracks_parameters(),
array('scoid' => $scoid, 'userid' => $userid, 'attempt' => $attempt));
$track... | php | public static function get_scorm_sco_tracks($scoid, $userid, $attempt = 0) {
global $USER, $DB;
$params = self::validate_parameters(self::get_scorm_sco_tracks_parameters(),
array('scoid' => $scoid, 'userid' => $userid, 'attempt' => $attempt));
$track... | [
"public",
"static",
"function",
"get_scorm_sco_tracks",
"(",
"$",
"scoid",
",",
"$",
"userid",
",",
"$",
"attempt",
"=",
"0",
")",
"{",
"global",
"$",
"USER",
",",
"$",
"DB",
";",
"$",
"params",
"=",
"self",
"::",
"validate_parameters",
"(",
"self",
":... | Retrieves SCO tracking data for the given user id and attempt number
@param int $scoid the sco id
@param int $userid the user id
@param int $attempt the attempt number
@return array warnings and the scoes data
@since Moodle 3.0 | [
"Retrieves",
"SCO",
"tracking",
"data",
"for",
"the",
"given",
"user",
"id",
"and",
"attempt",
"number"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L542-L604 |
219,919 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_sco_tracks_returns | public static function get_scorm_sco_tracks_returns() {
return new external_single_structure(
array(
'data' => new external_single_structure(
array(
'attempt' => new external_value(PARAM_INT, 'Attempt number'),
'tra... | php | public static function get_scorm_sco_tracks_returns() {
return new external_single_structure(
array(
'data' => new external_single_structure(
array(
'attempt' => new external_value(PARAM_INT, 'Attempt number'),
'tra... | [
"public",
"static",
"function",
"get_scorm_sco_tracks_returns",
"(",
")",
"{",
"return",
"new",
"external_single_structure",
"(",
"array",
"(",
"'data'",
"=>",
"new",
"external_single_structure",
"(",
"array",
"(",
"'attempt'",
"=>",
"new",
"external_value",
"(",
"P... | Describes the get_scorm_sco_tracks return value.
@return external_single_structure
@since Moodle 3.0 | [
"Describes",
"the",
"get_scorm_sco_tracks",
"return",
"value",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L612-L632 |
219,920 | moodle/moodle | mod/scorm/classes/external.php | mod_scorm_external.get_scorm_access_information | public static function get_scorm_access_information($scormid) {
global $DB;
$params = self::validate_parameters(self::get_scorm_access_information_parameters(), array('scormid' => $scormid));
// Request and permission validation.
$scorm = $DB->get_record('scorm', array('id' => $params[... | php | public static function get_scorm_access_information($scormid) {
global $DB;
$params = self::validate_parameters(self::get_scorm_access_information_parameters(), array('scormid' => $scormid));
// Request and permission validation.
$scorm = $DB->get_record('scorm', array('id' => $params[... | [
"public",
"static",
"function",
"get_scorm_access_information",
"(",
"$",
"scormid",
")",
"{",
"global",
"$",
"DB",
";",
"$",
"params",
"=",
"self",
"::",
"validate_parameters",
"(",
"self",
"::",
"get_scorm_access_information_parameters",
"(",
")",
",",
"array",
... | Return access information for a given scorm.
@param int $scormid scorm instance id
@return array of warnings and the access information
@since Moodle 3.7
@throws moodle_exception | [
"Return",
"access",
"information",
"for",
"a",
"given",
"scorm",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/scorm/classes/external.php#L932-L955 |
219,921 | moodle/moodle | admin/tool/lpmigrate/classes/framework_mapper.php | framework_mapper.automap | public function automap() {
$map = array();
// Shallow copy.
$collectionfrom = $this->get_collection_from();
$collectionto = $this->get_collection_to();
// Find mappings.
foreach ($collectionfrom as $keyfrom => $compfrom) {
foreach ($collectionto as $keyto =... | php | public function automap() {
$map = array();
// Shallow copy.
$collectionfrom = $this->get_collection_from();
$collectionto = $this->get_collection_to();
// Find mappings.
foreach ($collectionfrom as $keyfrom => $compfrom) {
foreach ($collectionto as $keyto =... | [
"public",
"function",
"automap",
"(",
")",
"{",
"$",
"map",
"=",
"array",
"(",
")",
";",
"// Shallow copy.",
"$",
"collectionfrom",
"=",
"$",
"this",
"->",
"get_collection_from",
"(",
")",
";",
"$",
"collectionto",
"=",
"$",
"this",
"->",
"get_collection_t... | Auto map the frameworks.
@return void | [
"Auto",
"map",
"the",
"frameworks",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/lpmigrate/classes/framework_mapper.php#L73-L93 |
219,922 | moodle/moodle | admin/tool/lpmigrate/classes/framework_mapper.php | framework_mapper.get_collection_from | protected function get_collection_from() {
if ($this->collectionfrom === null) {
$this->collectionfrom = api::search_competencies('', $this->from);
}
return $this->collectionfrom;
} | php | protected function get_collection_from() {
if ($this->collectionfrom === null) {
$this->collectionfrom = api::search_competencies('', $this->from);
}
return $this->collectionfrom;
} | [
"protected",
"function",
"get_collection_from",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collectionfrom",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"collectionfrom",
"=",
"api",
"::",
"search_competencies",
"(",
"''",
",",
"$",
"this",
"->",
"from",... | Get the collection at origin.
@return array | [
"Get",
"the",
"collection",
"at",
"origin",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/lpmigrate/classes/framework_mapper.php#L115-L120 |
219,923 | moodle/moodle | admin/tool/lpmigrate/classes/framework_mapper.php | framework_mapper.get_collection_to | protected function get_collection_to() {
if ($this->collectionto === null) {
$this->collectionto = api::search_competencies('', $this->to);
}
return $this->collectionto;
} | php | protected function get_collection_to() {
if ($this->collectionto === null) {
$this->collectionto = api::search_competencies('', $this->to);
}
return $this->collectionto;
} | [
"protected",
"function",
"get_collection_to",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collectionto",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"collectionto",
"=",
"api",
"::",
"search_competencies",
"(",
"''",
",",
"$",
"this",
"->",
"to",
")",
... | Get the collection at destination.
@return array | [
"Get",
"the",
"collection",
"at",
"destination",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/lpmigrate/classes/framework_mapper.php#L126-L131 |
219,924 | moodle/moodle | lib/mustache/src/Mustache/Loader/InlineLoader.php | Mustache_Loader_InlineLoader.loadTemplates | protected function loadTemplates()
{
if ($this->templates === null) {
$this->templates = array();
$data = file_get_contents($this->fileName, false, null, $this->offset);
foreach (preg_split("/^@@(?= [\w\d\.]+$)/m", $data, -1) as $chunk) {
if (trim($chunk))... | php | protected function loadTemplates()
{
if ($this->templates === null) {
$this->templates = array();
$data = file_get_contents($this->fileName, false, null, $this->offset);
foreach (preg_split("/^@@(?= [\w\d\.]+$)/m", $data, -1) as $chunk) {
if (trim($chunk))... | [
"protected",
"function",
"loadTemplates",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"templates",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"templates",
"=",
"array",
"(",
")",
";",
"$",
"data",
"=",
"file_get_contents",
"(",
"$",
"this",
"->",
"... | Parse and load templates from the end of a source file. | [
"Parse",
"and",
"load",
"templates",
"from",
"the",
"end",
"of",
"a",
"source",
"file",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/mustache/src/Mustache/Loader/InlineLoader.php#L110-L122 |
219,925 | moodle/moodle | auth/shibboleth/classes/helper.php | helper.logout_file_session | public static function logout_file_session($spsessionid) {
global $CFG;
if (!empty($CFG->session_file_save_path)) {
$dir = $CFG->session_file_save_path;
} else {
$dir = $CFG->dataroot . '/sessions';
}
if (is_dir($dir)) {
if ($dh = opendir($di... | php | public static function logout_file_session($spsessionid) {
global $CFG;
if (!empty($CFG->session_file_save_path)) {
$dir = $CFG->session_file_save_path;
} else {
$dir = $CFG->dataroot . '/sessions';
}
if (is_dir($dir)) {
if ($dh = opendir($di... | [
"public",
"static",
"function",
"logout_file_session",
"(",
"$",
"spsessionid",
")",
"{",
"global",
"$",
"CFG",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"CFG",
"->",
"session_file_save_path",
")",
")",
"{",
"$",
"dir",
"=",
"$",
"CFG",
"->",
"session_file... | Delete session of user using file sessions.
@param string $spsessionid SP-provided Shibboleth Session ID
@return \SoapFault or void if everything was fine | [
"Delete",
"session",
"of",
"user",
"using",
"file",
"sessions",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/auth/shibboleth/classes/helper.php#L44-L79 |
219,926 | moodle/moodle | auth/shibboleth/classes/helper.php | helper.logout_db_session | public static function logout_db_session($spsessionid) {
global $CFG, $DB;
$sessions = $DB->get_records_sql(
'SELECT userid, sessdata FROM {sessions} WHERE timemodified > ?',
array(time() - $CFG->sessiontimeout)
);
foreach ($sessions as $session) {
/... | php | public static function logout_db_session($spsessionid) {
global $CFG, $DB;
$sessions = $DB->get_records_sql(
'SELECT userid, sessdata FROM {sessions} WHERE timemodified > ?',
array(time() - $CFG->sessiontimeout)
);
foreach ($sessions as $session) {
/... | [
"public",
"static",
"function",
"logout_db_session",
"(",
"$",
"spsessionid",
")",
"{",
"global",
"$",
"CFG",
",",
"$",
"DB",
";",
"$",
"sessions",
"=",
"$",
"DB",
"->",
"get_records_sql",
"(",
"'SELECT userid, sessdata FROM {sessions} WHERE timemodified > ?'",
",",... | Delete session of user using DB sessions.
@param string $spsessionid SP-provided Shibboleth Session ID | [
"Delete",
"session",
"of",
"user",
"using",
"DB",
"sessions",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/auth/shibboleth/classes/helper.php#L86-L106 |
219,927 | moodle/moodle | auth/shibboleth/classes/helper.php | helper.unserializesession | private static function unserializesession($serializedstring) {
$variables = array();
$a = preg_split("/(\w+)\|/", $serializedstring, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$counta = count($a);
for ($i = 0; $i < $counta; $i = $i + 2) {
$variables[$a[$i]] = unser... | php | private static function unserializesession($serializedstring) {
$variables = array();
$a = preg_split("/(\w+)\|/", $serializedstring, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
$counta = count($a);
for ($i = 0; $i < $counta; $i = $i + 2) {
$variables[$a[$i]] = unser... | [
"private",
"static",
"function",
"unserializesession",
"(",
"$",
"serializedstring",
")",
"{",
"$",
"variables",
"=",
"array",
"(",
")",
";",
"$",
"a",
"=",
"preg_split",
"(",
"\"/(\\w+)\\|/\"",
",",
"$",
"serializedstring",
",",
"-",
"1",
",",
"PREG_SPLIT_N... | Unserialize a session string.
@param string $serializedstring
@return array | [
"Unserialize",
"a",
"session",
"string",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/auth/shibboleth/classes/helper.php#L114-L122 |
219,928 | moodle/moodle | backup/util/xml/output/xml_output.class.php | xml_output.write | public function write($content) {
if (!$this->running) {
throw new xml_output_exception('xml_output_not_started');
}
$lenc = strlen($content); // Get length in bytes
if ($lenc == 0) { // 0 length contents, nothing to do
return;
}
// Buffer handling... | php | public function write($content) {
if (!$this->running) {
throw new xml_output_exception('xml_output_not_started');
}
$lenc = strlen($content); // Get length in bytes
if ($lenc == 0) { // 0 length contents, nothing to do
return;
}
// Buffer handling... | [
"public",
"function",
"write",
"(",
"$",
"content",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"running",
")",
"{",
"throw",
"new",
"xml_output_exception",
"(",
"'xml_output_not_started'",
")",
";",
"}",
"$",
"lenc",
"=",
"strlen",
"(",
"$",
"content",... | Get contents from @xml_writer and buffer/output them | [
"Get",
"contents",
"from"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/backup/util/xml/output/xml_output.class.php#L106-L133 |
219,929 | moodle/moodle | repository/googledocs/lib.php | repository_googledocs.search | public function search($searchtext, $page = 0) {
$path = $this->build_node_path('root', get_string('pluginname', 'repository_googledocs'));
$str = get_string('searchfor', 'repository_googledocs', $searchtext);
$path = $this->build_node_path('search', $str, $path);
// Query the Drive.
... | php | public function search($searchtext, $page = 0) {
$path = $this->build_node_path('root', get_string('pluginname', 'repository_googledocs'));
$str = get_string('searchfor', 'repository_googledocs', $searchtext);
$path = $this->build_node_path('search', $str, $path);
// Query the Drive.
... | [
"public",
"function",
"search",
"(",
"$",
"searchtext",
",",
"$",
"page",
"=",
"0",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"build_node_path",
"(",
"'root'",
",",
"get_string",
"(",
"'pluginname'",
",",
"'repository_googledocs'",
")",
")",
";",
"$... | Search throughout the Google Drive.
@param string $searchtext text to search for.
@param int $page search page.
@return array of results. | [
"Search",
"throughout",
"the",
"Google",
"Drive",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/googledocs/lib.php#L278-L294 |
219,930 | moodle/moodle | repository/googledocs/lib.php | repository_googledocs.supported_returntypes | public function supported_returntypes() {
// We can only support references if the system account is connected.
if (!empty($this->issuer) && $this->issuer->is_system_account_connected()) {
$setting = get_config('googledocs', 'supportedreturntypes');
if ($setting == 'internal') {
... | php | public function supported_returntypes() {
// We can only support references if the system account is connected.
if (!empty($this->issuer) && $this->issuer->is_system_account_connected()) {
$setting = get_config('googledocs', 'supportedreturntypes');
if ($setting == 'internal') {
... | [
"public",
"function",
"supported_returntypes",
"(",
")",
"{",
"// We can only support references if the system account is connected.",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"issuer",
")",
"&&",
"$",
"this",
"->",
"issuer",
"->",
"is_system_account_connected",... | Tells how the file can be picked from this repository.
@return int | [
"Tells",
"how",
"the",
"file",
"can",
"be",
"picked",
"from",
"this",
"repository",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/googledocs/lib.php#L544-L558 |
219,931 | moodle/moodle | repository/googledocs/lib.php | repository_googledocs.copy_file | protected function copy_file(\repository_googledocs\rest $client, $fileid, $name) {
$fields = "id,name,mimeType,webContentLink,webViewLink,size,thumbnailLink,iconLink";
$params = [
'fileid' => $fileid,
'fields' => $fields,
];
// Keep the original name (don't put c... | php | protected function copy_file(\repository_googledocs\rest $client, $fileid, $name) {
$fields = "id,name,mimeType,webContentLink,webViewLink,size,thumbnailLink,iconLink";
$params = [
'fileid' => $fileid,
'fields' => $fields,
];
// Keep the original name (don't put c... | [
"protected",
"function",
"copy_file",
"(",
"\\",
"repository_googledocs",
"\\",
"rest",
"$",
"client",
",",
"$",
"fileid",
",",
"$",
"name",
")",
"{",
"$",
"fields",
"=",
"\"id,name,mimeType,webContentLink,webViewLink,size,thumbnailLink,iconLink\"",
";",
"$",
"params"... | Copy a file and return the new file details. A side effect of the copy
is that the owner will be the account authenticated with this oauth client.
@param \repository_googledocs\rest $client Authenticated client.
@param string $fileid The file we are copying.
@param string $name The original filename (don't change it).... | [
"Copy",
"a",
"file",
"and",
"return",
"the",
"new",
"file",
"details",
".",
"A",
"side",
"effect",
"of",
"the",
"copy",
"is",
"that",
"the",
"owner",
"will",
"be",
"the",
"account",
"authenticated",
"with",
"this",
"oauth",
"client",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/googledocs/lib.php#L751-L768 |
219,932 | moodle/moodle | repository/googledocs/lib.php | repository_googledocs.add_writer_to_file | protected function add_writer_to_file(\repository_googledocs\rest $client, $fileid, $email) {
$updateeditor = [
'emailAddress' => $email,
'role' => 'writer',
'type' => 'user'
];
$params = ['fileid' => $fileid, 'sendNotificationEmail' => 'false'];
$resp... | php | protected function add_writer_to_file(\repository_googledocs\rest $client, $fileid, $email) {
$updateeditor = [
'emailAddress' => $email,
'role' => 'writer',
'type' => 'user'
];
$params = ['fileid' => $fileid, 'sendNotificationEmail' => 'false'];
$resp... | [
"protected",
"function",
"add_writer_to_file",
"(",
"\\",
"repository_googledocs",
"\\",
"rest",
"$",
"client",
",",
"$",
"fileid",
",",
"$",
"email",
")",
"{",
"$",
"updateeditor",
"=",
"[",
"'emailAddress'",
"=>",
"$",
"email",
",",
"'role'",
"=>",
"'write... | Add a writer to the permissions on the file.
@param \repository_googledocs\rest $client Authenticated client.
@param string $fileid The file we are updating.
@param string $email The email of the writer account to add.
@return boolean | [
"Add",
"a",
"writer",
"to",
"the",
"permissions",
"on",
"the",
"file",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/googledocs/lib.php#L807-L820 |
219,933 | moodle/moodle | repository/googledocs/lib.php | repository_googledocs.move_file_from_root_to_folder | protected function move_file_from_root_to_folder(\repository_googledocs\rest $client, $fileid, $folderid) {
// Set the parent.
$params = [
'fileid' => $fileid, 'addParents' => $folderid, 'removeParents' => 'root'
];
$response = $client->call('update', $params, ' ');
i... | php | protected function move_file_from_root_to_folder(\repository_googledocs\rest $client, $fileid, $folderid) {
// Set the parent.
$params = [
'fileid' => $fileid, 'addParents' => $folderid, 'removeParents' => 'root'
];
$response = $client->call('update', $params, ' ');
i... | [
"protected",
"function",
"move_file_from_root_to_folder",
"(",
"\\",
"repository_googledocs",
"\\",
"rest",
"$",
"client",
",",
"$",
"fileid",
",",
"$",
"folderid",
")",
"{",
"// Set the parent.",
"$",
"params",
"=",
"[",
"'fileid'",
"=>",
"$",
"fileid",
",",
... | Move from root to folder
@param \repository_googledocs\rest $client Authenticated client.
@param string $fileid The file we are updating.
@param string $folderid The id of the folder we are moving to
@return boolean | [
"Move",
"from",
"root",
"to",
"folder"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/googledocs/lib.php#L830-L841 |
219,934 | moodle/moodle | repository/googledocs/lib.php | repository_googledocs.prevent_writers_from_sharing_file | protected function prevent_writers_from_sharing_file(\repository_googledocs\rest $client, $fileid) {
// We don't want anyone but Moodle to change the sharing settings.
$params = [
'fileid' => $fileid
];
$update = [
'writersCanShare' => false
];
$re... | php | protected function prevent_writers_from_sharing_file(\repository_googledocs\rest $client, $fileid) {
// We don't want anyone but Moodle to change the sharing settings.
$params = [
'fileid' => $fileid
];
$update = [
'writersCanShare' => false
];
$re... | [
"protected",
"function",
"prevent_writers_from_sharing_file",
"(",
"\\",
"repository_googledocs",
"\\",
"rest",
"$",
"client",
",",
"$",
"fileid",
")",
"{",
"// We don't want anyone but Moodle to change the sharing settings.",
"$",
"params",
"=",
"[",
"'fileid'",
"=>",
"$... | Prevent writers from sharing.
@param \repository_googledocs\rest $client Authenticated client.
@param string $fileid The file we are updating.
@return boolean | [
"Prevent",
"writers",
"from",
"sharing",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/googledocs/lib.php#L850-L864 |
219,935 | moodle/moodle | login/signup_form.php | login_signup_form.validation | public function validation($data, $files) {
$errors = parent::validation($data, $files);
if (signup_captcha_enabled()) {
$recaptchaelement = $this->_form->getElement('recaptcha_element');
if (!empty($this->_form->_submitValues['g-recaptcha-response'])) {
$respons... | php | public function validation($data, $files) {
$errors = parent::validation($data, $files);
if (signup_captcha_enabled()) {
$recaptchaelement = $this->_form->getElement('recaptcha_element');
if (!empty($this->_form->_submitValues['g-recaptcha-response'])) {
$respons... | [
"public",
"function",
"validation",
"(",
"$",
"data",
",",
"$",
"files",
")",
"{",
"$",
"errors",
"=",
"parent",
"::",
"validation",
"(",
"$",
"data",
",",
"$",
"files",
")",
";",
"if",
"(",
"signup_captcha_enabled",
"(",
")",
")",
"{",
"$",
"recaptc... | Validate user supplied data on the signup form.
@param array $data array of ("fieldname"=>value) of submitted data
@param array $files array of uploaded files "element_name"=>tmp_file_path
@return array of "element_name"=>"error_description" if there are errors,
or an empty array if everything is OK (true allowed for ... | [
"Validate",
"user",
"supplied",
"data",
"on",
"the",
"signup",
"form",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/login/signup_form.php#L128-L146 |
219,936 | moodle/moodle | question/type/questionbase.php | question_graded_automatically.check_combined_feedback_file_access | protected function check_combined_feedback_file_access($qa, $options, $filearea, $args = null) {
$state = $qa->get_state();
if ($args === null) {
debugging('You must pass $args as the fourth argument to check_combined_feedback_file_access.',
DEBUG_DEVELOPER);
... | php | protected function check_combined_feedback_file_access($qa, $options, $filearea, $args = null) {
$state = $qa->get_state();
if ($args === null) {
debugging('You must pass $args as the fourth argument to check_combined_feedback_file_access.',
DEBUG_DEVELOPER);
... | [
"protected",
"function",
"check_combined_feedback_file_access",
"(",
"$",
"qa",
",",
"$",
"options",
",",
"$",
"filearea",
",",
"$",
"args",
"=",
"null",
")",
"{",
"$",
"state",
"=",
"$",
"qa",
"->",
"get_state",
"(",
")",
";",
"if",
"(",
"$",
"args",
... | Check a request for access to a file belonging to a combined feedback field.
@param question_attempt $qa the question attempt being displayed.
@param question_display_options $options the options that control display of the question.
@param string $filearea the name of the file area.
@param array $args the remaining bi... | [
"Check",
"a",
"request",
"for",
"access",
"to",
"a",
"file",
"belonging",
"to",
"a",
"combined",
"feedback",
"field",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/questionbase.php#L689-L708 |
219,937 | moodle/moodle | question/type/questionbase.php | question_graded_automatically.check_hint_file_access | protected function check_hint_file_access($qa, $options, $args) {
if (!$options->feedback) {
return false;
}
$hint = $qa->get_applicable_hint();
$hintid = reset($args); // Itemid is hint id.
return $hintid == $hint->id;
} | php | protected function check_hint_file_access($qa, $options, $args) {
if (!$options->feedback) {
return false;
}
$hint = $qa->get_applicable_hint();
$hintid = reset($args); // Itemid is hint id.
return $hintid == $hint->id;
} | [
"protected",
"function",
"check_hint_file_access",
"(",
"$",
"qa",
",",
"$",
"options",
",",
"$",
"args",
")",
"{",
"if",
"(",
"!",
"$",
"options",
"->",
"feedback",
")",
"{",
"return",
"false",
";",
"}",
"$",
"hint",
"=",
"$",
"qa",
"->",
"get_appli... | Check a request for access to a file belonging to a hint.
@param question_attempt $qa the question attempt being displayed.
@param question_display_options $options the options that control display of the question.
@param array $args the remaining bits of the file path.
@return bool whether access to the file should be... | [
"Check",
"a",
"request",
"for",
"access",
"to",
"a",
"file",
"belonging",
"to",
"a",
"hint",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/questionbase.php#L717-L724 |
219,938 | moodle/moodle | mod/forum/classes/local/renderers/posts.php | posts.render | public function render(
stdClass $user,
array $forums,
array $discussions,
array $posts
) : string {
// Format the forums and discussion to make them more easily accessed later.
$forums = array_reduce($forums, function($carry, $forum) {
$carry[$forum->get_... | php | public function render(
stdClass $user,
array $forums,
array $discussions,
array $posts
) : string {
// Format the forums and discussion to make them more easily accessed later.
$forums = array_reduce($forums, function($carry, $forum) {
$carry[$forum->get_... | [
"public",
"function",
"render",
"(",
"stdClass",
"$",
"user",
",",
"array",
"$",
"forums",
",",
"array",
"$",
"discussions",
",",
"array",
"$",
"posts",
")",
":",
"string",
"{",
"// Format the forums and discussion to make them more easily accessed later.",
"$",
"fo... | Render the given posts for the forums and discussions.
@param stdClass $user The user viewing the posts
@param forum_entity[] $forums A list of all forums for these posts
@param discussion_entity[] $discussions A list of all discussions for these posts
@param post_entity[] $posts The posts to render
@return string | [
"Render",
"the",
"given",
"posts",
"for",
"the",
"forums",
"and",
"discussions",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/forum/classes/local/renderers/posts.php#L78-L110 |
219,939 | moodle/moodle | lib/classes/event/competency_deleted.php | competency_deleted.create_multiple_from_competencyids | public static function create_multiple_from_competencyids($competencyids, $contextid) {
$events = array();
foreach ($competencyids as $id) {
$events[$id] = static::create(array(
'contextid' => $contextid,
'objectid' => $id
));
}
ret... | php | public static function create_multiple_from_competencyids($competencyids, $contextid) {
$events = array();
foreach ($competencyids as $id) {
$events[$id] = static::create(array(
'contextid' => $contextid,
'objectid' => $id
));
}
ret... | [
"public",
"static",
"function",
"create_multiple_from_competencyids",
"(",
"$",
"competencyids",
",",
"$",
"contextid",
")",
"{",
"$",
"events",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"competencyids",
"as",
"$",
"id",
")",
"{",
"$",
"events",
"[... | Instantiate events from competency ids.
@param array $competencyids Array of competency ids.
@param int $contextid The context id.
@return self[] Array of events. | [
"Instantiate",
"events",
"from",
"competency",
"ids",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/event/competency_deleted.php#L67-L76 |
219,940 | moodle/moodle | blocks/rss_client/classes/output/block.php | block.export_for_template | public function export_for_template(\renderer_base $output) {
$data = array('feeds' => array());
foreach ($this->feeds as $feed) {
$data['feeds'][] = $feed->export_for_template($output);
}
return $data;
} | php | public function export_for_template(\renderer_base $output) {
$data = array('feeds' => array());
foreach ($this->feeds as $feed) {
$data['feeds'][] = $feed->export_for_template($output);
}
return $data;
} | [
"public",
"function",
"export_for_template",
"(",
"\\",
"renderer_base",
"$",
"output",
")",
"{",
"$",
"data",
"=",
"array",
"(",
"'feeds'",
"=>",
"array",
"(",
")",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"feeds",
"as",
"$",
"feed",
")",
"{",
"... | Prepare data for use in a template
@param \renderer_base $output
@return array | [
"Prepare",
"data",
"for",
"use",
"in",
"a",
"template"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/blocks/rss_client/classes/output/block.php#L62-L70 |
219,941 | moodle/moodle | grade/report/singleview/classes/local/ui/dropdown_attribute.php | dropdown_attribute.html | public function html() {
global $OUTPUT;
$options = $this->options;
$selected = $this->selected;
$context = array(
'name' => $this->name,
'value' => $this->selected,
'tabindex' => 1,
'disabled' => !empty($this->isdisabled),
'o... | php | public function html() {
global $OUTPUT;
$options = $this->options;
$selected = $this->selected;
$context = array(
'name' => $this->name,
'value' => $this->selected,
'tabindex' => 1,
'disabled' => !empty($this->isdisabled),
'o... | [
"public",
"function",
"html",
"(",
")",
"{",
"global",
"$",
"OUTPUT",
";",
"$",
"options",
"=",
"$",
"this",
"->",
"options",
";",
"$",
"selected",
"=",
"$",
"this",
"->",
"selected",
";",
"$",
"context",
"=",
"array",
"(",
"'name'",
"=>",
"$",
"th... | Render this element as html.
@return string | [
"Render",
"this",
"element",
"as",
"html",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/grade/report/singleview/classes/local/ui/dropdown_attribute.php#L79-L100 |
219,942 | moodle/moodle | admin/tool/langimport/classes/controller.php | controller.install_languagepacks | public function install_languagepacks($langs, $updating = false) {
global $CFG;
$this->installer->set_queue($langs);
$results = $this->installer->run();
$updatedpacks = 0;
foreach ($results as $langcode => $langstatus) {
switch ($langstatus) {
case ... | php | public function install_languagepacks($langs, $updating = false) {
global $CFG;
$this->installer->set_queue($langs);
$results = $this->installer->run();
$updatedpacks = 0;
foreach ($results as $langcode => $langstatus) {
switch ($langstatus) {
case ... | [
"public",
"function",
"install_languagepacks",
"(",
"$",
"langs",
",",
"$",
"updating",
"=",
"false",
")",
"{",
"global",
"$",
"CFG",
";",
"$",
"this",
"->",
"installer",
"->",
"set_queue",
"(",
"$",
"langs",
")",
";",
"$",
"results",
"=",
"$",
"this",... | Install language packs provided
@param string|array $langs array of langcodes or individual langcodes
@param bool $updating true if updating the langpacks
@return int false if an error encountered or
@throws \moodle_exception when error is encountered installing langpack | [
"Install",
"language",
"packs",
"provided"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/langimport/classes/controller.php#L70-L104 |
219,943 | moodle/moodle | admin/tool/langimport/classes/controller.php | controller.uninstall_language | public function uninstall_language($lang) {
global $CFG;
$dest1 = $CFG->dataroot.'/lang/'.$lang;
$dest2 = $CFG->dirroot.'/lang/'.$lang;
$rm1 = false;
$rm2 = false;
if (file_exists($dest1)) {
$rm1 = remove_dir($dest1);
}
if (file_exists($dest2)... | php | public function uninstall_language($lang) {
global $CFG;
$dest1 = $CFG->dataroot.'/lang/'.$lang;
$dest2 = $CFG->dirroot.'/lang/'.$lang;
$rm1 = false;
$rm2 = false;
if (file_exists($dest1)) {
$rm1 = remove_dir($dest1);
}
if (file_exists($dest2)... | [
"public",
"function",
"uninstall_language",
"(",
"$",
"lang",
")",
"{",
"global",
"$",
"CFG",
";",
"$",
"dest1",
"=",
"$",
"CFG",
"->",
"dataroot",
".",
"'/lang/'",
".",
"$",
"lang",
";",
"$",
"dest2",
"=",
"$",
"CFG",
"->",
"dirroot",
".",
"'/lang/'... | Uninstall language pack
@param string $lang language code
@return bool true if language succesfull installed | [
"Uninstall",
"language",
"pack"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/langimport/classes/controller.php#L112-L134 |
219,944 | moodle/moodle | admin/tool/langimport/classes/controller.php | controller.update_all_installed_languages | public function update_all_installed_languages() {
global $CFG;
if (!$availablelangs = $this->installer->get_remote_list_of_languages()) {
$this->errors[] = get_string('cannotdownloadlanguageupdatelist', 'error');
return false;
}
$md5array = array(); // Conve... | php | public function update_all_installed_languages() {
global $CFG;
if (!$availablelangs = $this->installer->get_remote_list_of_languages()) {
$this->errors[] = get_string('cannotdownloadlanguageupdatelist', 'error');
return false;
}
$md5array = array(); // Conve... | [
"public",
"function",
"update_all_installed_languages",
"(",
")",
"{",
"global",
"$",
"CFG",
";",
"if",
"(",
"!",
"$",
"availablelangs",
"=",
"$",
"this",
"->",
"installer",
"->",
"get_remote_list_of_languages",
"(",
")",
")",
"{",
"$",
"this",
"->",
"errors... | Updated all install language packs with the latest found on servre
@return bool true if languages succesfully updated. | [
"Updated",
"all",
"install",
"language",
"packs",
"with",
"the",
"latest",
"found",
"on",
"servre"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/langimport/classes/controller.php#L141-L194 |
219,945 | moodle/moodle | admin/tool/langimport/classes/controller.php | controller.is_installed_lang | public function is_installed_lang($lang, $md5check) {
global $CFG;
$md5file = $CFG->dataroot.'/lang/'.$lang.'/'.$lang.'.md5';
if (file_exists($md5file)) {
return (file_get_contents($md5file) == $md5check);
}
return false;
} | php | public function is_installed_lang($lang, $md5check) {
global $CFG;
$md5file = $CFG->dataroot.'/lang/'.$lang.'/'.$lang.'.md5';
if (file_exists($md5file)) {
return (file_get_contents($md5file) == $md5check);
}
return false;
} | [
"public",
"function",
"is_installed_lang",
"(",
"$",
"lang",
",",
"$",
"md5check",
")",
"{",
"global",
"$",
"CFG",
";",
"$",
"md5file",
"=",
"$",
"CFG",
"->",
"dataroot",
".",
"'/lang/'",
".",
"$",
"lang",
".",
"'/'",
".",
"$",
"lang",
".",
"'.md5'",... | checks the md5 of the zip file, grabbed from download.moodle.org,
against the md5 of the local language file from last update
@param string $lang language code
@param string $md5check md5 to check
@return bool true if installed | [
"checks",
"the",
"md5",
"of",
"the",
"zip",
"file",
"grabbed",
"from",
"download",
".",
"moodle",
".",
"org",
"against",
"the",
"md5",
"of",
"the",
"local",
"language",
"file",
"from",
"last",
"update"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/langimport/classes/controller.php#L203-L210 |
219,946 | moodle/moodle | availability/condition/grade/classes/condition.php | condition.get_cached_grade_name | private static function get_cached_grade_name($courseid, $gradeitemid) {
global $DB, $CFG;
require_once($CFG->libdir . '/gradelib.php');
// Get all grade item names from cache, or using db query.
$cache = \cache::make('availability_grade', 'items');
if (($cacheditems = $cache->g... | php | private static function get_cached_grade_name($courseid, $gradeitemid) {
global $DB, $CFG;
require_once($CFG->libdir . '/gradelib.php');
// Get all grade item names from cache, or using db query.
$cache = \cache::make('availability_grade', 'items');
if (($cacheditems = $cache->g... | [
"private",
"static",
"function",
"get_cached_grade_name",
"(",
"$",
"courseid",
",",
"$",
"gradeitemid",
")",
"{",
"global",
"$",
"DB",
",",
"$",
"CFG",
";",
"require_once",
"(",
"$",
"CFG",
"->",
"libdir",
".",
"'/gradelib.php'",
")",
";",
"// Get all grade... | Obtains the name of a grade item, also checking that it exists. Uses a
cache. The name returned is suitable for display.
@param int $courseid Course id
@param int $gradeitemid Grade item id
@return string Grade name or empty string if no grade with that id | [
"Obtains",
"the",
"name",
"of",
"a",
"grade",
"item",
"also",
"checking",
"that",
"it",
"exists",
".",
"Uses",
"a",
"cache",
".",
"The",
"name",
"returned",
"is",
"suitable",
"for",
"display",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/availability/condition/grade/classes/condition.php#L171-L193 |
219,947 | moodle/moodle | availability/condition/grade/classes/condition.php | condition.get_cached_grade_score | protected static function get_cached_grade_score($gradeitemid, $courseid,
$grabthelot=false, $userid=0) {
global $USER, $DB;
if (!$userid) {
$userid = $USER->id;
}
$cache = \cache::make('availability_grade', 'scores');
if (($cachedgrades = $cache->get($use... | php | protected static function get_cached_grade_score($gradeitemid, $courseid,
$grabthelot=false, $userid=0) {
global $USER, $DB;
if (!$userid) {
$userid = $USER->id;
}
$cache = \cache::make('availability_grade', 'scores');
if (($cachedgrades = $cache->get($use... | [
"protected",
"static",
"function",
"get_cached_grade_score",
"(",
"$",
"gradeitemid",
",",
"$",
"courseid",
",",
"$",
"grabthelot",
"=",
"false",
",",
"$",
"userid",
"=",
"0",
")",
"{",
"global",
"$",
"USER",
",",
"$",
"DB",
";",
"if",
"(",
"!",
"$",
... | Obtains a grade score. Note that this score should not be displayed to
the user, because gradebook rules might prohibit that. It may be a
non-final score subject to adjustment later.
@param int $gradeitemid Grade item ID we're interested in
@param int $courseid Course id
@param bool $grabthelot If true, grabs all scor... | [
"Obtains",
"a",
"grade",
"score",
".",
"Note",
"that",
"this",
"score",
"should",
"not",
"be",
"displayed",
"to",
"the",
"user",
"because",
"gradebook",
"rules",
"might",
"prohibit",
"that",
".",
"It",
"may",
"be",
"a",
"non",
"-",
"final",
"score",
"sub... | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/availability/condition/grade/classes/condition.php#L209-L269 |
219,948 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS.addServer | public function addServer($servername = 'localhost', $port = 0, $sharedSecret = 'testing123', $timeout = 3, $maxtries = 3)
{
$this->_servers[] = array($servername, $port, $sharedSecret, $timeout, $maxtries);
} | php | public function addServer($servername = 'localhost', $port = 0, $sharedSecret = 'testing123', $timeout = 3, $maxtries = 3)
{
$this->_servers[] = array($servername, $port, $sharedSecret, $timeout, $maxtries);
} | [
"public",
"function",
"addServer",
"(",
"$",
"servername",
"=",
"'localhost'",
",",
"$",
"port",
"=",
"0",
",",
"$",
"sharedSecret",
"=",
"'testing123'",
",",
"$",
"timeout",
"=",
"3",
",",
"$",
"maxtries",
"=",
"3",
")",
"{",
"$",
"this",
"->",
"_se... | Adds a RADIUS server to the list of servers for requests.
At most 10 servers may be specified. When multiple servers
are given, they are tried in round-robin fashion until a
valid response is received
@param string $servername Servername or IP-Address
@param integer $port Portnumber
@param string $shar... | [
"Adds",
"a",
"RADIUS",
"server",
"to",
"the",
"list",
"of",
"servers",
"for",
"requests",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L174-L177 |
219,949 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS.putAttribute | public function putAttribute($attrib, $value, $type = null)
{
if ($type == null) {
$type = gettype($value);
}
switch ($type) {
case 'integer':
case 'double':
return radius_put_int($this->res, $attrib, $value);
case 'addr':
... | php | public function putAttribute($attrib, $value, $type = null)
{
if ($type == null) {
$type = gettype($value);
}
switch ($type) {
case 'integer':
case 'double':
return radius_put_int($this->res, $attrib, $value);
case 'addr':
... | [
"public",
"function",
"putAttribute",
"(",
"$",
"attrib",
",",
"$",
"value",
",",
"$",
"type",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"type",
"==",
"null",
")",
"{",
"$",
"type",
"=",
"gettype",
"(",
"$",
"value",
")",
";",
"}",
"switch",
"(",
... | Puts an attribute.
@param integer $attrib Attribute-number
@param mixed $port Attribute-value
@param type $type Attribute-type
@return bool true on success, false on error | [
"Puts",
"an",
"attribute",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L208-L227 |
219,950 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS.putVendorAttribute | public function putVendorAttribute($vendor, $attrib, $value, $type = null)
{
if ($type == null) {
$type = gettype($value);
}
switch ($type) {
case 'integer':
case 'double':
return radius_put_vendor_int($this->res, $vendor, $attrib, $value... | php | public function putVendorAttribute($vendor, $attrib, $value, $type = null)
{
if ($type == null) {
$type = gettype($value);
}
switch ($type) {
case 'integer':
case 'double':
return radius_put_vendor_int($this->res, $vendor, $attrib, $value... | [
"public",
"function",
"putVendorAttribute",
"(",
"$",
"vendor",
",",
"$",
"attrib",
",",
"$",
"value",
",",
"$",
"type",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"type",
"==",
"null",
")",
"{",
"$",
"type",
"=",
"gettype",
"(",
"$",
"value",
")",
"... | Puts a vendor-specific attribute.
@param integer $vendor Vendor (MSoft, Cisco, ...)
@param integer $attrib Attribute-number
@param mixed $port Attribute-value
@param type $type Attribute-type
@return bool true on success, false on error | [
"Puts",
"a",
"vendor",
"-",
"specific",
"attribute",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L238-L258 |
219,951 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS.putStandardAttributes | public function putStandardAttributes()
{
if (!$this->useStandardAttributes) {
return;
}
if (isset($_SERVER)) {
$var = $_SERVER;
} else {
$var = $GLOBALS['HTTP_SERVER_VARS'];
}
$this->putAttribute(RADIUS_NAS_IDENTIFIER, isset($var... | php | public function putStandardAttributes()
{
if (!$this->useStandardAttributes) {
return;
}
if (isset($_SERVER)) {
$var = $_SERVER;
} else {
$var = $GLOBALS['HTTP_SERVER_VARS'];
}
$this->putAttribute(RADIUS_NAS_IDENTIFIER, isset($var... | [
"public",
"function",
"putStandardAttributes",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"useStandardAttributes",
")",
"{",
"return",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"_SERVER",
")",
")",
"{",
"$",
"var",
"=",
"$",
"_SERVER",
";",
"}",... | Puts standard attributes. | [
"Puts",
"standard",
"attributes",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L288-L305 |
219,952 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS.putServer | public function putServer($servername, $port = 0, $sharedsecret = 'testing123', $timeout = 3, $maxtries = 3)
{
if (!radius_add_server($this->res, $servername, $port, $sharedsecret, $timeout, $maxtries)) {
return false;
}
return true;
} | php | public function putServer($servername, $port = 0, $sharedsecret = 'testing123', $timeout = 3, $maxtries = 3)
{
if (!radius_add_server($this->res, $servername, $port, $sharedsecret, $timeout, $maxtries)) {
return false;
}
return true;
} | [
"public",
"function",
"putServer",
"(",
"$",
"servername",
",",
"$",
"port",
"=",
"0",
",",
"$",
"sharedsecret",
"=",
"'testing123'",
",",
"$",
"timeout",
"=",
"3",
",",
"$",
"maxtries",
"=",
"3",
")",
"{",
"if",
"(",
"!",
"radius_add_server",
"(",
"... | Configures the radius library.
@param string $servername Servername or IP-Address
@param integer $port Portnumber
@param string $sharedSecret Shared secret
@param integer $timeout Timeout for each request
@param integer $maxtries Max. retries for each request
@return bool true on success, fa... | [
"Configures",
"the",
"radius",
"library",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L328-L334 |
219,953 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS.start | public function start()
{
if (!$this->open()) {
return false;
}
foreach ($this->_servers as $s) {
// Servername, port, sharedsecret, timeout, retries
if (!$this->putServer($s[0], $s[1], $s[2], $s[3], $s[4])) {
return false;
}
... | php | public function start()
{
if (!$this->open()) {
return false;
}
foreach ($this->_servers as $s) {
// Servername, port, sharedsecret, timeout, retries
if (!$this->putServer($s[0], $s[1], $s[2], $s[3], $s[4])) {
return false;
}
... | [
"public",
"function",
"start",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"open",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
"_servers",
"as",
"$",
"s",
")",
"{",
"// Servername, port, sharedsecret, timeo... | Initiates a RADIUS request.
@return bool true on success, false on errors | [
"Initiates",
"a",
"RADIUS",
"request",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L355-L378 |
219,954 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS.send | public function send()
{
$req = radius_send_request($this->res);
if (!$req) {
throw new Auth_RADIUS_Exception('Error sending request: ' . $this->getError());
}
switch($req) {
case RADIUS_ACCESS_ACCEPT:
if (is_subclass_of($this, 'auth_radius_ac... | php | public function send()
{
$req = radius_send_request($this->res);
if (!$req) {
throw new Auth_RADIUS_Exception('Error sending request: ' . $this->getError());
}
switch($req) {
case RADIUS_ACCESS_ACCEPT:
if (is_subclass_of($this, 'auth_radius_ac... | [
"public",
"function",
"send",
"(",
")",
"{",
"$",
"req",
"=",
"radius_send_request",
"(",
"$",
"this",
"->",
"res",
")",
";",
"if",
"(",
"!",
"$",
"req",
")",
"{",
"throw",
"new",
"Auth_RADIUS_Exception",
"(",
"'Error sending request: '",
".",
"$",
"this... | Sends a prepared RADIUS request and waits for a response
@return mixed true on success, false on reject, PEAR_Error on error | [
"Sends",
"a",
"prepared",
"RADIUS",
"request",
"and",
"waits",
"for",
"a",
"response"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L385-L412 |
219,955 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS_PAP.putAuthAttributes | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->password)) {
$this->putAttribute(RADIUS_USER_PASSWORD, $this->password);
}
} | php | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->password)) {
$this->putAttribute(RADIUS_USER_PASSWORD, $this->password);
}
} | [
"function",
"putAuthAttributes",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"username",
")",
")",
"{",
"$",
"this",
"->",
"putAttribute",
"(",
"RADIUS_USER_NAME",
",",
"$",
"this",
"->",
"username",
")",
";",
"}",
"if",
"(",
"isset",
... | Put authentication specific attributes
@return void | [
"Put",
"authentication",
"specific",
"attributes"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L631-L639 |
219,956 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS_CHAP_MD5.putAuthAttributes | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->response)) {
$response = pack('C', $this->chapid) . $this->response;
$this->putAttribute(RADIUS_CHAP_PASSWORD, $response... | php | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->response)) {
$response = pack('C', $this->chapid) . $this->response;
$this->putAttribute(RADIUS_CHAP_PASSWORD, $response... | [
"function",
"putAuthAttributes",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"username",
")",
")",
"{",
"$",
"this",
"->",
"putAttribute",
"(",
"RADIUS_USER_NAME",
",",
"$",
"this",
"->",
"username",
")",
";",
"}",
"if",
"(",
"isset",
... | Put CHAP-MD5 specific attributes
For authenticating using CHAP-MD5 via RADIUS you have to put the challenge
and the response. The chapid is inserted in the first byte of the response.
@return void | [
"Put",
"CHAP",
"-",
"MD5",
"specific",
"attributes"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L696-L708 |
219,957 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS_MSCHAPv1.putAuthAttributes | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->response) || isset($this->lmResponse)) {
$lmResp = isset($this->lmResponse) ? $this->lmResponse : str_repeat ("\0", 24);
... | php | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->response) || isset($this->lmResponse)) {
$lmResp = isset($this->lmResponse) ? $this->lmResponse : str_repeat ("\0", 24);
... | [
"function",
"putAuthAttributes",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"username",
")",
")",
"{",
"$",
"this",
"->",
"putAttribute",
"(",
"RADIUS_USER_NAME",
",",
"$",
"this",
"->",
"username",
")",
";",
"}",
"if",
"(",
"isset",
... | Put MS-CHAPv1 specific attributes
For authenticating using MS-CHAPv1 via RADIUS you have to put the challenge
and the response. The response has this structure:
struct rad_mschapvalue {
u_char ident;
u_char flags;
u_char lm_response[24];
u_char response[24];
};
@return void | [
"Put",
"MS",
"-",
"CHAPv1",
"specific",
"attributes"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L761-L775 |
219,958 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS_MSCHAPv2.putAuthAttributes | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->response) && isset($this->peerChallenge)) {
// Response: chapid, flags (1 = use NT Response), Peer challenge, reserved, Response
... | php | function putAuthAttributes()
{
if (isset($this->username)) {
$this->putAttribute(RADIUS_USER_NAME, $this->username);
}
if (isset($this->response) && isset($this->peerChallenge)) {
// Response: chapid, flags (1 = use NT Response), Peer challenge, reserved, Response
... | [
"function",
"putAuthAttributes",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"username",
")",
")",
"{",
"$",
"this",
"->",
"putAttribute",
"(",
"RADIUS_USER_NAME",
",",
"$",
"this",
"->",
"username",
")",
";",
"}",
"if",
"(",
"isset",
... | Put MS-CHAPv2 specific attributes
For authenticating using MS-CHAPv1 via RADIUS you have to put the challenge
and the response. The response has this structure:
struct rad_mschapv2value {
u_char ident;
u_char flags;
u_char pchallenge[16];
u_char reserved[8];
u_char response[24];
};
where pchallenge is the peer challen... | [
"Put",
"MS",
"-",
"CHAPv2",
"specific",
"attributes"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L814-L827 |
219,959 | moodle/moodle | lib/pear/Auth/RADIUS.php | Auth_RADIUS_Acct.putAuthAttributes | function putAuthAttributes()
{
$this->putAttribute(RADIUS_ACCT_SESSION_ID, $this->session_id);
$this->putAttribute(RADIUS_ACCT_STATUS_TYPE, $this->status_type);
if (isset($this->session_time) && $this->status_type == RADIUS_STOP) {
$this->putAttribute(RADIUS_ACCT_SESSION_TIME, $t... | php | function putAuthAttributes()
{
$this->putAttribute(RADIUS_ACCT_SESSION_ID, $this->session_id);
$this->putAttribute(RADIUS_ACCT_STATUS_TYPE, $this->status_type);
if (isset($this->session_time) && $this->status_type == RADIUS_STOP) {
$this->putAttribute(RADIUS_ACCT_SESSION_TIME, $t... | [
"function",
"putAuthAttributes",
"(",
")",
"{",
"$",
"this",
"->",
"putAttribute",
"(",
"RADIUS_ACCT_SESSION_ID",
",",
"$",
"this",
"->",
"session_id",
")",
";",
"$",
"this",
"->",
"putAttribute",
"(",
"RADIUS_ACCT_STATUS_TYPE",
",",
"$",
"this",
"->",
"status... | Put attributes for accounting.
Here we put some accounting values. There many more attributes for accounting,
but for web-applications only certain attributes make sense.
@return void | [
"Put",
"attributes",
"for",
"accounting",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Auth/RADIUS.php#L938-L949 |
219,960 | moodle/moodle | calendar/classes/external/week_day_exporter.php | week_day_exporter.get_popover_title | protected function get_popover_title() {
$title = null;
$userdate = userdate($this->data[0], get_string('strftimedayshort'));
if (count($this->related['events'])) {
$title = get_string('eventsfor', 'calendar', $userdate);
} else if ($this->data['istoday']) {
$tit... | php | protected function get_popover_title() {
$title = null;
$userdate = userdate($this->data[0], get_string('strftimedayshort'));
if (count($this->related['events'])) {
$title = get_string('eventsfor', 'calendar', $userdate);
} else if ($this->data['istoday']) {
$tit... | [
"protected",
"function",
"get_popover_title",
"(",
")",
"{",
"$",
"title",
"=",
"null",
";",
"$",
"userdate",
"=",
"userdate",
"(",
"$",
"this",
"->",
"data",
"[",
"0",
"]",
",",
"get_string",
"(",
"'strftimedayshort'",
")",
")",
";",
"if",
"(",
"count... | Get the title for this popover.
@return string | [
"Get",
"the",
"title",
"for",
"this",
"popover",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/calendar/classes/external/week_day_exporter.php#L128-L143 |
219,961 | moodle/moodle | admin/tool/log/classes/privacy/provider.php | provider.call_subplugins_method_with_args | protected static function call_subplugins_method_with_args($method, array $args = [], string $interface = null) {
if (!isset($interface)) {
$interface = \tool_log\local\privacy\logstore_provider::class;
}
\core_privacy\manager::plugintype_class_callback('logstore', $interface, $metho... | php | protected static function call_subplugins_method_with_args($method, array $args = [], string $interface = null) {
if (!isset($interface)) {
$interface = \tool_log\local\privacy\logstore_provider::class;
}
\core_privacy\manager::plugintype_class_callback('logstore', $interface, $metho... | [
"protected",
"static",
"function",
"call_subplugins_method_with_args",
"(",
"$",
"method",
",",
"array",
"$",
"args",
"=",
"[",
"]",
",",
"string",
"$",
"interface",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"interface",
")",
")",
"{",
... | Invoke the subplugins method with arguments.
@param string $method The method name.
@param array $args The arguments.
@param string $interface The interface to use. By default uses the logstore_provider.
@return void | [
"Invoke",
"the",
"subplugins",
"method",
"with",
"arguments",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/log/classes/privacy/provider.php#L131-L136 |
219,962 | moodle/moodle | lib/phpexcel/PHPExcel/Writer/OpenDocument.php | PHPExcel_Writer_OpenDocument.createZip | private function createZip($pFilename)
{
// Create new ZIP file and open it for writing
$zipClass = PHPExcel_Settings::getZipClass();
$objZip = new $zipClass();
// Retrieve OVERWRITE and CREATE constants from the instantiated zip class
// This method of accessing constant va... | php | private function createZip($pFilename)
{
// Create new ZIP file and open it for writing
$zipClass = PHPExcel_Settings::getZipClass();
$objZip = new $zipClass();
// Retrieve OVERWRITE and CREATE constants from the instantiated zip class
// This method of accessing constant va... | [
"private",
"function",
"createZip",
"(",
"$",
"pFilename",
")",
"{",
"// Create new ZIP file and open it for writing",
"$",
"zipClass",
"=",
"PHPExcel_Settings",
"::",
"getZipClass",
"(",
")",
";",
"$",
"objZip",
"=",
"new",
"$",
"zipClass",
"(",
")",
";",
"// R... | Create zip object
@param string $pFilename
@throws PHPExcel_Writer_Exception
@return ZipArchive | [
"Create",
"zip",
"object"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/phpexcel/PHPExcel/Writer/OpenDocument.php#L138-L161 |
219,963 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Ids/Pop3.php | Horde_Imap_Client_Ids_Pop3._toSequenceString | protected function _toSequenceString($sort = true)
{
/* $sort is ignored - see _sort(). */
/* Use space as delimiter as it is the only printable ASCII character
* that is not allowed as part of the UID (RFC 1939 [7]). */
return implode(' ', count($this->_ids) > 25000 ? array_unique... | php | protected function _toSequenceString($sort = true)
{
/* $sort is ignored - see _sort(). */
/* Use space as delimiter as it is the only printable ASCII character
* that is not allowed as part of the UID (RFC 1939 [7]). */
return implode(' ', count($this->_ids) > 25000 ? array_unique... | [
"protected",
"function",
"_toSequenceString",
"(",
"$",
"sort",
"=",
"true",
")",
"{",
"/* $sort is ignored - see _sort(). */",
"/* Use space as delimiter as it is the only printable ASCII character\n * that is not allowed as part of the UID (RFC 1939 [7]). */",
"return",
"implode"... | Create a POP3 message sequence string.
Index Format: UID1[SPACE]UID2...
@param boolean $sort Not used in this class.
@return string The POP3 message sequence string. | [
"Create",
"a",
"POP3",
"message",
"sequence",
"string",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Ids/Pop3.php#L43-L50 |
219,964 | moodle/moodle | blocks/timeline/classes/output/main.php | main.get_filters_as_booleans | protected function get_filters_as_booleans() {
$filters = [
BLOCK_TIMELINE_FILTER_BY_NONE => false,
BLOCK_TIMELINE_FILTER_BY_OVERDUE => false,
BLOCK_TIMELINE_FILTER_BY_7_DAYS => false,
BLOCK_TIMELINE_FILTER_BY_30_DAYS => false,
BLOCK_TIMELINE_FILTER_BY... | php | protected function get_filters_as_booleans() {
$filters = [
BLOCK_TIMELINE_FILTER_BY_NONE => false,
BLOCK_TIMELINE_FILTER_BY_OVERDUE => false,
BLOCK_TIMELINE_FILTER_BY_7_DAYS => false,
BLOCK_TIMELINE_FILTER_BY_30_DAYS => false,
BLOCK_TIMELINE_FILTER_BY... | [
"protected",
"function",
"get_filters_as_booleans",
"(",
")",
"{",
"$",
"filters",
"=",
"[",
"BLOCK_TIMELINE_FILTER_BY_NONE",
"=>",
"false",
",",
"BLOCK_TIMELINE_FILTER_BY_OVERDUE",
"=>",
"false",
",",
"BLOCK_TIMELINE_FILTER_BY_7_DAYS",
"=>",
"false",
",",
"BLOCK_TIMELINE... | Test the available filters with the current user preference and return an array with
bool flags corresponding to which is active
@return array | [
"Test",
"the",
"available",
"filters",
"with",
"the",
"current",
"user",
"preference",
"and",
"return",
"an",
"array",
"with",
"bool",
"flags",
"corresponding",
"to",
"which",
"is",
"active"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/blocks/timeline/classes/output/main.php#L81-L95 |
219,965 | moodle/moodle | lib/classes/oauth2/refresh_system_tokens_task.php | refresh_system_tokens_task.notify_admins | protected function notify_admins(\core\oauth2\issuer $issuer) {
global $CFG;
$admins = get_admins();
if (empty($admins)) {
return;
}
foreach ($admins as $admin) {
$strparams = ['siteurl' => $CFG->wwwroot, 'issuer' => $issuer->get('name')];
$lo... | php | protected function notify_admins(\core\oauth2\issuer $issuer) {
global $CFG;
$admins = get_admins();
if (empty($admins)) {
return;
}
foreach ($admins as $admin) {
$strparams = ['siteurl' => $CFG->wwwroot, 'issuer' => $issuer->get('name')];
$lo... | [
"protected",
"function",
"notify_admins",
"(",
"\\",
"core",
"\\",
"oauth2",
"\\",
"issuer",
"$",
"issuer",
")",
"{",
"global",
"$",
"CFG",
";",
"$",
"admins",
"=",
"get_admins",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"admins",
")",
")",
"{",
... | Notify admins when an OAuth refresh token expires. Should not happen if cron is running regularly.
@param \core\oauth2\issuer $issuer | [
"Notify",
"admins",
"when",
"an",
"OAuth",
"refresh",
"token",
"expires",
".",
"Should",
"not",
"happen",
"if",
"cron",
"is",
"running",
"regularly",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/oauth2/refresh_system_tokens_task.php#L54-L79 |
219,966 | moodle/moodle | lib/form/filemanager.php | MoodleQuickForm_filemanager.setMaxbytes | function setMaxbytes($maxbytes) {
global $CFG, $PAGE;
$this->_options['maxbytes'] = get_user_max_upload_file_size($PAGE->context, $CFG->maxbytes, $maxbytes);
} | php | function setMaxbytes($maxbytes) {
global $CFG, $PAGE;
$this->_options['maxbytes'] = get_user_max_upload_file_size($PAGE->context, $CFG->maxbytes, $maxbytes);
} | [
"function",
"setMaxbytes",
"(",
"$",
"maxbytes",
")",
"{",
"global",
"$",
"CFG",
",",
"$",
"PAGE",
";",
"$",
"this",
"->",
"_options",
"[",
"'maxbytes'",
"]",
"=",
"get_user_max_upload_file_size",
"(",
"$",
"PAGE",
"->",
"context",
",",
"$",
"CFG",
"->",... | Sets maximum file size which can be uploaded
@param int $maxbytes file size | [
"Sets",
"maximum",
"file",
"size",
"which",
"can",
"be",
"uploaded"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/filemanager.php#L165-L168 |
219,967 | moodle/moodle | lib/form/filemanager.php | MoodleQuickForm_filemanager.toHtml | function toHtml() {
global $CFG, $USER, $COURSE, $PAGE, $OUTPUT;
require_once("$CFG->dirroot/repository/lib.php");
// security - never ever allow guest/not logged in user to upload anything or use this element!
if (isguestuser() or !isloggedin()) {
print_error('noguest');
... | php | function toHtml() {
global $CFG, $USER, $COURSE, $PAGE, $OUTPUT;
require_once("$CFG->dirroot/repository/lib.php");
// security - never ever allow guest/not logged in user to upload anything or use this element!
if (isguestuser() or !isloggedin()) {
print_error('noguest');
... | [
"function",
"toHtml",
"(",
")",
"{",
"global",
"$",
"CFG",
",",
"$",
"USER",
",",
"$",
"COURSE",
",",
"$",
"PAGE",
",",
"$",
"OUTPUT",
";",
"require_once",
"(",
"\"$CFG->dirroot/repository/lib.php\"",
")",
";",
"// security - never ever allow guest/not logged in u... | Returns HTML for filemanager form element.
@return string | [
"Returns",
"HTML",
"for",
"filemanager",
"form",
"element",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/filemanager.php#L251-L310 |
219,968 | moodle/moodle | lib/form/filemanager.php | MoodleQuickForm_filemanager.validateSubmitValue | public function validateSubmitValue($value) {
if (empty($value)) {
return;
}
$filetypesutil = new \core_form\filetypes_util();
$whitelist = $filetypesutil->normalize_file_types($this->_options['accepted_types']);
if (empty($whitelist) || $whitelist === ['*']) {
... | php | public function validateSubmitValue($value) {
if (empty($value)) {
return;
}
$filetypesutil = new \core_form\filetypes_util();
$whitelist = $filetypesutil->normalize_file_types($this->_options['accepted_types']);
if (empty($whitelist) || $whitelist === ['*']) {
... | [
"public",
"function",
"validateSubmitValue",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"value",
")",
")",
"{",
"return",
";",
"}",
"$",
"filetypesutil",
"=",
"new",
"\\",
"core_form",
"\\",
"filetypes_util",
"(",
")",
";",
"$",
"whitel... | Check that all files have the allowed type.
@param int $value Draft item id with the uploaded files.
@return string|null Validation error message or null. | [
"Check",
"that",
"all",
"files",
"have",
"the",
"allowed",
"type",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/form/filemanager.php#L324-L361 |
219,969 | moodle/moodle | lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php | HTMLPurifier_Lexer_DOMLex.tokenizeDOM | protected function tokenizeDOM($node, &$tokens, $config)
{
$level = 0;
$nodes = array($level => new HTMLPurifier_Queue(array($node)));
$closingNodes = array();
do {
while (!$nodes[$level]->isEmpty()) {
$node = $nodes[$level]->shift(); // FIFO
... | php | protected function tokenizeDOM($node, &$tokens, $config)
{
$level = 0;
$nodes = array($level => new HTMLPurifier_Queue(array($node)));
$closingNodes = array();
do {
while (!$nodes[$level]->isEmpty()) {
$node = $nodes[$level]->shift(); // FIFO
... | [
"protected",
"function",
"tokenizeDOM",
"(",
"$",
"node",
",",
"&",
"$",
"tokens",
",",
"$",
"config",
")",
"{",
"$",
"level",
"=",
"0",
";",
"$",
"nodes",
"=",
"array",
"(",
"$",
"level",
"=>",
"new",
"HTMLPurifier_Queue",
"(",
"array",
"(",
"$",
... | Iterative function that tokenizes a node, putting it into an accumulator.
To iterate is human, to recurse divine - L. Peter Deutsch
@param DOMNode $node DOMNode to be tokenized.
@param HTMLPurifier_Token[] $tokens Array-list of already tokenized tokens.
@return HTMLPurifier_Token of node appended to previously passed... | [
"Iterative",
"function",
"that",
"tokenizes",
"a",
"node",
"putting",
"it",
"into",
"an",
"accumulator",
".",
"To",
"iterate",
"is",
"human",
"to",
"recurse",
"divine",
"-",
"L",
".",
"Peter",
"Deutsch"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/Lexer/DOMLex.php#L99-L127 |
219,970 | moodle/moodle | question/type/multianswer/backup/moodle1/lib.php | moodle1_qtype_multianswer_handler.process_question | public function process_question(array $data, array $raw) {
// Convert and write the answers first.
if (isset($data['answers'])) {
$this->write_answers($data['answers'], $this->pluginname);
}
// Convert and write the multianswer extra fields.
foreach ($data['multian... | php | public function process_question(array $data, array $raw) {
// Convert and write the answers first.
if (isset($data['answers'])) {
$this->write_answers($data['answers'], $this->pluginname);
}
// Convert and write the multianswer extra fields.
foreach ($data['multian... | [
"public",
"function",
"process_question",
"(",
"array",
"$",
"data",
",",
"array",
"$",
"raw",
")",
"{",
"// Convert and write the answers first.",
"if",
"(",
"isset",
"(",
"$",
"data",
"[",
"'answers'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"write_answers"... | Appends the multianswer specific information to the question
Note that there is an upgrade step 2008050800 that is not replayed here as I suppose there
was an error on restore and the backup file contains correct data. If I'm wrong on this
assumption then the parent of the embedded questions could be fixed on conversi... | [
"Appends",
"the",
"multianswer",
"specific",
"information",
"to",
"the",
"question"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/multianswer/backup/moodle1/lib.php#L50-L63 |
219,971 | moodle/moodle | lib/classes/collator.php | core_collator.ensure_collator_available | protected static function ensure_collator_available() {
$locale = get_string('locale', 'langconfig');
if (is_null(self::$collator) || $locale != self::$locale) {
self::$collator = false;
self::$locale = $locale;
if (class_exists('Collator', false)) {
$... | php | protected static function ensure_collator_available() {
$locale = get_string('locale', 'langconfig');
if (is_null(self::$collator) || $locale != self::$locale) {
self::$collator = false;
self::$locale = $locale;
if (class_exists('Collator', false)) {
$... | [
"protected",
"static",
"function",
"ensure_collator_available",
"(",
")",
"{",
"$",
"locale",
"=",
"get_string",
"(",
"'locale'",
",",
"'langconfig'",
")",
";",
"if",
"(",
"is_null",
"(",
"self",
"::",
"$",
"collator",
")",
"||",
"$",
"locale",
"!=",
"self... | Ensures that a collator is available and created
@return bool Returns true if collation is available and ready | [
"Ensures",
"that",
"a",
"collator",
"is",
"available",
"and",
"created"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/collator.php#L69-L131 |
219,972 | moodle/moodle | lib/classes/collator.php | core_collator.restore_array | protected static function restore_array(array &$arr, array &$original) {
foreach ($arr as $key => $ignored) {
$arr[$key] = $original[$key];
}
} | php | protected static function restore_array(array &$arr, array &$original) {
foreach ($arr as $key => $ignored) {
$arr[$key] = $original[$key];
}
} | [
"protected",
"static",
"function",
"restore_array",
"(",
"array",
"&",
"$",
"arr",
",",
"array",
"&",
"$",
"original",
")",
"{",
"foreach",
"(",
"$",
"arr",
"as",
"$",
"key",
"=>",
"$",
"ignored",
")",
"{",
"$",
"arr",
"[",
"$",
"key",
"]",
"=",
... | Restore array contents keeping new keys.
@static
@param array $arr
@param array $original
@return void modifies $arr | [
"Restore",
"array",
"contents",
"keeping",
"new",
"keys",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/collator.php#L140-L144 |
219,973 | moodle/moodle | lib/classes/collator.php | core_collator.asort | public static function asort(array &$arr, $sortflag = core_collator::SORT_STRING) {
if (empty($arr)) {
// nothing to do
return true;
}
$original = null;
$casesensitive = (bool)($sortflag & core_collator::CASE_SENSITIVE);
$sortflag = ($sortflag & ~core_co... | php | public static function asort(array &$arr, $sortflag = core_collator::SORT_STRING) {
if (empty($arr)) {
// nothing to do
return true;
}
$original = null;
$casesensitive = (bool)($sortflag & core_collator::CASE_SENSITIVE);
$sortflag = ($sortflag & ~core_co... | [
"public",
"static",
"function",
"asort",
"(",
"array",
"&",
"$",
"arr",
",",
"$",
"sortflag",
"=",
"core_collator",
"::",
"SORT_STRING",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"arr",
")",
")",
"{",
"// nothing to do",
"return",
"true",
";",
"}",
"$",
... | Locale aware sorting, the key associations are kept, values are sorted alphabetically.
@param array $arr array to be sorted (reference)
@param int $sortflag One of core_collator::SORT_NUMERIC, core_collator::SORT_STRING, core_collator::SORT_NATURAL, core_collator::SORT_REGULAR
optionally "|" core_collator::CASE_SENSIT... | [
"Locale",
"aware",
"sorting",
"the",
"key",
"associations",
"are",
"kept",
"values",
"are",
"sorted",
"alphabetically",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/collator.php#L174-L247 |
219,974 | moodle/moodle | lib/classes/collator.php | core_collator.asort_objects_by_property | public static function asort_objects_by_property(array &$objects, $property, $sortflag = core_collator::SORT_STRING) {
$original = $objects;
foreach ($objects as $key => $object) {
$objects[$key] = $object->$property;
}
$result = self::asort($objects, $sortflag);
self... | php | public static function asort_objects_by_property(array &$objects, $property, $sortflag = core_collator::SORT_STRING) {
$original = $objects;
foreach ($objects as $key => $object) {
$objects[$key] = $object->$property;
}
$result = self::asort($objects, $sortflag);
self... | [
"public",
"static",
"function",
"asort_objects_by_property",
"(",
"array",
"&",
"$",
"objects",
",",
"$",
"property",
",",
"$",
"sortflag",
"=",
"core_collator",
"::",
"SORT_STRING",
")",
"{",
"$",
"original",
"=",
"$",
"objects",
";",
"foreach",
"(",
"$",
... | Locale aware sort of objects by a property in common to all objects
@param array $objects An array of objects to sort (handled by reference)
@param string $property The property to use for comparison
@param int $sortflag One of core_collator::SORT_NUMERIC, core_collator::SORT_STRING, core_collator::SORT_NATURAL, core_... | [
"Locale",
"aware",
"sort",
"of",
"objects",
"by",
"a",
"property",
"in",
"common",
"to",
"all",
"objects"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/collator.php#L258-L266 |
219,975 | moodle/moodle | lib/classes/collator.php | core_collator.asort_objects_by_method | public static function asort_objects_by_method(array &$objects, $method, $sortflag = core_collator::SORT_STRING) {
$original = $objects;
foreach ($objects as $key => $object) {
$objects[$key] = $object->{$method}();
}
$result = self::asort($objects, $sortflag);
self::... | php | public static function asort_objects_by_method(array &$objects, $method, $sortflag = core_collator::SORT_STRING) {
$original = $objects;
foreach ($objects as $key => $object) {
$objects[$key] = $object->{$method}();
}
$result = self::asort($objects, $sortflag);
self::... | [
"public",
"static",
"function",
"asort_objects_by_method",
"(",
"array",
"&",
"$",
"objects",
",",
"$",
"method",
",",
"$",
"sortflag",
"=",
"core_collator",
"::",
"SORT_STRING",
")",
"{",
"$",
"original",
"=",
"$",
"objects",
";",
"foreach",
"(",
"$",
"ob... | Locale aware sort of objects by a method in common to all objects
@param array $objects An array of objects to sort (handled by reference)
@param string $method The method to call to generate a value for comparison
@param int $sortflag One of core_collator::SORT_NUMERIC, core_collator::SORT_STRING, core_collator::SORT... | [
"Locale",
"aware",
"sort",
"of",
"objects",
"by",
"a",
"method",
"in",
"common",
"to",
"all",
"objects"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/collator.php#L277-L285 |
219,976 | moodle/moodle | lib/classes/collator.php | core_collator.asort_array_of_arrays_by_key | public static function asort_array_of_arrays_by_key(array &$array, $key, $sortflag = core_collator::SORT_STRING) {
$original = $array;
foreach ($array as $initkey => $item) {
$array[$initkey] = $item[$key];
}
$result = self::asort($array, $sortflag);
self::restore_arr... | php | public static function asort_array_of_arrays_by_key(array &$array, $key, $sortflag = core_collator::SORT_STRING) {
$original = $array;
foreach ($array as $initkey => $item) {
$array[$initkey] = $item[$key];
}
$result = self::asort($array, $sortflag);
self::restore_arr... | [
"public",
"static",
"function",
"asort_array_of_arrays_by_key",
"(",
"array",
"&",
"$",
"array",
",",
"$",
"key",
",",
"$",
"sortflag",
"=",
"core_collator",
"::",
"SORT_STRING",
")",
"{",
"$",
"original",
"=",
"$",
"array",
";",
"foreach",
"(",
"$",
"arra... | Locale aware sort of array of arrays.
Given an array like:
$array = array(
array('name' => 'bravo'),
array('name' => 'charlie'),
array('name' => 'alpha')
);
If you call:
core_collator::asort_array_of_arrays_by_key($array, 'name')
You will be returned $array sorted by the name key of the subarrays. e.g.
$array = arra... | [
"Locale",
"aware",
"sort",
"of",
"array",
"of",
"arrays",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/collator.php#L317-L325 |
219,977 | moodle/moodle | lib/classes/collator.php | core_collator.ksort | public static function ksort(array &$arr, $sortflag = core_collator::SORT_STRING) {
$keys = array_keys($arr);
if (!self::asort($keys, $sortflag)) {
return false;
}
// This is a bit slow, but we need to keep the references
$original = $arr;
$arr = array(); // S... | php | public static function ksort(array &$arr, $sortflag = core_collator::SORT_STRING) {
$keys = array_keys($arr);
if (!self::asort($keys, $sortflag)) {
return false;
}
// This is a bit slow, but we need to keep the references
$original = $arr;
$arr = array(); // S... | [
"public",
"static",
"function",
"ksort",
"(",
"array",
"&",
"$",
"arr",
",",
"$",
"sortflag",
"=",
"core_collator",
"::",
"SORT_STRING",
")",
"{",
"$",
"keys",
"=",
"array_keys",
"(",
"$",
"arr",
")",
";",
"if",
"(",
"!",
"self",
"::",
"asort",
"(",
... | Locale aware sorting, the key associations are kept, keys are sorted alphabetically.
@param array $arr array to be sorted (reference)
@param int $sortflag One of core_collator::SORT_NUMERIC, core_collator::SORT_STRING, core_collator::SORT_NATURAL, core_collator::SORT_REGULAR
optionally "|" core_collator::CASE_SENSITIV... | [
"Locale",
"aware",
"sorting",
"the",
"key",
"associations",
"are",
"kept",
"keys",
"are",
"sorted",
"alphabetically",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/collator.php#L335-L348 |
219,978 | moodle/moodle | admin/tool/usertours/classes/local/filter/category.php | category.check_contexts | private static function check_contexts(context $context, $values) {
if ($context->contextlevel > CONTEXT_COURSECAT) {
return self::check_contexts($context->get_parent_context(), $values);
} else if ($context->contextlevel == CONTEXT_COURSECAT) {
if (in_array($context->instanceid,... | php | private static function check_contexts(context $context, $values) {
if ($context->contextlevel > CONTEXT_COURSECAT) {
return self::check_contexts($context->get_parent_context(), $values);
} else if ($context->contextlevel == CONTEXT_COURSECAT) {
if (in_array($context->instanceid,... | [
"private",
"static",
"function",
"check_contexts",
"(",
"context",
"$",
"context",
",",
"$",
"values",
")",
"{",
"if",
"(",
"$",
"context",
"->",
"contextlevel",
">",
"CONTEXT_COURSECAT",
")",
"{",
"return",
"self",
"::",
"check_contexts",
"(",
"$",
"context... | Recursive function allows checking of parent categories.
@param context $context
@param array $values
@return boolean | [
"Recursive",
"function",
"allows",
"checking",
"of",
"parent",
"categories",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/usertours/classes/local/filter/category.php#L85-L97 |
219,979 | moodle/moodle | lib/portfolio/plugin.php | portfolio_plugin_base.get_export_config | public final function get_export_config($key) {
$allowed = array_merge(
array('hidewait', 'wait', 'format', 'hideformat'),
$this->get_allowed_export_config()
);
if (!in_array($key, $allowed)) {
$a = (object)array('property' => $key, 'class' => get_class($this)... | php | public final function get_export_config($key) {
$allowed = array_merge(
array('hidewait', 'wait', 'format', 'hideformat'),
$this->get_allowed_export_config()
);
if (!in_array($key, $allowed)) {
$a = (object)array('property' => $key, 'class' => get_class($this)... | [
"public",
"final",
"function",
"get_export_config",
"(",
"$",
"key",
")",
"{",
"$",
"allowed",
"=",
"array_merge",
"(",
"array",
"(",
"'hidewait'",
",",
"'wait'",
",",
"'format'",
",",
"'hideformat'",
")",
",",
"$",
"this",
"->",
"get_allowed_export_config",
... | Gets an export time config value.
Subclasses should not override this.
@param string $key field to fetch
@return null|string config value | [
"Gets",
"an",
"export",
"time",
"config",
"value",
".",
"Subclasses",
"should",
"not",
"override",
"this",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/portfolio/plugin.php#L237-L250 |
219,980 | moodle/moodle | lib/portfolio/plugin.php | portfolio_plugin_base.create_instance | public static function create_instance($plugin, $name, $config) {
global $DB, $CFG;
$new = (object)array(
'plugin' => $plugin,
'name' => $name,
);
if (!portfolio_static_function($plugin, 'allows_multiple_instances')) {
// check we don't have one alre... | php | public static function create_instance($plugin, $name, $config) {
global $DB, $CFG;
$new = (object)array(
'plugin' => $plugin,
'name' => $name,
);
if (!portfolio_static_function($plugin, 'allows_multiple_instances')) {
// check we don't have one alre... | [
"public",
"static",
"function",
"create_instance",
"(",
"$",
"plugin",
",",
"$",
"name",
",",
"$",
"config",
")",
"{",
"global",
"$",
"DB",
",",
"$",
"CFG",
";",
"$",
"new",
"=",
"(",
"object",
")",
"array",
"(",
"'plugin'",
"=>",
"$",
"plugin",
",... | This function creates a new instance of a plugin
saves it in the database, saves the config
and returns it.
You shouldn't need to override it
unless you're doing something really funky
@param string $plugin portfolio plugin to create
@param string $name name of new instance
@param array $config what the admin config f... | [
"This",
"function",
"creates",
"a",
"new",
"instance",
"of",
"a",
"plugin",
"saves",
"it",
"in",
"the",
"database",
"saves",
"the",
"config",
"and",
"returns",
"it",
".",
"You",
"shouldn",
"t",
"need",
"to",
"override",
"it",
"unless",
"you",
"re",
"doin... | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/portfolio/plugin.php#L424-L443 |
219,981 | moodle/moodle | lib/portfolio/plugin.php | portfolio_plugin_base.get_config | public final function get_config($key) {
if (!in_array($key, $this->get_allowed_config())) {
$a = (object)array('property' => $key, 'class' => get_class($this));
throw new portfolio_export_exception($this->get('exporter'), 'invalidconfigproperty', 'portfolio', null, $a);
}
... | php | public final function get_config($key) {
if (!in_array($key, $this->get_allowed_config())) {
$a = (object)array('property' => $key, 'class' => get_class($this));
throw new portfolio_export_exception($this->get('exporter'), 'invalidconfigproperty', 'portfolio', null, $a);
}
... | [
"public",
"final",
"function",
"get_config",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"get_allowed_config",
"(",
")",
")",
")",
"{",
"$",
"a",
"=",
"(",
"object",
")",
"array",
"(",
"'property'... | Gets the value of a particular config item
@param string $key key to fetch
@return null|mixed the corresponding value | [
"Gets",
"the",
"value",
"of",
"a",
"particular",
"config",
"item"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/portfolio/plugin.php#L552-L561 |
219,982 | moodle/moodle | lib/portfolio/plugin.php | portfolio_plugin_base.get_user_config | public final function get_user_config($key, $userid=0) {
global $DB;
if (empty($userid)) {
$userid = $this->user->id;
}
if ($key != 'visible') { // handled by the parent class
if (!in_array($key, $this->get_allowed_user_config())) {
$a = (object)... | php | public final function get_user_config($key, $userid=0) {
global $DB;
if (empty($userid)) {
$userid = $this->user->id;
}
if ($key != 'visible') { // handled by the parent class
if (!in_array($key, $this->get_allowed_user_config())) {
$a = (object)... | [
"public",
"final",
"function",
"get_user_config",
"(",
"$",
"key",
",",
"$",
"userid",
"=",
"0",
")",
"{",
"global",
"$",
"DB",
";",
"if",
"(",
"empty",
"(",
"$",
"userid",
")",
")",
"{",
"$",
"userid",
"=",
"$",
"this",
"->",
"user",
"->",
"id",... | Get the value of a config item for a particular user.
@param string $key key to fetch
@param int $userid id of user (defaults to current)
@return string the corresponding value | [
"Get",
"the",
"value",
"of",
"a",
"config",
"item",
"for",
"a",
"particular",
"user",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/portfolio/plugin.php#L571-L595 |
219,983 | moodle/moodle | lib/portfolio/plugin.php | portfolio_plugin_base.set_user_config | public final function set_user_config($config, $userid=0) {
global $DB;
if (empty($userid)) {
$userid = $this->user->id;
}
foreach ($config as $key => $value) {
if ($key != 'visible' && !in_array($key, $this->get_allowed_user_config())) {
$a = (o... | php | public final function set_user_config($config, $userid=0) {
global $DB;
if (empty($userid)) {
$userid = $this->user->id;
}
foreach ($config as $key => $value) {
if ($key != 'visible' && !in_array($key, $this->get_allowed_user_config())) {
$a = (o... | [
"public",
"final",
"function",
"set_user_config",
"(",
"$",
"config",
",",
"$",
"userid",
"=",
"0",
")",
"{",
"global",
"$",
"DB",
";",
"if",
"(",
"empty",
"(",
"$",
"userid",
")",
")",
"{",
"$",
"userid",
"=",
"$",
"this",
"->",
"user",
"->",
"i... | Sets config options for a given user.
@param array $config array containing key/value pairs to set
@param int $userid userid to set config for (defaults to current) | [
"Sets",
"config",
"options",
"for",
"a",
"given",
"user",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/portfolio/plugin.php#L604-L629 |
219,984 | moodle/moodle | lib/htmlpurifier/HTMLPurifier/HTMLModule.php | HTMLPurifier_HTMLModule.addElement | public function addElement($element, $type, $contents, $attr_includes = array(), $attr = array())
{
$this->elements[] = $element;
// parse content_model
list($content_model_type, $content_model) = $this->parseContents($contents);
// merge in attribute inclusions
$this->mergeI... | php | public function addElement($element, $type, $contents, $attr_includes = array(), $attr = array())
{
$this->elements[] = $element;
// parse content_model
list($content_model_type, $content_model) = $this->parseContents($contents);
// merge in attribute inclusions
$this->mergeI... | [
"public",
"function",
"addElement",
"(",
"$",
"element",
",",
"$",
"type",
",",
"$",
"contents",
",",
"$",
"attr_includes",
"=",
"array",
"(",
")",
",",
"$",
"attr",
"=",
"array",
"(",
")",
")",
"{",
"$",
"this",
"->",
"elements",
"[",
"]",
"=",
... | Convenience function that sets up a new element
@param string $element Name of element to add
@param string|bool $type What content set should element be registered to?
Set as false to skip this step.
@param string $contents Allowed children in form of:
"$content_model_type: $content_model"
@param array $attr_includes ... | [
"Convenience",
"function",
"that",
"sets",
"up",
"a",
"new",
"element"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/HTMLModule.php#L144-L166 |
219,985 | moodle/moodle | lib/htmlpurifier/HTMLPurifier/HTMLModule.php | HTMLPurifier_HTMLModule.addBlankElement | public function addBlankElement($element)
{
if (!isset($this->info[$element])) {
$this->elements[] = $element;
$this->info[$element] = new HTMLPurifier_ElementDef();
$this->info[$element]->standalone = false;
} else {
trigger_error("Definition for $ele... | php | public function addBlankElement($element)
{
if (!isset($this->info[$element])) {
$this->elements[] = $element;
$this->info[$element] = new HTMLPurifier_ElementDef();
$this->info[$element]->standalone = false;
} else {
trigger_error("Definition for $ele... | [
"public",
"function",
"addBlankElement",
"(",
"$",
"element",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"info",
"[",
"$",
"element",
"]",
")",
")",
"{",
"$",
"this",
"->",
"elements",
"[",
"]",
"=",
"$",
"element",
";",
"$",
"thi... | Convenience function that creates a totally blank, non-standalone
element.
@param string $element Name of element to create
@return HTMLPurifier_ElementDef Created element | [
"Convenience",
"function",
"that",
"creates",
"a",
"totally",
"blank",
"non",
"-",
"standalone",
"element",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/HTMLModule.php#L174-L184 |
219,986 | moodle/moodle | lib/htmlpurifier/HTMLPurifier/HTMLModule.php | HTMLPurifier_HTMLModule.addElementToContentSet | public function addElementToContentSet($element, $type)
{
if (!isset($this->content_sets[$type])) {
$this->content_sets[$type] = '';
} else {
$this->content_sets[$type] .= ' | ';
}
$this->content_sets[$type] .= $element;
} | php | public function addElementToContentSet($element, $type)
{
if (!isset($this->content_sets[$type])) {
$this->content_sets[$type] = '';
} else {
$this->content_sets[$type] .= ' | ';
}
$this->content_sets[$type] .= $element;
} | [
"public",
"function",
"addElementToContentSet",
"(",
"$",
"element",
",",
"$",
"type",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"content_sets",
"[",
"$",
"type",
"]",
")",
")",
"{",
"$",
"this",
"->",
"content_sets",
"[",
"$",
"type... | Convenience function that registers an element to a content set
@param string $element Element to register
@param string $type Name content set (warning: case sensitive, usually upper-case
first letter) | [
"Convenience",
"function",
"that",
"registers",
"an",
"element",
"to",
"a",
"content",
"set"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/HTMLModule.php#L192-L200 |
219,987 | moodle/moodle | cache/stores/mongodb/MongoDB/Operation/CreateIndexes.php | CreateIndexes.executeCommand | private function executeCommand(Server $server)
{
$cmd = [
'createIndexes' => $this->collectionName,
'indexes' => $this->indexes,
];
if (isset($this->options['maxTimeMS'])) {
$cmd['maxTimeMS'] = $this->options['maxTimeMS'];
}
$server->exe... | php | private function executeCommand(Server $server)
{
$cmd = [
'createIndexes' => $this->collectionName,
'indexes' => $this->indexes,
];
if (isset($this->options['maxTimeMS'])) {
$cmd['maxTimeMS'] = $this->options['maxTimeMS'];
}
$server->exe... | [
"private",
"function",
"executeCommand",
"(",
"Server",
"$",
"server",
")",
"{",
"$",
"cmd",
"=",
"[",
"'createIndexes'",
"=>",
"$",
"this",
"->",
"collectionName",
",",
"'indexes'",
"=>",
"$",
"this",
"->",
"indexes",
",",
"]",
";",
"if",
"(",
"isset",
... | Create one or more indexes for the collection using the createIndexes
command.
@param Server $server
@throws DriverRuntimeException for other driver errors (e.g. connection errors) | [
"Create",
"one",
"or",
"more",
"indexes",
"for",
"the",
"collection",
"using",
"the",
"createIndexes",
"command",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/cache/stores/mongodb/MongoDB/Operation/CreateIndexes.php#L175-L187 |
219,988 | moodle/moodle | lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php | FileSystemHelper.createMetaInfoFolderAndFile | protected function createMetaInfoFolderAndFile()
{
$this->metaInfFolder = $this->createFolder($this->rootFolder, self::META_INF_FOLDER_NAME);
$this->createManifestFile();
return $this;
} | php | protected function createMetaInfoFolderAndFile()
{
$this->metaInfFolder = $this->createFolder($this->rootFolder, self::META_INF_FOLDER_NAME);
$this->createManifestFile();
return $this;
} | [
"protected",
"function",
"createMetaInfoFolderAndFile",
"(",
")",
"{",
"$",
"this",
"->",
"metaInfFolder",
"=",
"$",
"this",
"->",
"createFolder",
"(",
"$",
"this",
"->",
"rootFolder",
",",
"self",
"::",
"META_INF_FOLDER_NAME",
")",
";",
"$",
"this",
"->",
"... | Creates the "META-INF" folder under the root folder as well as the "manifest.xml" file in it
@return FileSystemHelper
@throws \Box\Spout\Common\Exception\IOException If unable to create the folder or the "manifest.xml" file | [
"Creates",
"the",
"META",
"-",
"INF",
"folder",
"under",
"the",
"root",
"folder",
"as",
"well",
"as",
"the",
"manifest",
".",
"xml",
"file",
"in",
"it"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php#L88-L95 |
219,989 | moodle/moodle | lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php | FileSystemHelper.createSheetsContentTempFolder | protected function createSheetsContentTempFolder()
{
$this->sheetsContentTempFolder = $this->createFolder($this->rootFolder, self::SHEETS_CONTENT_TEMP_FOLDER_NAME);
return $this;
} | php | protected function createSheetsContentTempFolder()
{
$this->sheetsContentTempFolder = $this->createFolder($this->rootFolder, self::SHEETS_CONTENT_TEMP_FOLDER_NAME);
return $this;
} | [
"protected",
"function",
"createSheetsContentTempFolder",
"(",
")",
"{",
"$",
"this",
"->",
"sheetsContentTempFolder",
"=",
"$",
"this",
"->",
"createFolder",
"(",
"$",
"this",
"->",
"rootFolder",
",",
"self",
"::",
"SHEETS_CONTENT_TEMP_FOLDER_NAME",
")",
";",
"re... | Creates the temp folder where specific sheets content will be written to.
This folder is not part of the final ODS file and is only used to be able to jump between sheets.
@return FileSystemHelper
@throws \Box\Spout\Common\Exception\IOException If unable to create the folder | [
"Creates",
"the",
"temp",
"folder",
"where",
"specific",
"sheets",
"content",
"will",
"be",
"written",
"to",
".",
"This",
"folder",
"is",
"not",
"part",
"of",
"the",
"final",
"ODS",
"file",
"and",
"is",
"only",
"used",
"to",
"be",
"able",
"to",
"jump",
... | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php#L127-L131 |
219,990 | moodle/moodle | lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php | FileSystemHelper.createMetaFile | protected function createMetaFile()
{
$appName = self::APP_NAME;
$createdDate = (new \DateTime())->format(\DateTime::W3C);
$metaXmlFileContents = <<<EOD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<office:document-meta office:version="1.2" xmlns:dc="http://purl.org/dc/elements/1... | php | protected function createMetaFile()
{
$appName = self::APP_NAME;
$createdDate = (new \DateTime())->format(\DateTime::W3C);
$metaXmlFileContents = <<<EOD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<office:document-meta office:version="1.2" xmlns:dc="http://purl.org/dc/elements/1... | [
"protected",
"function",
"createMetaFile",
"(",
")",
"{",
"$",
"appName",
"=",
"self",
"::",
"APP_NAME",
";",
"$",
"createdDate",
"=",
"(",
"new",
"\\",
"DateTime",
"(",
")",
")",
"->",
"format",
"(",
"\\",
"DateTime",
"::",
"W3C",
")",
";",
"$",
"me... | Creates the "meta.xml" file under the root folder
@return FileSystemHelper
@throws \Box\Spout\Common\Exception\IOException If unable to create the file | [
"Creates",
"the",
"meta",
".",
"xml",
"file",
"under",
"the",
"root",
"folder"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php#L139-L158 |
219,991 | moodle/moodle | lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php | FileSystemHelper.createMimetypeFile | protected function createMimetypeFile()
{
$this->createFileWithContents($this->rootFolder, self::MIMETYPE_FILE_NAME, self::MIMETYPE);
return $this;
} | php | protected function createMimetypeFile()
{
$this->createFileWithContents($this->rootFolder, self::MIMETYPE_FILE_NAME, self::MIMETYPE);
return $this;
} | [
"protected",
"function",
"createMimetypeFile",
"(",
")",
"{",
"$",
"this",
"->",
"createFileWithContents",
"(",
"$",
"this",
"->",
"rootFolder",
",",
"self",
"::",
"MIMETYPE_FILE_NAME",
",",
"self",
"::",
"MIMETYPE",
")",
";",
"return",
"$",
"this",
";",
"}"... | Creates the "mimetype" file under the root folder
@return FileSystemHelper
@throws \Box\Spout\Common\Exception\IOException If unable to create the file | [
"Creates",
"the",
"mimetype",
"file",
"under",
"the",
"root",
"folder"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php#L166-L170 |
219,992 | moodle/moodle | lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php | FileSystemHelper.createContentFile | public function createContentFile($worksheets, $styleHelper)
{
$contentXmlFileContents = <<<EOD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<office:document-content office:version="1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:... | php | public function createContentFile($worksheets, $styleHelper)
{
$contentXmlFileContents = <<<EOD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<office:document-content office:version="1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:... | [
"public",
"function",
"createContentFile",
"(",
"$",
"worksheets",
",",
"$",
"styleHelper",
")",
"{",
"$",
"contentXmlFileContents",
"=",
" <<<EOD\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<office:document-content office:version=\"1.2\" xmlns:dc=\"http://purl.org/dc... | Creates the "content.xml" file under the root folder
@param Worksheet[] $worksheets
@param StyleHelper $styleHelper
@return FileSystemHelper | [
"Creates",
"the",
"content",
".",
"xml",
"file",
"under",
"the",
"root",
"folder"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php#L179-L213 |
219,993 | moodle/moodle | lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php | FileSystemHelper.copyFileContentsToTarget | protected function copyFileContentsToTarget($sourceFilePath, $targetResource)
{
$sourceHandle = fopen($sourceFilePath, 'r');
stream_copy_to_stream($sourceHandle, $targetResource);
fclose($sourceHandle);
} | php | protected function copyFileContentsToTarget($sourceFilePath, $targetResource)
{
$sourceHandle = fopen($sourceFilePath, 'r');
stream_copy_to_stream($sourceHandle, $targetResource);
fclose($sourceHandle);
} | [
"protected",
"function",
"copyFileContentsToTarget",
"(",
"$",
"sourceFilePath",
",",
"$",
"targetResource",
")",
"{",
"$",
"sourceHandle",
"=",
"fopen",
"(",
"$",
"sourceFilePath",
",",
"'r'",
")",
";",
"stream_copy_to_stream",
"(",
"$",
"sourceHandle",
",",
"$... | Streams the content of the file at the given path into the target resource.
Depending on which mode the target resource was created with, it will truncate then copy
or append the content to the target file.
@param string $sourceFilePath Path of the file whose content will be copied
@param resource $targetResource Targ... | [
"Streams",
"the",
"content",
"of",
"the",
"file",
"at",
"the",
"given",
"path",
"into",
"the",
"target",
"resource",
".",
"Depending",
"on",
"which",
"mode",
"the",
"target",
"resource",
"was",
"created",
"with",
"it",
"will",
"truncate",
"then",
"copy",
"... | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php#L224-L229 |
219,994 | moodle/moodle | lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php | FileSystemHelper.createStylesFile | public function createStylesFile($styleHelper, $numWorksheets)
{
$stylesXmlFileContents = $styleHelper->getStylesXMLFileContent($numWorksheets);
$this->createFileWithContents($this->rootFolder, self::STYLES_XML_FILE_NAME, $stylesXmlFileContents);
return $this;
} | php | public function createStylesFile($styleHelper, $numWorksheets)
{
$stylesXmlFileContents = $styleHelper->getStylesXMLFileContent($numWorksheets);
$this->createFileWithContents($this->rootFolder, self::STYLES_XML_FILE_NAME, $stylesXmlFileContents);
return $this;
} | [
"public",
"function",
"createStylesFile",
"(",
"$",
"styleHelper",
",",
"$",
"numWorksheets",
")",
"{",
"$",
"stylesXmlFileContents",
"=",
"$",
"styleHelper",
"->",
"getStylesXMLFileContent",
"(",
"$",
"numWorksheets",
")",
";",
"$",
"this",
"->",
"createFileWithC... | Creates the "styles.xml" file under the root folder
@param StyleHelper $styleHelper
@param int $numWorksheets Number of created worksheets
@return FileSystemHelper | [
"Creates",
"the",
"styles",
".",
"xml",
"file",
"under",
"the",
"root",
"folder"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/ODS/Helper/FileSystemHelper.php#L250-L256 |
219,995 | moodle/moodle | admin/tool/generator/classes/make_course_form.php | tool_generator_make_course_form.definition | public function definition() {
$mform = $this->_form;
$mform->addElement('select', 'size', get_string('size', 'tool_generator'),
tool_generator_course_backend::get_size_choices());
$mform->setDefault('size', tool_generator_course_backend::DEFAULT_SIZE);
$mform->addEleme... | php | public function definition() {
$mform = $this->_form;
$mform->addElement('select', 'size', get_string('size', 'tool_generator'),
tool_generator_course_backend::get_size_choices());
$mform->setDefault('size', tool_generator_course_backend::DEFAULT_SIZE);
$mform->addEleme... | [
"public",
"function",
"definition",
"(",
")",
"{",
"$",
"mform",
"=",
"$",
"this",
"->",
"_form",
";",
"$",
"mform",
"->",
"addElement",
"(",
"'select'",
",",
"'size'",
",",
"get_string",
"(",
"'size'",
",",
"'tool_generator'",
")",
",",
"tool_generator_co... | Course generation tool form definition.
@return void | [
"Course",
"generation",
"tool",
"form",
"definition",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/generator/classes/make_course_form.php#L43-L61 |
219,996 | moodle/moodle | lib/classes/hub/publication.php | publication.get_sorted_subjects | public static function get_sorted_subjects() {
$subjects = get_string_manager()->load_component_strings('edufields', current_language());
// Sort the subjects.
$return = [];
asort($subjects);
foreach ($subjects as $key => $option) {
$keylength = strlen($key);
... | php | public static function get_sorted_subjects() {
$subjects = get_string_manager()->load_component_strings('edufields', current_language());
// Sort the subjects.
$return = [];
asort($subjects);
foreach ($subjects as $key => $option) {
$keylength = strlen($key);
... | [
"public",
"static",
"function",
"get_sorted_subjects",
"(",
")",
"{",
"$",
"subjects",
"=",
"get_string_manager",
"(",
")",
"->",
"load_component_strings",
"(",
"'edufields'",
",",
"current_language",
"(",
")",
")",
";",
"// Sort the subjects.",
"$",
"return",
"="... | Retrieve all the sorted course subjects
@return array $subjects | [
"Retrieve",
"all",
"the",
"sorted",
"course",
"subjects"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/publication.php#L79-L92 |
219,997 | moodle/moodle | lib/classes/hub/publication.php | publication.get_course_publications | public static function get_course_publications($courseid) {
global $DB;
$sql = 'SELECT cp.id, cp.status, cp.timechecked, cp.timepublished, rh.hubname,
rh.huburl, cp.courseid, cp.enrollable, cp.hubcourseid
FROM {course_published} cp, {registration_hubs} rh
... | php | public static function get_course_publications($courseid) {
global $DB;
$sql = 'SELECT cp.id, cp.status, cp.timechecked, cp.timepublished, rh.hubname,
rh.huburl, cp.courseid, cp.enrollable, cp.hubcourseid
FROM {course_published} cp, {registration_hubs} rh
... | [
"public",
"static",
"function",
"get_course_publications",
"(",
"$",
"courseid",
")",
"{",
"global",
"$",
"DB",
";",
"$",
"sql",
"=",
"'SELECT cp.id, cp.status, cp.timechecked, cp.timepublished, rh.hubname,\n rh.huburl, cp.courseid, cp.enrollable, cp.hubcourseid... | Get all publication for a course
@param int $courseid local course id
@return array of publication | [
"Get",
"all",
"publication",
"for",
"a",
"course"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/publication.php#L100-L117 |
219,998 | moodle/moodle | lib/classes/hub/publication.php | publication.get_publication | public static function get_publication($id, $courseid = 0, $strictness = IGNORE_MISSING) {
global $DB;
if (!$id && $strictness != MUST_EXIST) {
return false;
}
$params = ['id' => $id, 'huburl' => HUB_MOODLEORGHUBURL];
if ($courseid) {
$params['courseid'] =... | php | public static function get_publication($id, $courseid = 0, $strictness = IGNORE_MISSING) {
global $DB;
if (!$id && $strictness != MUST_EXIST) {
return false;
}
$params = ['id' => $id, 'huburl' => HUB_MOODLEORGHUBURL];
if ($courseid) {
$params['courseid'] =... | [
"public",
"static",
"function",
"get_publication",
"(",
"$",
"id",
",",
"$",
"courseid",
"=",
"0",
",",
"$",
"strictness",
"=",
"IGNORE_MISSING",
")",
"{",
"global",
"$",
"DB",
";",
"if",
"(",
"!",
"$",
"id",
"&&",
"$",
"strictness",
"!=",
"MUST_EXIST"... | Load publication information from local db
@param int $id
@param int $courseid if specified publication will be checked that it is in the current course
@param int $strictness
@return stdClass | [
"Load",
"publication",
"information",
"from",
"local",
"db"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/publication.php#L127-L137 |
219,999 | moodle/moodle | lib/classes/hub/publication.php | publication.request_status_update | public static function request_status_update() {
global $DB;
list($sitecourses, $coursetotal) = api::get_courses('', 1, 1, ['allsitecourses' => 1]);
// Update status for all these course.
foreach ($sitecourses as $sitecourse) {
// Get the publication from the hub course id.... | php | public static function request_status_update() {
global $DB;
list($sitecourses, $coursetotal) = api::get_courses('', 1, 1, ['allsitecourses' => 1]);
// Update status for all these course.
foreach ($sitecourses as $sitecourse) {
// Get the publication from the hub course id.... | [
"public",
"static",
"function",
"request_status_update",
"(",
")",
"{",
"global",
"$",
"DB",
";",
"list",
"(",
"$",
"sitecourses",
",",
"$",
"coursetotal",
")",
"=",
"api",
"::",
"get_courses",
"(",
"''",
",",
"1",
",",
"1",
",",
"[",
"'allsitecourses'",... | Check all courses published from this site if they have been approved | [
"Check",
"all",
"courses",
"published",
"from",
"this",
"site",
"if",
"they",
"have",
"been",
"approved"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/hub/publication.php#L151-L172 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.