4require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintAbstractGUI.php';
 
    5require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintTracking.php';
 
   68                $nextClass = 
$ilCtrl->getNextClass($this);
 
   72                        case 'ilasshintpagegui':
 
   74                                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintPageObjectCommandForwarder.php';
 
   77                                $forwarder->forward();
 
   97                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsTableGUI.php';
 
   99                $questionHintList = $this->questionHintTracking->getRequestedHintsList();
 
  102                                $this->questionOBJ, $questionHintList, $this, self::CMD_SHOW_LIST
 
  120                if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
 
  125                $isRequested = $this->questionHintTracking->isRequested((
int)
$_GET[
'hintId']);
 
  129                        throw new ilTestException(
'hint with given id is not yet requested for given testactive and testpass');
 
  134                require_once 
'Services/Utilities/classes/class.ilUtil.php';
 
  135                require_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
  136                require_once 
'Services/Form/classes/class.ilNonEditableValueGUI.php';
 
  142                $form->setFormAction(
$ilCtrl->getFormAction($this));
 
  144                $form->setTableWidth(
'100%');
 
  146                $form->setTitle(sprintf(
 
  147                                $lng->txt(
'tst_question_hints_form_header_edit'),
 
  148                                $questionHint->getIndex(),
 
  149                                $this->questionOBJ->getTitle()
 
  152                $form->addCommandButton(self::CMD_BACK_TO_QUESTION, 
$lng->txt(
'tst_question_hints_back_to_question'));
 
  154                $numExistingRequests = $this->questionHintTracking->getNumExistingRequests();
 
  156                if($numExistingRequests > 1)
 
  158                        $form->addCommandButton(self::CMD_SHOW_LIST, 
$lng->txt(
'button_show_requested_question_hints'));
 
  163                $nonEditableHintText = 
new ilNonEditableValueGUI(
$lng->txt(
'tst_question_hints_form_label_hint_text'), 
'hint_text', 
true);
 
  165                $form->addItem($nonEditableHintText);
 
  169                $nonEditableHintPoints = 
new ilNonEditableValueGUI(
$lng->txt(
'tst_question_hints_form_label_hint_points'), 
'hint_points');
 
  170                $nonEditableHintPoints->setValue($questionHint->getPoints());
 
  171                $form->addItem($nonEditableHintPoints);
 
  190                        $nextRequestableHint = $this->questionHintTracking->getNextRequestableHint();
 
  194                        $ilCtrl->redirect($this, self::CMD_BACK_TO_QUESTION);
 
  197                require_once 
'Services/Utilities/classes/class.ilConfirmationGUI.php';
 
  202                                $ilCtrl->getFormAction($this), 
"hintId={$nextRequestableHint->getId()}" 
  205                $confirmation->setFormAction($formAction);
 
  207                $confirmation->setConfirm(
$lng->txt(
'tst_question_hints_confirm_request'), self::CMD_PERFORM_REQUEST);
 
  208                $confirmation->setCancel(
$lng->txt(
'tst_question_hints_cancel_request'), self::CMD_BACK_TO_QUESTION);
 
  210                $confirmation->setHeaderText(sprintf(
 
  211                                $lng->txt(
'tst_question_hints_request_confirmation'),
 
  212                                $nextRequestableHint->getIndex(),
 
  213                                $nextRequestableHint->getPoints()
 
  230                if( !isset(
$_GET[
'hintId']) || !(
int)
$_GET[
'hintId'] )
 
  237                        $nextRequestableHint = $this->questionHintTracking->getNextRequestableHint();
 
  241                        $ilCtrl->redirect($this, self::CMD_BACK_TO_QUESTION);
 
  244                if( $nextRequestableHint->getId() != (
int)
$_GET[
'hintId'] )
 
  246                        throw new ilTestException(
'given hint id does not relate to the next requestable hint');
 
  249                $this->questionHintTracking->storeRequest($nextRequestableHint);
 
  266                $ilCtrl->redirect($this->parentGUI, $this->parentCMD);
 
  282                        $tpl->setBodyClass(
'kiosk');
 
  283                        $tpl->setAddFooter(
false);
 
  286                                        'CONTENT', 
'content', 
'tpl.il_tst_question_hints_kiosk_page.html', 
'Modules/TestQuestionPool' 
  289                        $tpl->setVariable(
'KIOSK_HEAD', $this->parentGUI->getKioskHead());
 
  291                        $tpl->setVariable(
'KIOSK_CONTENT', $content);
 
  295                        $tpl->setContent($content);
 
  321                if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
 
  323                        $ilCtrl->setParameterByClass(
'ilasshintpagegui', 
'hint_id', $hintId);
 
  324                        $linkTarget = 
$ilCtrl->getLinkTargetByClass(
'ilAssHintPageGUI', 
'', 
'', 
false, $xmlStyle);
 
  328                        $ilCtrl->setParameter($this, 
'hintId', $hintId);
 
  329                        $linkTarget = 
$ilCtrl->getLinkTarget($this, self::CMD_SHOW_HINT, 
'', 
false, $xmlStyle); 
 
Basic GUI class for assessment questions.
const PRESENTATION_MODE_REQUEST
presentation mode for requesting
const CMD_CONFIRM_REQUEST
__construct($parentGUI, $parentCMD, assQuestionGUI $questionGUI, $questionHintTracking)
Constructor.
getHintPresentationLinkTarget($hintId, $xmlStyle=true)
returns the link target for hint request presentation
performRequestCmd()
Performs a hint request and invokes the (re-)saving the question solution.
confirmRequestCmd()
shows a confirmation screen for a hint request
const CMD_PERFORM_REQUEST
populateContent($content)
populates the rendered questin hint relating output content to global template depending on possibly ...
showListCmd()
shows the list of allready requested hints
const CMD_SHOW_LIST
command constants
backToQuestionCmd()
gateway command method to jump back to test session output
executeCommand()
Execute Command.
const CMD_BACK_TO_QUESTION
showHintCmd()
shows an allready requested hint
static getInstanceById($hintId)
creates a hint object instance, loads the persisted hint dataset identified by passed hint id from da...
Confirmation screen class.
This class represents a non editable value in a property form.
Base Exception for all Exceptions relating to Modules/Test.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static prepareTextareaOutput($txt_output, $prepare_for_latex_output=FALSE, $omitNl2BrWhenTextArea=false)
Prepares a string for a text area output where latex code may be in it If the text is HTML-free,...
static redirect($a_script)
http redirect to other script