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:
moodler 2004-03-12 13:03:51 +00:00
parent 191ad6873c
commit 8c0f49667f

View File

@ -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;