mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
In shortanswers you can now use \* (ie slash asterisk) to mean a real asterisk
Normally the asterisk is a wildcard
This commit is contained in:
parent
191ad6873c
commit
8c0f49667f
@ -1672,9 +1672,10 @@ function quiz_grade_attempt_question_result($question,
|
||||
|
||||
$potentialgrade = (float)$answer->fraction * $question->grade;
|
||||
|
||||
if ($potentialgrade >= $grade
|
||||
and (strpos(' '.$answer->answer, '*'))) {
|
||||
$answer->answer = eregi_replace('\*','.*',$answer->answer);
|
||||
if ($potentialgrade >= $grade and (strpos(' '.$answer->answer, '*'))) {
|
||||
$answer->answer = str_replace('\*','@@@@@@',$answer->answer);
|
||||
$answer->answer = str_replace('*','.*',$answer->answer);
|
||||
$answer->answer = str_replace('@@@@@@', '\*',$answer->answer);
|
||||
if (eregi('^'.$answer->answer.'$', $question->answer)) {
|
||||
$feedback[0] = $answer->feedback;
|
||||
$grade = $potentialgrade;
|
||||
|
Loading…
x
Reference in New Issue
Block a user