Merge branch 'MDL-63422' of git://github.com/stronk7/moodle

This commit is contained in:
Andrew Nicols 2018-11-02 08:22:33 +08:00
commit f8e364e31a
27 changed files with 79 additions and 89 deletions

View file

@ -795,7 +795,7 @@ class model {
// skip it and do nothing with it. // skip it and do nothing with it.
debugging($this->model->id . ' model predictions processor could not process the sample with id ' . debugging($this->model->id . ' model predictions processor could not process the sample with id ' .
$sampleinfo[0], DEBUG_DEVELOPER); $sampleinfo[0], DEBUG_DEVELOPER);
continue; continue 2;
case 2: case 2:
// Prediction processors that do not return a prediction score will have the maximum prediction // Prediction processors that do not return a prediction score will have the maximum prediction
// score. // score.

View file

@ -3380,7 +3380,7 @@ class CAS_Client
case 'user': case 'user':
case 'proxies': case 'proxies':
case 'proxyGrantingTicket': case 'proxyGrantingTicket':
continue; break;
default: default:
if (strlen(trim($attr_node->nodeValue))) { if (strlen(trim($attr_node->nodeValue))) {
phpCas :: trace( phpCas :: trace(

View file

@ -2,3 +2,4 @@ Description of phpCAS 1.3.5 library import
* downloaded from http://downloads.jasig.org/cas-clients/php/current/ * downloaded from http://downloads.jasig.org/cas-clients/php/current/
* applied patch https://github.com/apereo/phpCAS/pull/247 for PHP 7.2 compatibility (MDL-60280) * applied patch https://github.com/apereo/phpCAS/pull/247 for PHP 7.2 compatibility (MDL-60280)
* applied patch https://github.com/apereo/phpCAS/pull/278 for PHP 7.3 compatibility (MDL-63422)

View file

@ -251,7 +251,7 @@ class provider implements
if (empty($entryids)) { if (empty($entryids)) {
// This should not happen, as the user context should not have been reported then. // This should not happen, as the user context should not have been reported then.
continue; continue 2;
} }
list($insql, $inparams) = $DB->get_in_or_equal($entryids, SQL_PARAMS_NAMED); list($insql, $inparams) = $DB->get_in_or_equal($entryids, SQL_PARAMS_NAMED);

View file

@ -500,14 +500,13 @@ class provider implements
foreach ($contextlist as $context) { foreach ($contextlist as $context) {
switch ($context->contextlevel) { switch ($context->contextlevel) {
case CONTEXT_USER: case CONTEXT_USER:
if ($context->instanceid != $userid) { if ($context->instanceid == $userid) {
// Only delete the user's information when they requested their context to be deleted. We // Only delete the user's information when they requested their context to be deleted. We
// do not take any action on other user's contexts because we don't own the data there. // do not take any action on other user's contexts because we don't own the data there.
continue; static::delete_user_evidence_of_prior_learning($userid);
static::delete_user_plans($userid);
static::delete_user_competencies($userid);
} }
static::delete_user_evidence_of_prior_learning($userid);
static::delete_user_plans($userid);
static::delete_user_competencies($userid);
break; break;
case CONTEXT_COURSE: case CONTEXT_COURSE:

View file

@ -51,7 +51,7 @@ function grade_get_course_grades($courseid, $userid_or_ids=null) {
switch ($grade_item->gradetype) { switch ($grade_item->gradetype) {
case GRADE_TYPE_NONE: case GRADE_TYPE_NONE:
continue; break;
case GRADE_TYPE_VALUE: case GRADE_TYPE_VALUE:
$item->scaleid = 0; $item->scaleid = 0;
@ -178,7 +178,7 @@ function grade_get_course_grade($userid, $courseid_or_ids=null) {
switch ($grade_item->gradetype) { switch ($grade_item->gradetype) {
case GRADE_TYPE_NONE: case GRADE_TYPE_NONE:
continue; break;
case GRADE_TYPE_VALUE: case GRADE_TYPE_VALUE:
$item->scaleid = 0; $item->scaleid = 0;

View file

@ -472,7 +472,7 @@ function grade_get_grades($courseid, $itemtype, $itemmodule, $iteminstance, $use
switch ($grade_item->gradetype) { switch ($grade_item->gradetype) {
case GRADE_TYPE_NONE: case GRADE_TYPE_NONE:
continue; break;
case GRADE_TYPE_VALUE: case GRADE_TYPE_VALUE:
$item->scaleid = 0; $item->scaleid = 0;

View file

@ -295,7 +295,7 @@ class Horde_Imap_Client_Tokenize implements Iterator
// identifier. // identifier.
$binary = true; $binary = true;
$text .= $c; $text .= $c;
continue; break;
case '{': case '{':
if ($binary) { if ($binary) {

View file

@ -571,7 +571,7 @@ class Horde_Mail_Rfc822
if (substr($str, -1) == "\r") { if (substr($str, -1) == "\r") {
$str = substr($str, 0, -1); $str = substr($str, 0, -1);
} }
continue; break;
case '\\': case '\\':
if (($chr = $this->_curr(true)) === false) { if (($chr = $this->_curr(true)) === false) {
@ -737,7 +737,7 @@ class Horde_Mail_Rfc822
case "\r": case "\r":
case "\t": case "\t":
++$this->_ptr; ++$this->_ptr;
continue; break;
case '(': case '(':
$this->_rfc822SkipComment(); $this->_rfc822SkipComment();
@ -765,7 +765,7 @@ class Horde_Mail_Rfc822
switch ($chr) { switch ($chr) {
case '(': case '(':
++$level; ++$level;
continue; break;
case ')': case ')':
if (--$level == 0) { if (--$level == 0) {

View file

@ -8,6 +8,9 @@ Description of import of Horde libraries
# Copy the following script and store it on /tmp, change it's execute bit, and run it, passing # Copy the following script and store it on /tmp, change it's execute bit, and run it, passing
in your path to Horde (the directory you've cloned the repository): in your path to Horde (the directory you've cloned the repository):
/tmp/copyhorde.sh ~/git/ext/horde/ /tmp/copyhorde.sh ~/git/ext/horde/
# Verify that these patches have been applied in the imported version. Apply them locally if not:
- https://github.com/horde/Mail/pull/1 (Mail component).
- https://github.com/horde/Imap_Client/pull/6 (IMAP Client component).
==== ====
#!/bin/sh #!/bin/sh

View file

@ -67,7 +67,7 @@ class Less_Exception_Chunk extends Less_Exception_Parser{
case 40: case 40:
$parenLevel++; $parenLevel++;
$lastParen = $this->parserCurrentIndex; $lastParen = $this->parserCurrentIndex;
continue; break;
// ) // )
case 41: case 41:
@ -75,18 +75,18 @@ class Less_Exception_Chunk extends Less_Exception_Parser{
if( $parenLevel < 0 ){ if( $parenLevel < 0 ){
return $this->fail("missing opening `(`"); return $this->fail("missing opening `(`");
} }
continue; break;
// ; // ;
case 59: case 59:
//if (!$parenLevel) { $this->emitChunk(); } //if (!$parenLevel) { $this->emitChunk(); }
continue; break;
// { // {
case 123: case 123:
$level++; $level++;
$lastOpening = $this->parserCurrentIndex; $lastOpening = $this->parserCurrentIndex;
continue; break;
// } // }
case 125: case 125:
@ -96,10 +96,10 @@ class Less_Exception_Chunk extends Less_Exception_Parser{
} }
//if (!$level && !$parenLevel) { $this->emitChunk(); } //if (!$level && !$parenLevel) { $this->emitChunk(); }
continue; break;
// \ // \
case 92: case 92:
if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; continue; } if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; break; }
return $this->fail("unescaped `\\`"); return $this->fail("unescaped `\\`");
// ", ' and ` // ", ' and `
@ -119,12 +119,12 @@ class Less_Exception_Chunk extends Less_Exception_Parser{
$this->parserCurrentIndex++; $this->parserCurrentIndex++;
} }
} }
if ($matched) { continue; } if ($matched) { break; }
return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex); return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex);
// /, check for comment // /, check for comment
case 47: case 47:
if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { continue; } if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { break; }
$cc2 = $this->CharCode($this->parserCurrentIndex+1); $cc2 = $this->CharCode($this->parserCurrentIndex+1);
if ($cc2 == 47) { if ($cc2 == 47) {
// //, find lnfeed // //, find lnfeed
@ -145,14 +145,14 @@ class Less_Exception_Chunk extends Less_Exception_Parser{
return $this->fail("missing closing `*/`", $currentChunkStartIndex); return $this->fail("missing closing `*/`", $currentChunkStartIndex);
} }
} }
continue; break;
// *, check for unmatched */ // *, check for unmatched */
case 42: case 42:
if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) { if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) {
return $this->fail("unmatched `/*`"); return $this->fail("unmatched `/*`");
} }
continue; break;
} }
} }

View file

@ -8,6 +8,8 @@ All the files from the folder lib/Less are copied in
this directory. Only exception made for the directory this directory. Only exception made for the directory
'.easymin' which is not included. '.easymin' which is not included.
Verify that https://github.com/oyejorge/less.php/pull/367 has been applied to the imported version or apply it locally.
Also copy the license file from the project root. Also copy the license file from the project root.
Licensed under the Apache license 2.0. Licensed under the Apache license 2.0.

View file

@ -5,7 +5,8 @@ Description of TCPDF library import 6.2.13
* remove tcpdf_import.php from composer.json * remove tcpdf_import.php from composer.json
* remove all fonts that were not already present * remove all fonts that were not already present
* visit http://127.0.0.1/lib/tests/other/pdflibtestpage.php and view the pdf * visit http://127.0.0.1/lib/tests/other/pdflibtestpage.php and view the pdf
* check the status of https://github.com/tecnickcom/TCPDF/pull/74 and re-apply if not merged/closed * check the status of https://github.com/tecnickcom/TCPDF/pull/74 and re-apply if not merged/closed (6.2.16 and up should contain it).
* verify that https://github.com/tecnickcom/TCPDF/pull/91 is included in the imported library (6.2.25 and up should contain it).
2017/10/02 2017/10/02
---------- ----------

View file

@ -17781,7 +17781,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// justify block // justify block
if (!TCPDF_STATIC::empty_string($this->lispacer)) { if (!TCPDF_STATIC::empty_string($this->lispacer)) {
$this->lispacer = ''; $this->lispacer = '';
continue; break;
} }
preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches); preg_match('/([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]([0-9\.\+\-]*)[\s]('.$strpiece[1][0].')[\s](re)([\s]*)/x', $pmid, $xmatches);
if (!isset($xmatches[1])) { if (!isset($xmatches[1])) {

View file

@ -187,7 +187,7 @@ class combined_document {
$status = $file->get('status'); $status = $file->get('status');
switch ($status) { switch ($status) {
case \core_files\conversion::STATUS_COMPLETE: case \core_files\conversion::STATUS_COMPLETE:
continue; continue 2;
break; break;
default: default:
$converter->poll_conversion($conversion); $converter->poll_conversion($conversion);

View file

@ -108,7 +108,7 @@ class convert_submissions extends scheduled_task {
case combined_document::STATUS_READY: case combined_document::STATUS_READY:
case combined_document::STATUS_PENDING_INPUT: case combined_document::STATUS_PENDING_INPUT:
// The document has not been converted yet or is somehow still ready. // The document has not been converted yet or is somehow still ready.
continue; continue 2;
} }
document_services::get_page_images_for_attempt( document_services::get_page_images_for_attempt(
$assignment, $assignment,

View file

@ -534,10 +534,9 @@ function mod_assign_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionsubmit': case 'completionsubmit':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionsubmit', 'assign');
} }
$descriptions[] = get_string('completionsubmit', 'assign');
break; break;
default: default:
break; break;

View file

@ -1007,7 +1007,7 @@ while (true) {
if (!preg_match('/beep=([^&]*)[& ]/', $data, $info)) { if (!preg_match('/beep=([^&]*)[& ]/', $data, $info)) {
$daemon->trace('Beep sidekick did not contain a valid userid', E_USER_WARNING); $daemon->trace('Beep sidekick did not contain a valid userid', E_USER_WARNING);
$daemon->dismiss_ufo($handle, true, 'Request with malformed data; connection closed'); $daemon->dismiss_ufo($handle, true, 'Request with malformed data; connection closed');
continue; continue 2;
} else { } else {
$customdata = array('beep' => intval($info[1])); $customdata = array('beep' => intval($info[1]));
} }
@ -1017,7 +1017,7 @@ while (true) {
if (!preg_match('/chat_message=([^&]*)[& ]chat_msgidnr=([^&]*)[& ]/', $data, $info)) { if (!preg_match('/chat_message=([^&]*)[& ]chat_msgidnr=([^&]*)[& ]/', $data, $info)) {
$daemon->trace('Message sidekick did not contain a valid message', E_USER_WARNING); $daemon->trace('Message sidekick did not contain a valid message', E_USER_WARNING);
$daemon->dismiss_ufo($handle, true, 'Request with malformed data; connection closed'); $daemon->dismiss_ufo($handle, true, 'Request with malformed data; connection closed');
continue; continue 2;
} else { } else {
$customdata = array('message' => $info[1], 'index' => $info[2]); $customdata = array('message' => $info[1], 'index' => $info[2]);
} }
@ -1025,7 +1025,7 @@ while (true) {
default: default:
$daemon->trace('UFO with '.$handle.': Request with unknown type; connection closed', E_USER_WARNING); $daemon->trace('UFO with '.$handle.': Request with unknown type; connection closed', E_USER_WARNING);
$daemon->dismiss_ufo($handle, true, 'Request with unknown type; connection closed'); $daemon->dismiss_ufo($handle, true, 'Request with unknown type; connection closed');
continue; continue 2;
break; break;
} }

View file

@ -1453,10 +1453,9 @@ function mod_choice_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionsubmit': case 'completionsubmit':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionsubmit', 'choice');
} }
$descriptions[] = get_string('completionsubmit', 'choice');
break; break;
default: default:
break; break;

View file

@ -4555,10 +4555,9 @@ function mod_data_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionentries': case 'completionentries':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionentriesdesc', 'data', $val);
} }
$descriptions[] = get_string('completionentriesdesc', 'data', $val);
break; break;
default: default:
break; break;

View file

@ -3097,10 +3097,9 @@ function mod_feedback_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionsubmit': case 'completionsubmit':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionsubmit', 'feedback');
} }
$descriptions[] = get_string('completionsubmit', 'feedback');
break; break;
default: default:
break; break;

View file

@ -8563,22 +8563,19 @@ function mod_forum_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completiondiscussions': case 'completiondiscussions':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completiondiscussionsdesc', 'forum', $val);
} }
$descriptions[] = get_string('completiondiscussionsdesc', 'forum', $val);
break; break;
case 'completionreplies': case 'completionreplies':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionrepliesdesc', 'forum', $val);
} }
$descriptions[] = get_string('completionrepliesdesc', 'forum', $val);
break; break;
case 'completionposts': case 'completionposts':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionpostsdesc', 'forum', $val);
} }
$descriptions[] = get_string('completionpostsdesc', 'forum', $val);
break; break;
default: default:
break; break;

