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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
213,200 | moodle/moodle | mod/assign/feedback/editpdf/backup/moodle2/backup_assignfeedback_editpdf_subplugin.class.php | backup_assignfeedback_editpdf_subplugin.define_grade_subplugin_structure | protected function define_grade_subplugin_structure() {
// Create XML elements.
$subplugin = $this->get_subplugin_element();
$subpluginwrapper = new backup_nested_element($this->get_recommended_name());
$subpluginelementfiles = new backup_nested_element('feedback_editpdf_files', null, a... | php | protected function define_grade_subplugin_structure() {
// Create XML elements.
$subplugin = $this->get_subplugin_element();
$subpluginwrapper = new backup_nested_element($this->get_recommended_name());
$subpluginelementfiles = new backup_nested_element('feedback_editpdf_files', null, a... | [
"protected",
"function",
"define_grade_subplugin_structure",
"(",
")",
"{",
"// Create XML elements.",
"$",
"subplugin",
"=",
"$",
"this",
"->",
"get_subplugin_element",
"(",
")",
";",
"$",
"subpluginwrapper",
"=",
"new",
"backup_nested_element",
"(",
"$",
"this",
"... | Returns the subplugin information to attach to feedback element
@return backup_subplugin_element | [
"Returns",
"the",
"subplugin",
"information",
"to",
"attach",
"to",
"feedback",
"element"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/assign/feedback/editpdf/backup/moodle2/backup_assignfeedback_editpdf_subplugin.class.php#L41-L77 |
213,201 | moodle/moodle | admin/tool/langimport/classes/locale.php | locale.check_locale_availability | public function check_locale_availability(string $langpackcode) : bool {
global $CFG;
if (empty($langpackcode)) {
throw new coding_exception('Invalid language pack code in \\'.__METHOD__.'() call, only non-empty string is allowed');
}
// Fetch the correct locale based on os... | php | public function check_locale_availability(string $langpackcode) : bool {
global $CFG;
if (empty($langpackcode)) {
throw new coding_exception('Invalid language pack code in \\'.__METHOD__.'() call, only non-empty string is allowed');
}
// Fetch the correct locale based on os... | [
"public",
"function",
"check_locale_availability",
"(",
"string",
"$",
"langpackcode",
")",
":",
"bool",
"{",
"global",
"$",
"CFG",
";",
"if",
"(",
"empty",
"(",
"$",
"langpackcode",
")",
")",
"{",
"throw",
"new",
"coding_exception",
"(",
"'Invalid language pa... | Checks availability of locale on current operating system.
@param string $langpackcode E.g.: en, es, fr, de.
@return bool TRUE if the locale is available on OS.
@throws coding_exception when $langpackcode parameter is a non-empty string. | [
"Checks",
"availability",
"of",
"locale",
"on",
"current",
"operating",
"system",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/langimport/classes/locale.php#L45-L72 |
213,202 | moodle/moodle | question/type/gapselect/edit_form_base.php | qtype_gapselect_edit_form_base.allowed_tags_message | private function allowed_tags_message($badtag) {
$a = new stdClass();
$a->tag = htmlspecialchars($badtag);
$a->allowed = $this->get_list_of_printable_allowed_tags($this->allowedhtmltags);
if ($a->allowed) {
return get_string('tagsnotallowed', 'qtype_gapselect', $a);
}... | php | private function allowed_tags_message($badtag) {
$a = new stdClass();
$a->tag = htmlspecialchars($badtag);
$a->allowed = $this->get_list_of_printable_allowed_tags($this->allowedhtmltags);
if ($a->allowed) {
return get_string('tagsnotallowed', 'qtype_gapselect', $a);
}... | [
"private",
"function",
"allowed_tags_message",
"(",
"$",
"badtag",
")",
"{",
"$",
"a",
"=",
"new",
"stdClass",
"(",
")",
";",
"$",
"a",
"->",
"tag",
"=",
"htmlspecialchars",
"(",
"$",
"badtag",
")",
";",
"$",
"a",
"->",
"allowed",
"=",
"$",
"this",
... | Returns a message indicating what tags are allowed.
@param string $badtag The disallowed tag that was supplied
@return string Message indicating what tags are allowed | [
"Returns",
"a",
"message",
"indicating",
"what",
"tags",
"are",
"allowed",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/gapselect/edit_form_base.php#L90-L99 |
213,203 | moodle/moodle | question/type/gapselect/edit_form_base.php | qtype_gapselect_edit_form_base.get_list_of_printable_allowed_tags | private function get_list_of_printable_allowed_tags($allowedhtmltags) {
$allowedtaglist = array();
foreach ($allowedhtmltags as $htmltag) {
$allowedtaglist[] = htmlspecialchars('<' . $htmltag . '>');
}
return implode(', ', $allowedtaglist);
} | php | private function get_list_of_printable_allowed_tags($allowedhtmltags) {
$allowedtaglist = array();
foreach ($allowedhtmltags as $htmltag) {
$allowedtaglist[] = htmlspecialchars('<' . $htmltag . '>');
}
return implode(', ', $allowedtaglist);
} | [
"private",
"function",
"get_list_of_printable_allowed_tags",
"(",
"$",
"allowedhtmltags",
")",
"{",
"$",
"allowedtaglist",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"allowedhtmltags",
"as",
"$",
"htmltag",
")",
"{",
"$",
"allowedtaglist",
"[",
"]",
"="... | Returns a prinatble list of allowed HTML tags.
@param array $allowedhtmltags An array for tag strings that are allowed
@return string A printable list of tags | [
"Returns",
"a",
"prinatble",
"list",
"of",
"allowed",
"HTML",
"tags",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/gapselect/edit_form_base.php#L107-L113 |
213,204 | moodle/moodle | question/type/gapselect/edit_form_base.php | qtype_gapselect_edit_form_base.definition_answer_choice | protected function definition_answer_choice(&$mform) {
$mform->addElement('header', 'choicehdr', get_string('choices', 'qtype_gapselect'));
$mform->setExpanded('choicehdr', 1);
$mform->addElement('checkbox', 'shuffleanswers', get_string('shuffle', 'qtype_gapselect'));
$mform->setDefault... | php | protected function definition_answer_choice(&$mform) {
$mform->addElement('header', 'choicehdr', get_string('choices', 'qtype_gapselect'));
$mform->setExpanded('choicehdr', 1);
$mform->addElement('checkbox', 'shuffleanswers', get_string('shuffle', 'qtype_gapselect'));
$mform->setDefault... | [
"protected",
"function",
"definition_answer_choice",
"(",
"&",
"$",
"mform",
")",
"{",
"$",
"mform",
"->",
"addElement",
"(",
"'header'",
",",
"'choicehdr'",
",",
"get_string",
"(",
"'choices'",
",",
"'qtype_gapselect'",
")",
")",
";",
"$",
"mform",
"->",
"s... | Defines form elements for answer choices.
@param object $mform The Moodle form object being built | [
"Defines",
"form",
"elements",
"for",
"answer",
"choices",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/gapselect/edit_form_base.php#L134-L164 |
213,205 | moodle/moodle | question/type/gapselect/edit_form_base.php | qtype_gapselect_edit_form_base.choice_group | protected function choice_group($mform) {
$options = array();
for ($i = 1; $i <= $this->get_maximum_choice_group_number(); $i += 1) {
$options[$i] = question_utils::int_to_letter($i);
}
$grouparray = array();
$grouparray[] = $mform->createElement('text', 'answer',
... | php | protected function choice_group($mform) {
$options = array();
for ($i = 1; $i <= $this->get_maximum_choice_group_number(); $i += 1) {
$options[$i] = question_utils::int_to_letter($i);
}
$grouparray = array();
$grouparray[] = $mform->createElement('text', 'answer',
... | [
"protected",
"function",
"choice_group",
"(",
"$",
"mform",
")",
"{",
"$",
"options",
"=",
"array",
"(",
")",
";",
"for",
"(",
"$",
"i",
"=",
"1",
";",
"$",
"i",
"<=",
"$",
"this",
"->",
"get_maximum_choice_group_number",
"(",
")",
";",
"$",
"i",
"... | Creates an array with elements for a choice group.
@param object $mform The Moodle form we are working with
@param int $maxgroup The number of max group generate element select.
@return array Array for form elements | [
"Creates",
"an",
"array",
"with",
"elements",
"for",
"a",
"choice",
"group",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/gapselect/edit_form_base.php#L182-L193 |
213,206 | moodle/moodle | question/type/gapselect/edit_form_base.php | qtype_gapselect_edit_form_base.validate_slots | private function validate_slots($questiontext, $choices) {
$error = 'Please check the Question text: ';
if (!$questiontext) {
return get_string('errorquestiontextblank', 'qtype_gapselect');
}
$matches = array();
preg_match_all($this->squarebracketsregex, $questiontex... | php | private function validate_slots($questiontext, $choices) {
$error = 'Please check the Question text: ';
if (!$questiontext) {
return get_string('errorquestiontextblank', 'qtype_gapselect');
}
$matches = array();
preg_match_all($this->squarebracketsregex, $questiontex... | [
"private",
"function",
"validate_slots",
"(",
"$",
"questiontext",
",",
"$",
"choices",
")",
"{",
"$",
"error",
"=",
"'Please check the Question text: '",
";",
"if",
"(",
"!",
"$",
"questiontext",
")",
"{",
"return",
"get_string",
"(",
"'errorquestiontextblank'",
... | Finds errors in question slots.
@param string $questiontext The question text
@param array $choices Question choices
@return string|bool Error message or false if no errors | [
"Finds",
"errors",
"in",
"question",
"slots",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/question/type/gapselect/edit_form_base.php#L263-L303 |
213,207 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._connect | protected function _connect()
{
if (!is_null($this->_connection)) {
return;
}
try {
$this->_connection = new Horde_Imap_Client_Socket_Connection_Socket(
$this->getParam('hostspec'),
$this->getParam('port'),
$this->getPa... | php | protected function _connect()
{
if (!is_null($this->_connection)) {
return;
}
try {
$this->_connection = new Horde_Imap_Client_Socket_Connection_Socket(
$this->getParam('hostspec'),
$this->getParam('port'),
$this->getPa... | [
"protected",
"function",
"_connect",
"(",
")",
"{",
"if",
"(",
"!",
"is_null",
"(",
"$",
"this",
"->",
"_connection",
")",
")",
"{",
"return",
";",
"}",
"try",
"{",
"$",
"this",
"->",
"_connection",
"=",
"new",
"Horde_Imap_Client_Socket_Connection_Socket",
... | Connects to the IMAP server.
@throws Horde_Imap_Client_Exception | [
"Connects",
"to",
"the",
"IMAP",
"server",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L586-L653 |
213,208 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._authInitialResponse | protected function _authInitialResponse($method, $ir, $username = null)
{
$cmd = $this->_command('AUTHENTICATE')->add($method);
if ($this->_capability('SASL-IR')) {
// IMAP Extension for SASL Initial Client Response (RFC 4959)
$cmd->add($ir);
if ($username) {
... | php | protected function _authInitialResponse($method, $ir, $username = null)
{
$cmd = $this->_command('AUTHENTICATE')->add($method);
if ($this->_capability('SASL-IR')) {
// IMAP Extension for SASL Initial Client Response (RFC 4959)
$cmd->add($ir);
if ($username) {
... | [
"protected",
"function",
"_authInitialResponse",
"(",
"$",
"method",
",",
"$",
"ir",
",",
"$",
"username",
"=",
"null",
")",
"{",
"$",
"cmd",
"=",
"$",
"this",
"->",
"_command",
"(",
"'AUTHENTICATE'",
")",
"->",
"add",
"(",
"$",
"method",
")",
";",
"... | Create the AUTHENTICATE command for the initial client response.
@param string $method AUTHENTICATE SASL method.
@param string $ir Initial client response.
@param string $username If set, log a username message in debug log
instead of raw data.
@return Horde_Imap_Client_Interaction_Command A command objec... | [
"Create",
"the",
"AUTHENTICATE",
"command",
"for",
"the",
"initial",
"client",
"response",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L859-L886 |
213,209 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._loginTasks | protected function _loginTasks($firstlogin = true, array $resp = array())
{
/* If reusing an imapproxy connection, no need to do any of these
* login tasks again. */
if (!$firstlogin && !empty($resp['proxyreuse'])) {
if (isset($this->_init['enabled'])) {
foreach ... | php | protected function _loginTasks($firstlogin = true, array $resp = array())
{
/* If reusing an imapproxy connection, no need to do any of these
* login tasks again. */
if (!$firstlogin && !empty($resp['proxyreuse'])) {
if (isset($this->_init['enabled'])) {
foreach ... | [
"protected",
"function",
"_loginTasks",
"(",
"$",
"firstlogin",
"=",
"true",
",",
"array",
"$",
"resp",
"=",
"array",
"(",
")",
")",
"{",
"/* If reusing an imapproxy connection, no need to do any of these\n * login tasks again. */",
"if",
"(",
"!",
"$",
"firstlo... | Perform login tasks.
@param boolean $firstlogin Is this the first login?
@param array $resp The data response from the login command.
May include:
- capability_set: (boolean) True if CAPABILITY was set after login.
- proxyreuse: (boolean) True if re-used connection via imapproxy.
@return boolean True if gl... | [
"Perform",
"login",
"tasks",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L899-L947 |
213,210 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._prepareStatusResponse | protected function _prepareStatusResponse($request, $mailbox)
{
$mbox_ob = $this->_mailboxOb($mailbox);
$out = array();
foreach ($request as $val) {
$out[$val] = $mbox_ob->getStatus($this->_statusFields[$val]);
}
return $out;
} | php | protected function _prepareStatusResponse($request, $mailbox)
{
$mbox_ob = $this->_mailboxOb($mailbox);
$out = array();
foreach ($request as $val) {
$out[$val] = $mbox_ob->getStatus($this->_statusFields[$val]);
}
return $out;
} | [
"protected",
"function",
"_prepareStatusResponse",
"(",
"$",
"request",
",",
"$",
"mailbox",
")",
"{",
"$",
"mbox_ob",
"=",
"$",
"this",
"->",
"_mailboxOb",
"(",
"$",
"mailbox",
")",
";",
"$",
"out",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
... | Prepares a status response for a mailbox.
@param array $request The status keys to return.
@param string $mailbox The mailbox to query. | [
"Prepares",
"a",
"status",
"response",
"for",
"a",
"mailbox",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L1792-L1802 |
213,211 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._appendData | protected function _appendData($data, &$asize)
{
if (is_resource($data)) {
rewind($data);
}
/* Since this is body text, with possible embedded charset
* information, non-ASCII characters are supported. */
$ob = new Horde_Imap_Client_Data_Format_String_Nonascii($... | php | protected function _appendData($data, &$asize)
{
if (is_resource($data)) {
rewind($data);
}
/* Since this is body text, with possible embedded charset
* information, non-ASCII characters are supported. */
$ob = new Horde_Imap_Client_Data_Format_String_Nonascii($... | [
"protected",
"function",
"_appendData",
"(",
"$",
"data",
",",
"&",
"$",
"asize",
")",
"{",
"if",
"(",
"is_resource",
"(",
"$",
"data",
")",
")",
"{",
"rewind",
"(",
"$",
"data",
")",
";",
"}",
"/* Since this is body text, with possible embedded charset\n ... | Prepares append message data for insertion into the IMAP command
string.
@param mixed $data Either a resource or a string.
@param integer &$asize Total append size.
@return Horde_Imap_Client_Data_Format_String_Nonascii The data object. | [
"Prepares",
"append",
"message",
"data",
"for",
"insertion",
"into",
"the",
"IMAP",
"command",
"string",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L2003-L2022 |
213,212 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._convertCatenateUrl | protected function _convertCatenateUrl($url)
{
$e = $part = null;
$url = new Horde_Imap_Client_Url_Imap($url);
if (!is_null($url->mailbox) && !is_null($url->uid)) {
try {
$status_res = is_null($url->uidvalidity)
? null
: $t... | php | protected function _convertCatenateUrl($url)
{
$e = $part = null;
$url = new Horde_Imap_Client_Url_Imap($url);
if (!is_null($url->mailbox) && !is_null($url->uid)) {
try {
$status_res = is_null($url->uidvalidity)
? null
: $t... | [
"protected",
"function",
"_convertCatenateUrl",
"(",
"$",
"url",
")",
"{",
"$",
"e",
"=",
"$",
"part",
"=",
"null",
";",
"$",
"url",
"=",
"new",
"Horde_Imap_Client_Url_Imap",
"(",
"$",
"url",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"url",
"->"... | Converts a CATENATE URL to stream data.
@param string $url The CATENATE URL.
@return resource A stream containing the data. | [
"Converts",
"a",
"CATENATE",
"URL",
"to",
"stream",
"data",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L2031-L2062 |
213,213 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._partialAtom | protected function _partialAtom($opts)
{
if (!empty($opts['length'])) {
return '<' . (empty($opts['start']) ? 0 : intval($opts['start'])) . '.' . intval($opts['length']) . '>';
}
return empty($opts['start'])
? ''
: ('<' . intval($opts['start']) . '>');
... | php | protected function _partialAtom($opts)
{
if (!empty($opts['length'])) {
return '<' . (empty($opts['start']) ? 0 : intval($opts['start'])) . '.' . intval($opts['length']) . '>';
}
return empty($opts['start'])
? ''
: ('<' . intval($opts['start']) . '>');
... | [
"protected",
"function",
"_partialAtom",
"(",
"$",
"opts",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"opts",
"[",
"'length'",
"]",
")",
")",
"{",
"return",
"'<'",
".",
"(",
"empty",
"(",
"$",
"opts",
"[",
"'start'",
"]",
")",
"?",
"0",
":",
... | Add a partial atom to an IMAP command based on the criteria options.
@param array $opts Criteria options.
@return string The partial atom. | [
"Add",
"a",
"partial",
"atom",
"to",
"an",
"IMAP",
"command",
"based",
"on",
"the",
"criteria",
"options",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L3091-L3100 |
213,214 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._parseStructureParams | protected function _parseStructureParams($data)
{
$params = array();
if (is_null($data)) {
return $params;
}
while (($name = $data->next()) !== false) {
$params[Horde_String::lower($name)] = $data->next();
}
$cp = new Horde_Mime_Headers_Cont... | php | protected function _parseStructureParams($data)
{
$params = array();
if (is_null($data)) {
return $params;
}
while (($name = $data->next()) !== false) {
$params[Horde_String::lower($name)] = $data->next();
}
$cp = new Horde_Mime_Headers_Cont... | [
"protected",
"function",
"_parseStructureParams",
"(",
"$",
"data",
")",
"{",
"$",
"params",
"=",
"array",
"(",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"data",
")",
")",
"{",
"return",
"$",
"params",
";",
"}",
"while",
"(",
"(",
"$",
"name",
"=",... | Helper function to parse a parameters-like tokenized array.
@param mixed $data Message data. Either a Horde_Imap_Client_Tokenize
object or null.
@return array The parameter array. | [
"Helper",
"function",
"to",
"parse",
"a",
"parameters",
"-",
"like",
"tokenized",
"array",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L3447-L3462 |
213,215 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._storeCmd | protected function _storeCmd($options)
{
$cmds = array();
$silent = empty($options['unchangedsince'])
? !($this->_debug->debug || $this->_initCache(true))
: false;
if (!empty($options['replace'])) {
$cmds[] = array(
'FLAGS' . ($silent ? ... | php | protected function _storeCmd($options)
{
$cmds = array();
$silent = empty($options['unchangedsince'])
? !($this->_debug->debug || $this->_initCache(true))
: false;
if (!empty($options['replace'])) {
$cmds[] = array(
'FLAGS' . ($silent ? ... | [
"protected",
"function",
"_storeCmd",
"(",
"$",
"options",
")",
"{",
"$",
"cmds",
"=",
"array",
"(",
")",
";",
"$",
"silent",
"=",
"empty",
"(",
"$",
"options",
"[",
"'unchangedsince'",
"]",
")",
"?",
"!",
"(",
"$",
"this",
"->",
"_debug",
"->",
"d... | Create a store command.
@param array $options See Horde_Imap_Client_Base#_store().
@return Horde_Imap_Client_Interaction_Pipeline Pipeline object. | [
"Create",
"a",
"store",
"command",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L3614-L3656 |
213,216 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._getAnnotateMoreEntry | protected function _getAnnotateMoreEntry($name)
{
if (substr($name, 0, 7) === '/shared') {
return array(substr($name, 7), 'value.shared');
} else if (substr($name, 0, 8) === '/private') {
return array(substr($name, 8), 'value.priv');
}
$e = new Horde_Imap_Cli... | php | protected function _getAnnotateMoreEntry($name)
{
if (substr($name, 0, 7) === '/shared') {
return array(substr($name, 7), 'value.shared');
} else if (substr($name, 0, 8) === '/private') {
return array(substr($name, 8), 'value.priv');
}
$e = new Horde_Imap_Cli... | [
"protected",
"function",
"_getAnnotateMoreEntry",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"substr",
"(",
"$",
"name",
",",
"0",
",",
"7",
")",
"===",
"'/shared'",
")",
"{",
"return",
"array",
"(",
"substr",
"(",
"$",
"name",
",",
"7",
")",
",",
"'va... | Split a name for the METADATA extension into the correct syntax for the
older ANNOTATEMORE version.
@param string $name A name for a metadata entry.
@return array A list of two elements: The entry name and the value
type.
@throws Horde_Imap_Client_Exception | [
"Split",
"a",
"name",
"for",
"the",
"METADATA",
"extension",
"into",
"the",
"correct",
"syntax",
"for",
"the",
"older",
"ANNOTATEMORE",
"version",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L4000-L4014 |
213,217 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._getMboxFormatOb | protected function _getMboxFormatOb($mailbox, $list = false)
{
if ($this->_capability()->isEnabled('UTF8=ACCEPT')) {
try {
return $list
? new Horde_Imap_Client_Data_Format_ListMailbox_Utf8($mailbox)
: new Horde_Imap_Client_Data_Format_Mailb... | php | protected function _getMboxFormatOb($mailbox, $list = false)
{
if ($this->_capability()->isEnabled('UTF8=ACCEPT')) {
try {
return $list
? new Horde_Imap_Client_Data_Format_ListMailbox_Utf8($mailbox)
: new Horde_Imap_Client_Data_Format_Mailb... | [
"protected",
"function",
"_getMboxFormatOb",
"(",
"$",
"mailbox",
",",
"$",
"list",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_capability",
"(",
")",
"->",
"isEnabled",
"(",
"'UTF8=ACCEPT'",
")",
")",
"{",
"try",
"{",
"return",
"$",
"list"... | Return the proper mailbox format object based on the server's
capabilities.
@param string $mailbox The mailbox.
@param boolean $list Is this object used in a LIST command?
@return Horde_Imap_Client_Data_Format_Mailbox A mailbox format object. | [
"Return",
"the",
"proper",
"mailbox",
"format",
"object",
"based",
"on",
"the",
"server",
"s",
"capabilities",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L4179-L4192 |
213,218 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._processCmdContinuation | protected function _processCmdContinuation($pipeline, $noexception = false)
{
do {
$ob = $this->_getLine($pipeline);
} while ($ob instanceof Horde_Imap_Client_Interaction_Server_Untagged);
if ($ob instanceof Horde_Imap_Client_Interaction_Server_Continuation) {
return... | php | protected function _processCmdContinuation($pipeline, $noexception = false)
{
do {
$ob = $this->_getLine($pipeline);
} while ($ob instanceof Horde_Imap_Client_Interaction_Server_Untagged);
if ($ob instanceof Horde_Imap_Client_Interaction_Server_Continuation) {
return... | [
"protected",
"function",
"_processCmdContinuation",
"(",
"$",
"pipeline",
",",
"$",
"noexception",
"=",
"false",
")",
"{",
"do",
"{",
"$",
"ob",
"=",
"$",
"this",
"->",
"_getLine",
"(",
"$",
"pipeline",
")",
";",
"}",
"while",
"(",
"$",
"ob",
"instance... | Process a command continuation response.
@param Horde_Imap_Client_Interaction_Pipeline $pipeline The pipeline
object.
@param boolean $noexception Don't throw
exception if
continuation
does not occur.
@return mixed A Horde_Imap_Client_Interaction_Server_Continuation
object or false.
@th... | [
"Process",
"a",
"command",
"continuation",
"response",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L4451-L4473 |
213,219 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._pipeline | protected function _pipeline($cmd = null)
{
if (!isset($this->_temp['fetchob'])) {
$this->_temp['fetchob'] = new Horde_Imap_Client_Fetch_Results(
$this->_fetchDataClass,
Horde_Imap_Client_Fetch_Results::SEQUENCE
);
}
$ob = new Horde_Im... | php | protected function _pipeline($cmd = null)
{
if (!isset($this->_temp['fetchob'])) {
$this->_temp['fetchob'] = new Horde_Imap_Client_Fetch_Results(
$this->_fetchDataClass,
Horde_Imap_Client_Fetch_Results::SEQUENCE
);
}
$ob = new Horde_Im... | [
"protected",
"function",
"_pipeline",
"(",
"$",
"cmd",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"_temp",
"[",
"'fetchob'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"_temp",
"[",
"'fetchob'",
"]",
"=",
"new",
"Horde_Imap... | Shortcut to creating a new pipeline object.
@param Horde_Imap_Client_Interaction_Command $cmd An IMAP command to
add.
@return Horde_Imap_Client_Interaction_Pipeline A pipeline object. | [
"Shortcut",
"to",
"creating",
"a",
"new",
"pipeline",
"object",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L4495-L4513 |
213,220 | moodle/moodle | lib/horde/framework/Horde/Imap/Client/Socket.php | Horde_Imap_Client_Socket._getLine | protected function _getLine(
Horde_Imap_Client_Interaction_Pipeline $pipeline
)
{
$server = Horde_Imap_Client_Interaction_Server::create(
$this->_connection->read()
);
switch (get_class($server)) {
case 'Horde_Imap_Client_Interaction_Server_Continuation':
... | php | protected function _getLine(
Horde_Imap_Client_Interaction_Pipeline $pipeline
)
{
$server = Horde_Imap_Client_Interaction_Server::create(
$this->_connection->read()
);
switch (get_class($server)) {
case 'Horde_Imap_Client_Interaction_Server_Continuation':
... | [
"protected",
"function",
"_getLine",
"(",
"Horde_Imap_Client_Interaction_Pipeline",
"$",
"pipeline",
")",
"{",
"$",
"server",
"=",
"Horde_Imap_Client_Interaction_Server",
"::",
"create",
"(",
"$",
"this",
"->",
"_connection",
"->",
"read",
"(",
")",
")",
";",
"swi... | Gets data from the IMAP server stream and parses it.
@param Horde_Imap_Client_Interaction_Pipeline $pipeline Pipeline
object.
@return Horde_Imap_Client_Interaction_Server Server object.
@throws Horde_Imap_Client_Exception | [
"Gets",
"data",
"from",
"the",
"IMAP",
"server",
"stream",
"and",
"parses",
"it",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Imap/Client/Socket.php#L4525-L4620 |
213,221 | moodle/moodle | mod/workshop/allocation/scheduled/lib.php | workshop_scheduled_allocator.init | public function init() {
global $PAGE, $DB;
$result = new workshop_allocation_result($this);
$customdata = array();
$customdata['workshop'] = $this->workshop;
$current = $DB->get_record('workshopallocation_scheduled',
array('workshopid' => $this->workshop->id), '*'... | php | public function init() {
global $PAGE, $DB;
$result = new workshop_allocation_result($this);
$customdata = array();
$customdata['workshop'] = $this->workshop;
$current = $DB->get_record('workshopallocation_scheduled',
array('workshopid' => $this->workshop->id), '*'... | [
"public",
"function",
"init",
"(",
")",
"{",
"global",
"$",
"PAGE",
",",
"$",
"DB",
";",
"$",
"result",
"=",
"new",
"workshop_allocation_result",
"(",
"$",
"this",
")",
";",
"$",
"customdata",
"=",
"array",
"(",
")",
";",
"$",
"customdata",
"[",
"'wo... | Save the settings for the random allocator to execute it later | [
"Save",
"the",
"settings",
"for",
"the",
"random",
"allocator",
"to",
"execute",
"it",
"later"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/workshop/allocation/scheduled/lib.php#L55-L106 |
213,222 | moodle/moodle | mod/workshop/allocation/scheduled/lib.php | workshop_scheduled_allocator.execute | public function execute() {
global $DB;
$result = new workshop_allocation_result($this);
// make sure the workshop itself is at the expected state
if ($this->workshop->phase != workshop::PHASE_SUBMISSION) {
$result->set_status(workshop_allocation_result::STATUS_FAILED,
... | php | public function execute() {
global $DB;
$result = new workshop_allocation_result($this);
// make sure the workshop itself is at the expected state
if ($this->workshop->phase != workshop::PHASE_SUBMISSION) {
$result->set_status(workshop_allocation_result::STATUS_FAILED,
... | [
"public",
"function",
"execute",
"(",
")",
"{",
"global",
"$",
"DB",
";",
"$",
"result",
"=",
"new",
"workshop_allocation_result",
"(",
"$",
"this",
")",
";",
"// make sure the workshop itself is at the expected state",
"if",
"(",
"$",
"this",
"->",
"workshop",
... | Executes the allocation
@return workshop_allocation_result | [
"Executes",
"the",
"allocation"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/workshop/allocation/scheduled/lib.php#L133-L198 |
213,223 | moodle/moodle | mod/workshop/allocation/scheduled/lib.php | workshop_scheduled_allocator.store_settings | protected function store_settings($enabled, $reset, workshop_random_allocator_setting $settings, workshop_allocation_result $result) {
global $DB;
$data = new stdClass();
$data->workshopid = $this->workshop->id;
$data->enabled = $enabled;
$data->submissionend = $this->workshop-... | php | protected function store_settings($enabled, $reset, workshop_random_allocator_setting $settings, workshop_allocation_result $result) {
global $DB;
$data = new stdClass();
$data->workshopid = $this->workshop->id;
$data->enabled = $enabled;
$data->submissionend = $this->workshop-... | [
"protected",
"function",
"store_settings",
"(",
"$",
"enabled",
",",
"$",
"reset",
",",
"workshop_random_allocator_setting",
"$",
"settings",
",",
"workshop_allocation_result",
"$",
"result",
")",
"{",
"global",
"$",
"DB",
";",
"$",
"data",
"=",
"new",
"stdClass... | Stores the pre-defined random allocation settings for later usage
@param bool $enabled is the scheduled allocation enabled
@param bool $reset reset the recent execution info
@param workshop_random_allocator_setting $settings settings form data
@param workshop_allocation_result $result logger | [
"Stores",
"the",
"pre",
"-",
"defined",
"random",
"allocation",
"settings",
"for",
"later",
"usage"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/workshop/allocation/scheduled/lib.php#L220-L248 |
213,224 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.send_file | public function send_file($storedfile, $lifetime=null , $filter=0, $forcedownload=false, array $options = null) {
$reference = $this->unpack_reference($storedfile->get_reference());
$maxcachesize = $this->max_cache_bytes();
if (empty($maxcachesize)) {
// Always cache the file, regar... | php | public function send_file($storedfile, $lifetime=null , $filter=0, $forcedownload=false, array $options = null) {
$reference = $this->unpack_reference($storedfile->get_reference());
$maxcachesize = $this->max_cache_bytes();
if (empty($maxcachesize)) {
// Always cache the file, regar... | [
"public",
"function",
"send_file",
"(",
"$",
"storedfile",
",",
"$",
"lifetime",
"=",
"null",
",",
"$",
"filter",
"=",
"0",
",",
"$",
"forcedownload",
"=",
"false",
",",
"array",
"$",
"options",
"=",
"null",
")",
"{",
"$",
"reference",
"=",
"$",
"thi... | Repository method to serve the referenced file.
@inheritDocs | [
"Repository",
"method",
"to",
"serve",
"the",
"referenced",
"file",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L76-L109 |
213,225 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.get_file_reference | public function get_file_reference($source) {
global $USER;
$reference = new stdClass;
$reference->userid = $USER->id;
$reference->username = fullname($USER);
$reference->path = $source;
// Determine whether we are downloading the file, or should use a file reference.
... | php | public function get_file_reference($source) {
global $USER;
$reference = new stdClass;
$reference->userid = $USER->id;
$reference->username = fullname($USER);
$reference->path = $source;
// Determine whether we are downloading the file, or should use a file reference.
... | [
"public",
"function",
"get_file_reference",
"(",
"$",
"source",
")",
"{",
"global",
"$",
"USER",
";",
"$",
"reference",
"=",
"new",
"stdClass",
";",
"$",
"reference",
"->",
"userid",
"=",
"$",
"USER",
"->",
"id",
";",
"$",
"reference",
"->",
"username",
... | Prepare file reference information.
@inheritDocs | [
"Prepare",
"file",
"reference",
"information",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L179-L195 |
213,226 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.get_link | public function get_link($reference) {
$unpacked = $this->unpack_reference($reference);
return $this->get_file_download_link($unpacked->url);
} | php | public function get_link($reference) {
$unpacked = $this->unpack_reference($reference);
return $this->get_file_download_link($unpacked->url);
} | [
"public",
"function",
"get_link",
"(",
"$",
"reference",
")",
"{",
"$",
"unpacked",
"=",
"$",
"this",
"->",
"unpack_reference",
"(",
"$",
"reference",
")",
";",
"return",
"$",
"this",
"->",
"get_file_download_link",
"(",
"$",
"unpacked",
"->",
"url",
")",
... | Return file URL for external link.
@inheritDocs | [
"Return",
"file",
"URL",
"for",
"external",
"link",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L202-L206 |
213,227 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.get_file | public function get_file($reference, $saveas = '') {
$unpacked = $this->unpack_reference($reference);
// This is a shared link, and hopefully it is still active.
$downloadlink = $this->get_file_download_link($unpacked->url);
$saveas = $this->prepare_file($saveas);
file_put_cont... | php | public function get_file($reference, $saveas = '') {
$unpacked = $this->unpack_reference($reference);
// This is a shared link, and hopefully it is still active.
$downloadlink = $this->get_file_download_link($unpacked->url);
$saveas = $this->prepare_file($saveas);
file_put_cont... | [
"public",
"function",
"get_file",
"(",
"$",
"reference",
",",
"$",
"saveas",
"=",
"''",
")",
"{",
"$",
"unpacked",
"=",
"$",
"this",
"->",
"unpack_reference",
"(",
"$",
"reference",
")",
";",
"// This is a shared link, and hopefully it is still active.",
"$",
"d... | Downloads a file from external repository and saves it in temp dir.
@inheritDocs | [
"Downloads",
"a",
"file",
"from",
"external",
"repository",
"and",
"saves",
"it",
"in",
"temp",
"dir",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L213-L223 |
213,228 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.get_listing | public function get_listing($path = '', $page = '1') {
if (empty($path) || $path == '/') {
$path = '';
} else {
$path = file_correct_filepath($path);
}
$list = [
'list' => [],
'manage' => 'https://www.dropbox.com/home',
... | php | public function get_listing($path = '', $page = '1') {
if (empty($path) || $path == '/') {
$path = '';
} else {
$path = file_correct_filepath($path);
}
$list = [
'list' => [],
'manage' => 'https://www.dropbox.com/home',
... | [
"public",
"function",
"get_listing",
"(",
"$",
"path",
"=",
"''",
",",
"$",
"page",
"=",
"'1'",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"path",
")",
"||",
"$",
"path",
"==",
"'/'",
")",
"{",
"$",
"path",
"=",
"''",
";",
"}",
"else",
"{",
"$",... | Get dropbox files.
@inheritDocs | [
"Get",
"dropbox",
"files",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L248-L287 |
213,229 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.search | public function search($query, $page = 0) {
$list = [
'list' => [],
'manage' => 'https://www.dropbox.com/home',
'logouturl' => 'https://www.dropbox.com/logout',
'message' => get_string('logoutdesc', 'repository_dropbox'),
... | php | public function search($query, $page = 0) {
$list = [
'list' => [],
'manage' => 'https://www.dropbox.com/home',
'logouturl' => 'https://www.dropbox.com/logout',
'message' => get_string('logoutdesc', 'repository_dropbox'),
... | [
"public",
"function",
"search",
"(",
"$",
"query",
",",
"$",
"page",
"=",
"0",
")",
"{",
"$",
"list",
"=",
"[",
"'list'",
"=>",
"[",
"]",
",",
"'manage'",
"=>",
"'https://www.dropbox.com/home'",
",",
"'logouturl'",
"=>",
"'https://www.dropbox.com/logout'",
"... | Get dropbox files in the specified path.
@param string $query The search query
@param int $page The page number
@return array | [
"Get",
"dropbox",
"files",
"in",
"the",
"specified",
"path",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L296-L328 |
213,230 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.send_thumbnail | public function send_thumbnail($source) {
$content = $this->dropbox->get_thumbnail($source);
// Set 30 days lifetime for the image.
// If the image is changed in dropbox it will have different revision number and URL will be different.
// It is completely safe to cache the thumbnail in ... | php | public function send_thumbnail($source) {
$content = $this->dropbox->get_thumbnail($source);
// Set 30 days lifetime for the image.
// If the image is changed in dropbox it will have different revision number and URL will be different.
// It is completely safe to cache the thumbnail in ... | [
"public",
"function",
"send_thumbnail",
"(",
"$",
"source",
")",
"{",
"$",
"content",
"=",
"$",
"this",
"->",
"dropbox",
"->",
"get_thumbnail",
"(",
"$",
"source",
")",
";",
"// Set 30 days lifetime for the image.",
"// If the image is changed in dropbox it will have di... | Displays a thumbnail for current user's dropbox file.
@inheritDocs | [
"Displays",
"a",
"thumbnail",
"for",
"current",
"user",
"s",
"dropbox",
"file",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L335-L342 |
213,231 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.fix_old_style_reference | protected function fix_old_style_reference($packed) {
$ref = unserialize($packed);
$ref = $this->dropbox->get_file_share_info($ref->path);
if (!$ref || empty($ref->url)) {
// Some error occurred, do not fix reference for now.
return $packed;
}
$newreferen... | php | protected function fix_old_style_reference($packed) {
$ref = unserialize($packed);
$ref = $this->dropbox->get_file_share_info($ref->path);
if (!$ref || empty($ref->url)) {
// Some error occurred, do not fix reference for now.
return $packed;
}
$newreferen... | [
"protected",
"function",
"fix_old_style_reference",
"(",
"$",
"packed",
")",
"{",
"$",
"ref",
"=",
"unserialize",
"(",
"$",
"packed",
")",
";",
"$",
"ref",
"=",
"$",
"this",
"->",
"dropbox",
"->",
"get_file_share_info",
"(",
"$",
"ref",
"->",
"path",
")"... | Fixes references in DB that contains user credentials.
@param string $packed Content of DB field files_reference.reference
@return string New serialized reference | [
"Fixes",
"references",
"in",
"DB",
"that",
"contains",
"user",
"credentials",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L350-L395 |
213,232 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.unpack_reference | protected function unpack_reference($packed) {
$reference = unserialize($packed);
if (empty($reference->url)) {
// The reference is missing some information. Attempt to update it.
return unserialize($this->fix_old_style_reference($packed));
}
return $reference;
... | php | protected function unpack_reference($packed) {
$reference = unserialize($packed);
if (empty($reference->url)) {
// The reference is missing some information. Attempt to update it.
return unserialize($this->fix_old_style_reference($packed));
}
return $reference;
... | [
"protected",
"function",
"unpack_reference",
"(",
"$",
"packed",
")",
"{",
"$",
"reference",
"=",
"unserialize",
"(",
"$",
"packed",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"reference",
"->",
"url",
")",
")",
"{",
"// The reference is missing some information.... | Unpack the supplied serialized reference, fixing it if required.
@param string $packed The packed reference
@return object The unpacked reference | [
"Unpack",
"the",
"supplied",
"serialized",
"reference",
"fixing",
"it",
"if",
"required",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L403-L411 |
213,233 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.print_login | public function print_login() {
$url = $this->dropbox->get_login_url();
if ($this->options['ajax']) {
$ret = array();
$btn = new \stdClass();
$btn->type = 'popup';
$btn->url = $url->out(false);
$ret['login'] = array($btn);
return $r... | php | public function print_login() {
$url = $this->dropbox->get_login_url();
if ($this->options['ajax']) {
$ret = array();
$btn = new \stdClass();
$btn->type = 'popup';
$btn->url = $url->out(false);
$ret['login'] = array($btn);
return $r... | [
"public",
"function",
"print_login",
"(",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"dropbox",
"->",
"get_login_url",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"options",
"[",
"'ajax'",
"]",
")",
"{",
"$",
"ret",
"=",
"array",
"(",
")",
";... | Generate dropbox login url.
@inheritDocs | [
"Generate",
"dropbox",
"login",
"url",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L452-L464 |
213,234 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.cron | public function cron() {
$fs = get_file_storage();
$files = $fs->get_external_files($this->id);
$fetchedreferences = [];
foreach ($files as $file) {
if (isset($fetchedreferences[$file->get_referencefileid()])) {
continue;
}
try {
... | php | public function cron() {
$fs = get_file_storage();
$files = $fs->get_external_files($this->id);
$fetchedreferences = [];
foreach ($files as $file) {
if (isset($fetchedreferences[$file->get_referencefileid()])) {
continue;
}
try {
... | [
"public",
"function",
"cron",
"(",
")",
"{",
"$",
"fs",
"=",
"get_file_storage",
"(",
")",
";",
"$",
"files",
"=",
"$",
"fs",
"->",
"get_external_files",
"(",
"$",
"this",
"->",
"id",
")",
";",
"$",
"fetchedreferences",
"=",
"[",
"]",
";",
"foreach",... | Caches all references to Dropbox files in moodle filepool.
Invoked by {@link repository_dropbox_cron()}. Only files smaller than
{@link repository_dropbox::max_cache_bytes()} and only files which
synchronisation timeout have not expired are cached.
@inheritDocs | [
"Caches",
"all",
"references",
"to",
"Dropbox",
"files",
"in",
"moodle",
"filepool",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L484-L501 |
213,235 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.type_config_form | public static function type_config_form($mform, $classname = 'repository') {
parent::type_config_form($mform);
$key = get_config('dropbox', 'dropbox_key');
$secret = get_config('dropbox', 'dropbox_secret');
if (empty($key)) {
$key = '';
}
if (empty($secret... | php | public static function type_config_form($mform, $classname = 'repository') {
parent::type_config_form($mform);
$key = get_config('dropbox', 'dropbox_key');
$secret = get_config('dropbox', 'dropbox_secret');
if (empty($key)) {
$key = '';
}
if (empty($secret... | [
"public",
"static",
"function",
"type_config_form",
"(",
"$",
"mform",
",",
"$",
"classname",
"=",
"'repository'",
")",
"{",
"parent",
"::",
"type_config_form",
"(",
"$",
"mform",
")",
";",
"$",
"key",
"=",
"get_config",
"(",
"'dropbox'",
",",
"'dropbox_key'... | Add Plugin settings input to Moodle form.
@inheritDocs | [
"Add",
"Plugin",
"settings",
"input",
"to",
"Moodle",
"form",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L508-L538 |
213,236 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.get_option | public function get_option($config = '') {
if ($config === 'dropbox_key') {
return trim(get_config('dropbox', 'dropbox_key'));
} else if ($config === 'dropbox_secret') {
return trim(get_config('dropbox', 'dropbox_secret'));
} else if ($config === 'dropbox_cachelimit') {
... | php | public function get_option($config = '') {
if ($config === 'dropbox_key') {
return trim(get_config('dropbox', 'dropbox_key'));
} else if ($config === 'dropbox_secret') {
return trim(get_config('dropbox', 'dropbox_secret'));
} else if ($config === 'dropbox_cachelimit') {
... | [
"public",
"function",
"get_option",
"(",
"$",
"config",
"=",
"''",
")",
"{",
"if",
"(",
"$",
"config",
"===",
"'dropbox_key'",
")",
"{",
"return",
"trim",
"(",
"get_config",
"(",
"'dropbox'",
",",
"'dropbox_key'",
")",
")",
";",
"}",
"else",
"if",
"(",... | Get dropbox options
@param string $config
@return mixed | [
"Get",
"dropbox",
"options"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L569-L584 |
213,237 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.process_entries | protected function process_entries(array $entries) {
global $OUTPUT;
$dirslist = [];
$fileslist = [];
foreach ($entries as $entry) {
$entrydata = $entry;
if (isset($entrydata->metadata)) {
// If this is metadata, fetch the metadata content.
... | php | protected function process_entries(array $entries) {
global $OUTPUT;
$dirslist = [];
$fileslist = [];
foreach ($entries as $entry) {
$entrydata = $entry;
if (isset($entrydata->metadata)) {
// If this is metadata, fetch the metadata content.
... | [
"protected",
"function",
"process_entries",
"(",
"array",
"$",
"entries",
")",
"{",
"global",
"$",
"OUTPUT",
";",
"$",
"dirslist",
"=",
"[",
"]",
";",
"$",
"fileslist",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"entries",
"as",
"$",
"entry",
")",
"{",... | Process a standard entries list.
@param array $entries The list of entries returned from the API
@return array The manipulated entries for display in the file picker | [
"Process",
"a",
"standard",
"entries",
"list",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L693-L734 |
213,238 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.process_breadcrumbs | protected function process_breadcrumbs($path) {
// Process breadcrumb trail.
// Note: Dropbox is case insensitive.
// Without performing an additional API call, it isn't possible to get the path_display.
// As a result, the path here is the path_lower.
$breadcrumbs = [
... | php | protected function process_breadcrumbs($path) {
// Process breadcrumb trail.
// Note: Dropbox is case insensitive.
// Without performing an additional API call, it isn't possible to get the path_display.
// As a result, the path here is the path_lower.
$breadcrumbs = [
... | [
"protected",
"function",
"process_breadcrumbs",
"(",
"$",
"path",
")",
"{",
"// Process breadcrumb trail.",
"// Note: Dropbox is case insensitive.",
"// Without performing an additional API call, it isn't possible to get the path_display.",
"// As a result, the path here is the path_lower.",
... | Process the breadcrumbs for a listing.
@param string $path The path to create breadcrumbs for
@return array | [
"Process",
"the",
"breadcrumbs",
"for",
"a",
"listing",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L742-L769 |
213,239 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.get_thumbnail_url | protected function get_thumbnail_url($entry) {
if ($this->dropbox->supports_thumbnail($entry)) {
$thumburl = new moodle_url('/repository/dropbox/thumbnail.php', [
// The id field in dropbox is unique - no need to specify a revision.
'source' => $entry->id,
... | php | protected function get_thumbnail_url($entry) {
if ($this->dropbox->supports_thumbnail($entry)) {
$thumburl = new moodle_url('/repository/dropbox/thumbnail.php', [
// The id field in dropbox is unique - no need to specify a revision.
'source' => $entry->id,
... | [
"protected",
"function",
"get_thumbnail_url",
"(",
"$",
"entry",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"dropbox",
"->",
"supports_thumbnail",
"(",
"$",
"entry",
")",
")",
"{",
"$",
"thumburl",
"=",
"new",
"moodle_url",
"(",
"'/repository/dropbox/thumbnail.ph... | Grab the thumbnail URL for the specified entry.
@param object $entry The file entry as retrieved from the API
@return moodle_url | [
"Grab",
"the",
"thumbnail",
"URL",
"for",
"the",
"specified",
"entry",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L777-L791 |
213,240 | moodle/moodle | repository/dropbox/lib.php | repository_dropbox.max_cache_bytes | public function max_cache_bytes() {
if ($this->cachelimit === null) {
$this->cachelimit = (int) get_config('dropbox', 'dropbox_cachelimit');
}
return $this->cachelimit;
} | php | public function max_cache_bytes() {
if ($this->cachelimit === null) {
$this->cachelimit = (int) get_config('dropbox', 'dropbox_cachelimit');
}
return $this->cachelimit;
} | [
"public",
"function",
"max_cache_bytes",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cachelimit",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"cachelimit",
"=",
"(",
"int",
")",
"get_config",
"(",
"'dropbox'",
",",
"'dropbox_cachelimit'",
")",
";",
"}"... | Returns the maximum size of the Dropbox files to cache in moodle.
Note that {@link repository_dropbox::sync_reference()} will try to cache images even
when they are bigger in order to generate thumbnails. However there is
a small timeout for downloading images for synchronisation and it will
probably fail if the image... | [
"Returns",
"the",
"maximum",
"size",
"of",
"the",
"Dropbox",
"files",
"to",
"cache",
"in",
"moodle",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/dropbox/lib.php#L803-L808 |
213,241 | moodle/moodle | lib/pear/Crypt/CHAP.php | Crypt_CHAP.generateChallenge | function generateChallenge($varname = 'challenge', $size = 8)
{
$this->$varname = '';
for ($i = 0; $i < $size; $i++) {
$this->$varname .= pack('C', 1 + mt_rand() % 255);
}
return $this->$varname;
} | php | function generateChallenge($varname = 'challenge', $size = 8)
{
$this->$varname = '';
for ($i = 0; $i < $size; $i++) {
$this->$varname .= pack('C', 1 + mt_rand() % 255);
}
return $this->$varname;
} | [
"function",
"generateChallenge",
"(",
"$",
"varname",
"=",
"'challenge'",
",",
"$",
"size",
"=",
"8",
")",
"{",
"$",
"this",
"->",
"$",
"varname",
"=",
"''",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"$",
"size",
";",
"$",
"i",
... | Generates a random binary challenge
@param string $varname Name of the property
@param integer $size Size of the challenge in Bytes
@return void | [
"Generates",
"a",
"random",
"binary",
"challenge"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Crypt/CHAP.php#L107-L114 |
213,242 | moodle/moodle | lib/pear/Crypt/CHAP.php | Crypt_CHAP_MSv1.ntPasswordHash | function ntPasswordHash($password = null)
{
if (isset($password)) {
return pack('H*',hash('md4', $this->str2unicode($password)));
} else {
return pack('H*',hash('md4', $this->str2unicode($this->password)));
}
} | php | function ntPasswordHash($password = null)
{
if (isset($password)) {
return pack('H*',hash('md4', $this->str2unicode($password)));
} else {
return pack('H*',hash('md4', $this->str2unicode($this->password)));
}
} | [
"function",
"ntPasswordHash",
"(",
"$",
"password",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"password",
")",
")",
"{",
"return",
"pack",
"(",
"'H*'",
",",
"hash",
"(",
"'md4'",
",",
"$",
"this",
"->",
"str2unicode",
"(",
"$",
"password",... | Generates the NT-HASH from the given plaintext password.
@access public
@return string | [
"Generates",
"the",
"NT",
"-",
"HASH",
"from",
"the",
"given",
"plaintext",
"password",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Crypt/CHAP.php#L194-L201 |
213,243 | moodle/moodle | lib/pear/Crypt/CHAP.php | Crypt_CHAP_MSv1._challengeResponse | function _challengeResponse($lm = false)
{
if ($lm) {
$hash = $this->lmPasswordHash();
} else {
$hash = $this->ntPasswordHash();
}
while (strlen($hash) < 21) {
$hash .= "\0";
}
$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_... | php | function _challengeResponse($lm = false)
{
if ($lm) {
$hash = $this->lmPasswordHash();
} else {
$hash = $this->ntPasswordHash();
}
while (strlen($hash) < 21) {
$hash .= "\0";
}
$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_... | [
"function",
"_challengeResponse",
"(",
"$",
"lm",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"lm",
")",
"{",
"$",
"hash",
"=",
"$",
"this",
"->",
"lmPasswordHash",
"(",
")",
";",
"}",
"else",
"{",
"$",
"hash",
"=",
"$",
"this",
"->",
"ntPasswordHash",... | Generates the response.
Generates the response using DES.
@param bool $lm wether generating LAN-Manager-Response
@access private
@return string | [
"Generates",
"the",
"response",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Crypt/CHAP.php#L262-L293 |
213,244 | moodle/moodle | lib/pear/Crypt/CHAP.php | Crypt_CHAP_MSv1._desHash | function _desHash($plain)
{
$key = $this->_desAddParity($plain);
$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, $key, $iv);
$hash = mcrypt_generic($td, 'KGS!@#$%');
... | php | function _desHash($plain)
{
$key = $this->_desAddParity($plain);
$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
mcrypt_generic_init($td, $key, $iv);
$hash = mcrypt_generic($td, 'KGS!@#$%');
... | [
"function",
"_desHash",
"(",
"$",
"plain",
")",
"{",
"$",
"key",
"=",
"$",
"this",
"->",
"_desAddParity",
"(",
"$",
"plain",
")",
";",
"$",
"td",
"=",
"mcrypt_module_open",
"(",
"MCRYPT_DES",
",",
"''",
",",
"MCRYPT_MODE_ECB",
",",
"''",
")",
";",
"$... | Generates an irreversible HASH.
@access private
@return string | [
"Generates",
"an",
"irreversible",
"HASH",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/pear/Crypt/CHAP.php#L319-L329 |
213,245 | moodle/moodle | course/format/topics/renderer.php | format_topics_renderer.section_title_without_link | public function section_title_without_link($section, $course) {
return $this->render(course_get_format($course)->inplace_editable_render_section_name($section, false));
} | php | public function section_title_without_link($section, $course) {
return $this->render(course_get_format($course)->inplace_editable_render_section_name($section, false));
} | [
"public",
"function",
"section_title_without_link",
"(",
"$",
"section",
",",
"$",
"course",
")",
"{",
"return",
"$",
"this",
"->",
"render",
"(",
"course_get_format",
"(",
"$",
"course",
")",
"->",
"inplace_editable_render_section_name",
"(",
"$",
"section",
",... | Generate the section title to be displayed on the section page, without a link
@param stdClass $section The course_section entry from DB
@param stdClass $course The course entry from DB
@return string HTML to output. | [
"Generate",
"the",
"section",
"title",
"to",
"be",
"displayed",
"on",
"the",
"section",
"page",
"without",
"a",
"link"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/course/format/topics/renderer.php#L94-L96 |
213,246 | moodle/moodle | admin/tool/dataprivacy/classes/external/category_exporter.php | category_exporter.get_name | public static function get_name($categoryid) {
global $PAGE;
if ($categoryid === false || $categoryid == context_instance::INHERIT) {
return get_string('inherit', 'tool_dataprivacy');
} else if ($categoryid == context_instance::NOTSET) {
return get_string('notset', 'tool_... | php | public static function get_name($categoryid) {
global $PAGE;
if ($categoryid === false || $categoryid == context_instance::INHERIT) {
return get_string('inherit', 'tool_dataprivacy');
} else if ($categoryid == context_instance::NOTSET) {
return get_string('notset', 'tool_... | [
"public",
"static",
"function",
"get_name",
"(",
"$",
"categoryid",
")",
"{",
"global",
"$",
"PAGE",
";",
"if",
"(",
"$",
"categoryid",
"===",
"false",
"||",
"$",
"categoryid",
"==",
"context_instance",
"::",
"INHERIT",
")",
"{",
"return",
"get_string",
"(... | Utility function that fetches a category name from the given ID.
@param int $categoryid The category ID. Could be INHERIT (false, -1), NOT_SET (0), or the actual ID.
@return string The purpose name. | [
"Utility",
"function",
"that",
"fetches",
"a",
"category",
"name",
"from",
"the",
"given",
"ID",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/external/category_exporter.php#L65-L78 |
213,247 | moodle/moodle | lib/htmlpurifier/HTMLPurifier/HTMLModuleManager.php | HTMLPurifier_HTMLModuleManager.processModule | public function processModule($module)
{
if (!isset($this->registeredModules[$module]) || is_object($module)) {
$this->registerModule($module);
}
$this->modules[$module] = $this->registeredModules[$module];
} | php | public function processModule($module)
{
if (!isset($this->registeredModules[$module]) || is_object($module)) {
$this->registerModule($module);
}
$this->modules[$module] = $this->registeredModules[$module];
} | [
"public",
"function",
"processModule",
"(",
"$",
"module",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"registeredModules",
"[",
"$",
"module",
"]",
")",
"||",
"is_object",
"(",
"$",
"module",
")",
")",
"{",
"$",
"this",
"->",
"registe... | Takes a module and adds it to the active module collection,
registering it if necessary. | [
"Takes",
"a",
"module",
"and",
"adds",
"it",
"to",
"the",
"active",
"module",
"collection",
"registering",
"it",
"if",
"necessary",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/htmlpurifier/HTMLPurifier/HTMLModuleManager.php#L338-L344 |
213,248 | moodle/moodle | admin/tool/xmldb/classes/external.php | tool_xmldb_external.invoke_move_action_parameters | public static function invoke_move_action_parameters() {
return new external_function_parameters([
'action' => new external_value(PARAM_ALPHAEXT, 'Action'),
'dir' => new external_value(PARAM_PATH, 'Plugin that is being edited'),
'table' => new external_value(PARAM_NOTAGS, 'Ta... | php | public static function invoke_move_action_parameters() {
return new external_function_parameters([
'action' => new external_value(PARAM_ALPHAEXT, 'Action'),
'dir' => new external_value(PARAM_PATH, 'Plugin that is being edited'),
'table' => new external_value(PARAM_NOTAGS, 'Ta... | [
"public",
"static",
"function",
"invoke_move_action_parameters",
"(",
")",
"{",
"return",
"new",
"external_function_parameters",
"(",
"[",
"'action'",
"=>",
"new",
"external_value",
"(",
"PARAM_ALPHAEXT",
",",
"'Action'",
")",
",",
"'dir'",
"=>",
"new",
"external_va... | Parameters for the 'tool_xmldb_invoke_move_action' WS
@return external_function_parameters | [
"Parameters",
"for",
"the",
"tool_xmldb_invoke_move_action",
"WS"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/xmldb/classes/external.php#L42-L52 |
213,249 | moodle/moodle | admin/tool/xmldb/classes/external.php | tool_xmldb_external.invoke_move_action | public static function invoke_move_action($action, $dir, $table, $field, $key, $index, $position) {
global $CFG, $XMLDB, $SESSION;
require_once($CFG->libdir.'/ddllib.php');
require_once("$CFG->dirroot/$CFG->admin/tool/xmldb/actions/XMLDBAction.class.php");
require_once("$CFG->dirroot/$CF... | php | public static function invoke_move_action($action, $dir, $table, $field, $key, $index, $position) {
global $CFG, $XMLDB, $SESSION;
require_once($CFG->libdir.'/ddllib.php');
require_once("$CFG->dirroot/$CFG->admin/tool/xmldb/actions/XMLDBAction.class.php");
require_once("$CFG->dirroot/$CF... | [
"public",
"static",
"function",
"invoke_move_action",
"(",
"$",
"action",
",",
"$",
"dir",
",",
"$",
"table",
",",
"$",
"field",
",",
"$",
"key",
",",
"$",
"index",
",",
"$",
"position",
")",
"{",
"global",
"$",
"CFG",
",",
"$",
"XMLDB",
",",
"$",
... | WS 'tool_xmldb_invoke_move_action' that invokes a move action
@param string $action
@param string $dir
@param string $table
@param string $field
@param string $key
@param string $index
@param int $position
@throws coding_exception | [
"WS",
"tool_xmldb_invoke_move_action",
"that",
"invokes",
"a",
"move",
"action"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/xmldb/classes/external.php#L66-L117 |
213,250 | moodle/moodle | lib/horde/framework/Horde/Idna/Punycode.php | Horde_Idna_Punycode.encode | public function encode($input)
{
$parts = explode('.', $input);
foreach ($parts as &$part) {
$part = $this->_encodePart($part);
}
return implode('.', $parts);
} | php | public function encode($input)
{
$parts = explode('.', $input);
foreach ($parts as &$part) {
$part = $this->_encodePart($part);
}
return implode('.', $parts);
} | [
"public",
"function",
"encode",
"(",
"$",
"input",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"'.'",
",",
"$",
"input",
")",
";",
"foreach",
"(",
"$",
"parts",
"as",
"&",
"$",
"part",
")",
"{",
"$",
"part",
"=",
"$",
"this",
"->",
"_encodePart"... | Encode a domain to its Punycode version.
@param string $input Domain name in Unicde to be encoded.
@return string Punycode representation in ASCII. | [
"Encode",
"a",
"domain",
"to",
"its",
"Punycode",
"version",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Idna/Punycode.php#L78-L87 |
213,251 | moodle/moodle | lib/horde/framework/Horde/Idna/Punycode.php | Horde_Idna_Punycode._encodePart | protected function _encodePart($input)
{
$codePoints = $this->_codePoints($input);
$n = static::INITIAL_N;
$bias = static::INITIAL_BIAS;
$delta = 0;
$h = $b = count($codePoints['basic']);
$output = '';
foreach ($codePoints['basic'] as $code) {
$o... | php | protected function _encodePart($input)
{
$codePoints = $this->_codePoints($input);
$n = static::INITIAL_N;
$bias = static::INITIAL_BIAS;
$delta = 0;
$h = $b = count($codePoints['basic']);
$output = '';
foreach ($codePoints['basic'] as $code) {
$o... | [
"protected",
"function",
"_encodePart",
"(",
"$",
"input",
")",
"{",
"$",
"codePoints",
"=",
"$",
"this",
"->",
"_codePoints",
"(",
"$",
"input",
")",
";",
"$",
"n",
"=",
"static",
"::",
"INITIAL_N",
";",
"$",
"bias",
"=",
"static",
"::",
"INITIAL_BIAS... | Encode a part of a domain name, such as tld, to its Punycode version.
@param string $input Part of a domain name.
@return string Punycode representation of a domain part. | [
"Encode",
"a",
"part",
"of",
"a",
"domain",
"name",
"such",
"as",
"tld",
"to",
"its",
"Punycode",
"version",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Idna/Punycode.php#L96-L158 |
213,252 | moodle/moodle | lib/horde/framework/Horde/Idna/Punycode.php | Horde_Idna_Punycode.decode | public function decode($input)
{
$parts = explode('.', $input);
foreach ($parts as &$part) {
if (strpos($part, static::PREFIX) === 0) {
$part = $this->_decodePart(
substr($part, strlen(static::PREFIX))
);
}
}
... | php | public function decode($input)
{
$parts = explode('.', $input);
foreach ($parts as &$part) {
if (strpos($part, static::PREFIX) === 0) {
$part = $this->_decodePart(
substr($part, strlen(static::PREFIX))
);
}
}
... | [
"public",
"function",
"decode",
"(",
"$",
"input",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"'.'",
",",
"$",
"input",
")",
";",
"foreach",
"(",
"$",
"parts",
"as",
"&",
"$",
"part",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"part",
",",
"sta... | Decode a Punycode domain name to its Unicode counterpart.
@param string $input Domain name in Punycode
@return string Unicode domain name. | [
"Decode",
"a",
"Punycode",
"domain",
"name",
"to",
"its",
"Unicode",
"counterpart",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Idna/Punycode.php#L167-L180 |
213,253 | moodle/moodle | lib/horde/framework/Horde/Idna/Punycode.php | Horde_Idna_Punycode._decodePart | protected function _decodePart($input)
{
$n = static::INITIAL_N;
$i = 0;
$bias = static::INITIAL_BIAS;
$output = '';
$pos = strrpos($input, static::DELIMITER);
if ($pos !== false) {
$output = substr($input, 0, $pos++);
} else {
$pos = ... | php | protected function _decodePart($input)
{
$n = static::INITIAL_N;
$i = 0;
$bias = static::INITIAL_BIAS;
$output = '';
$pos = strrpos($input, static::DELIMITER);
if ($pos !== false) {
$output = substr($input, 0, $pos++);
} else {
$pos = ... | [
"protected",
"function",
"_decodePart",
"(",
"$",
"input",
")",
"{",
"$",
"n",
"=",
"static",
"::",
"INITIAL_N",
";",
"$",
"i",
"=",
"0",
";",
"$",
"bias",
"=",
"static",
"::",
"INITIAL_BIAS",
";",
"$",
"output",
"=",
"''",
";",
"$",
"pos",
"=",
... | Decode a part of domain name, such as tld.
@param string $input Part of a domain name.
@return string Unicode domain part. | [
"Decode",
"a",
"part",
"of",
"domain",
"name",
"such",
"as",
"tld",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Idna/Punycode.php#L189-L237 |
213,254 | moodle/moodle | lib/horde/framework/Horde/Idna/Punycode.php | Horde_Idna_Punycode._calculateThreshold | protected function _calculateThreshold($k, $bias)
{
if ($k <= ($bias + static::TMIN)) {
return static::TMIN;
} elseif ($k >= ($bias + static::TMAX)) {
return static::TMAX;
}
return $k - $bias;
} | php | protected function _calculateThreshold($k, $bias)
{
if ($k <= ($bias + static::TMIN)) {
return static::TMIN;
} elseif ($k >= ($bias + static::TMAX)) {
return static::TMAX;
}
return $k - $bias;
} | [
"protected",
"function",
"_calculateThreshold",
"(",
"$",
"k",
",",
"$",
"bias",
")",
"{",
"if",
"(",
"$",
"k",
"<=",
"(",
"$",
"bias",
"+",
"static",
"::",
"TMIN",
")",
")",
"{",
"return",
"static",
"::",
"TMIN",
";",
"}",
"elseif",
"(",
"$",
"k... | Calculate the bias threshold to fall between TMIN and TMAX.
@param integer $k
@param integer $bias
@return integer | [
"Calculate",
"the",
"bias",
"threshold",
"to",
"fall",
"between",
"TMIN",
"and",
"TMAX",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Idna/Punycode.php#L247-L255 |
213,255 | moodle/moodle | lib/horde/framework/Horde/Idna/Punycode.php | Horde_Idna_Punycode._codePoints | protected function _codePoints($input)
{
$codePoints = array(
'all' => array(),
'basic' => array(),
'nonBasic' => array()
);
$len = Horde_String::length($input, 'UTF-8');
for ($i = 0; $i < $len; ++$i) {
$char = Horde_String::su... | php | protected function _codePoints($input)
{
$codePoints = array(
'all' => array(),
'basic' => array(),
'nonBasic' => array()
);
$len = Horde_String::length($input, 'UTF-8');
for ($i = 0; $i < $len; ++$i) {
$char = Horde_String::su... | [
"protected",
"function",
"_codePoints",
"(",
"$",
"input",
")",
"{",
"$",
"codePoints",
"=",
"array",
"(",
"'all'",
"=>",
"array",
"(",
")",
",",
"'basic'",
"=>",
"array",
"(",
")",
",",
"'nonBasic'",
"=>",
"array",
"(",
")",
")",
";",
"$",
"len",
... | List code points for a given input.
@param string $input
@return array Multi-dimension array with basic, non-basic and
aggregated code points. | [
"List",
"code",
"points",
"for",
"a",
"given",
"input",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Idna/Punycode.php#L293-L313 |
213,256 | moodle/moodle | lib/horde/framework/Horde/Idna/Punycode.php | Horde_Idna_Punycode._charToCodePoint | protected function _charToCodePoint($char)
{
$code = ord($char[0]);
if ($code < 128) {
return $code;
} elseif ($code < 224) {
return (($code - 192) * 64) + (ord($char[1]) - 128);
} elseif ($code < 240) {
return (($code - 224) * 4096) + ((ord($char[... | php | protected function _charToCodePoint($char)
{
$code = ord($char[0]);
if ($code < 128) {
return $code;
} elseif ($code < 224) {
return (($code - 192) * 64) + (ord($char[1]) - 128);
} elseif ($code < 240) {
return (($code - 224) * 4096) + ((ord($char[... | [
"protected",
"function",
"_charToCodePoint",
"(",
"$",
"char",
")",
"{",
"$",
"code",
"=",
"ord",
"(",
"$",
"char",
"[",
"0",
"]",
")",
";",
"if",
"(",
"$",
"code",
"<",
"128",
")",
"{",
"return",
"$",
"code",
";",
"}",
"elseif",
"(",
"$",
"cod... | Convert a single or multi-byte character to its code point.
@param string $char
@return integer | [
"Convert",
"a",
"single",
"or",
"multi",
"-",
"byte",
"character",
"to",
"its",
"code",
"point",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/horde/framework/Horde/Idna/Punycode.php#L322-L333 |
213,257 | moodle/moodle | grade/report/singleview/classes/local/screen/select.php | select.init | public function init($selfitemisempty = false) {
global $DB;
$roleids = explode(',', get_config('moodle', 'gradebookroles'));
$this->items = array();
foreach ($roleids as $roleid) {
// Keeping the first user appearance.
$this->items = $this->items + get_role_use... | php | public function init($selfitemisempty = false) {
global $DB;
$roleids = explode(',', get_config('moodle', 'gradebookroles'));
$this->items = array();
foreach ($roleids as $roleid) {
// Keeping the first user appearance.
$this->items = $this->items + get_role_use... | [
"public",
"function",
"init",
"(",
"$",
"selfitemisempty",
"=",
"false",
")",
"{",
"global",
"$",
"DB",
";",
"$",
"roleids",
"=",
"explode",
"(",
"','",
",",
"get_config",
"(",
"'moodle'",
",",
"'gradebookroles'",
")",
")",
";",
"$",
"this",
"->",
"ite... | Initialise this screen
@param bool $selfitemisempty Has an item been selected (will be false) | [
"Initialise",
"this",
"screen"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/grade/report/singleview/classes/local/screen/select.php#L46-L61 |
213,258 | moodle/moodle | grade/report/singleview/classes/local/screen/select.php | select.html | public function html() {
global $OUTPUT;
$html = '';
$types = gradereport_singleview::valid_screens();
foreach ($types as $type) {
$classname = "gradereport_singleview\\local\\screen\\${type}";
$screen = new $classname($this->courseid, null, $this->groupid);
... | php | public function html() {
global $OUTPUT;
$html = '';
$types = gradereport_singleview::valid_screens();
foreach ($types as $type) {
$classname = "gradereport_singleview\\local\\screen\\${type}";
$screen = new $classname($this->courseid, null, $this->groupid);
... | [
"public",
"function",
"html",
"(",
")",
"{",
"global",
"$",
"OUTPUT",
";",
"$",
"html",
"=",
"''",
";",
"$",
"types",
"=",
"gradereport_singleview",
"::",
"valid_screens",
"(",
")",
";",
"foreach",
"(",
"$",
"types",
"as",
"$",
"type",
")",
"{",
"$",... | Return the HTML for the page.
@return string | [
"Return",
"the",
"HTML",
"for",
"the",
"page",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/grade/report/singleview/classes/local/screen/select.php#L77-L118 |
213,259 | moodle/moodle | admin/tool/templatelibrary/classes/external.php | external.list_templates | public static function list_templates($component, $search, $themename = '') {
$params = self::validate_parameters(self::list_templates_parameters(),
array(
'component' => $component,
... | php | public static function list_templates($component, $search, $themename = '') {
$params = self::validate_parameters(self::list_templates_parameters(),
array(
'component' => $component,
... | [
"public",
"static",
"function",
"list_templates",
"(",
"$",
"component",
",",
"$",
"search",
",",
"$",
"themename",
"=",
"''",
")",
"{",
"$",
"params",
"=",
"self",
"::",
"validate_parameters",
"(",
"self",
"::",
"list_templates_parameters",
"(",
")",
",",
... | Loads the list of templates.
@param string $component Limit the search to a component.
@param string $search The search string.
@param string $themename The name of theme
@return array[string] | [
"Loads",
"the",
"list",
"of",
"templates",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/templatelibrary/classes/external.php#L80-L89 |
213,260 | moodle/moodle | mod/label/classes/external.php | mod_label_external.get_labels_by_courses | public static function get_labels_by_courses($courseids = array()) {
$warnings = array();
$returnedlabels = array();
$params = array(
'courseids' => $courseids,
);
$params = self::validate_parameters(self::get_labels_by_courses_parameters(), $params);
$myco... | php | public static function get_labels_by_courses($courseids = array()) {
$warnings = array();
$returnedlabels = array();
$params = array(
'courseids' => $courseids,
);
$params = self::validate_parameters(self::get_labels_by_courses_parameters(), $params);
$myco... | [
"public",
"static",
"function",
"get_labels_by_courses",
"(",
"$",
"courseids",
"=",
"array",
"(",
")",
")",
"{",
"$",
"warnings",
"=",
"array",
"(",
")",
";",
"$",
"returnedlabels",
"=",
"array",
"(",
")",
";",
"$",
"params",
"=",
"array",
"(",
"'cour... | Returns a list of labels in a provided list of courses.
If no list is provided all labels that the user can view will be returned.
@param array $courseids course ids
@return array of warnings and labels
@since Moodle 3.3 | [
"Returns",
"a",
"list",
"of",
"labels",
"in",
"a",
"provided",
"list",
"of",
"courses",
".",
"If",
"no",
"list",
"is",
"provided",
"all",
"labels",
"that",
"the",
"user",
"can",
"view",
"will",
"be",
"returned",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/label/classes/external.php#L66-L108 |
213,261 | moodle/moodle | lib/classes/message/manager.php | manager.send_conversation_message_to_processors | protected static function send_conversation_message_to_processors(array $eventprocmaps, message $eventdata,
\stdClass $savemessage) {
global $DB;
// We cannot communicate with external systems in DB transactions,
// buffer th... | php | protected static function send_conversation_message_to_processors(array $eventprocmaps, message $eventdata,
\stdClass $savemessage) {
global $DB;
// We cannot communicate with external systems in DB transactions,
// buffer th... | [
"protected",
"static",
"function",
"send_conversation_message_to_processors",
"(",
"array",
"$",
"eventprocmaps",
",",
"message",
"$",
"eventdata",
",",
"\\",
"stdClass",
"$",
"savemessage",
")",
"{",
"global",
"$",
"DB",
";",
"// We cannot communicate with external sys... | Takes a list of localised event data, and tries to send them to their respective member's message processors.
Input format:
[CONVID => [$localisedeventdata, $savemessage, $processorlist], ].
@param array $eventprocmaps the array of localised event data and processors for each member of the conversation.
@param messag... | [
"Takes",
"a",
"list",
"of",
"localised",
"event",
"data",
"and",
"tries",
"to",
"send",
"them",
"to",
"their",
"respective",
"member",
"s",
"message",
"processors",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/message/manager.php#L292-L313 |
213,262 | moodle/moodle | lib/classes/message/manager.php | manager.send_message | public static function send_message(message $eventdata, \stdClass $savemessage, array $processorlist) {
global $CFG;
require_once($CFG->dirroot.'/message/lib.php'); // This is most probably already included from messagelib.php file.
if (empty($processorlist)) {
// Trigger event for... | php | public static function send_message(message $eventdata, \stdClass $savemessage, array $processorlist) {
global $CFG;
require_once($CFG->dirroot.'/message/lib.php'); // This is most probably already included from messagelib.php file.
if (empty($processorlist)) {
// Trigger event for... | [
"public",
"static",
"function",
"send_message",
"(",
"message",
"$",
"eventdata",
",",
"\\",
"stdClass",
"$",
"savemessage",
",",
"array",
"$",
"processorlist",
")",
"{",
"global",
"$",
"CFG",
";",
"require_once",
"(",
"$",
"CFG",
"->",
"dirroot",
".",
"'/... | Do the message sending.
NOTE: to be used from message_send() only.
@param \core\message\message $eventdata fully prepared event data for processors
@param \stdClass $savemessage the message saved in 'message' table
@param array $processorlist list of processors for target user
@return int $messageid the id from 'mess... | [
"Do",
"the",
"message",
"sending",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/message/manager.php#L325-L350 |
213,263 | moodle/moodle | lib/classes/message/manager.php | manager.send_message_to_processors | protected static function send_message_to_processors($eventdata, \stdClass $savemessage, array
$processorlist) {
global $CFG, $DB;
// We cannot communicate with external systems in DB transactions,
// buffer the messages if necessary.
if ($DB->is_transaction_started()) {
... | php | protected static function send_message_to_processors($eventdata, \stdClass $savemessage, array
$processorlist) {
global $CFG, $DB;
// We cannot communicate with external systems in DB transactions,
// buffer the messages if necessary.
if ($DB->is_transaction_started()) {
... | [
"protected",
"static",
"function",
"send_message_to_processors",
"(",
"$",
"eventdata",
",",
"\\",
"stdClass",
"$",
"savemessage",
",",
"array",
"$",
"processorlist",
")",
"{",
"global",
"$",
"CFG",
",",
"$",
"DB",
";",
"// We cannot communicate with external system... | Send message to message processors.
@param \stdClass|\core\message\message $eventdata
@param \stdClass $savemessage
@param array $processorlist
@return int $messageid | [
"Send",
"message",
"to",
"message",
"processors",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/message/manager.php#L360-L398 |
213,264 | moodle/moodle | lib/classes/message/manager.php | manager.process_buffer | protected static function process_buffer() {
// Reset the buffers first in case we get exception from processor.
$messages = self::$buffer;
self::$buffer = array();
$convmessages = self::$convmessagebuffer;
self::$convmessagebuffer = array();
foreach ($messages as $messa... | php | protected static function process_buffer() {
// Reset the buffers first in case we get exception from processor.
$messages = self::$buffer;
self::$buffer = array();
$convmessages = self::$convmessagebuffer;
self::$convmessagebuffer = array();
foreach ($messages as $messa... | [
"protected",
"static",
"function",
"process_buffer",
"(",
")",
"{",
"// Reset the buffers first in case we get exception from processor.",
"$",
"messages",
"=",
"self",
"::",
"$",
"buffer",
";",
"self",
"::",
"$",
"buffer",
"=",
"array",
"(",
")",
";",
"$",
"convm... | Sent out any buffered messages if necessary. | [
"Sent",
"out",
"any",
"buffered",
"messages",
"if",
"necessary",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/classes/message/manager.php#L425-L441 |
213,265 | moodle/moodle | grade/grading/renderer.php | core_grading_renderer.management_method_selector | public function management_method_selector(grading_manager $manager, moodle_url $targeturl) {
$method = $manager->get_active_method();
$methods = $manager->get_available_methods(false);
$methods['none'] = get_string('gradingmethodnone', 'core_grading');
$selector = new single_select(new... | php | public function management_method_selector(grading_manager $manager, moodle_url $targeturl) {
$method = $manager->get_active_method();
$methods = $manager->get_available_methods(false);
$methods['none'] = get_string('gradingmethodnone', 'core_grading');
$selector = new single_select(new... | [
"public",
"function",
"management_method_selector",
"(",
"grading_manager",
"$",
"manager",
",",
"moodle_url",
"$",
"targeturl",
")",
"{",
"$",
"method",
"=",
"$",
"manager",
"->",
"get_active_method",
"(",
")",
";",
"$",
"methods",
"=",
"$",
"manager",
"->",
... | Renders the active method selector at the grading method management screen
@param grading_manager $manager
@param moodle_url $targeturl
@return string | [
"Renders",
"the",
"active",
"method",
"selector",
"at",
"the",
"grading",
"method",
"management",
"screen"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/grade/grading/renderer.php#L44-L55 |
213,266 | moodle/moodle | grade/grading/renderer.php | core_grading_renderer.management_message | public function management_message($message) {
$this->page->requires->strings_for_js(array('clicktoclose'), 'core_grading');
$this->page->requires->yui_module('moodle-core_grading-manage', 'M.core_grading.init_manage');
return $this->output->box(format_string($message) . ' - ' . html_writer::tag... | php | public function management_message($message) {
$this->page->requires->strings_for_js(array('clicktoclose'), 'core_grading');
$this->page->requires->yui_module('moodle-core_grading-manage', 'M.core_grading.init_manage');
return $this->output->box(format_string($message) . ' - ' . html_writer::tag... | [
"public",
"function",
"management_message",
"(",
"$",
"message",
")",
"{",
"$",
"this",
"->",
"page",
"->",
"requires",
"->",
"strings_for_js",
"(",
"array",
"(",
"'clicktoclose'",
")",
",",
"'core_grading'",
")",
";",
"$",
"this",
"->",
"page",
"->",
"req... | Renders a message for the user, typically as an action result
@param string $message
@return string | [
"Renders",
"a",
"message",
"for",
"the",
"user",
"typically",
"as",
"an",
"action",
"result"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/grade/grading/renderer.php#L78-L83 |
213,267 | moodle/moodle | grade/grading/renderer.php | core_grading_renderer.pick_action_icon | public function pick_action_icon(moodle_url $url, $text, $icon = '', $class = '') {
$img = $this->output->pix_icon($icon, '');
$txt = html_writer::tag('div', $text, array('class' => 'action-text'));
return html_writer::link($url, $img . $txt, array('class' => 'action '.$class));
} | php | public function pick_action_icon(moodle_url $url, $text, $icon = '', $class = '') {
$img = $this->output->pix_icon($icon, '');
$txt = html_writer::tag('div', $text, array('class' => 'action-text'));
return html_writer::link($url, $img . $txt, array('class' => 'action '.$class));
} | [
"public",
"function",
"pick_action_icon",
"(",
"moodle_url",
"$",
"url",
",",
"$",
"text",
",",
"$",
"icon",
"=",
"''",
",",
"$",
"class",
"=",
"''",
")",
"{",
"$",
"img",
"=",
"$",
"this",
"->",
"output",
"->",
"pix_icon",
"(",
"$",
"icon",
",",
... | Renders the template action icon
@param moodle_url $url action URL
@param string $text action text
@param string $icon the name of the icon to use
@param string $class extra class of this action
@return string | [
"Renders",
"the",
"template",
"action",
"icon"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/grade/grading/renderer.php#L94-L99 |
213,268 | moodle/moodle | enrol/paypal/classes/util.php | util.message_paypal_error_to_admin | public static function message_paypal_error_to_admin($subject, $data) {
$admin = get_admin();
$site = get_site();
$message = "$site->fullname: Transaction failed.\n\n$subject\n\n";
foreach ($data as $key => $value) {
$message .= "$key => $value\n";
}
$even... | php | public static function message_paypal_error_to_admin($subject, $data) {
$admin = get_admin();
$site = get_site();
$message = "$site->fullname: Transaction failed.\n\n$subject\n\n";
foreach ($data as $key => $value) {
$message .= "$key => $value\n";
}
$even... | [
"public",
"static",
"function",
"message_paypal_error_to_admin",
"(",
"$",
"subject",
",",
"$",
"data",
")",
"{",
"$",
"admin",
"=",
"get_admin",
"(",
")",
";",
"$",
"site",
"=",
"get_site",
"(",
")",
";",
"$",
"message",
"=",
"\"$site->fullname: Transactio... | Alerts site admin of potential problems.
@param string $subject email subject
@param stdClass $data PayPal IPN data | [
"Alerts",
"site",
"admin",
"of",
"potential",
"problems",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/enrol/paypal/classes/util.php#L44-L67 |
213,269 | moodle/moodle | enrol/paypal/classes/util.php | util.get_exception_handler | public static function get_exception_handler() {
return function($ex) {
$info = get_exception_info($ex);
$logerrmsg = "enrol_paypal IPN exception handler: ".$info->message;
if (debugging('', DEBUG_NORMAL)) {
$logerrmsg .= ' Debug: '.$info->debuginfo."\n".form... | php | public static function get_exception_handler() {
return function($ex) {
$info = get_exception_info($ex);
$logerrmsg = "enrol_paypal IPN exception handler: ".$info->message;
if (debugging('', DEBUG_NORMAL)) {
$logerrmsg .= ' Debug: '.$info->debuginfo."\n".form... | [
"public",
"static",
"function",
"get_exception_handler",
"(",
")",
"{",
"return",
"function",
"(",
"$",
"ex",
")",
"{",
"$",
"info",
"=",
"get_exception_info",
"(",
"$",
"ex",
")",
";",
"$",
"logerrmsg",
"=",
"\"enrol_paypal IPN exception handler: \"",
".",
"$... | Silent exception handler.
@return callable exception handler | [
"Silent",
"exception",
"handler",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/enrol/paypal/classes/util.php#L74-L90 |
213,270 | moodle/moodle | lib/spout/src/Spout/Writer/Common/Internal/AbstractWorkbook.php | AbstractWorkbook.getWorksheetFromExternalSheet | protected function getWorksheetFromExternalSheet($sheet)
{
$worksheetFound = null;
foreach ($this->worksheets as $worksheet) {
if ($worksheet->getExternalSheet() === $sheet) {
$worksheetFound = $worksheet;
break;
}
}
return $w... | php | protected function getWorksheetFromExternalSheet($sheet)
{
$worksheetFound = null;
foreach ($this->worksheets as $worksheet) {
if ($worksheet->getExternalSheet() === $sheet) {
$worksheetFound = $worksheet;
break;
}
}
return $w... | [
"protected",
"function",
"getWorksheetFromExternalSheet",
"(",
"$",
"sheet",
")",
"{",
"$",
"worksheetFound",
"=",
"null",
";",
"foreach",
"(",
"$",
"this",
"->",
"worksheets",
"as",
"$",
"worksheet",
")",
"{",
"if",
"(",
"$",
"worksheet",
"->",
"getExternal... | Returns the worksheet associated to the given external sheet.
@param \Box\Spout\Writer\Common\Sheet $sheet
@return WorksheetInterface|null The worksheet associated to the given external sheet or null if not found. | [
"Returns",
"the",
"worksheet",
"associated",
"to",
"the",
"given",
"external",
"sheet",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/Common/Internal/AbstractWorkbook.php#L123-L135 |
213,271 | moodle/moodle | lib/spout/src/Spout/Writer/Common/Internal/AbstractWorkbook.php | AbstractWorkbook.addRowToCurrentWorksheet | public function addRowToCurrentWorksheet($dataRow, $style)
{
$currentWorksheet = $this->getCurrentWorksheet();
$hasReachedMaxRows = $this->hasCurrentWorkseetReachedMaxRows();
$styleHelper = $this->getStyleHelper();
// if we reached the maximum number of rows for the current sheet...... | php | public function addRowToCurrentWorksheet($dataRow, $style)
{
$currentWorksheet = $this->getCurrentWorksheet();
$hasReachedMaxRows = $this->hasCurrentWorkseetReachedMaxRows();
$styleHelper = $this->getStyleHelper();
// if we reached the maximum number of rows for the current sheet...... | [
"public",
"function",
"addRowToCurrentWorksheet",
"(",
"$",
"dataRow",
",",
"$",
"style",
")",
"{",
"$",
"currentWorksheet",
"=",
"$",
"this",
"->",
"getCurrentWorksheet",
"(",
")",
";",
"$",
"hasReachedMaxRows",
"=",
"$",
"this",
"->",
"hasCurrentWorkseetReache... | Adds data to the current sheet.
If shouldCreateNewSheetsAutomatically option is set to true, it will handle pagination
with the creation of new worksheets if one worksheet has reached its maximum capicity.
@param array $dataRow Array containing data to be written. Cannot be empty.
Example $dataRow = ['data1', 1234, nu... | [
"Adds",
"data",
"to",
"the",
"current",
"sheet",
".",
"If",
"shouldCreateNewSheetsAutomatically",
"option",
"is",
"set",
"to",
"true",
"it",
"will",
"handle",
"pagination",
"with",
"the",
"creation",
"of",
"new",
"worksheets",
"if",
"one",
"worksheet",
"has",
... | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/lib/spout/src/Spout/Writer/Common/Internal/AbstractWorkbook.php#L149-L172 |
213,272 | moodle/moodle | admin/tool/dataprivacy/classes/output/data_requests_table.php | data_requests_table.col_select | public function col_select($data) {
if ($data->status == \tool_dataprivacy\api::DATAREQUEST_STATUS_AWAITING_APPROVAL) {
if ($data->type == \tool_dataprivacy\api::DATAREQUEST_TYPE_DELETE
&& !api::can_create_data_deletion_request_for_other()) {
// Don't show checkbox if... | php | public function col_select($data) {
if ($data->status == \tool_dataprivacy\api::DATAREQUEST_STATUS_AWAITING_APPROVAL) {
if ($data->type == \tool_dataprivacy\api::DATAREQUEST_TYPE_DELETE
&& !api::can_create_data_deletion_request_for_other()) {
// Don't show checkbox if... | [
"public",
"function",
"col_select",
"(",
"$",
"data",
")",
"{",
"if",
"(",
"$",
"data",
"->",
"status",
"==",
"\\",
"tool_dataprivacy",
"\\",
"api",
"::",
"DATAREQUEST_STATUS_AWAITING_APPROVAL",
")",
"{",
"if",
"(",
"$",
"data",
"->",
"type",
"==",
"\\",
... | The select column.
@param stdClass $data The row data.
@return string
@throws \moodle_exception
@throws coding_exception | [
"The",
"select",
"column",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/data_requests_table.php#L122-L139 |
213,273 | moodle/moodle | admin/tool/dataprivacy/classes/output/data_requests_table.php | data_requests_table.col_userid | public function col_userid($data) {
$user = $data->foruser;
return html_writer::link($user->profileurl, $user->fullname, ['title' => get_string('viewprofile')]);
} | php | public function col_userid($data) {
$user = $data->foruser;
return html_writer::link($user->profileurl, $user->fullname, ['title' => get_string('viewprofile')]);
} | [
"public",
"function",
"col_userid",
"(",
"$",
"data",
")",
"{",
"$",
"user",
"=",
"$",
"data",
"->",
"foruser",
";",
"return",
"html_writer",
"::",
"link",
"(",
"$",
"user",
"->",
"profileurl",
",",
"$",
"user",
"->",
"fullname",
",",
"[",
"'title'",
... | The user column.
@param stdClass $data The row data.
@return mixed | [
"The",
"user",
"column",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/data_requests_table.php#L160-L163 |
213,274 | moodle/moodle | admin/tool/dataprivacy/classes/output/data_requests_table.php | data_requests_table.col_requestedby | public function col_requestedby($data) {
$user = $data->requestedbyuser;
return html_writer::link($user->profileurl, $user->fullname, ['title' => get_string('viewprofile')]);
} | php | public function col_requestedby($data) {
$user = $data->requestedbyuser;
return html_writer::link($user->profileurl, $user->fullname, ['title' => get_string('viewprofile')]);
} | [
"public",
"function",
"col_requestedby",
"(",
"$",
"data",
")",
"{",
"$",
"user",
"=",
"$",
"data",
"->",
"requestedbyuser",
";",
"return",
"html_writer",
"::",
"link",
"(",
"$",
"user",
"->",
"profileurl",
",",
"$",
"user",
"->",
"fullname",
",",
"[",
... | The requesting user's column.
@param stdClass $data The row data.
@return mixed | [
"The",
"requesting",
"user",
"s",
"column",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/data_requests_table.php#L181-L184 |
213,275 | moodle/moodle | admin/tool/dataprivacy/classes/output/data_requests_table.php | data_requests_table.print_nothing_to_display | public function print_nothing_to_display() {
global $OUTPUT;
echo $this->render_reset_button();
$this->print_initials_bar();
if (!empty($this->statuses) || !empty($this->types)) {
$message = get_string('nodatarequestsmatchingfilter', 'tool_dataprivacy');
} else {
... | php | public function print_nothing_to_display() {
global $OUTPUT;
echo $this->render_reset_button();
$this->print_initials_bar();
if (!empty($this->statuses) || !empty($this->types)) {
$message = get_string('nodatarequestsmatchingfilter', 'tool_dataprivacy');
} else {
... | [
"public",
"function",
"print_nothing_to_display",
"(",
")",
"{",
"global",
"$",
"OUTPUT",
";",
"echo",
"$",
"this",
"->",
"render_reset_button",
"(",
")",
";",
"$",
"this",
"->",
"print_initials_bar",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"th... | Override default implementation to display a more meaningful information to the user. | [
"Override",
"default",
"implementation",
"to",
"display",
"a",
"more",
"meaningful",
"information",
"to",
"the",
"user",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/data_requests_table.php#L345-L355 |
213,276 | moodle/moodle | admin/tool/dataprivacy/classes/output/data_requests_table.php | data_requests_table.wrap_html_finish | public function wrap_html_finish() {
global $OUTPUT;
$data = new stdClass();
$data->options = [
[
'value' => 0,
'name' => ''
],
[
'value' => \tool_dataprivacy\api::DATAREQUEST_ACTION_APPROVE,
'na... | php | public function wrap_html_finish() {
global $OUTPUT;
$data = new stdClass();
$data->options = [
[
'value' => 0,
'name' => ''
],
[
'value' => \tool_dataprivacy\api::DATAREQUEST_ACTION_APPROVE,
'na... | [
"public",
"function",
"wrap_html_finish",
"(",
")",
"{",
"global",
"$",
"OUTPUT",
";",
"$",
"data",
"=",
"new",
"stdClass",
"(",
")",
";",
"$",
"data",
"->",
"options",
"=",
"[",
"[",
"'value'",
"=>",
"0",
",",
"'name'",
"=>",
"''",
"]",
",",
"[",
... | Override the table's wrap_html_finish method in order to render the bulk actions and
records per page options. | [
"Override",
"the",
"table",
"s",
"wrap_html_finish",
"method",
"in",
"order",
"to",
"render",
"the",
"bulk",
"actions",
"and",
"records",
"per",
"page",
"options",
"."
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/admin/tool/dataprivacy/classes/output/data_requests_table.php#L372-L398 |
213,277 | moodle/moodle | mod/chat/renderer.php | mod_chat_renderer.render_event_message | protected function render_event_message(event_message $eventmessage) {
global $CFG;
if (file_exists($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$eventmessage->theme.'/config.php')) {
include($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$eventmessage->theme.'/config.php');
}
... | php | protected function render_event_message(event_message $eventmessage) {
global $CFG;
if (file_exists($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$eventmessage->theme.'/config.php')) {
include($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$eventmessage->theme.'/config.php');
}
... | [
"protected",
"function",
"render_event_message",
"(",
"event_message",
"$",
"eventmessage",
")",
"{",
"global",
"$",
"CFG",
";",
"if",
"(",
"file_exists",
"(",
"$",
"CFG",
"->",
"dirroot",
".",
"'/mod/chat/gui_ajax/theme/'",
".",
"$",
"eventmessage",
"->",
"them... | Render and event_message instance
@param event_message $eventmessage The event_message instance to render
@return string HTML representing the event_message instance | [
"Render",
"and",
"event_message",
"instance"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/chat/renderer.php#L41-L61 |
213,278 | moodle/moodle | mod/chat/renderer.php | mod_chat_renderer.render_user_message | protected function render_user_message(user_message $usermessage) {
global $CFG;
if (file_exists($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$usermessage->theme.'/config.php')) {
include($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$usermessage->theme.'/config.php');
}
$patt... | php | protected function render_user_message(user_message $usermessage) {
global $CFG;
if (file_exists($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$usermessage->theme.'/config.php')) {
include($CFG->dirroot . '/mod/chat/gui_ajax/theme/'.$usermessage->theme.'/config.php');
}
$patt... | [
"protected",
"function",
"render_user_message",
"(",
"user_message",
"$",
"usermessage",
")",
"{",
"global",
"$",
"CFG",
";",
"if",
"(",
"file_exists",
"(",
"$",
"CFG",
"->",
"dirroot",
".",
"'/mod/chat/gui_ajax/theme/'",
".",
"$",
"usermessage",
"->",
"theme",
... | Render a user message
@param user_message $usermessage the user message to display
@return string html representation of a user_message instance | [
"Render",
"a",
"user",
"message"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/mod/chat/renderer.php#L69-L105 |
213,279 | moodle/moodle | repository/s3/S3.php | S3.setSSL | public static function setSSL($enabled, $validate = true)
{
self::$useSSL = $enabled;
self::$useSSLValidation = $validate;
} | php | public static function setSSL($enabled, $validate = true)
{
self::$useSSL = $enabled;
self::$useSSLValidation = $validate;
} | [
"public",
"static",
"function",
"setSSL",
"(",
"$",
"enabled",
",",
"$",
"validate",
"=",
"true",
")",
"{",
"self",
"::",
"$",
"useSSL",
"=",
"$",
"enabled",
";",
"self",
"::",
"$",
"useSSLValidation",
"=",
"$",
"validate",
";",
"}"
] | Set SSL on or off
@param boolean $enabled SSL enabled
@param boolean $validate SSL certificate validation
@return void | [
"Set",
"SSL",
"on",
"or",
"off"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L254-L258 |
213,280 | moodle/moodle | repository/s3/S3.php | S3.setProxy | public static function setProxy($host, $user = null, $pass = null, $type = CURLPROXY_SOCKS5)
{
self::$proxy = array('host' => $host, 'type' => $type, 'user' => $user, 'pass' => $pass);
} | php | public static function setProxy($host, $user = null, $pass = null, $type = CURLPROXY_SOCKS5)
{
self::$proxy = array('host' => $host, 'type' => $type, 'user' => $user, 'pass' => $pass);
} | [
"public",
"static",
"function",
"setProxy",
"(",
"$",
"host",
",",
"$",
"user",
"=",
"null",
",",
"$",
"pass",
"=",
"null",
",",
"$",
"type",
"=",
"CURLPROXY_SOCKS5",
")",
"{",
"self",
"::",
"$",
"proxy",
"=",
"array",
"(",
"'host'",
"=>",
"$",
"ho... | Set proxy information
@param string $host Proxy hostname and port (localhost:1234)
@param string $user Proxy username
@param string $pass Proxy password
@param constant $type CURL proxy type
@return void | [
"Set",
"proxy",
"information"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L286-L289 |
213,281 | moodle/moodle | repository/s3/S3.php | S3.putBucket | public static function putBucket($bucket, $acl = self::ACL_PRIVATE, $location = false)
{
$rest = new S3Request('PUT', $bucket, '', self::$endpoint);
$rest->setAmzHeader('x-amz-acl', $acl);
if ($location !== false)
{
$dom = new DOMDocument;
$createBucketConfiguration = $dom->createElement('CreateBucketCo... | php | public static function putBucket($bucket, $acl = self::ACL_PRIVATE, $location = false)
{
$rest = new S3Request('PUT', $bucket, '', self::$endpoint);
$rest->setAmzHeader('x-amz-acl', $acl);
if ($location !== false)
{
$dom = new DOMDocument;
$createBucketConfiguration = $dom->createElement('CreateBucketCo... | [
"public",
"static",
"function",
"putBucket",
"(",
"$",
"bucket",
",",
"$",
"acl",
"=",
"self",
"::",
"ACL_PRIVATE",
",",
"$",
"location",
"=",
"false",
")",
"{",
"$",
"rest",
"=",
"new",
"S3Request",
"(",
"'PUT'",
",",
"$",
"bucket",
",",
"''",
",",
... | Put a bucket
@param string $bucket Bucket name
@param constant $acl ACL flag
@param string $location Set as "EU" to create buckets hosted in Europe
@return boolean | [
"Put",
"a",
"bucket"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L517-L544 |
213,282 | moodle/moodle | repository/s3/S3.php | S3.getObject | public static function getObject($bucket, $uri, $saveTo = false)
{
$rest = new S3Request('GET', $bucket, $uri, self::$endpoint);
if ($saveTo !== false)
{
if (is_resource($saveTo))
$rest->fp =& $saveTo;
else
if (($rest->fp = @fopen($saveTo, 'wb')) !== false)
$rest->file = realpath($saveTo);
... | php | public static function getObject($bucket, $uri, $saveTo = false)
{
$rest = new S3Request('GET', $bucket, $uri, self::$endpoint);
if ($saveTo !== false)
{
if (is_resource($saveTo))
$rest->fp =& $saveTo;
else
if (($rest->fp = @fopen($saveTo, 'wb')) !== false)
$rest->file = realpath($saveTo);
... | [
"public",
"static",
"function",
"getObject",
"(",
"$",
"bucket",
",",
"$",
"uri",
",",
"$",
"saveTo",
"=",
"false",
")",
"{",
"$",
"rest",
"=",
"new",
"S3Request",
"(",
"'GET'",
",",
"$",
"bucket",
",",
"$",
"uri",
",",
"self",
"::",
"$",
"endpoint... | Get an object
@param string $bucket Bucket name
@param string $uri Object URI
@param mixed $saveTo Filename or resource to write to
@return mixed | [
"Get",
"an",
"object"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L755-L779 |
213,283 | moodle/moodle | repository/s3/S3.php | S3.getObjectInfo | public static function getObjectInfo($bucket, $uri, $returnInfo = true)
{
$rest = new S3Request('HEAD', $bucket, $uri, self::$endpoint);
$rest = $rest->getResponse();
if ($rest->error === false && ($rest->code !== 200 && $rest->code !== 404))
$rest->error = array('code' => $rest->code, 'message' => 'Unexpecte... | php | public static function getObjectInfo($bucket, $uri, $returnInfo = true)
{
$rest = new S3Request('HEAD', $bucket, $uri, self::$endpoint);
$rest = $rest->getResponse();
if ($rest->error === false && ($rest->code !== 200 && $rest->code !== 404))
$rest->error = array('code' => $rest->code, 'message' => 'Unexpecte... | [
"public",
"static",
"function",
"getObjectInfo",
"(",
"$",
"bucket",
",",
"$",
"uri",
",",
"$",
"returnInfo",
"=",
"true",
")",
"{",
"$",
"rest",
"=",
"new",
"S3Request",
"(",
"'HEAD'",
",",
"$",
"bucket",
",",
"$",
"uri",
",",
"self",
"::",
"$",
"... | Get object information
@param string $bucket Bucket name
@param string $uri Object URI
@param boolean $returnInfo Return response information
@return mixed | false | [
"Get",
"object",
"information"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L790-L803 |
213,284 | moodle/moodle | repository/s3/S3.php | S3.setBucketRedirect | public static function setBucketRedirect($bucket = NULL, $location = NULL)
{
$rest = new S3Request('PUT', $bucket, '', self::$endpoint);
if( empty($bucket) || empty($location) ) {
self::__triggerError("S3::setBucketRedirect({$bucket}, {$location}): Empty parameter.", __FILE__, __LINE__);
return false;
}
... | php | public static function setBucketRedirect($bucket = NULL, $location = NULL)
{
$rest = new S3Request('PUT', $bucket, '', self::$endpoint);
if( empty($bucket) || empty($location) ) {
self::__triggerError("S3::setBucketRedirect({$bucket}, {$location}): Empty parameter.", __FILE__, __LINE__);
return false;
}
... | [
"public",
"static",
"function",
"setBucketRedirect",
"(",
"$",
"bucket",
"=",
"NULL",
",",
"$",
"location",
"=",
"NULL",
")",
"{",
"$",
"rest",
"=",
"new",
"S3Request",
"(",
"'PUT'",
",",
"$",
"bucket",
",",
"''",
",",
"self",
"::",
"$",
"endpoint",
... | Set up a bucket redirection
@param string $bucket Bucket name
@param string $location Target host name
@return boolean | [
"Set",
"up",
"a",
"bucket",
"redirection"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L856-L887 |
213,285 | moodle/moodle | repository/s3/S3.php | S3.setBucketLogging | public static function setBucketLogging($bucket, $targetBucket, $targetPrefix = null)
{
// The S3 log delivery group has to be added to the target bucket's ACP
if ($targetBucket !== null && ($acp = self::getAccessControlPolicy($targetBucket, '')) !== false)
{
// Only add permissions to the target bucket when ... | php | public static function setBucketLogging($bucket, $targetBucket, $targetPrefix = null)
{
// The S3 log delivery group has to be added to the target bucket's ACP
if ($targetBucket !== null && ($acp = self::getAccessControlPolicy($targetBucket, '')) !== false)
{
// Only add permissions to the target bucket when ... | [
"public",
"static",
"function",
"setBucketLogging",
"(",
"$",
"bucket",
",",
"$",
"targetBucket",
",",
"$",
"targetPrefix",
"=",
"null",
")",
"{",
"// The S3 log delivery group has to be added to the target bucket's ACP",
"if",
"(",
"$",
"targetBucket",
"!==",
"null",
... | Set logging for a bucket
@param string $bucket Bucket name
@param string $targetBucket Target bucket (where logs are stored)
@param string $targetPrefix Log prefix (e,g; domain.com-)
@return boolean | [
"Set",
"logging",
"for",
"a",
"bucket"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L898-L950 |
213,286 | moodle/moodle | repository/s3/S3.php | S3.getBucketLogging | public static function getBucketLogging($bucket)
{
$rest = new S3Request('GET', $bucket, '', self::$endpoint);
$rest->setParameter('logging', null);
$rest = $rest->getResponse();
if ($rest->error === false && $rest->code !== 200)
$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP stat... | php | public static function getBucketLogging($bucket)
{
$rest = new S3Request('GET', $bucket, '', self::$endpoint);
$rest->setParameter('logging', null);
$rest = $rest->getResponse();
if ($rest->error === false && $rest->code !== 200)
$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP stat... | [
"public",
"static",
"function",
"getBucketLogging",
"(",
"$",
"bucket",
")",
"{",
"$",
"rest",
"=",
"new",
"S3Request",
"(",
"'GET'",
",",
"$",
"bucket",
",",
"''",
",",
"self",
"::",
"$",
"endpoint",
")",
";",
"$",
"rest",
"->",
"setParameter",
"(",
... | Get logging status for a bucket
This will return false if logging is not enabled.
Note: To enable logging, you also need to grant write access to the log group
@param string $bucket Bucket name
@return array | false | [
"Get",
"logging",
"status",
"for",
"a",
"bucket"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L962-L980 |
213,287 | moodle/moodle | repository/s3/S3.php | S3.getBucketLocation | public static function getBucketLocation($bucket)
{
$rest = new S3Request('GET', $bucket, '', self::$endpoint);
$rest->setParameter('location', null);
$rest = $rest->getResponse();
if ($rest->error === false && $rest->code !== 200)
$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP st... | php | public static function getBucketLocation($bucket)
{
$rest = new S3Request('GET', $bucket, '', self::$endpoint);
$rest->setParameter('location', null);
$rest = $rest->getResponse();
if ($rest->error === false && $rest->code !== 200)
$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP st... | [
"public",
"static",
"function",
"getBucketLocation",
"(",
"$",
"bucket",
")",
"{",
"$",
"rest",
"=",
"new",
"S3Request",
"(",
"'GET'",
",",
"$",
"bucket",
",",
"''",
",",
"self",
"::",
"$",
"endpoint",
")",
";",
"$",
"rest",
"->",
"setParameter",
"(",
... | Get a bucket's location
@param string $bucket Bucket name
@return string | false | [
"Get",
"a",
"bucket",
"s",
"location"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1001-L1015 |
213,288 | moodle/moodle | repository/s3/S3.php | S3.getAccessControlPolicy | public static function getAccessControlPolicy($bucket, $uri = '')
{
$rest = new S3Request('GET', $bucket, $uri, self::$endpoint);
$rest->setParameter('acl', null);
$rest = $rest->getResponse();
if ($rest->error === false && $rest->code !== 200)
$rest->error = array('code' => $rest->code, 'message' => 'Unexp... | php | public static function getAccessControlPolicy($bucket, $uri = '')
{
$rest = new S3Request('GET', $bucket, $uri, self::$endpoint);
$rest->setParameter('acl', null);
$rest = $rest->getResponse();
if ($rest->error === false && $rest->code !== 200)
$rest->error = array('code' => $rest->code, 'message' => 'Unexp... | [
"public",
"static",
"function",
"getAccessControlPolicy",
"(",
"$",
"bucket",
",",
"$",
"uri",
"=",
"''",
")",
"{",
"$",
"rest",
"=",
"new",
"S3Request",
"(",
"'GET'",
",",
"$",
"bucket",
",",
"$",
"uri",
",",
"self",
"::",
"$",
"endpoint",
")",
";",... | Get object or bucket Access Control Policy
@param string $bucket Bucket name
@param string $uri Object URI
@return mixed | false | [
"Get",
"object",
"or",
"bucket",
"Access",
"Control",
"Policy"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1092-L1143 |
213,289 | moodle/moodle | repository/s3/S3.php | S3.getAuthenticatedURL | public static function getAuthenticatedURL($bucket, $uri, $lifetime, $hostBucket = false, $https = false)
{
$expires = self::__getTime() + $lifetime;
$uri = str_replace(array('%2F', '%2B'), array('/', '+'), rawurlencode($uri));
return sprintf(($https ? 'https' : 'http').'://%s/%s?AWSAccessKeyId=%s&Expires=%u&Sig... | php | public static function getAuthenticatedURL($bucket, $uri, $lifetime, $hostBucket = false, $https = false)
{
$expires = self::__getTime() + $lifetime;
$uri = str_replace(array('%2F', '%2B'), array('/', '+'), rawurlencode($uri));
return sprintf(($https ? 'https' : 'http').'://%s/%s?AWSAccessKeyId=%s&Expires=%u&Sig... | [
"public",
"static",
"function",
"getAuthenticatedURL",
"(",
"$",
"bucket",
",",
"$",
"uri",
",",
"$",
"lifetime",
",",
"$",
"hostBucket",
"=",
"false",
",",
"$",
"https",
"=",
"false",
")",
"{",
"$",
"expires",
"=",
"self",
"::",
"__getTime",
"(",
")",... | Get a query string authenticated URL
@param string $bucket Bucket name
@param string $uri Object URI
@param integer $lifetime Lifetime in seconds
@param boolean $hostBucket Use the bucket name as the hostname
@param boolean $https Use HTTPS ($hostBucket should be false for SSL verification)
@return string | [
"Get",
"a",
"query",
"string",
"authenticated",
"URL"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1179-L1187 |
213,290 | moodle/moodle | repository/s3/S3.php | S3.getSignedPolicyURL | public static function getSignedPolicyURL($policy)
{
$data = json_encode($policy);
$signature = '';
if (!openssl_sign($data, $signature, self::$__signingKeyResource)) return false;
$encoded = str_replace(array('+', '='), array('-', '_', '~'), base64_encode($data));
$signature = str_replace(array('+', '='), ... | php | public static function getSignedPolicyURL($policy)
{
$data = json_encode($policy);
$signature = '';
if (!openssl_sign($data, $signature, self::$__signingKeyResource)) return false;
$encoded = str_replace(array('+', '='), array('-', '_', '~'), base64_encode($data));
$signature = str_replace(array('+', '='), ... | [
"public",
"static",
"function",
"getSignedPolicyURL",
"(",
"$",
"policy",
")",
"{",
"$",
"data",
"=",
"json_encode",
"(",
"$",
"policy",
")",
";",
"$",
"signature",
"=",
"''",
";",
"if",
"(",
"!",
"openssl_sign",
"(",
"$",
"data",
",",
"$",
"signature"... | Get a CloudFront signed policy URL
@param array $policy Policy
@return string | [
"Get",
"a",
"CloudFront",
"signed",
"policy",
"URL"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1196-L1209 |
213,291 | moodle/moodle | repository/s3/S3.php | S3.createDistribution | public static function createDistribution($bucket, $enabled = true, $cnames = array(), $comment = null, $defaultRootObject = null, $originAccessIdentity = null, $trustedSigners = array())
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::createDistribution({$bucket}, ".(int)$enabled.", [],... | php | public static function createDistribution($bucket, $enabled = true, $cnames = array(), $comment = null, $defaultRootObject = null, $originAccessIdentity = null, $trustedSigners = array())
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::createDistribution({$bucket}, ".(int)$enabled.", [],... | [
"public",
"static",
"function",
"createDistribution",
"(",
"$",
"bucket",
",",
"$",
"enabled",
"=",
"true",
",",
"$",
"cnames",
"=",
"array",
"(",
")",
",",
"$",
"comment",
"=",
"null",
",",
"$",
"defaultRootObject",
"=",
"null",
",",
"$",
"originAccessI... | Create a CloudFront distribution
@param string $bucket Bucket name
@param boolean $enabled Enabled (true/false)
@param array $cnames Array containing CNAME aliases
@param string $comment Use the bucket name as the hostname
@param string $defaultRootObject Default root object
@param string $originAccessIdentity Origin ... | [
"Create",
"a",
"CloudFront",
"distribution"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1307-L1346 |
213,292 | moodle/moodle | repository/s3/S3.php | S3.getDistribution | public static function getDistribution($distributionId)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::getDistribution($distributionId): %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // Clo... | php | public static function getDistribution($distributionId)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::getDistribution($distributionId): %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // Clo... | [
"public",
"static",
"function",
"getDistribution",
"(",
"$",
"distributionId",
")",
"{",
"if",
"(",
"!",
"extension_loaded",
"(",
"'openssl'",
")",
")",
"{",
"self",
"::",
"__triggerError",
"(",
"sprintf",
"(",
"\"S3::getDistribution($distributionId): %s\"",
",",
... | Get CloudFront distribution info
@param string $distributionId Distribution ID from listDistributions()
@return array | false | [
"Get",
"CloudFront",
"distribution",
"info"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1355-L1387 |
213,293 | moodle/moodle | repository/s3/S3.php | S3.updateDistribution | public static function updateDistribution($dist)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::updateDistribution({$dist['id']}): %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // CloudFro... | php | public static function updateDistribution($dist)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::updateDistribution({$dist['id']}): %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // CloudFro... | [
"public",
"static",
"function",
"updateDistribution",
"(",
"$",
"dist",
")",
"{",
"if",
"(",
"!",
"extension_loaded",
"(",
"'openssl'",
")",
")",
"{",
"self",
"::",
"__triggerError",
"(",
"sprintf",
"(",
"\"S3::updateDistribution({$dist['id']}): %s\"",
",",
"\"Clo... | Update a CloudFront distribution
@param array $dist Distribution array info identical to output of getDistribution()
@return array | false | [
"Update",
"a",
"CloudFront",
"distribution"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1396-L1439 |
213,294 | moodle/moodle | repository/s3/S3.php | S3.deleteDistribution | public static function deleteDistribution($dist)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::deleteDistribution({$dist['id']}): %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // CloudFro... | php | public static function deleteDistribution($dist)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::deleteDistribution({$dist['id']}): %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // CloudFro... | [
"public",
"static",
"function",
"deleteDistribution",
"(",
"$",
"dist",
")",
"{",
"if",
"(",
"!",
"extension_loaded",
"(",
"'openssl'",
")",
")",
"{",
"self",
"::",
"__triggerError",
"(",
"sprintf",
"(",
"\"S3::deleteDistribution({$dist['id']}): %s\"",
",",
"\"Clo... | Delete a CloudFront distribution
@param array $dist Distribution array info identical to output of getDistribution()
@return boolean | [
"Delete",
"a",
"CloudFront",
"distribution"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1448-L1475 |
213,295 | moodle/moodle | repository/s3/S3.php | S3.listDistributions | public static function listDistributions()
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::listDistributions(): [%s] %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // CloudFront requires SSL
... | php | public static function listDistributions()
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::listDistributions(): [%s] %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = true; // CloudFront requires SSL
... | [
"public",
"static",
"function",
"listDistributions",
"(",
")",
"{",
"if",
"(",
"!",
"extension_loaded",
"(",
"'openssl'",
")",
")",
"{",
"self",
"::",
"__triggerError",
"(",
"sprintf",
"(",
"\"S3::listDistributions(): [%s] %s\"",
",",
"\"CloudFront functionality requi... | Get a list of CloudFront distributions
@return array | [
"Get",
"a",
"list",
"of",
"CloudFront",
"distributions"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1483-L1521 |
213,296 | moodle/moodle | repository/s3/S3.php | S3.listOriginAccessIdentities | public static function listOriginAccessIdentities()
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::listOriginAccessIdentities(): [%s] %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
self::$useSSL = true; // CloudFront requires SSL
$rest =... | php | public static function listOriginAccessIdentities()
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::listOriginAccessIdentities(): [%s] %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
self::$useSSL = true; // CloudFront requires SSL
$rest =... | [
"public",
"static",
"function",
"listOriginAccessIdentities",
"(",
")",
"{",
"if",
"(",
"!",
"extension_loaded",
"(",
"'openssl'",
")",
")",
"{",
"self",
"::",
"__triggerError",
"(",
"sprintf",
"(",
"\"S3::listOriginAccessIdentities(): [%s] %s\"",
",",
"\"CloudFront f... | List CloudFront Origin Access Identities
@return array | [
"List",
"CloudFront",
"Origin",
"Access",
"Identities"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1528-L1560 |
213,297 | moodle/moodle | repository/s3/S3.php | S3.invalidateDistribution | public static function invalidateDistribution($distributionId, $paths)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::invalidateDistribution(): [%s] %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = ... | php | public static function invalidateDistribution($distributionId, $paths)
{
if (!extension_loaded('openssl'))
{
self::__triggerError(sprintf("S3::invalidateDistribution(): [%s] %s",
"CloudFront functionality requires SSL"), __FILE__, __LINE__);
return false;
}
$useSSL = self::$useSSL;
self::$useSSL = ... | [
"public",
"static",
"function",
"invalidateDistribution",
"(",
"$",
"distributionId",
",",
"$",
"paths",
")",
"{",
"if",
"(",
"!",
"extension_loaded",
"(",
"'openssl'",
")",
")",
"{",
"self",
"::",
"__triggerError",
"(",
"sprintf",
"(",
"\"S3::invalidateDistribu... | Invalidate objects in a CloudFront distribution
Thanks to Martin Lindkvist for S3::invalidateDistribution()
@param string $distributionId Distribution ID from listDistributions()
@param array $paths Array of object paths to invalidate
@return boolean | [
"Invalidate",
"objects",
"in",
"a",
"CloudFront",
"distribution"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1572-L1598 |
213,298 | moodle/moodle | repository/s3/S3.php | S3.__getCloudFrontInvalidationBatchXML | private static function __getCloudFrontInvalidationBatchXML($paths, $callerReference = '0')
{
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$invalidationBatch = $dom->createElement('InvalidationBatch');
foreach ($paths as $path)
$invalidationBatch->appendChild($dom->createElement('Path'... | php | private static function __getCloudFrontInvalidationBatchXML($paths, $callerReference = '0')
{
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$invalidationBatch = $dom->createElement('InvalidationBatch');
foreach ($paths as $path)
$invalidationBatch->appendChild($dom->createElement('Path'... | [
"private",
"static",
"function",
"__getCloudFrontInvalidationBatchXML",
"(",
"$",
"paths",
",",
"$",
"callerReference",
"=",
"'0'",
")",
"{",
"$",
"dom",
"=",
"new",
"DOMDocument",
"(",
"'1.0'",
",",
"'UTF-8'",
")",
";",
"$",
"dom",
"->",
"formatOutput",
"="... | Get a InvalidationBatch DOMDocument
@internal Used to create XML in invalidateDistribution()
@param array $paths Paths to objects to invalidateDistribution
@param int $callerReference
@return string | [
"Get",
"a",
"InvalidationBatch",
"DOMDocument"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1609-L1620 |
213,299 | moodle/moodle | repository/s3/S3.php | S3.__getCloudFrontDistributionConfigXML | private static function __getCloudFrontDistributionConfigXML($bucket, $enabled, $comment, $callerReference = '0', $cnames = array(), $defaultRootObject = null, $originAccessIdentity = null, $trustedSigners = array())
{
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$distributionConfig = $dom-... | php | private static function __getCloudFrontDistributionConfigXML($bucket, $enabled, $comment, $callerReference = '0', $cnames = array(), $defaultRootObject = null, $originAccessIdentity = null, $trustedSigners = array())
{
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$distributionConfig = $dom-... | [
"private",
"static",
"function",
"__getCloudFrontDistributionConfigXML",
"(",
"$",
"bucket",
",",
"$",
"enabled",
",",
"$",
"comment",
",",
"$",
"callerReference",
"=",
"'0'",
",",
"$",
"cnames",
"=",
"array",
"(",
")",
",",
"$",
"defaultRootObject",
"=",
"n... | Get a DistributionConfig DOMDocument
http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/index.html?PutConfig.html
@internal Used to create XML in createDistribution() and updateDistribution()
@param string $bucket S3 Origin bucket
@param boolean $enabled Enabled (true/false)
@param string $comment... | [
"Get",
"a",
"DistributionConfig",
"DOMDocument"
] | a411b499b98afc9901c24a9466c7e322946a04aa | https://github.com/moodle/moodle/blob/a411b499b98afc9901c24a9466c7e322946a04aa/repository/s3/S3.php#L1690-L1718 |
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.