Skip to content

Commit

Permalink
Merge branch 'MDL-63422' of git://github.com/stronk7/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Nov 2, 2018
2 parents bdccab4 + b702dbf commit f8e364e
Show file tree
Hide file tree
Showing 27 changed files with 79 additions and 89 deletions.
2 changes: 1 addition & 1 deletion analytics/classes/model.php
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ private function format_predictor_predictions($predictorresult) {
// skip it and do nothing with it.
debugging($this->model->id . ' model predictions processor could not process the sample with id ' .
$sampleinfo[0], DEBUG_DEVELOPER);
continue;
continue 2;
case 2:
// Prediction processors that do not return a prediction score will have the maximum prediction
// score.
Expand Down
2 changes: 1 addition & 1 deletion auth/cas/CAS/CAS/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -3380,7 +3380,7 @@ private function _readExtraAttributesCas20($success_elements)
case 'user':
case 'proxies':
case 'proxyGrantingTicket':
continue;
break;
default:
if (strlen(trim($attr_node->nodeValue))) {
phpCas :: trace(
Expand Down
3 changes: 2 additions & 1 deletion auth/cas/CAS/moodle_readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Description of phpCAS 1.3.5 library import

* 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)
2 changes: 1 addition & 1 deletion blog/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public static function export_user_data(approved_contextlist $contextlist) {

if (empty($entryids)) {
// 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);
Expand Down
9 changes: 4 additions & 5 deletions competency/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,13 @@ public static function delete_data_for_user(approved_contextlist $contextlist) {
foreach ($contextlist as $context) {
switch ($context->contextlevel) {
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
// 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;

case CONTEXT_COURSE:
Expand Down
4 changes: 2 additions & 2 deletions grade/querylib.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function grade_get_course_grades($courseid, $userid_or_ids=null) {

switch ($grade_item->gradetype) {
case GRADE_TYPE_NONE:
continue;
break;

case GRADE_TYPE_VALUE:
$item->scaleid = 0;
Expand Down Expand Up @@ -178,7 +178,7 @@ function grade_get_course_grade($userid, $courseid_or_ids=null) {

switch ($grade_item->gradetype) {
case GRADE_TYPE_NONE:
continue;
break;

case GRADE_TYPE_VALUE:
$item->scaleid = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/gradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ function grade_get_grades($courseid, $itemtype, $itemmodule, $iteminstance, $use

switch ($grade_item->gradetype) {
case GRADE_TYPE_NONE:
continue;
break;

case GRADE_TYPE_VALUE:
$item->scaleid = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/horde/framework/Horde/Imap/Client/Tokenize.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function next()
// identifier.
$binary = true;
$text .= $c;
continue;
break;

case '{':
if ($binary) {
Expand Down
6 changes: 3 additions & 3 deletions lib/horde/framework/Horde/Mail/Rfc822.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ protected function _rfc822ParseQuotedString(&$str)
if (substr($str, -1) == "\r") {
$str = substr($str, 0, -1);
}
continue;
break;

case '\\':
if (($chr = $this->_curr(true)) === false) {
Expand Down Expand Up @@ -737,7 +737,7 @@ protected function _rfc822SkipLwsp($advance = false)
case "\r":
case "\t":
++$this->_ptr;
continue;
break;

case '(':
$this->_rfc822SkipComment();
Expand Down Expand Up @@ -765,7 +765,7 @@ protected function _rfc822SkipComment()
switch ($chr) {
case '(':
++$level;
continue;
break;

case ')':
if (--$level == 0) {
Expand Down
3 changes: 3 additions & 0 deletions lib/horde/readme_moodle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
in your path to Horde (the directory you've cloned the repository):
/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
Expand Down
20 changes: 10 additions & 10 deletions lib/lessphp/Exception/Chunk.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,26 @@ protected function Chunks(){
case 40:
$parenLevel++;
$lastParen = $this->parserCurrentIndex;
continue;
break;

// )
case 41:
$parenLevel--;
if( $parenLevel < 0 ){
return $this->fail("missing opening `(`");
}
continue;
break;

// ;
case 59:
//if (!$parenLevel) { $this->emitChunk(); }
continue;
break;

// {
case 123:
$level++;
$lastOpening = $this->parserCurrentIndex;
continue;
break;

// }
case 125:
Expand All @@ -96,10 +96,10 @@ protected function Chunks(){

}
//if (!$level && !$parenLevel) { $this->emitChunk(); }
continue;
break;
// \
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 `\\`");

// ", ' and `
Expand All @@ -119,12 +119,12 @@ protected function Chunks(){
$this->parserCurrentIndex++;
}
}
if ($matched) { continue; }
if ($matched) { break; }
return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex);

// /, check for comment
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);
if ($cc2 == 47) {
// //, find lnfeed
Expand All @@ -145,14 +145,14 @@ protected function Chunks(){
return $this->fail("missing closing `*/`", $currentChunkStartIndex);
}
}
continue;
break;

// *, check for unmatched */
case 42:
if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) {
return $this->fail("unmatched `/*`");
}
continue;
break;
}
}

Expand Down
2 changes: 2 additions & 0 deletions lib/lessphp/moodle_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ All the files from the folder lib/Less are copied in
this directory. Only exception made for the directory
'.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.

Licensed under the Apache license 2.0.
Expand Down
3 changes: 2 additions & 1 deletion lib/tcpdf/readme_moodle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Description of TCPDF library import 6.2.13
* remove tcpdf_import.php from composer.json
* remove all fonts that were not already present
* 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
----------
Expand Down
2 changes: 1 addition & 1 deletion lib/tcpdf/tcpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -17781,7 +17781,7 @@ public function writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=fal
// justify block
if (!TCPDF_STATIC::empty_string($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);
if (!isset($xmatches[1])) {
Expand Down
2 changes: 1 addition & 1 deletion mod/assign/feedback/editpdf/classes/combined_document.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function refresh_files() {
$status = $file->get('status');
switch ($status) {
case \core_files\conversion::STATUS_COMPLETE:
continue;
continue 2;
break;
default:
$converter->poll_conversion($conversion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function execute() {
case combined_document::STATUS_READY:
case combined_document::STATUS_PENDING_INPUT:
// The document has not been converted yet or is somehow still ready.
continue;
continue 2;
}
document_services::get_page_images_for_attempt(
$assignment,
Expand Down
5 changes: 2 additions & 3 deletions mod/assign/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,9 @@ function mod_assign_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) {
case 'completionsubmit':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionsubmit', 'assign');
}
$descriptions[] = get_string('completionsubmit', 'assign');
break;
default:
break;
Expand Down
6 changes: 3 additions & 3 deletions mod/chat/chatd.php
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ public function cli_switch($switch, $param = null) {
if (!preg_match('/beep=([^&]*)[& ]/', $data, $info)) {
$daemon->trace('Beep sidekick did not contain a valid userid', E_USER_WARNING);
$daemon->dismiss_ufo($handle, true, 'Request with malformed data; connection closed');
continue;
continue 2;
} else {
$customdata = array('beep' => intval($info[1]));
}
Expand All @@ -1017,15 +1017,15 @@ public function cli_switch($switch, $param = null) {
if (!preg_match('/chat_message=([^&]*)[& ]chat_msgidnr=([^&]*)[& ]/', $data, $info)) {
$daemon->trace('Message sidekick did not contain a valid message', E_USER_WARNING);
$daemon->dismiss_ufo($handle, true, 'Request with malformed data; connection closed');
continue;
continue 2;
} else {
$customdata = array('message' => $info[1], 'index' => $info[2]);
}
break;
default:
$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');
continue;
continue 2;
break;
}

Expand Down
5 changes: 2 additions & 3 deletions mod/choice/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1453,10 +1453,9 @@ function mod_choice_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) {
case 'completionsubmit':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionsubmit', 'choice');
}
$descriptions[] = get_string('completionsubmit', 'choice');
break;
default:
break;
Expand Down
5 changes: 2 additions & 3 deletions mod/data/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4555,10 +4555,9 @@ function mod_data_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) {
case 'completionentries':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionentriesdesc', 'data', $val);
}
$descriptions[] = get_string('completionentriesdesc', 'data', $val);
break;
default:
break;
Expand Down
5 changes: 2 additions & 3 deletions mod/feedback/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3097,10 +3097,9 @@ function mod_feedback_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) {
case 'completionsubmit':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionsubmit', 'feedback');
}
$descriptions[] = get_string('completionsubmit', 'feedback');
break;
default:
break;
Expand Down
15 changes: 6 additions & 9 deletions mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -8563,22 +8563,19 @@ function mod_forum_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) {
case 'completiondiscussions':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completiondiscussionsdesc', 'forum', $val);
}
$descriptions[] = get_string('completiondiscussionsdesc', 'forum', $val);
break;
case 'completionreplies':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionrepliesdesc', 'forum', $val);
}
$descriptions[] = get_string('completionrepliesdesc', 'forum', $val);
break;
case 'completionposts':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionpostsdesc', 'forum', $val);
}
$descriptions[] = get_string('completionpostsdesc', 'forum', $val);
break;
default:
break;
Expand Down
5 changes: 2 additions & 3 deletions mod/glossary/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4314,10 +4314,9 @@ function mod_glossary_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) {
case 'completionentries':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionentriesdesc', 'glossary', $val);
}
$descriptions[] = get_string('completionentriesdesc', 'glossary', $val);
break;
default:
break;
Expand Down
10 changes: 4 additions & 6 deletions mod/lesson/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1745,16 +1745,14 @@ function mod_lesson_get_completion_active_rule_descriptions($cm) {
foreach ($cm->customdata['customcompletionrules'] as $key => $val) {
switch ($key) {
case 'completionendreached':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completionendreached_desc', 'lesson', $val);
}
$descriptions[] = get_string('completionendreached_desc', 'lesson', $val);
break;
case 'completiontimespent':
if (empty($val)) {
continue;
if (!empty($val)) {
$descriptions[] = get_string('completiontimespentdesc', 'lesson', format_time($val));
}
$descriptions[] = get_string('completiontimespentdesc', 'lesson', format_time($val));
break;
default:
break;
Expand Down
Loading

0 comments on commit f8e364e

Please sign in to comment.