public function QuizQuestionResponse::getReportFormScore in Quiz 7.5
Same name and namespace in other branches
- 6.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::getReportFormScore()
- 7.6 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::getReportFormScore()
- 7 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::getReportFormScore()
- 7.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::getReportFormScore()
Implementation of getReportFormScore().
See also
QuizQuestionResponse::getReportFormScore()
1 call to QuizQuestionResponse::getReportFormScore()
- QuizQuestionResponse::getReportForm in question_types/
quiz_question/ quiz_question.core.inc - Creates the report form for the admin pages, and for when a user gets feedback after answering questions.
File
- question_types/
quiz_question/ quiz_question.core.inc, line 873 - Classes used in the Quiz Question module.
Class
- QuizQuestionResponse
- Each question type must store its own response data and be able to calculate a score for that data.
Code
public function getReportFormScore() {
$score = $this
->isEvaluated() ? $this
->getScore() : '';
return array(
'#title' => 'Enter score',
'#type' => 'textfield',
'#default_value' => $score,
'#size' => 3,
'#attributes' => array(
'class' => array(
'quiz-report-score',
),
),
'#element_validate' => array(
'element_validate_integer',
),
'#required' => TRUE,
'#field_suffix' => '/ ' . $this
->getMaxScore(),
);
}