mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 22:50:19 +01:00
MDL-17183 "function 'question_get_real_state' fails when response is empty string" fixed regular expression
This commit is contained in:
parent
35f0660ab4
commit
91ec2c427a
@ -2710,7 +2710,7 @@ function get_filesdir_from_context($context){
|
||||
function question_get_real_state($state){
|
||||
$realstate = clone($state);
|
||||
$matches = array();
|
||||
if (!preg_match('|^random([0-9]+)-(.+)|', $state->answer, $matches)){
|
||||
if (!preg_match('|^random([0-9]+)-(.*)|', $state->answer, $matches)){
|
||||
notify(get_string('errorrandom', 'quiz_statistics'));
|
||||
return false;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user