mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Removed tabs from source.
This commit is contained in:
parent
c44ad6e93e
commit
134f2cc05a
@ -146,28 +146,28 @@ class question_shortanswer_qtype extends default_questiontype {
|
||||
$inputname = ' name="'.$nameprefix.'" ';
|
||||
|
||||
$feedback = '';
|
||||
$class = '';
|
||||
$feedbackimg = '';
|
||||
$class = '';
|
||||
$feedbackimg = '';
|
||||
|
||||
if ($options->feedback) {
|
||||
foreach($question->options->answers as $answer) {
|
||||
if ($this->test_response($question, $state, $answer)) {
|
||||
// Answer was correct or partially correct.
|
||||
if ($answer->fraction == 1) {
|
||||
$class = 'correct';
|
||||
$feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_green_big.gif" alt="'.get_string('correct', 'quiz').'" width="16" height="16" />';
|
||||
} else {
|
||||
$class = 'partiallycorrect';
|
||||
$feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_amber_big.gif" alt="'.get_string('partiallycorrect', 'quiz').'" width="16" height="16" />';
|
||||
}
|
||||
if ($answer->feedback) {
|
||||
if ($this->test_response($question, $state, $answer)) {
|
||||
// Answer was correct or partially correct.
|
||||
if ($answer->fraction == 1) {
|
||||
$class = 'correct';
|
||||
$feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_green_big.gif" alt="'.get_string('correct', 'quiz').'" width="16" height="16" />';
|
||||
} else {
|
||||
$class = 'partiallycorrect';
|
||||
$feedbackimg = '<img src="'.$CFG->pixpath.'/i/tick_amber_big.gif" alt="'.get_string('partiallycorrect', 'quiz').'" width="16" height="16" />';
|
||||
}
|
||||
if ($answer->feedback) {
|
||||
$feedback = format_text($answer->feedback, true, $formatoptions, $cmoptions->course);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
$class = 'incorrect';
|
||||
$feedbackimg = '<img src="'.$CFG->pixpath.'/i/cross_red_big.gif" alt="'.get_string('incorrect', 'quiz').'" width="16" height="16" />';
|
||||
}
|
||||
} else {
|
||||
$class = 'incorrect';
|
||||
$feedbackimg = '<img src="'.$CFG->pixpath.'/i/cross_red_big.gif" alt="'.get_string('incorrect', 'quiz').'" width="16" height="16" />';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user