View file

@ -4314,10 +4314,9 @@ function mod_glossary_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionentries': case 'completionentries':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionentriesdesc', 'glossary', $val);
} }
$descriptions[] = get_string('completionentriesdesc', 'glossary', $val);
break; break;
default: default:
break; break;

View file

@ -1745,16 +1745,14 @@ function mod_lesson_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionendreached': case 'completionendreached':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionendreached_desc', 'lesson', $val);
} }
$descriptions[] = get_string('completionendreached_desc', 'lesson', $val);
break; break;
case 'completiontimespent': case 'completiontimespent':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completiontimespentdesc', 'lesson', format_time($val));
} }
$descriptions[] = get_string('completiontimespentdesc', 'lesson', format_time($val));
break; break;
default: default:
break; break;

View file

@ -2266,16 +2266,14 @@ function mod_quiz_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionattemptsexhausted': case 'completionattemptsexhausted':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionattemptsexhausteddesc', 'quiz');
} }
$descriptions[] = get_string('completionattemptsexhausteddesc', 'quiz');
break; break;
case 'completionpass': case 'completionpass':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionpassdesc', 'quiz', format_time($val));
} }
$descriptions[] = get_string('completionpassdesc', 'quiz', format_time($val));
break; break;
default: default:
break; break;

