53 $questionInstance = $DIC->question()->getQuestionInstance($questionId);
54 $questionPresentationGUI = $DIC->question()->getQuestionPresentationInstance($questionInstance);
56 $questionNavigationAware;
57 $questionPresentationGUI->setQuestionNavigation($questionNavigationAware);
59 $questionPresentationGUI->setRenderPurpose(ilAsqQuestionPresentation::RENDER_PURPOSE_PLAYBACK);
61 if ($participantSolutionLocked =
false) {
62 $renderer = $questionPresentationGUI->getSolutionPresentation($participantSolution);
64 $renderer = $questionPresentationGUI->getQuestionPresentation($participantSolution);
67 $playerQstPageHTML = $renderer->getContent();
73 if ($showFeedbacks =
true && !$participantSolution->isEmpty()) {
74 $genericFeedbackRenderer = $questionPresentationGUI->getGenericFeedbackOutput($participantSolution);
75 $playerQstPageHTML .= $genericFeedbackRenderer->getContent();
77 $specificFeedbackRenderer = $questionPresentationGUI->getSpecificFeedbackOutput($participantSolution);
78 $playerQstPageHTML .= $specificFeedbackRenderer->getContent();
85 if ($showBestSolution =
true) {
86 $renderer = $questionPresentationGUI->getSolutionPresentation(
87 $questionInstance->getBestSolution()
90 $playerQstPageHTML .= $renderer->getContent();
128 $serverRequestObject;
142 $participantSolution->initFromServerRequest($serverRequestObject);
149 $questionInstance = $DIC->question()->getQuestionInstance($questionId);
151 $resultCalculator = $DIC->question()->getResultCalculator($questionInstance, $solutionInstance);
153 $resultInstance = $resultCalculator->calculate();
160 $reachedPoints = $resultInstance->getPoints();
163 $isCorrect = $resultInstance->isCorrect();
185 return $DIC->question()->getQuestionSolutionInstance($questionId, $solutionId);
188 return $DIC->question()->getEmptyQuestionSolutionInstance($questionId);
submitSolution()
With the presentation of an assessment question, this question also gets submitted having any solutio...
getParticipantSolution($questionId)
this method returns either an initialised solution object instance, or and empty one, depending on self managed test results (handled by a future ilTestResult)
When a component wants to integrate the assessment question service to present questions to users in ...
showQuestion()
When presenting an assessment question to a user, the ilAsqQuestionPresentation provides the interfac...