mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-76112-master' of https://github.com/marinaglancy/moodle
This commit is contained in:
commit
7e6d32d7c2
@ -68,7 +68,7 @@ class filetypes_util {
|
||||
|
||||
// Turn string into a list.
|
||||
if (!is_array($types)) {
|
||||
$types = preg_split('/[\s,;:"\']+/', $types, null, PREG_SPLIT_NO_EMPTY);
|
||||
$types = preg_split('/[\s,;:"\']+/', $types, -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
// Fix whitespace and normalize the syntax a bit.
|
||||
|
@ -116,7 +116,7 @@ class messageinbound_test extends \advanced_testcase {
|
||||
$content = file_get_contents($file->getRealPath());
|
||||
$content = preg_replace("#\r\n#", "\n", $content);
|
||||
$tokens = preg_split('#(?:^|\n*)----([A-Z]+)----\n#', $content,
|
||||
null, PREG_SPLIT_DELIM_CAPTURE);
|
||||
-1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$sections = array(
|
||||
// Key => Required.
|
||||
'FULLSOURCE' => true,
|
||||
|
@ -453,7 +453,7 @@ class workshop {
|
||||
}
|
||||
|
||||
if (!is_array($extensions)) {
|
||||
$extensions = preg_split('/[\s,;:"\']+/', $extensions, null, PREG_SPLIT_NO_EMPTY);
|
||||
$extensions = preg_split('/[\s,;:"\']+/', $extensions, -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
foreach ($extensions as $i => $extension) {
|
||||
|
@ -182,7 +182,7 @@ abstract class qtype_gapselect_base extends question_type {
|
||||
// Break up the question text, and store the fragments, places and right answers.
|
||||
|
||||
$bits = preg_split('/\[\[(\d+)]]/', $question->questiontext,
|
||||
null, PREG_SPLIT_DELIM_CAPTURE);
|
||||
-1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$question->textfragments[0] = array_shift($bits);
|
||||
$i = 1;
|
||||
|
||||
|
@ -281,7 +281,7 @@ class qtype_multianswer extends question_type {
|
||||
parent::initialise_question_instance($question, $questiondata);
|
||||
|
||||
$bits = preg_split('/\{#(\d+)\}/', $question->questiontext,
|
||||
null, PREG_SPLIT_DELIM_CAPTURE);
|
||||
-1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$question->textfragments[0] = array_shift($bits);
|
||||
$i = 1;
|
||||
while (!empty($bits)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user