View file

@ -1778,30 +1778,27 @@ function mod_scorm_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionstatusrequired': case 'completionstatusrequired':
if (is_null($val)) { if (!is_null($val)) {
continue; // Determine the selected statuses using a bitwise operation.
} $cvalues = array();
// Determine the selected statuses using a bitwise operation. foreach (scorm_status_options(true) as $bit => $string) {
$cvalues = array(); if (($val & $bit) == $bit) {
foreach (scorm_status_options(true) as $bit => $string) { $cvalues[] = $string;
if (($val & $bit) == $bit) { }
$cvalues[] = $string;
} }
$statusstring = implode(', ', $cvalues);
$descriptions[] = get_string('completionstatusrequireddesc', 'scorm', $statusstring);
} }
$statusstring = implode(', ', $cvalues);
$descriptions[] = get_string('completionstatusrequireddesc', 'scorm', $statusstring);
break; break;
case 'completionscorerequired': case 'completionscorerequired':
if (is_null($val)) { if (!is_null($val)) {
continue; $descriptions[] = get_string('completionscorerequireddesc', 'scorm', $val);
} }
$descriptions[] = get_string('completionscorerequireddesc', 'scorm', $val);
break; break;
case 'completionstatusallscos': case 'completionstatusallscos':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionstatusallscos', 'scorm');
} }
$descriptions[] = get_string('completionstatusallscos', 'scorm');
break; break;
default: default:
break; break;

View file

@ -1201,10 +1201,9 @@ function mod_survey_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) { foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) { switch ($key) {
case 'completionsubmit': case 'completionsubmit':
if (empty($val)) { if (!empty($val)) {
continue; $descriptions[] = get_string('completionsubmit', 'survey');
} }
$descriptions[] = get_string('completionsubmit', 'survey');
break; break;
default: default:
break; break;