public function ClozeResponse::getReportFormScore in Cloze 6
Same name and namespace in other branches
- 7 cloze.classes.inc \ClozeResponse::getReportFormScore()
Implementation of getReportFormScore
See also
QuizQuestionResponse#getReportFormScore($showpoints, $showfeedback, $allow_scoring)
File
- ./
cloze.classes.inc, line 329 - The main classes for the short answer question type.
Class
- ClozeResponse
- Extension of QuizQuestionResponse
Code
public function getReportFormScore($showfeedback = TRUE, $showpoints = TRUE, $allow_scoring = FALSE) {
$score = $this
->isEvaluated() ? $this
->getScore() : '?';
if (quiz_access_to_score() && $allow_scoring && $this->question->correct_answer_evaluation == ShortAnswerQuestion::ANSWER_MANUAL) {
return array(
'#type' => 'textfield',
'#default_value' => $score,
'#size' => 3,
'#maxlength' => 3,
'#attributes' => array(
'class' => 'quiz-report-score',
),
);
}
else {
return array(
'#type' => 'markup',
'#value' => $score,
);
}
}