public function LongAnswerResponse::getReportFormScore in OG Quiz 7
Implementation of getReportFormScore
Overrides QuizQuestionResponse::getReportFormScore
See also
QuizQuestionResponse#getReportFormScore($showpoints, $showfeedback, $allow_scoring)
File
- includes/
og_long_answer.php, line 387 - Long answer classes.
Class
- LongAnswerResponse
- Extension of QuizQuestionResponse
Code
public function getReportFormScore($showfeedback = TRUE, $showpoints = TRUE, $allow_scoring = FALSE) {
// The score will be shown as a questionmark if the question haven't been scored already
$score = $this
->isEvaluated() ? $this
->getScore() : '?';
// We show a textfield if the quiz shall be scored. Markup otherwise
if ($this
->quizContextAccessToScore() && $allow_scoring) {
return array(
'#type' => 'textfield',
'#default_value' => $score,
'#size' => 3,
'#maxlength' => 3,
'#attributes' => array(
'class' => array(
'quiz-report-score',
),
),
);
}
else {
return array(
'#markup' => $score,
);
}
}