mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-46852 mod_lesson: More accurate comparison of shortanswer answers
This commit is contained in:
parent
f0640eb7d2
commit
69866e0377
1 changed files with 2 additions and 1 deletions
|
@ -78,7 +78,8 @@ class lesson_page_type_shortanswer extends lesson_page {
|
||||||
$answers = $this->get_answers();
|
$answers = $this->get_answers();
|
||||||
foreach ($answers as $answer) {
|
foreach ($answers as $answer) {
|
||||||
$i++;
|
$i++;
|
||||||
$expectedanswer = $answer->answer; // for easier handling of $answer->answer
|
// Applying PARAM_TEXT as it is applied to the answer submitted by the user.
|
||||||
|
$expectedanswer = clean_param($answer->answer, PARAM_TEXT);
|
||||||
$ismatch = false;
|
$ismatch = false;
|
||||||
$markit = false;
|
$markit = false;
|
||||||
$useregexp = ($this->qoption);
|
$useregexp = ($this->qoption);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue