ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
assQuestionGUI Class Reference

Basic GUI class for assessment questions. More...

+ Inheritance diagram for assQuestionGUI:
+ Collaboration diagram for assQuestionGUI:

Public Member Functions

 hasInlineFeedback ()
 
 addHeaderAction ()
 
 redrawHeaderAction ()
 
 getHeaderAction ()
 
 geCommentsPanelHTML ()
 
 executeCommand ()
 
 getType ()
 needed for page editor compliance More...
 
 getPresentationContext ()
 
 setPresentationContext (string $presentationContext)
 
 isTestPresentationContext ()
 
 isPreviousSolutionPrefilled ()
 
 setPreviousSolutionPrefilled (bool $previousSolutionPrefilled)
 
 getRenderPurpose ()
 
 setRenderPurpose (string $renderPurpose)
 
 isRenderPurposePrintPdf ()
 
 isRenderPurposePreview ()
 
 isRenderPurposeInputValue ()
 
 isRenderPurposePlayback ()
 
 isRenderPurposeDemoplay ()
 
 renderPurposeSupportsFormHtml ()
 
 getEditContext ()
 
 setEditContext (string $editContext)
 
 isAuthoringEditContext ()
 
 isAdjustmentEditContext ()
 
 setAdjustmentEditContext ()
 
 getNavigationGUI ()
 
 setNavigationGUI (?ilTestQuestionNavigationGUI $navigationGUI)
 
 setTaxonomyIds (array $taxonomyIds)
 
 getTaxonomyIds ()
 
 setTargetGui ($linkTargetGui)
 
 setTargetGuiClass ($targetGuiClass)
 
 getTargetGuiClass ()
 
 setQuestionHeaderBlockBuilder (\ilQuestionHeaderBlockBuilder $questionHeaderBlockBuilder)
 
 getQuestionHeaderBlockBuilder ()
 
 setQuestionActionCmd (string $questionActionCmd)
 
 getQuestionActionCmd ()
 
 assessment ()
 
 populateJavascriptFilesRequiredForWorkForm (ilGlobalTemplateInterface $tpl)
 
 getPresentationJavascripts ()
 
 getQuestionTemplate ()
 
 getILIASPage (string $html="")
 Returns the ILIAS Page around a question. More...
 
 outQuestionPage ($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
 
 cancel ()
 
 originalSyncForm (string $return_to="", string $return_to_feedback='')
 
 sync ()
 
 cancelSync ()
 
 saveEdit ()
 
 save ()
 
 saveReturn ()
 
 apply ()
 
 getContextPath ($cont_obj, int $a_endnode_id, int $a_startnode_id=1)
 get context path in content object tree More...
 
 setSequenceNumber (int $nr)
 
 getSequenceNumber ()
 
 setQuestionCount (int $a_question_count)
 
 getQuestionCount ()
 
 getErrorMessage ()
 
 setErrorMessage (string $errormessage)
 
 addErrorMessage (string $errormessage)
 
 outAdditionalOutput ()
 Why are you here? Some magic for plugins? More...
 
 getQuestionType ()
 
 getAsValueAttribute (string $a_value)
 
 addNewIdListener ($a_object, string $a_method, string $a_parameters="")
 Add a listener that is notified with the new question ID, when a new question is saved. More...
 
 callNewIdListeners (int $a_new_id)
 
 addQuestionFormCommandButtons (ilPropertyFormGUI $form)
 
 addBasicQuestionFormProperties (ilPropertyFormGUI $form)
 
 getGenericFeedbackOutput (int $active_id, ?int $pass)
 
 getGenericFeedbackOutputForCorrectSolution ()
 
 getGenericFeedbackOutputForIncorrectSolution ()
 
 getSpecificFeedbackOutput (array $userSolution)
 Returns the answer specific feedback for the question. More...
 
 outQuestionType ()
 
 suggestedsolution ()
 
 outSolutionExplorer ()
 
 saveSuggestedSolutionType ()
 
 cancelExplorer ()
 
 outPageSelector ()
 
 outChapterSelector ()
 
 outGlossarySelector ()
 
 linkChilds ()
 
 addPG ()
 
 addST ()
 
 addGIT ()
 
 isSaveCommand ()
 
 setQuestionTabs ()
 
 addTab_SuggestedSolution (ilTabsGUI $tabs, string $classname)
 
 getEditQuestionTabCommands ()
 
 getSolutionOutput ( $active_id, $pass=null, $graphicalOutput=false, $result_output=false, $show_question_only=true, $show_feedback=false, $show_correct_solution=false, $show_manual_scoring=false, $show_question_text=true)
 
 renderSolutionOutput (mixed $user_solutions, int $active_id, int $pass, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_autosave_title=false, bool $show_inline_feedback=false,)
 
 isAutosaveable ()
 
 getPreview ($show_question_only=false, $showInlineFeedback=false)
 
 outQuestionForTest (string $formaction, int $active_id, ?int $pass, bool $is_question_postponed=false, $user_post_solutions=false, bool $show_specific_inline_feedback=false)
 
 magicAfterTestOutput ()
 
 getTestOutput ( $active_id, $pass, $is_question_postponed, $user_post_solutions, $show_specific_inline_feedback)
 
 getFormEncodingType ()
 
 setPreviewSession (ilAssQuestionPreviewSession $previewSession)
 
 getPreviewSession ()
 
 showHints ()
 
 buildFocusAnchorHtml ()
 
 isAnswerFrequencyStatisticSupported ()
 
 getSubQuestionsIndex ()
 
 getAnswersFrequency ($relevantAnswers, $questionIndex)
 
 getAnswerFrequencyTableGUI ($parentGui, $parentCmd, $relevantAnswers, $questionIndex)
 
 prepareReprintableCorrectionsForm (ilPropertyFormGUI $form)
 
 populateCorrectionsFormProperties (ilPropertyFormGUI $form)
 
 saveCorrectionsFormProperties (ilPropertyFormGUI $form)
 
 isInLearningModuleContext ()
 
 setInLearningModuleContext (bool $flag)
 
 getAutoSavedSolutionOutput (int $active_id, int $pass, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_autosave_title=false, bool $show_inline_feedback=false)
 

Static Public Member Functions

static _getQuestionGUI (string $question_type='', int $question_id=-1)
 Creates a question gui representation and returns the alias to the question gui. More...
 
static _getGUIClassNameForId ($a_q_id)
 
static _getClassNameForQType ($q_type)
 
static getCommandsFromClassConstants (string $guiClassName, string $cmdConstantNameBegin='CMD_')
 
static prepareTextareaOutput (?string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false)
 Prepares a string for a text area output where latex code may be in it If the text is HTML-free, CHR(13) will be converted to a line break. More...
 

Data Fields

const FORM_MODE_EDIT = 'edit'
 
const FORM_MODE_ADJUST = 'adjust'
 
const FORM_ENCODING_URLENCODE = 'application/x-www-form-urlencoded'
 
const FORM_ENCODING_MULTIPART = 'multipart/form-data'
 
const CORRECTNESS_NOT_OK = 0
 
const CORRECTNESS_MOSTLY_OK = 1
 
const CORRECTNESS_OK = 2
 
const ALLOWED_PLAIN_TEXT_TAGS = "<em>, <strong>"
 sk - 12.05.2023: This const is also used in ilKprimChoiceWizardInputGUI. More...
 
const SESSION_PREVIEW_DATA_BASE_INDEX = 'ilAssQuestionPreviewAnswers'
 
assQuestion $object
 
ilGlobalPageTemplate $tpl
 
ilLanguage $lng
 
 $error
 
string $errormessage
 
int $sequence_no
 sequence number in test More...
 
int $question_count
 question count in test More...
 
const PRESENTATION_CONTEXT_TEST = 'pContextTest'
 
const PRESENTATION_CONTEXT_RESULTS = 'pContextResults'
 
const RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'
 
const RENDER_PURPOSE_DEMOPLAY = 'renderPurposeDemoplay'
 
const RENDER_PURPOSE_PREVIEW = 'renderPurposePreview'
 
const RENDER_PURPOSE_PRINT_PDF = 'renderPurposePrintPdf'
 
const RENDER_PURPOSE_INPUT_VALUE = 'renderPurposeInputValue'
 
const EDIT_CONTEXT_AUTHORING = 'authoring'
 
const EDIT_CONTEXT_ADJUSTMENT = 'adjustment'
 

Protected Member Functions

 hasSpecialQuestionCommands ()
 
 writePostData (bool $always=false)
 Evaluates a posted edit form and writes the form data in the question object. More...
 
 renderEditForm (ilPropertyFormGUI $form)
 
 getUseUnchangedAnswerCheckboxHtml ()
 
 getPreviousSolutionProvidedMessage ()
 
 getPreviousSolutionConfirmationCheckboxHtml ()
 
 addNumberOfTriesToFormIfNecessary (ilPropertyFormGUI $form)
 
 saveTaxonomyAssignments ()
 
 populateTaxonomyFormSection (ilPropertyFormGUI $form)
 
 genericFeedbackOutputBuilder (string $feedback_correct, string $feedback_incorrect, int $active_id, ?int $pass)
 
 getTypeOptions ()
 
 createSuggestedSolutionLinkingTo (string $type, string $target)
 
 setDefaultTabs (ilTabsGUI $ilTabs)
 
 setQuestionSpecificTabs (ilTabsGUI $ilTabs)
 
 getBasicEditQuestionTabCommands ()
 
 getAdditionalEditQuestionCommands ()
 
 addTab_QuestionFeedback (ilTabsGUI $tabs)
 
 addTab_QuestionHints (ilTabsGUI $tabs)
 
 addTab_Question (ilTabsGUI $tabsGUI)
 
 hasCorrectSolution ($activeId, $passIndex)
 
 writeQuestionGenericPostData ()
 
 completeTestOutputFormAction ($formAction, $active_id, $pass)
 
 addBackTab (ilTabsGUI $ilTabs)
 
 buildBasicEditFormObject ()
 
 escapeTemplatePlaceholders (string $text)
 
 buildEditForm ()
 
 generateCorrectnessIconsForCorrectness (int $correctness)
 
 getSuggestedSolutionsRepo ()
 
 cleanupAnswerText (array $answer_text, bool $is_rte)
 sk - 12.05.2023: This is one more of those that we need, but don't want. More...
 
 addSaveOnEnterOnLoadCode ()
 

Protected Attributes

const SUGGESTED_SOLUTION_COMMANDS_CANCEL = 'cancelSuggestedSolution'
 
const SUGGESTED_SOLUTION_COMMANDS_SAVE = 'saveSuggestedSolution'
 
const SUGGESTED_SOLUTION_COMMANDS_DEFAULT = 'suggestedsolution'
 
const HAS_SPECIAL_QUESTION_COMMANDS = false
 
ilLogger $logger
 
ILIAS TestQuestionPool QuestionInfoService $questioninfo
 
ILIAS Notes GUIService $notes_gui
 
ilCtrl $ctrl
 
Refinery $refinery
 
ilPropertyFormGUI $editForm
 
ILIAS TestQuestionPool InternalRequestService $request
 
bool $parent_type_is_lm = false
 
assQuestionSuggestedSolutionsDatabaseRepository $suggestedsolution_repo = null
 

Private Member Functions

 saveQuestionToTest ()
 

Private Attributes

const RETURN_AFTER_EXISTING_WITH_ORIGINAL_SAVE = -1
 
const RETURN_AFTER_EXISTING_SAVE = 0
 
 $ui
 
ilObjectDataCache $ilObjDataCache
 
ilHelpGUI $ilHelp
 
ilAccessHandler $access
 
ilObjUser $ilUser
 
ilTabsGUI $ilTabs
 
ilRbacSystem $rbacsystem
 
ilTree $tree
 
ilDBInterface $db
 
ilComponentRepository $component_repository
 
array $new_id_listeners = array()
 
int $new_id_listener_cnt = 0
 
 $previewSession
 
 $taxonomyIds = []
 
 $targetGuiClass = null
 
string $questionActionCmd = 'handleQuestionAction'
 
ilQuestionHeaderBlockBuilder $questionHeaderBlockBuilder
 
ilTestQuestionNavigationGUI $navigationGUI = null
 
string $presentationContext = null
 
string $renderPurpose = self::RENDER_PURPOSE_PLAYBACK
 
string $editContext = self::EDIT_CONTEXT_AUTHORING
 
bool $previousSolutionPrefilled = false
 

Detailed Description

Basic GUI class for assessment questions.

The assQuestionGUI class encapsulates basic GUI functions for assessment questions.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Björn Heyser bheys.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 33 of file class.assQuestionGUI.php.

Member Function Documentation

◆ _getClassNameForQType()

static assQuestionGUI::_getClassNameForQType (   $q_type)
static
Deprecated:

Definition at line 495 of file class.assQuestionGUI.php.

Referenced by _getGUIClassNameForId().

495  : string
496  {
497  return $q_type . "GUI";
498  }
+ Here is the caller graph for this function:

◆ _getGUIClassNameForId()

static assQuestionGUI::_getGUIClassNameForId (   $a_q_id)
static
Deprecated:

Definition at line 484 of file class.assQuestionGUI.php.

References $DIC, and _getClassNameForQType().

Referenced by ilQuestionBrowserTableGUI\fillRow(), and ilObjQuestionPoolGUI\getQueryParamInt().

484  : string
485  {
486  global $DIC;
487  $q_type = $DIC->testQuestionPool()->questionInfo()->getQuestionType($a_q_id);
488  $class_name = assQuestionGUI::_getClassNameForQType($q_type);
489  return $class_name;
490  }
global $DIC
Definition: feed.php:28
static _getClassNameForQType($q_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getQuestionGUI()

static assQuestionGUI::_getQuestionGUI ( string  $question_type = '',
int  $question_id = -1 
)
static

Creates a question gui representation and returns the alias to the question gui.

Definition at line 453 of file class.assQuestionGUI.php.

References $DIC, $ilDB, and assQuestion\getFeedbackClassNameByQuestionType().

Referenced by ilObjQuestionPoolGUI\addLocatorItems(), ilTestExpressPageObjectGUI\addPageOfQuestions(), ilObjQuestionPoolGUI\createQuestionForTestObject(), ilObjQuestionPoolGUI\createQuestionObject(), ilPCQuestionGUI\edit(), ilTestExpressPageObjectGUI\executeCommand(), ilQuestionEditGUI\executeCommand(), ilObjTestGUI\executeCommand(), ilPageObjectGUI\executeCommand(), ilQuestionExporter\exportQuestion(), ilObjAssessmentFolder\fetchScoringAdjustableTypes(), ilAssQuestionPageCommandForwarder\forward(), ilPCQuestion\getJavascriptFiles(), ilObjQuestionPoolGUI\getQueryParamInt(), ilTestExpressPageObjectGUI\handleToolbarCommand(), ilPCQuestion\modifyPageContentPostXsl(), ilAssQuestionSkillAssignmentsGUI\saveSkillQuestionAssignmentPropertiesFormCmd(), ilObjQuestionPoolGUI\setTitleAndDescription(), and ilAssQuestionSkillAssignmentsGUI\showSkillQuestionAssignmentPropertiesFormCmd().

453  : ?assQuestionGUI
454  {
455  global $DIC;
456  $ilCtrl = $DIC['ilCtrl'];
457  $ilDB = $DIC['ilDB'];
458  $lng = $DIC['lng'];
459 
460  if (($question_type === '') && ($question_id > 0)) {
461  $question_type = $DIC->testQuestionPool()->questionInfo()->getQuestionType($question_id);
462  }
463 
464  if ($question_type === '') {
465  return null;
466  }
467 
468  $question_type_gui = $question_type . 'GUI';
469  $question = new $question_type_gui();
470 
471  $feedbackObjectClassname = assQuestion::getFeedbackClassNameByQuestionType($question_type);
472  $question->object->feedbackOBJ = new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
473 
474  if ($question_id > 0) {
475  $question->object->loadFromDb($question_id);
476  }
477 
478  return $question;
479  }
global $DIC
Definition: feed.php:28
Basic GUI class for assessment questions.
static getFeedbackClassNameByQuestionType(string $questionType)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addBackTab()

assQuestionGUI::addBackTab ( ilTabsGUI  $ilTabs)
protected

Definition at line 1854 of file class.assQuestionGUI.php.

References ilAssQuestionPreviewGUI\CMD_SHOW, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilTabsGUI\setBackTarget().

Referenced by setDefaultTabs(), and setQuestionTabs().

1854  : void
1855  {
1856  $this->ctrl->saveParameterByClass(ilAssQuestionPreviewGUI::class, 'prev_qid');
1857  $ilTabs->setBackTarget(
1858  $this->lng->txt('backtocallingpage'),
1859  $this->ctrl->getLinkTargetByClass(ilAssQuestionPreviewGUI::class, ilAssQuestionPreviewGUI::CMD_SHOW)
1860  );
1861  }
setBackTarget(string $a_title, string $a_target, string $a_frame="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addBasicQuestionFormProperties()

assQuestionGUI::addBasicQuestionFormProperties ( ilPropertyFormGUI  $form)

Definition at line 946 of file class.assQuestionGUI.php.

References $lifecycle, ilObjAdvancedEditing\_getUsedHTMLTags(), ilPropertyFormGUI\addItem(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_IPE, addNumberOfTriesToFormIfNecessary(), ilAssSelfAssessmentQuestionFormatter\getSelfAssessmentTags(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilTextAreaInputGUI\setValue().

Referenced by assKprimChoiceGUI\buildEditForm(), assImagemapQuestionGUI\buildEditForm(), assLongMenuGUI\buildEditForm(), assOrderingQuestionGUI\buildEditForm(), assTextQuestionGUI\editQuestion(), assOrderingHorizontalGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assNumericGUI\editQuestion(), assFileUploadGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assErrorTextGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), and assFormulaQuestionGUI\isSaveCommand().

946  : void
947  {
948  // title
949  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
950  $title->setMaxLength(100);
951  $title->setValue($this->object->getTitle());
952  $title->setRequired(true);
953  $form->addItem($title);
954 
955  if (!$this->object->getSelfAssessmentEditingMode()) {
956  // author
957  $author = new ilTextInputGUI($this->lng->txt("author"), "author");
958  $author->setValue($this->object->getAuthor());
959  $author->setMaxLength(512);
960  $author->setRequired(true);
961  $form->addItem($author);
962 
963  // description
964  $description = new ilTextInputGUI($this->lng->txt("description"), "comment");
965  $description->setValue($this->object->getComment());
966  $description->setRequired(false);
967  $description->setMaxLength(1000);
968  $form->addItem($description);
969  } else {
970  // author as hidden field
971  $hi = new ilHiddenInputGUI("author");
972  $author = ilLegacyFormElementsUtil::prepareFormOutput($this->object->getAuthor());
973  if (trim($author) == "") {
974  $author = "-";
975  }
976  $hi->setValue($author);
977  $form->addItem($hi);
978  }
979 
980  // lifecycle
981  $lifecycle = new ilSelectInputGUI($this->lng->txt('qst_lifecycle'), 'lifecycle');
982  $lifecycle->setOptions($this->object->getLifecycle()->getSelectOptions($this->lng));
983  $lifecycle->setValue($this->object->getLifecycle()->getIdentifier());
984  $form->addItem($lifecycle);
985 
986  // questiontext
987  $question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
988  $question->setValue($this->object->getQuestion());
989  $question->setRequired(true);
990  $question->setRows(10);
991  $question->setCols(80);
992 
993  if (!$this->object->getSelfAssessmentEditingMode()) {
994  if ($this->object->getAdditionalContentEditingMode() != assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_IPE) {
995  $question->setUseRte(true);
996  $question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
997  $question->addPlugin("latex");
998  $question->addButton("latex");
999  $question->addButton("pastelatex");
1000  $question->setRTESupport($this->object->getId(), "qpl", "assessment");
1001  }
1002  } else {
1004  $question->setUseTagsForRteOnly(false);
1005  }
1006  $form->addItem($question);
1007  $this->addNumberOfTriesToFormIfNecessary($form);
1008  }
const ADDITIONAL_CONTENT_EDITING_MODE_IPE
static getSelfAssessmentTags()
Get tags allowed in question tags in self assessment mode.
This class represents a selection list property in a property form.
static prepareFormOutput($a_str, bool $a_strip=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$lifecycle
This class represents a text area property in a property form.
addNumberOfTriesToFormIfNecessary(ilPropertyFormGUI $form)
static _getUsedHTMLTags(string $a_module="")
Returns an array of all allowed HTML tags for text editing.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addErrorMessage()

assQuestionGUI::addErrorMessage ( string  $errormessage)

Definition at line 889 of file class.assQuestionGUI.php.

References $errormessage.

Referenced by assFormulaQuestionGUI\checkInput(), and assFormulaQuestionGUI\writePostData().

889  : void
890  {
891  $this->errormessage .= ((strlen($this->errormessage)) ? "<br />" : "") . $errormessage;
892  }
+ Here is the caller graph for this function:

◆ addGIT()

assQuestionGUI::addGIT ( )

Definition at line 1588 of file class.assQuestionGUI.php.

References createSuggestedSolutionLinkingTo(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

1588  : void
1589  {
1590  $target = "il__git_" . $this->request->raw("git");
1591  $this->createSuggestedSolutionLinkingTo('git', $target);
1592  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1593  $this->ctrl->redirect($this, "suggestedsolution");
1594  }
createSuggestedSolutionLinkingTo(string $type, string $target)
+ Here is the call graph for this function:

◆ addHeaderAction()

assQuestionGUI::addHeaderAction ( )

Definition at line 172 of file class.assQuestionGUI.php.

172  : void
173  {
174  }

◆ addNewIdListener()

assQuestionGUI::addNewIdListener (   $a_object,
string  $a_method,
string  $a_parameters = "" 
)

Add a listener that is notified with the new question ID, when a new question is saved.

Definition at line 918 of file class.assQuestionGUI.php.

References $new_id_listener_cnt.

918  : void
919  {
921  $this->new_id_listeners[$cnt]["object"] = &$a_object;
922  $this->new_id_listeners[$cnt]["method"] = $a_method;
923  $this->new_id_listeners[$cnt]["parameters"] = $a_parameters;
924  $this->new_id_listener_cnt++;
925  }

◆ addNumberOfTriesToFormIfNecessary()

assQuestionGUI::addNumberOfTriesToFormIfNecessary ( ilPropertyFormGUI  $form)
protected

Definition at line 1010 of file class.assQuestionGUI.php.

References ilPropertyFormGUI\addItem(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by assClozeTestGUI\addBasicQuestionFormProperties(), and addBasicQuestionFormProperties().

1011  {
1012  if (!$this->object->getSelfAssessmentEditingMode()) {
1013  return;
1014  }
1015 
1016  $nr_tries = $this->object->getNrOfTries() ?? $this->object->getDefaultNrOfTries();
1017 
1018  if ($nr_tries < 1) {
1019  $nr_tries = "";
1020  }
1021 
1022  $ni = new ilNumberInputGUI($this->lng->txt("qst_nr_of_tries"), "nr_of_tries");
1023  $ni->setValue($nr_tries);
1024  $ni->setMinValue(0);
1025  $ni->setSize(5);
1026  $ni->setMaxLength(5);
1027  $form->addItem($ni);
1028  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPG()

assQuestionGUI::addPG ( )

Definition at line 1572 of file class.assQuestionGUI.php.

References createSuggestedSolutionLinkingTo(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

1572  : void
1573  {
1574  $target = "il__pg_" . $this->request->raw("pg");
1575  $this->createSuggestedSolutionLinkingTo('pg', $target);
1576  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1577  $this->ctrl->redirect($this, "suggestedsolution");
1578  }
createSuggestedSolutionLinkingTo(string $type, string $target)
+ Here is the call graph for this function:

◆ addQuestionFormCommandButtons()

assQuestionGUI::addQuestionFormCommandButtons ( ilPropertyFormGUI  $form)

◆ addSaveOnEnterOnLoadCode()

assQuestionGUI::addSaveOnEnterOnLoadCode ( )
protected

Definition at line 2077 of file class.assQuestionGUI.php.

Referenced by assFormulaQuestionGUI\callSpecialQuestionCommands(), executeCommand(), and assFormulaQuestionGUI\parseQuestion().

2077  : void
2078  {
2079  $this->tpl->addOnloadCode("
2080  let form = document.querySelector('#ilContentContainer form');
2081  let button = form.querySelector('input[name=\"cmd[save]\"]');
2082  if (form && button) {
2083  form.addEventListener('keydown', function (e) {
2084  if (e.key === 'Enter'
2085  && e.target.type !== 'textarea'
2086  && e.target.type !== 'submit'
2087  && e.target.type !== 'file'
2088  ) {
2089  e.preventDefault();
2090  form.requestSubmit(button);
2091  }
2092  })
2093  }
2094  ");
2095  }
+ Here is the caller graph for this function:

◆ addST()

assQuestionGUI::addST ( )

Definition at line 1580 of file class.assQuestionGUI.php.

References createSuggestedSolutionLinkingTo(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

1580  : void
1581  {
1582  $target = "il__st_" . $this->request->raw("st");
1583  $this->createSuggestedSolutionLinkingTo('st', $target);
1584  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1585  $this->ctrl->redirect($this, "suggestedsolution");
1586  }
createSuggestedSolutionLinkingTo(string $type, string $target)
+ Here is the call graph for this function:

◆ addTab_Question()

assQuestionGUI::addTab_Question ( ilTabsGUI  $tabsGUI)
protected

Definition at line 1722 of file class.assQuestionGUI.php.

References ilTabsGUI\addTarget(), ILIAS\Repository\ctrl(), and getSolutionOutput().

Referenced by setDefaultTabs().

1722  : void
1723  {
1724  $tabsGUI->addTarget(
1725  'edit_question',
1726  $this->ctrl->getLinkTargetByClass(
1727  array('ilrepositorygui','ilobjquestionpoolgui', get_class($this)),
1728  'editQuestion'
1729  ),
1730  'editQuestion',
1731  '',
1732  '',
1733  false
1734  );
1735  }
addTarget(string $a_text, string $a_link, $a_cmd="", $a_cmdClass="", string $a_frame="", bool $a_activate=false, bool $a_dir_text=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTab_QuestionFeedback()

assQuestionGUI::addTab_QuestionFeedback ( ilTabsGUI  $tabs)
protected

Definition at line 1692 of file class.assQuestionGUI.php.

References ilTabsGUI\addTarget(), ilAssQuestionFeedbackEditingGUI\CMD_SHOW, and ILIAS\Repository\ctrl().

Referenced by setDefaultTabs().

1692  : void
1693  {
1694  $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionFeedbackEditingGUI');
1695 
1696  $tabLink = $this->ctrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
1697 
1698  $tabs->addTarget('feedback', $tabLink, $tabCommands, $this->ctrl->getCmdClass(), '');
1699  }
addTarget(string $a_text, string $a_link, $a_cmd="", $a_cmdClass="", string $a_frame="", bool $a_activate=false, bool $a_dir_text=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTab_QuestionHints()

assQuestionGUI::addTab_QuestionHints ( ilTabsGUI  $tabs)
protected

Definition at line 1701 of file class.assQuestionGUI.php.

References ilTabsGUI\addTarget(), ilAssQuestionHintsGUI\CMD_SHOW_LIST, and ILIAS\Repository\ctrl().

Referenced by setDefaultTabs().

1701  : void
1702  {
1703  switch ($this->ctrl->getCmdClass()) {
1704  case 'ilassquestionhintsgui':
1705  $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintsGUI');
1706  break;
1707 
1708  case 'ilassquestionhintgui':
1709  $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintGUI');
1710  break;
1711 
1712  default:
1713 
1714  $tabCommands = array();
1715  }
1716 
1717  $tabLink = $this->ctrl->getLinkTargetByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
1718 
1719  $tabs->addTarget('tst_question_hints_tab', $tabLink, $tabCommands, $this->ctrl->getCmdClass(), '');
1720  }
addTarget(string $a_text, string $a_link, $a_cmd="", $a_cmdClass="", string $a_frame="", bool $a_activate=false, bool $a_dir_text=false)
const CMD_SHOW_LIST
command constants
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTab_SuggestedSolution()

assQuestionGUI::addTab_SuggestedSolution ( ilTabsGUI  $tabs,
string  $classname 
)

Definition at line 1662 of file class.assQuestionGUI.php.

References ilTabsGUI\addTarget(), and ILIAS\Repository\ctrl().

Referenced by setDefaultTabs().

1662  : void
1663  {
1664  if ($this->request->getQuestionId()) {
1665  $tabs->addTarget(
1666  "suggested_solution",
1667  $this->ctrl->getLinkTargetByClass($classname, "suggestedsolution"),
1668  array("suggestedsolution", "saveSuggestedSolution", "outSolutionExplorer", "cancel",
1669  "addSuggestedSolution","cancelExplorer", "linkChilds", "removeSuggestedSolution"
1670  ),
1671  $classname,
1672  ""
1673  );
1674  }
1675  }
addTarget(string $a_text, string $a_link, $a_cmd="", $a_cmdClass="", string $a_frame="", bool $a_activate=false, bool $a_dir_text=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply()

assQuestionGUI::apply ( )

Definition at line 830 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\object(), and writePostData().

830  : void
831  {
832  $this->writePostData();
833  $this->object->saveToDb();
834  $this->ctrl->setParameter($this, "q_id", $this->object->getId());
835  $this->editQuestion();
836  }
writePostData(bool $always=false)
Evaluates a posted edit form and writes the form data in the question object.
+ Here is the call graph for this function:

◆ assessment()

assQuestionGUI::assessment ( )

Definition at line 439 of file class.assQuestionGUI.php.

439  : void
440  {
441  $stats_table = new ilQuestionCumulatedStatisticsTableGUI($this, 'assessment', '', $this->object, $this->questioninfo);
442  $usage_table = new ilQuestionUsagesTableGUI($this, 'assessment', '', $this->object);
443 
444  $this->tpl->setContent(implode('<br />', array(
445  $stats_table->getHTML(),
446  $usage_table->getHTML()
447  )));
448  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ buildBasicEditFormObject()

assQuestionGUI::buildBasicEditFormObject ( )
protected

Definition at line 1876 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), getType(), and outQuestionType().

Referenced by assKprimChoiceGUI\buildEditForm(), assImagemapQuestionGUI\buildEditForm(), and assLongMenuGUI\buildEditForm().

1877  {
1878  $form = new ilPropertyFormGUI();
1879  $form->setFormAction($this->ctrl->getFormAction($this));
1880  $form->setId($this->getType());
1881  $form->setTitle($this->outQuestionType());
1882  $form->setTableWidth('100%');
1883  $form->setMultipart(true);
1884  return $form;
1885  }
getType()
needed for page editor compliance
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildEditForm()

assQuestionGUI::buildEditForm ( )
protected

Definition at line 1897 of file class.assQuestionGUI.php.

References $editForm.

Referenced by assMultipleChoiceGUI\editQuestion(), executeCommand(), and assMultipleChoiceGUI\writePostData().

1898  {
1899  $this->editQuestion(true); // TODO bheyser: editQuestion should be added to the abstract base class with a unified signature
1900  return $this->editForm;
1901  }
ilPropertyFormGUI $editForm
+ Here is the caller graph for this function:

◆ buildFocusAnchorHtml()

assQuestionGUI::buildFocusAnchorHtml ( )

Definition at line 1903 of file class.assQuestionGUI.php.

Referenced by assSingleChoiceGUI\getPreview(), assKprimChoiceGUI\getPreview(), assMultipleChoiceGUI\getPreview(), assMultipleChoiceGUI\renderSolutionOutput(), assSingleChoiceGUI\renderSolutionOutput(), and assKprimChoiceGUI\renderSolutionOutput().

1903  : string
1904  {
1905  return '<div id="focus"></div>';
1906  }
+ Here is the caller graph for this function:

◆ callNewIdListeners()

assQuestionGUI::callNewIdListeners ( int  $a_new_id)

Definition at line 927 of file class.assQuestionGUI.php.

References $new_id_listener_cnt.

Referenced by save(), and saveReturn().

927  : void
928  {
929  for ($i = 0; $i < $this->new_id_listener_cnt; $i++) {
930  $this->new_id_listeners[$i]["parameters"]["new_id"] = $a_new_id;
931  $object = &$this->new_id_listeners[$i]["object"];
932  $method = $this->new_id_listeners[$i]["method"];
933  $parameters = $this->new_id_listeners[$i]["parameters"];
934  $object->$method($parameters);
935  }
936  }
+ Here is the caller graph for this function:

◆ cancel()

assQuestionGUI::cancel ( )

Definition at line 598 of file class.assQuestionGUI.php.

References $_GET, ILIAS\Repository\ctrl(), and ilUtil\redirect().

598  : void
599  {
600  if ($this->request->raw("calling_test")) {
601  $_GET["ref_id"] = $this->request->raw("calling_test");
602  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $this->request->raw("calling_test"));
603  } elseif ($this->request->raw("test_ref_id")) {
604  $_GET["ref_id"] = $this->request->raw("test_ref_id");
605  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $this->request->raw("test_ref_id"));
606  } else {
607  if ($this->request->raw("q_id") > 0) {
608  $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $this->request->getQuestionId());
609  $this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
610  } else {
611  $this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
612  }
613  }
614  }
$_GET["client_id"]
Definition: webdav.php:30
static redirect(string $a_script)
+ Here is the call graph for this function:

◆ cancelExplorer()

assQuestionGUI::cancelExplorer ( )

Definition at line 1422 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl().

1422  : void
1423  {
1424  $this->ctrl->redirect($this, "suggestedsolution");
1425  }
+ Here is the call graph for this function:

◆ cancelSync()

assQuestionGUI::cancelSync ( )

Definition at line 658 of file class.assQuestionGUI.php.

References ilAssQuestionPreviewGUI\CMD_SHOW, ILIAS\Repository\ctrl(), ilTestExpressPage\getReturnToPageLink(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

658  : void
659  {
660  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
661 
662  if ($this->request->raw("return_to") !== '' && $this->request->raw("return_to") !== null) {
663  $this->ctrl->redirect($this, $this->request->raw("return_to"));
664  }
665  if ($this->request->raw('return_to_fb') !== '' && $this->request->raw('return_to_fb') !== null) {
666  $this->ctrl->redirectByClass(ilAssQuestionFeedbackEditingGUI::class, 'showFeedbackForm');
667  }
668  if ($this->request->raw('test_express_mode')) {
669  $this->ctrl->redirectToURL(ilTestExpressPage::getReturnToPageLink($this->object->getId()));
670  }
671  $this->ctrl->redirectByClass(ilAssQuestionPreviewGUI::class, ilAssQuestionPreviewGUI::CMD_SHOW);
672  }
static getReturnToPageLink($q_id=null)
+ Here is the call graph for this function:

◆ cleanupAnswerText()

assQuestionGUI::cleanupAnswerText ( array  $answer_text,
bool  $is_rte 
)
protected

sk - 12.05.2023: This is one more of those that we need, but don't want.

Deprecated:

Definition at line 2047 of file class.assQuestionGUI.php.

References ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), and ilArrayUtil\stripSlashesRecursive().

Referenced by assSingleChoiceGUI\writeAnswerSpecificPostData(), and assMultipleChoiceGUI\writeAnswerSpecificPostData().

2047  : array
2048  {
2049  if (!is_array($answer_text)) {
2050  return [];
2051  }
2052 
2053  if ($is_rte) {
2055  $answer_text,
2056  false,
2058  );
2059  }
2060 
2062  $answer_text,
2063  true,
2064  self::ALLOWED_PLAIN_TEXT_TAGS
2065  );
2066  }
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")
static _getUsedHTMLTagsAsString(string $a_module="")
Returns a string of all allowed HTML tags for text editing.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ completeTestOutputFormAction()

assQuestionGUI::completeTestOutputFormAction (   $formAction,
  $active_id,
  $pass 
)
protected

Definition at line 1829 of file class.assQuestionGUI.php.

Referenced by outQuestionForTest().

1831  {
1832  return $formAction;
1833  }
+ Here is the caller graph for this function:

◆ createSuggestedSolutionLinkingTo()

assQuestionGUI::createSuggestedSolutionLinkingTo ( string  $type,
string  $target 
)
protected

Definition at line 1537 of file class.assQuestionGUI.php.

References getSuggestedSolutionsRepo().

Referenced by addGIT(), addPG(), addST(), and linkChilds().

1538  {
1539  $repo = $this->getSuggestedSolutionsRepo();
1540  $question_id = $this->object->getId();
1541  $subquestion_index = ($this->request->raw("subquestion_index") > 0) ? $this->request->raw("subquestion_index") : 0;
1542 
1543  $solution = $repo->create($question_id, $type)
1544  ->withSubquestionIndex($subquestion_index)
1545  ->withInternalLink($target);
1546 
1547  $repo->update([$solution]);
1548  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ escapeTemplatePlaceholders()

assQuestionGUI::escapeTemplatePlaceholders ( string  $text)
protected

Definition at line 1892 of file class.assQuestionGUI.php.

Referenced by assTextSubsetGUI\getPreview(), assTextSubsetGUI\getTestOutput(), assClozeTestGUI\populateJSON(), and assTextSubsetGUI\renderSolutionOutput().

1892  : string
1893  {
1894  return str_replace(['{','}'], ['&#123;','&#125;'], $text);
1895  }
+ Here is the caller graph for this function:

◆ executeCommand()

assQuestionGUI::executeCommand ( )

Definition at line 208 of file class.assQuestionGUI.php.

References addSaveOnEnterOnLoadCode(), buildEditForm(), ILIAS\Repository\ctrl(), hasSpecialQuestionCommands(), ilUtil\stripSlashes(), and suggestedsolution().

209  {
210  $this->ilHelp->setScreenIdComponent('qpl');
211 
212  $next_class = $this->ctrl->getNextClass($this);
213 
214  switch ($next_class) {
215  case 'ilformpropertydispatchgui':
216  $form = $this->buildEditForm();
217  $form_prop_dispatch = new ilFormPropertyDispatchGUI();
218  $form_prop_dispatch->setItem($form->getItemByPostVar(ilUtil::stripSlashes($this->request->raw('postvar'))));
219  $this->ctrl->forwardCommand($form_prop_dispatch);
220  break;
221  default:
222  $cmd = $this->ctrl->getCmd('editQuestion');
223  switch ($cmd) {
224  case self::SUGGESTED_SOLUTION_COMMANDS_CANCEL:
225  case self::SUGGESTED_SOLUTION_COMMANDS_SAVE:
226  case self::SUGGESTED_SOLUTION_COMMANDS_DEFAULT:
227  $this->suggestedsolution();
228  break;
229  case 'saveSuggestedSolutionType':
230  case 'saveContentsSuggestedSolution':
231  case 'deleteSuggestedSolution':
232  case 'linkChilds':
233  case 'cancelExplorer':
234  case 'outSolutionExplorer':
235  case 'addST':
236  case 'addPG':
237  case 'addGIT':
238  $this->$cmd();
239  break;
240  case 'save':
241  case 'saveReturn':
242  case 'editQuestion':
243  $this->addSaveOnEnterOnLoadCode();
244  $this->$cmd();
245  break;
246  default:
247  if (method_exists($this, $cmd)) {
248  $this->$cmd();
249  return;
250  }
251  if ($this->hasSpecialQuestionCommands() === true) {
252  $this->callSpecialQuestionCommands($cmd);
253  }
254  }
255  }
256  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ geCommentsPanelHTML()

assQuestionGUI::geCommentsPanelHTML ( )

Definition at line 202 of file class.assQuestionGUI.php.

References ilCommentGUI\getListHTML(), and ILIAS\Repository\object().

202  : string
203  {
204  $comment_gui = new ilCommentGUI($this->object->getObjId(), $this->object->getId(), 'quest');
205  return $comment_gui->getListHTML();
206  }
getListHTML(bool $a_init_form=true)
Comment GUI.
+ Here is the call graph for this function:

◆ generateCorrectnessIconsForCorrectness()

assQuestionGUI::generateCorrectnessIconsForCorrectness ( int  $correctness)
protected

Definition at line 1945 of file class.assQuestionGUI.php.

References $path, ilUtil\getImagePath(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

Referenced by assLongMenuGUI\getSelectGapTemplate(), assFileUploadGUI\getSolutionOutput(), assImagemapQuestionGUI\getSolutionOutput(), assLongMenuGUI\getTextGapTemplate(), assOrderingHorizontalGUI\renderSolutionOutput(), assTextQuestionGUI\renderSolutionOutput(), assTextSubsetGUI\renderSolutionOutput(), assNumericGUI\renderSolutionOutput(), assMultipleChoiceGUI\renderSolutionOutput(), assErrorTextGUI\renderSolutionOutput(), assSingleChoiceGUI\renderSolutionOutput(), assMatchingQuestionGUI\renderSolutionOutput(), assKprimChoiceGUI\renderSolutionOutput(), assFormulaQuestionGUI\renderSolutionOutput(), and assClozeTestGUI\renderSolutionOutput().

1945  : string
1946  {
1947  switch ($correctness) {
1948  case self::CORRECTNESS_NOT_OK:
1949  $icon_name = 'standard/icon_not_ok.svg';
1950  $label = $this->lng->txt("answer_is_wrong");
1951  break;
1952  case self::CORRECTNESS_MOSTLY_OK:
1953  $icon_name = 'standard/icon_mostly_ok.svg';
1954  $label = $this->lng->txt("answer_is_not_correct_but_positive");
1955  break;
1956  case self::CORRECTNESS_OK:
1957  $icon_name = 'standard/icon_ok.svg';
1958  $label = $this->lng->txt("answer_is_right");
1959  break;
1960  default:
1961  return '';
1962  }
1963  $path = ilUtil::getImagePath($icon_name);
1964  $icon = $this->ui->factory()->symbol()->icon()->custom(
1965  $path,
1966  $label
1967  );
1968  return $this->ui->renderer()->render($icon);
1969  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$path
Definition: ltiservices.php:32
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ genericFeedbackOutputBuilder()

assQuestionGUI::genericFeedbackOutputBuilder ( string  $feedback_correct,
string  $feedback_incorrect,
int  $active_id,
?int  $pass 
)
protected

Definition at line 1096 of file class.assQuestionGUI.php.

Referenced by getGenericFeedbackOutput(), and assClozeTestGUI\getGenericFeedbackOutput().

1101  : string {
1102  if ($pass === null) {
1103  return '';
1104  }
1105  $reached_points = $this->object->calculateReachedPoints($active_id, $pass);
1106  $max_points = $this->object->getMaximumPoints();
1107  if ($reached_points == $max_points) {
1108  return $feedback_correct;
1109  }
1110 
1111  return $feedback_incorrect;
1112  }
+ Here is the caller graph for this function:

◆ getAdditionalEditQuestionCommands()

assQuestionGUI::getAdditionalEditQuestionCommands ( )
protected

Definition at line 1687 of file class.assQuestionGUI.php.

Referenced by getEditQuestionTabCommands().

1687  : array
1688  {
1689  return array();
1690  }
+ Here is the caller graph for this function:

◆ getAnswerFrequencyTableGUI()

assQuestionGUI::getAnswerFrequencyTableGUI (   $parentGui,
  $parentCmd,
  $relevantAnswers,
  $questionIndex 
)

Definition at line 1923 of file class.assQuestionGUI.php.

References getAnswersFrequency().

1924  {
1925  $table = new ilAnswerFrequencyStatisticTableGUI($parentGui, $parentCmd, $this->object);
1926  $table->setQuestionIndex($questionIndex);
1927  $table->setData($this->getAnswersFrequency($relevantAnswers, $questionIndex));
1928  $table->initColumns();
1929  return $table;
1930  }
getAnswersFrequency($relevantAnswers, $questionIndex)
+ Here is the call graph for this function:

◆ getAnswersFrequency()

assQuestionGUI::getAnswersFrequency (   $relevantAnswers,
  $questionIndex 
)

Definition at line 1918 of file class.assQuestionGUI.php.

Referenced by getAnswerFrequencyTableGUI().

1918  : array
1919  {
1920  return array();
1921  }
+ Here is the caller graph for this function:

◆ getAsValueAttribute()

assQuestionGUI::getAsValueAttribute ( string  $a_value)

Definition at line 904 of file class.assQuestionGUI.php.

904  : string
905  {
906  $result = "";
907  if (strlen($a_value)) {
908  $result = " value=\"$a_value\" ";
909  }
910  return $result;
911  }

◆ getAutoSavedSolutionOutput()

assQuestionGUI::getAutoSavedSolutionOutput ( int  $active_id,
int  $pass,
bool  $graphical_output = false,
bool  $result_output = false,
bool  $show_question_only = true,
bool  $show_feedback = false,
bool  $show_correct_solution = false,
bool  $show_manual_scoring = false,
bool  $show_question_text = true,
bool  $show_autosave_title = false,
bool  $show_inline_feedback = false 
)

Definition at line 2097 of file class.assQuestionGUI.php.

References renderSolutionOutput().

2109  : ?string {
2110  $autosave_solutions = $this->object->getSolutionValues($active_id, $pass, false);
2111  if ($autosave_solutions === []) {
2112  return null;
2113  }
2114  return $this->renderSolutionOutput(
2115  $autosave_solutions,
2116  $active_id,
2117  $pass,
2118  $graphical_output,
2119  $result_output,
2120  $show_question_only,
2121  $show_feedback,
2122  $show_correct_solution,
2123  $show_manual_scoring,
2124  $show_question_text,
2125  $show_autosave_title,
2126  $show_inline_feedback
2127  );
2128  }
renderSolutionOutput(mixed $user_solutions, int $active_id, int $pass, bool $graphical_output=false, bool $result_output=false, bool $show_question_only=true, bool $show_feedback=false, bool $show_correct_solution=false, bool $show_manual_scoring=false, bool $show_question_text=true, bool $show_autosave_title=false, bool $show_inline_feedback=false,)
+ Here is the call graph for this function:

◆ getBasicEditQuestionTabCommands()

assQuestionGUI::getBasicEditQuestionTabCommands ( )
protected

Definition at line 1682 of file class.assQuestionGUI.php.

Referenced by getEditQuestionTabCommands().

1682  : array
1683  {
1684  return array('editQuestion', 'save', 'saveEdit', 'originalSyncForm');
1685  }
+ Here is the caller graph for this function:

◆ getCommandsFromClassConstants()

static assQuestionGUI::getCommandsFromClassConstants ( string  $guiClassName,
string  $cmdConstantNameBegin = 'CMD_' 
)
static

Definition at line 1601 of file class.assQuestionGUI.php.

Referenced by ilPCQuestionGUI\setTabs().

1604  : array {
1605  $reflectionClass = new ReflectionClass($guiClassName);
1606 
1607  $commands = null;
1608 
1609  if ($reflectionClass instanceof ReflectionClass) {
1610  $commands = array();
1611 
1612  foreach ($reflectionClass->getConstants() as $constName => $constValue) {
1613  if (substr($constName, 0, strlen($cmdConstantNameBegin)) == $cmdConstantNameBegin) {
1614  $commands[] = $constValue;
1615  }
1616  }
1617  }
1618 
1619  return $commands;
1620  }
+ Here is the caller graph for this function:

◆ getContextPath()

assQuestionGUI::getContextPath (   $cont_obj,
int  $a_endnode_id,
int  $a_startnode_id = 1 
)

get context path in content object tree

Definition at line 841 of file class.assQuestionGUI.php.

References $path.

Referenced by outPageSelector().

841  : string
842  {
843  $path = "";
844 
845  $tmpPath = $cont_obj->getLMTree()->getPathFull($a_endnode_id, $a_startnode_id);
846 
847  // count -1, to exclude the learning module itself
848  for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
849  if ($path != "") {
850  $path .= " > ";
851  }
852 
853  $path .= $tmpPath[$i]["title"];
854  }
855 
856  return $path;
857  }
$path
Definition: ltiservices.php:32
+ Here is the caller graph for this function:

◆ getEditContext()

assQuestionGUI::getEditContext ( )

Definition at line 344 of file class.assQuestionGUI.php.

References $editContext.

Referenced by isAdjustmentEditContext(), and isAuthoringEditContext().

344  : string
345  {
346  return $this->editContext;
347  }
+ Here is the caller graph for this function:

◆ getEditQuestionTabCommands()

assQuestionGUI::getEditQuestionTabCommands ( )
final

Definition at line 1677 of file class.assQuestionGUI.php.

References getAdditionalEditQuestionCommands(), and getBasicEditQuestionTabCommands().

1677  : array
1678  {
1679  return array_merge($this->getBasicEditQuestionTabCommands(), $this->getAdditionalEditQuestionCommands());
1680  }
+ Here is the call graph for this function:

◆ getErrorMessage()

assQuestionGUI::getErrorMessage ( )

Definition at line 879 of file class.assQuestionGUI.php.

References $errormessage.

Referenced by assTextQuestionGUI\addSuggestedSolution(), and assFormulaQuestionGUI\suggestRange().

879  : string
880  {
881  return $this->errormessage;
882  }
+ Here is the caller graph for this function:

◆ getFormEncodingType()

assQuestionGUI::getFormEncodingType ( )

Definition at line 1849 of file class.assQuestionGUI.php.

Referenced by outQuestionForTest(), and ilTestPlayerAbstractGUI\showQuestionViewable().

1849  : string
1850  {
1851  return self::FORM_ENCODING_URLENCODE;
1852  }
+ Here is the caller graph for this function:

◆ getGenericFeedbackOutput()

assQuestionGUI::getGenericFeedbackOutput ( int  $active_id,
?int  $pass 
)
Parameters
int | null$passActive pass

Definition at line 1076 of file class.assQuestionGUI.php.

References genericFeedbackOutputBuilder(), ilObjTest\getManualFeedback(), ILIAS\Repository\object(), and ilLegacyFormElementsUtil\prepareTextareaOutput().

Referenced by assTextQuestionGUI\getAutoSavedSolutionOutput(), assFileUploadGUI\getSolutionOutput(), assImagemapQuestionGUI\getSolutionOutput(), ilTestPlayerAbstractGUI\populateGenericFeedbackBlock(), assOrderingHorizontalGUI\renderSolutionOutput(), assTextQuestionGUI\renderSolutionOutput(), assTextSubsetGUI\renderSolutionOutput(), assNumericGUI\renderSolutionOutput(), assMultipleChoiceGUI\renderSolutionOutput(), assErrorTextGUI\renderSolutionOutput(), assSingleChoiceGUI\renderSolutionOutput(), assLongMenuGUI\renderSolutionOutput(), assOrderingQuestionGUI\renderSolutionOutput(), assMatchingQuestionGUI\renderSolutionOutput(), assKprimChoiceGUI\renderSolutionOutput(), and assFormulaQuestionGUI\renderSolutionOutput().

1076  : string
1077  {
1078  $output = '';
1079  $manual_feedback = ilObjTest::getManualFeedback($active_id, $this->object->getId(), $pass);
1080  if ($manual_feedback !== '') {
1081  return $manual_feedback;
1082  }
1083 
1084  $correct_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true);
1085  $incorrect_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false);
1086  if ($correct_feedback . $incorrect_feedback !== '') {
1087  $output = $this->genericFeedbackOutputBuilder($correct_feedback, $incorrect_feedback, $active_id, $pass);
1088  }
1089 
1090  if ($this->object->isAdditionalContentEditingModePageObject()) {
1091  return $output;
1092  }
1094  }
genericFeedbackOutputBuilder(string $feedback_correct, string $feedback_incorrect, int $active_id, ?int $pass)
static getManualFeedback(int $active_id, int $question_id, ?int $pass)
Retrieves the feedback comment for a question in a test if it is finalized.
static prepareTextareaOutput(string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false)
Prepares a string for a text area output where latex code may be in it If the text is HTML-free...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGenericFeedbackOutputForCorrectSolution()

assQuestionGUI::getGenericFeedbackOutputForCorrectSolution ( )

Definition at line 1114 of file class.assQuestionGUI.php.

References ILIAS\Repository\object(), and ilLegacyFormElementsUtil\prepareTextareaOutput().

1114  : string
1115  {
1117  $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true),
1118  true
1119  );
1120  }
static prepareTextareaOutput(string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false)
Prepares a string for a text area output where latex code may be in it If the text is HTML-free...
+ Here is the call graph for this function:

◆ getGenericFeedbackOutputForIncorrectSolution()

assQuestionGUI::getGenericFeedbackOutputForIncorrectSolution ( )

Definition at line 1122 of file class.assQuestionGUI.php.

References getSpecificFeedbackOutput(), ILIAS\Repository\object(), and ilLegacyFormElementsUtil\prepareTextareaOutput().

1122  : string
1123  {
1125  $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false),
1126  true
1127  );
1128  }
static prepareTextareaOutput(string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false)
Prepares a string for a text area output where latex code may be in it If the text is HTML-free...
+ Here is the call graph for this function:

◆ getHeaderAction()

assQuestionGUI::getHeaderAction ( )

Definition at line 182 of file class.assQuestionGUI.php.

References ILIAS\Repository\access(), ILIAS\Repository\object(), ilCommonActionDispatcherGUI\setSubObject(), ilCommonActionDispatcherGUI\TYPE_REPOSITORY, and ILIAS\Repository\ui().

Referenced by redrawHeaderAction().

182  : string
183  {
184  $parentObjType = $this->ilObjDataCache->lookupType($this->object->getObjId());
185 
186  $dispatcher = new ilCommonActionDispatcherGUI(
188  $this->access,
189  $parentObjType,
190  $this->request->getRefId(),
191  $this->object->getObjId()
192  );
193 
194  $dispatcher->setSubObject("quest", $this->object->getId());
195 
196  $ha = $dispatcher->initHeaderAction();
197  $ha->enableComments(true, false);
198 
199  return $ha->getHeaderAction($this->ui->mainTemplate());
200  }
setSubObject(?string $sub_obj_type, ?int $sub_obj_id)
Set sub object attributes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getILIASPage()

assQuestionGUI::getILIASPage ( string  $html = "")

Returns the ILIAS Page around a question.

Definition at line 537 of file class.assQuestionGUI.php.

References ILIAS\Repository\object(), and ilPageObjectGUI\setQuestionHTML().

Referenced by assErrorTextGUI\generateQuestionOutput(), assTextQuestionGUI\getAutoSavedSolutionOutput(), assOrderingHorizontalGUI\getPreview(), assFileUploadGUI\getPreview(), assNumericGUI\getPreview(), assTextSubsetGUI\getPreview(), assSingleChoiceGUI\getPreview(), assLongMenuGUI\getPreview(), assTextQuestionGUI\getPreview(), assKprimChoiceGUI\getPreview(), assMultipleChoiceGUI\getPreview(), assOrderingQuestionGUI\getPreview(), assImagemapQuestionGUI\getPreview(), assMatchingQuestionGUI\getPreview(), assClozeTestGUI\getPreview(), assFormulaQuestionGUI\getPreview(), assFileUploadGUI\getSolutionOutput(), assImagemapQuestionGUI\getSolutionOutput(), assOrderingHorizontalGUI\getTestOutput(), assFileUploadGUI\getTestOutput(), assOrderingHorizontalGUI\renderSolutionOutput(), assTextQuestionGUI\renderSolutionOutput(), assTextSubsetGUI\renderSolutionOutput(), assNumericGUI\renderSolutionOutput(), assMultipleChoiceGUI\renderSolutionOutput(), assErrorTextGUI\renderSolutionOutput(), assSingleChoiceGUI\renderSolutionOutput(), assLongMenuGUI\renderSolutionOutput(), assOrderingQuestionGUI\renderSolutionOutput(), assMatchingQuestionGUI\renderSolutionOutput(), assKprimChoiceGUI\renderSolutionOutput(), assFormulaQuestionGUI\renderSolutionOutput(), and assClozeTestGUI\renderSolutionOutput().

537  : string
538  {
539  $page_gui = new ilAssQuestionPageGUI($this->object->getId());
540  $page_gui->setQuestionHTML(
541  [$this->object->getId() => $html]
542  );
543  $presentation = $page_gui->presentation();
544  $presentation = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $presentation);
545  return $presentation;
546  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setQuestionHTML(array $question_html)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNavigationGUI()

assQuestionGUI::getNavigationGUI ( )

Definition at line 369 of file class.assQuestionGUI.php.

References $navigationGUI.

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ getPresentationContext()

assQuestionGUI::getPresentationContext ( )

Definition at line 269 of file class.assQuestionGUI.php.

References $presentationContext.

Referenced by isTestPresentationContext().

269  : ?string
270  {
272  }
+ Here is the caller graph for this function:

◆ getPresentationJavascripts()

assQuestionGUI::getPresentationJavascripts ( )

Definition at line 507 of file class.assQuestionGUI.php.

Referenced by populateJavascriptFilesRequiredForWorkForm().

507  : array
508  {
509  return array();
510  }
+ Here is the caller graph for this function:

◆ getPreview()

assQuestionGUI::getPreview (   $show_question_only = false,
  $showInlineFeedback = false 
)
abstract

Referenced by writeQuestionGenericPostData().

+ Here is the caller graph for this function:

◆ getPreviewSession()

◆ getPreviousSolutionConfirmationCheckboxHtml()

assQuestionGUI::getPreviousSolutionConfirmationCheckboxHtml ( )
protected

Definition at line 591 of file class.assQuestionGUI.php.

References ilGlobalPageTemplate\get(), ILIAS\Repository\lng(), and ilGlobalPageTemplate\setVariable().

Referenced by outQuestionPage().

591  : string
592  {
593  $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
594  $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->lng->txt('use_previous_solution'));
595  return $tpl->get();
596  }
ilGlobalPageTemplate $tpl
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPreviousSolutionProvidedMessage()

assQuestionGUI::getPreviousSolutionProvidedMessage ( )
protected

Definition at line 586 of file class.assQuestionGUI.php.

References ILIAS\Repository\lng().

Referenced by outQuestionPage().

586  : string
587  {
588  return $this->lng->txt('use_previous_solution_advice');
589  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionActionCmd()

assQuestionGUI::getQuestionActionCmd ( )

◆ getQuestionCount()

assQuestionGUI::getQuestionCount ( )

Definition at line 874 of file class.assQuestionGUI.php.

References $question_count.

874  : int
875  {
876  return $this->question_count;
877  }
int $question_count
question count in test

◆ getQuestionHeaderBlockBuilder()

assQuestionGUI::getQuestionHeaderBlockBuilder ( )

Definition at line 410 of file class.assQuestionGUI.php.

References $questionHeaderBlockBuilder.

Referenced by ilTestPlayerAbstractGUI\populateInstantResponseModal(), ilTestPlayerAbstractGUI\showQuestionEditable(), and ilTestPlayerAbstractGUI\showQuestionViewable().

411  {
413  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilQuestionHeaderBlockBuilder $questionHeaderBlockBuilder
+ Here is the caller graph for this function:

◆ getQuestionTemplate()

assQuestionGUI::getQuestionTemplate ( )

Definition at line 512 of file class.assQuestionGUI.php.

Referenced by assTextQuestionGUI\addSuggestedSolution(), assImagemapQuestionGUI\areaEditor(), assKprimChoiceGUI\editQuestion(), assTextQuestionGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assOrderingHorizontalGUI\editQuestion(), assNumericGUI\editQuestion(), assFileUploadGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assMultipleChoiceGUI\editQuestion(), assErrorTextGUI\editQuestion(), assLongMenuGUI\editQuestion(), assImagemapQuestionGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), assClozeTestGUI\editQuestion(), assFormulaQuestionGUI\isSaveCommand(), and renderEditForm().

512  : void
513  {
514  // @todo Björn: Maybe this has to be changed for PHP 7/ILIAS 5.2.x (ilObjTestGUI::executeCommand, switch -> default case -> $this->prepareOutput(); already added a template to the CONTENT variable wrapped in a block named content)
515  if (!$this->tpl->blockExists('content')) {
516  $this->tpl->addBlockFile("CONTENT", "content", "tpl.il_as_qpl_content.html", "Modules/TestQuestionPool");
517  }
518  // @todo Björn: Maybe this has to be changed for PHP 7/ILIAS 5.2.x (ilObjTestGUI::executeCommand, switch -> default case -> $this->prepareOutput(); already added a template to the STATUSLINE variable wrapped in a block named statusline)
519  if (!$this->tpl->blockExists('statusline')) {
520  $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
521  }
522  // @todo Björn: Maybe this has to be changed for PHP 7/ILIAS 5.2.x because ass[XYZ]QuestionGUI::editQuestion is called multiple times
523  if (!$this->tpl->blockExists('adm_content')) {
524  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_question.html", "Modules/TestQuestionPool");
525  }
526  }
+ Here is the caller graph for this function:

◆ getQuestionType()

assQuestionGUI::getQuestionType ( )

Definition at line 899 of file class.assQuestionGUI.php.

Referenced by ilTestCorrectionsGUI\allowedInAdjustment(), and getType().

899  : string
900  {
901  return $this->object->getQuestionType();
902  }
+ Here is the caller graph for this function:

◆ getRenderPurpose()

assQuestionGUI::getRenderPurpose ( )

Definition at line 296 of file class.assQuestionGUI.php.

References $renderPurpose.

Referenced by isRenderPurposeDemoplay(), isRenderPurposeInputValue(), isRenderPurposePlayback(), isRenderPurposePreview(), and isRenderPurposePrintPdf().

296  : string
297  {
298  return $this->renderPurpose;
299  }
+ Here is the caller graph for this function:

◆ getSequenceNumber()

assQuestionGUI::getSequenceNumber ( )

Definition at line 864 of file class.assQuestionGUI.php.

References $sequence_no.

864  : int
865  {
866  return $this->sequence_no;
867  }
int $sequence_no
sequence number in test

◆ getSolutionOutput()

assQuestionGUI::getSolutionOutput (   $active_id,
  $pass = null,
  $graphicalOutput = false,
  $result_output = false,
  $show_question_only = true,
  $show_feedback = false,
  $show_correct_solution = false,
  $show_manual_scoring = false,
  $show_question_text = true 
)
abstract

◆ getSpecificFeedbackOutput()

assQuestionGUI::getSpecificFeedbackOutput ( array  $userSolution)
abstract

Returns the answer specific feedback for the question.

Parameters
array$userSolution($userSolution[<value1>] = <value2>)

Referenced by getGenericFeedbackOutputForIncorrectSolution(), and ilTestPlayerAbstractGUI\populateSpecificFeedbackBlock().

+ Here is the caller graph for this function:

◆ getSubQuestionsIndex()

assQuestionGUI::getSubQuestionsIndex ( )

Definition at line 1913 of file class.assQuestionGUI.php.

1913  : array
1914  {
1915  return array(0);
1916  }

◆ getSuggestedSolutionsRepo()

assQuestionGUI::getSuggestedSolutionsRepo ( )
protected

Definition at line 2034 of file class.assQuestionGUI.php.

References $dic, $suggestedsolution_repo, and ilQuestionPoolDIC\dic().

Referenced by createSuggestedSolutionLinkingTo(), and suggestedsolution().

2035  {
2036  if (is_null($this->suggestedsolution_repo)) {
2038  $this->suggestedsolution_repo = $dic['question.repo.suggestedsolutions'];
2039  }
2041  }
$dic
Definition: result.php:32
assQuestionSuggestedSolutionsDatabaseRepository $suggestedsolution_repo
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTargetGuiClass()

assQuestionGUI::getTargetGuiClass ( )

Definition at line 399 of file class.assQuestionGUI.php.

References $targetGuiClass.

Referenced by assImagemapQuestionGUI\buildAreaLinkTarget(), assErrorTextGUI\generateQuestionOutput(), assImagemapQuestionGUI\getPreview(), and assImagemapQuestionGUI\getTestOutput().

399  : ?string
400  {
401  return $this->targetGuiClass;
402  }
+ Here is the caller graph for this function:

◆ getTaxonomyIds()

assQuestionGUI::getTaxonomyIds ( )

Definition at line 384 of file class.assQuestionGUI.php.

References $taxonomyIds.

Referenced by populateTaxonomyFormSection(), and saveTaxonomyAssignments().

384  : array
385  {
386  return $this->taxonomyIds;
387  }
+ Here is the caller graph for this function:

◆ getTestOutput()

assQuestionGUI::getTestOutput (   $active_id,
  $pass,
  $is_question_postponed,
  $user_post_solutions,
  $show_specific_inline_feedback 
)
abstract

Referenced by magicAfterTestOutput(), and outQuestionForTest().

+ Here is the caller graph for this function:

◆ getType()

assQuestionGUI::getType ( )

needed for page editor compliance

Definition at line 264 of file class.assQuestionGUI.php.

References getQuestionType().

Referenced by buildBasicEditFormObject().

264  : string
265  {
266  return $this->getQuestionType();
267  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTypeOptions()

assQuestionGUI::getTypeOptions ( )
protected

Definition at line 1149 of file class.assQuestionGUI.php.

References ILIAS\Repository\lng().

Referenced by suggestedsolution().

1149  : array
1150  {
1151  foreach (assQuestionSuggestedSolution::TYPES as $k => $v) {
1152  $options[$k] = $this->lng->txt($v);
1153  }
1154  return $options;
1155  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUseUnchangedAnswerCheckboxHtml()

assQuestionGUI::getUseUnchangedAnswerCheckboxHtml ( )
protected

Definition at line 579 of file class.assQuestionGUI.php.

References ilGlobalPageTemplate\get(), ILIAS\Repository\object(), and ilGlobalPageTemplate\setVariable().

Referenced by outQuestionPage().

579  : string
580  {
581  $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
582  $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->object->getTestPresentationConfig()->getUseUnchangedAnswerLabel());
583  return $tpl->get();
584  }
ilGlobalPageTemplate $tpl
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasCorrectSolution()

◆ hasInlineFeedback()

assQuestionGUI::hasInlineFeedback ( )

Definition at line 167 of file class.assQuestionGUI.php.

Referenced by ilTestPlayerAbstractGUI\populateInstantResponseBlocks().

167  : bool
168  {
169  return false;
170  }
+ Here is the caller graph for this function:

◆ hasSpecialQuestionCommands()

assQuestionGUI::hasSpecialQuestionCommands ( )
protected

Definition at line 258 of file class.assQuestionGUI.php.

Referenced by executeCommand().

258  : bool
259  {
260  return static::HAS_SPECIAL_QUESTION_COMMANDS;
261  }
+ Here is the caller graph for this function:

◆ isAdjustmentEditContext()

assQuestionGUI::isAdjustmentEditContext ( )

Definition at line 359 of file class.assQuestionGUI.php.

References getEditContext().

359  : bool
360  {
361  return $this->getEditContext() == self::EDIT_CONTEXT_ADJUSTMENT;
362  }
+ Here is the call graph for this function:

◆ isAnswerFrequencyStatisticSupported()

assQuestionGUI::isAnswerFrequencyStatisticSupported ( )

Definition at line 1908 of file class.assQuestionGUI.php.

Referenced by ilTestCorrectionsGUI\setCorrectionTabsContext().

1908  : bool
1909  {
1910  return true;
1911  }
+ Here is the caller graph for this function:

◆ isAuthoringEditContext()

assQuestionGUI::isAuthoringEditContext ( )

Definition at line 354 of file class.assQuestionGUI.php.

References getEditContext().

354  : bool
355  {
356  return $this->getEditContext() == self::EDIT_CONTEXT_AUTHORING;
357  }
+ Here is the call graph for this function:

◆ isAutosaveable()

assQuestionGUI::isAutosaveable ( )

Definition at line 1776 of file class.assQuestionGUI.php.

1776  : bool
1777  {
1778  return $this->object instanceof ilAssQuestionAutosaveable;
1779  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ isInLearningModuleContext()

assQuestionGUI::isInLearningModuleContext ( )

Definition at line 2068 of file class.assQuestionGUI.php.

References $parent_type_is_lm.

Referenced by assOrderingQuestionGUI\addEditSubtabs(), and assOrderingQuestionGUI\populateQuestionSpecificFormPart().

2068  : bool
2069  {
2070  return $this->parent_type_is_lm;
2071  }
+ Here is the caller graph for this function:

◆ isPreviousSolutionPrefilled()

assQuestionGUI::isPreviousSolutionPrefilled ( )

Definition at line 285 of file class.assQuestionGUI.php.

References $previousSolutionPrefilled.

285  : bool
286  {
288  }

◆ isRenderPurposeDemoplay()

assQuestionGUI::isRenderPurposeDemoplay ( )

Definition at line 326 of file class.assQuestionGUI.php.

References getRenderPurpose().

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

326  : bool
327  {
328  return $this->getRenderPurpose() == self::RENDER_PURPOSE_DEMOPLAY;
329  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposeInputValue()

assQuestionGUI::isRenderPurposeInputValue ( )

Definition at line 316 of file class.assQuestionGUI.php.

References getRenderPurpose().

Referenced by renderPurposeSupportsFormHtml().

316  : bool
317  {
318  return $this->getRenderPurpose() == self::RENDER_PURPOSE_INPUT_VALUE;
319  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePlayback()

assQuestionGUI::isRenderPurposePlayback ( )

Definition at line 321 of file class.assQuestionGUI.php.

References getRenderPurpose().

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

321  : bool
322  {
323  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PLAYBACK;
324  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePreview()

assQuestionGUI::isRenderPurposePreview ( )

Definition at line 311 of file class.assQuestionGUI.php.

References getRenderPurpose().

311  : bool
312  {
313  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PREVIEW;
314  }
+ Here is the call graph for this function:

◆ isRenderPurposePrintPdf()

assQuestionGUI::isRenderPurposePrintPdf ( )

Definition at line 306 of file class.assQuestionGUI.php.

References getRenderPurpose().

Referenced by assOrderingQuestionGUI\buildNestingForm(), assOrderingQuestionGUI\populateAnswerSpecificFormPart(), assClozeTestGUI\populateSolutiontextToGapTpl(), renderPurposeSupportsFormHtml(), assMultipleChoiceGUI\renderSolutionOutput(), assSingleChoiceGUI\renderSolutionOutput(), and assKprimChoiceGUI\renderSolutionOutput().

306  : bool
307  {
308  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PRINT_PDF;
309  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSaveCommand()

assQuestionGUI::isSaveCommand ( )

Definition at line 1596 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl().

Referenced by assTextQuestionGUI\editQuestion(), assOrderingHorizontalGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assNumericGUI\editQuestion(), assFileUploadGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assMultipleChoiceGUI\editQuestion(), assErrorTextGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), and assClozeTestGUI\editQuestion().

1596  : bool
1597  {
1598  return in_array($this->ctrl->getCmd(), array('save', 'saveEdit', 'saveReturn'));
1599  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTestPresentationContext()

◆ linkChilds()

assQuestionGUI::linkChilds ( )

Definition at line 1550 of file class.assQuestionGUI.php.

References createSuggestedSolutionLinkingTo(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), outChapterSelector(), outGlossarySelector(), and outPageSelector().

1550  : void
1551  {
1552  $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1553  switch ($this->request->raw("search_link_type")) {
1554  case "pg":
1555  $this->outPageSelector();
1556  break;
1557  case "st":
1558  $this->outChapterSelector();
1559  break;
1560  case "glo":
1561  $this->outGlossarySelector();
1562  break;
1563  case "lm":
1564  $target = "il__lm_" . $this->request->raw("source_id");
1565  $this->createSuggestedSolutionLinkingTo('lm', $target);
1566  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1567  $this->ctrl->redirect($this, "suggestedsolution");
1568  break;
1569  }
1570  }
createSuggestedSolutionLinkingTo(string $type, string $target)
+ Here is the call graph for this function:

◆ magicAfterTestOutput()

assQuestionGUI::magicAfterTestOutput ( )

Definition at line 1835 of file class.assQuestionGUI.php.

References getTestOutput().

Referenced by outQuestionForTest().

1835  : void
1836  {
1837  return;
1838  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ originalSyncForm()

assQuestionGUI::originalSyncForm ( string  $return_to = "",
string  $return_to_feedback = '' 
)

Definition at line 616 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by suggestedsolution().

616  : void
617  {
618  if (strlen($return_to)) {
619  $this->ctrl->setParameter($this, "return_to", $return_to);
620  } elseif ($this->request->raw('return_to')) {
621  $this->ctrl->setParameter($this, "return_to", $this->request->raw('return_to'));
622  }
623  if (strlen($return_to_feedback)) {
624  $this->ctrl->setParameter($this, 'return_to_fb', 'true');
625  }
626 
627  $this->ctrl->saveParameter($this, 'test_express_mode');
628 
629  $template = new ilTemplate("tpl.il_as_qpl_sync_original.html", true, true, "Modules/TestQuestionPool");
630  $template->setVariable("BUTTON_YES", $this->lng->txt("yes"));
631  $template->setVariable("BUTTON_NO", $this->lng->txt("no"));
632  $template->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
633  $template->setVariable("TEXT_SYNC", $this->lng->txt("confirm_sync_questions"));
634  $this->tpl->setVariable("ADM_CONTENT", $template->get());
635  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outAdditionalOutput()

assQuestionGUI::outAdditionalOutput ( )

Why are you here? Some magic for plugins?

Definition at line 895 of file class.assQuestionGUI.php.

Referenced by assTextQuestionGUI\magicAfterTestOutput().

895  : void
896  {
897  }
+ Here is the caller graph for this function:

◆ outChapterSelector()

assQuestionGUI::outChapterSelector ( )

Definition at line 1481 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), ilObjectGUI\getObject(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilUtil\stripSlashes().

Referenced by linkChilds().

1481  : void
1482  {
1483  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1484 
1485  $cont_obj_gui = new ilObjContentObjectGUI('', $this->request->raw('source_id'), true);
1486  $cont_obj = $cont_obj_gui->getObject();
1487  $ctree = $cont_obj->getLMTree();
1488  $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
1489 
1490  $rows = array();
1491 
1492  foreach ($nodes as $node) {
1493  if ($node['type'] == $this->request->raw('search_link_type')) {
1494  $this->ctrl->setParameter($this, $node['type'], $node['obj_id']);
1495  $rows[] = array(
1496  'title' => $node['title'],
1497  'description' => '',
1498  'text_add' => $this->lng->txt('add'),
1499  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($node['type']))
1500  );
1501  }
1502  }
1503 
1504  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1505  $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($this->request->raw('search_link_type'))));
1506  $table->setData($rows);
1507 
1508  $this->tpl->setContent($table->getHTML());
1509  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjContentObjectGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outGlossarySelector()

assQuestionGUI::outGlossarySelector ( )

Definition at line 1511 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), ilObjGlossary\getTermList(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by linkChilds().

1511  : void
1512  {
1513  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1514 
1515  $glossary = new ilObjGlossary($this->request->raw('source_id'), true);
1516  $terms = $glossary->getTermList();
1517 
1518  $rows = array();
1519 
1520  foreach ($terms as $term) {
1521  $this->ctrl->setParameter($this, 'git', $term['id']);
1522  $rows[] = array(
1523  'title' => $term['term'],
1524  'description' => '',
1525  'text_add' => $this->lng->txt('add'),
1526  'href_add' => $this->ctrl->getLinkTarget($this, 'addGIT')
1527  );
1528  }
1529 
1530  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1531  $table->setTitle($this->lng->txt('glossary_term'));
1532  $table->setData($rows);
1533 
1534  $this->tpl->setContent($table->getHTML());
1535  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTermList(string $searchterm="", string $a_letter="", string $a_def="", int $a_tax_node=0, bool $a_include_offline_childs=false, bool $a_add_amet_fields=false, array $a_amet_filter=null, bool $a_omit_virtual=false, bool $a_include_references=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outPageSelector()

assQuestionGUI::outPageSelector ( )

Definition at line 1427 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), ilTree\getChildsByType(), getContextPath(), ilTree\getNodeData(), ilObjectGUI\getObject(), ilLMPageObject\getPageList(), ilTree\getRootId(), ilTree\isInTree(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilUtil\stripSlashes().

Referenced by linkChilds().

1427  : void
1428  {
1429  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1430 
1431  $cont_obj_gui = new ilObjContentObjectGUI('', $this->request->raw('source_id'), true);
1432  $cont_obj = $cont_obj_gui->getObject();
1433  $pages = ilLMPageObject::getPageList($cont_obj->getId());
1434  $shownpages = array();
1435  $tree = $cont_obj->getLMTree();
1436  $chapters = $tree->getSubtree($tree->getNodeData($tree->getRootId()));
1437 
1438  $rows = array();
1439 
1440  foreach ($chapters as $chapter) {
1441  $chapterpages = $tree->getChildsByType($chapter['obj_id'], 'pg');
1442  foreach ($chapterpages as $page) {
1443  if ($page['type'] == $this->request->raw('search_link_type')) {
1444  array_push($shownpages, $page['obj_id']);
1445 
1446  if ($tree->isInTree($page['obj_id'])) {
1447  $path_str = $this->getContextPath($cont_obj, $page['obj_id']);
1448  } else {
1449  $path_str = '---';
1450  }
1451 
1452  $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1453  $rows[] = array(
1454  'title' => $page['title'],
1455  'description' => ilLegacyFormElementsUtil::prepareFormOutput($path_str),
1456  'text_add' => $this->lng->txt('add'),
1457  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1458  );
1459  }
1460  }
1461  }
1462  foreach ($pages as $page) {
1463  if (!in_array($page['obj_id'], $shownpages)) {
1464  $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1465  $rows[] = array(
1466  'title' => $page['title'],
1467  'description' => '---',
1468  'text_add' => $this->lng->txt('add'),
1469  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1470  );
1471  }
1472  }
1473 
1474  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1475  $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($this->request->raw('search_link_type'))));
1476  $table->setData($rows);
1477 
1478  $this->tpl->setContent($table->getHTML());
1479  }
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
isInTree(?int $a_node_id)
get all information of a node.
static prepareFormOutput($a_str, bool $a_strip=false)
getContextPath($cont_obj, int $a_endnode_id, int $a_startnode_id=1)
get context path in content object tree
getChildsByType(int $a_node_id, string $a_type)
get child nodes of given node by object type
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getPageList(int $lm_id)
Class ilObjContentObjectGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionForTest()

assQuestionGUI::outQuestionForTest ( string  $formaction,
int  $active_id,
?int  $pass,
bool  $is_question_postponed = false,
  $user_post_solutions = false,
bool  $show_specific_inline_feedback = false 
)
final

Definition at line 1802 of file class.assQuestionGUI.php.

References completeTestOutputFormAction(), getFormEncodingType(), getTestOutput(), and magicAfterTestOutput().

Referenced by ilTestPlayerAbstractGUI\showQuestionEditable().

1809  : void {
1810  $formaction = $this->completeTestOutputFormAction($formaction, $active_id, $pass);
1811 
1812  $test_output = $this->getTestOutput(
1813  $active_id,
1814  $pass,
1815  $is_question_postponed,
1816  $user_post_solutions,
1817  $show_specific_inline_feedback
1818  );
1819 
1820  $this->magicAfterTestOutput();
1821 
1822  $this->tpl->setVariable("QUESTION_OUTPUT", $test_output);
1823  $this->tpl->setVariable("FORMACTION", $formaction);
1824  $this->tpl->setVariable("ENCTYPE", 'enctype="' . $this->getFormEncodingType() . '"');
1825  $this->tpl->setVariable("FORM_TIMESTAMP", (string) time());
1826  }
getTestOutput( $active_id, $pass, $is_question_postponed, $user_post_solutions, $show_specific_inline_feedback)
completeTestOutputFormAction($formAction, $active_id, $pass)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionPage()

assQuestionGUI::outQuestionPage (   $a_temp_var,
  $a_postponed = false,
  $active_id = "",
  $html = "",
  $inlineFeedbackEnabled = false 
)

Definition at line 548 of file class.assQuestionGUI.php.

References getNavigationGUI(), getPreviousSolutionConfirmationCheckboxHtml(), getPreviousSolutionProvidedMessage(), getUseUnchangedAnswerCheckboxHtml(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilPageObjectGUI\setOutputMode().

Referenced by assNumericGUI\getTestOutput(), assOrderingHorizontalGUI\getTestOutput(), assTextSubsetGUI\getTestOutput(), assFileUploadGUI\getTestOutput(), assKprimChoiceGUI\getTestOutput(), assErrorTextGUI\getTestOutput(), assLongMenuGUI\getTestOutput(), assSingleChoiceGUI\getTestOutput(), assTextQuestionGUI\getTestOutput(), assMultipleChoiceGUI\getTestOutput(), assOrderingQuestionGUI\getTestOutput(), assImagemapQuestionGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutput(), assFormulaQuestionGUI\getTestOutput(), assClozeTestGUI\getTestOutput(), ilTestPlayerAbstractGUI\populateInstantResponseModal(), and ilTestPlayerAbstractGUI\showQuestionViewable().

548  : string
549  {
550  if ($this->object->getTestPresentationConfig()->isSolutionInitiallyPrefilled()) {
551  // hey
552  $this->tpl->setOnScreenMessage('info', $this->getPreviousSolutionProvidedMessage());
554  } elseif ($this->object->getTestPresentationConfig()->isUnchangedAnswerPossible()) {
555  $html .= $this->getUseUnchangedAnswerCheckboxHtml();
556  }
557 
558  $this->lng->loadLanguageModule("content");
559 
560  $page_gui = new ilAssQuestionPageGUI($this->object->getId());
561  $page_gui->setOutputMode("presentation");
562  $page_gui->setTemplateTargetVar($a_temp_var);
563 
564  if ($this->getNavigationGUI()) {
565  $html .= $this->getNavigationGUI()->getHTML();
566  $page_gui->setQuestionActionsHTML($this->getNavigationGUI()->getActionsHTML());
567  }
568 
569  if (strlen($html)) {
570  $page_gui->setQuestionHTML(array($this->object->getId() => $html));
571  }
572 
573  $page_gui->setPresentationTitle($this->questionHeaderBlockBuilder->getPresentationTitle());
574  $page_gui->setQuestionInfoHTML($this->questionHeaderBlockBuilder->getQuestionInfoHTML());
575 
576  return $page_gui->presentation();
577  }
setOutputMode(string $a_mode=self::PRESENTATION)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionType()

assQuestionGUI::outQuestionType ( )

Definition at line 1136 of file class.assQuestionGUI.php.

References ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by buildBasicEditFormObject(), assOrderingQuestionGUI\buildEditForm(), assMultipleChoiceGUI\buildEditForm(), assOrderingQuestionGUI\buildNestingForm(), assTextQuestionGUI\editQuestion(), assOrderingHorizontalGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assNumericGUI\editQuestion(), assFileUploadGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assErrorTextGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), assClozeTestGUI\editQuestion(), assFormulaQuestionGUI\isSaveCommand(), and ilTestCorrectionsGUI\populatePageTitleAndDescription().

1136  : string
1137  {
1138  $count = $this->questioninfo->usageNumber($this->object->getId());
1139 
1140  if ($this->questioninfo->questionExistsInPool($this->object->getId()) && $count) {
1141  if ($this->rbacsystem->checkAccess("write", $this->request->getRefId())) {
1142  $this->tpl->setOnScreenMessage('info', sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
1143  }
1144  }
1145 
1146  return $this->questioninfo->getQuestionTypeName($this->object->getId());
1147  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outSolutionExplorer()

assQuestionGUI::outSolutionExplorer ( )

Definition at line 1357 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilExplorer\setExpand().

1357  : void
1358  {
1359  $type = $this->request->raw("link_new_type");
1360  $search = $this->request->raw("search_link_type");
1361  $this->ctrl->setParameter($this, "link_new_type", $type);
1362  $this->ctrl->setParameter($this, "search_link_type", $search);
1363  $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1364 
1365  $this->tpl->setOnScreenMessage('info', $this->lng->txt("select_object_to_link"));
1366 
1367  $parent_ref_id = $this->tree->getParentId($this->request->getRefId());
1368  $exp = new ilSolutionExplorer($this->ctrl->getLinkTarget($this, 'suggestedsolution'), get_class($this));
1369  $exp->setExpand($this->request->raw('expand_sol') ? $this->request->raw('expand_sol') : $parent_ref_id);
1370  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'outSolutionExplorer'));
1371  $exp->setTargetGet("ref_id");
1372  $exp->setRefId($this->request->getRefId());
1373  $exp->addFilter($type);
1374  $exp->setSelectableType($type);
1375  if ($this->request->isset('expandCurrentPath') && $this->request->raw('expandCurrentPath')) {
1376  $exp->expandPathByRefId($parent_ref_id);
1377  }
1378 
1379  // build html-output
1380  $exp->setOutput(0);
1381 
1382  $template = new ilTemplate("tpl.il_as_qpl_explorer.html", true, true, "Modules/TestQuestionPool");
1383  $template->setVariable("EXPLORER_TREE", $exp->getOutput());
1384  $template->setVariable("BUTTON_CANCEL", $this->lng->txt("cancel"));
1385  $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "suggestedsolution"));
1386  $this->tpl->setVariable("ADM_CONTENT", $template->get());
1387  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
+ Here is the call graph for this function:

◆ populateCorrectionsFormProperties()

assQuestionGUI::populateCorrectionsFormProperties ( ilPropertyFormGUI  $form)

Definition at line 1936 of file class.assQuestionGUI.php.

Referenced by ilTestCorrectionsGUI\buildQuestionCorrectionForm().

1936  : void
1937  {
1938  }
+ Here is the caller graph for this function:

◆ populateJavascriptFilesRequiredForWorkForm()

assQuestionGUI::populateJavascriptFilesRequiredForWorkForm ( ilGlobalTemplateInterface  $tpl)

Definition at line 500 of file class.assQuestionGUI.php.

References ilGlobalTemplateInterface\addJavaScript(), and getPresentationJavascripts().

500  : void
501  {
502  foreach ($this->getPresentationJavascripts() as $jsFile) {
503  $tpl->addJavaScript($jsFile);
504  }
505  }
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
+ Here is the call graph for this function:

◆ populateTaxonomyFormSection()

assQuestionGUI::populateTaxonomyFormSection ( ilPropertyFormGUI  $form)
protected

Definition at line 1043 of file class.assQuestionGUI.php.

References ilObject\_lookupType(), ilPropertyFormGUI\addItem(), ilTaxNodeAssignment\getAssignmentsOfItem(), getTaxonomyIds(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilFormPropertyGUI\setTitle().

Referenced by assKprimChoiceGUI\buildEditForm(), assImagemapQuestionGUI\buildEditForm(), assLongMenuGUI\buildEditForm(), assOrderingQuestionGUI\buildEditForm(), assMultipleChoiceGUI\buildEditForm(), assTextQuestionGUI\editQuestion(), assOrderingHorizontalGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assNumericGUI\editQuestion(), assFileUploadGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assErrorTextGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), assClozeTestGUI\editQuestion(), and assFormulaQuestionGUI\isSaveCommand().

1043  : void
1044  {
1045  if ($this->getTaxonomyIds() !== []) {
1046  // this is needed by ilTaxSelectInputGUI in some cases
1047  ilOverlayGUI::initJavaScript();
1048 
1049  $sectHeader = new ilFormSectionHeaderGUI();
1050  $sectHeader->setTitle($this->lng->txt('qpl_qst_edit_form_taxonomy_section'));
1051  $form->addItem($sectHeader);
1052 
1053  foreach ($this->getTaxonomyIds() as $taxonomyId) {
1054  $taxonomy = new ilObjTaxonomy($taxonomyId);
1055  $label = sprintf($this->lng->txt('qpl_qst_edit_form_taxonomy'), $taxonomy->getTitle());
1056  $postvar = "tax_node_assign_$taxonomyId";
1057 
1058  $taxSelect = new ilTaxSelectInputGUI($taxonomy->getId(), $postvar, true);
1059  $taxSelect->setTitle($label);
1060 
1061 
1062  $taxNodeAssignments = new ilTaxNodeAssignment(ilObject::_lookupType($this->object->getObjId()), $this->object->getObjId(), 'quest', $taxonomyId);
1063  $assignedNodes = $taxNodeAssignments->getAssignmentsOfItem($this->object->getId());
1064 
1065  $taxSelect->setValue(array_map(function ($assignedNode) {
1066  return $assignedNode['node_id'];
1067  }, $assignedNodes));
1068  $form->addItem($taxSelect);
1069  }
1070  }
1071  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAssignmentsOfItem(int $a_item_id)
Get assignments for item.
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareReprintableCorrectionsForm()

assQuestionGUI::prepareReprintableCorrectionsForm ( ilPropertyFormGUI  $form)

Definition at line 1932 of file class.assQuestionGUI.php.

1932  : void
1933  {
1934  }

◆ prepareTextareaOutput()

static assQuestionGUI::prepareTextareaOutput ( ?string  $txt_output,
bool  $prepare_for_latex_output = false,
bool  $omitNl2BrWhenTextArea = false 
)
static

Prepares a string for a text area output where latex code may be in it If the text is HTML-free, CHR(13) will be converted to a line break.

Parameters
string$txt_outputString which should be prepared for output public

Definition at line 1979 of file class.assQuestionGUI.php.

References ilMathJax\getInstance().

1983  : string {
1984  if ($txt_output === null || $txt_output === '') {
1985  return '';
1986  }
1987 
1988  $result = $txt_output;
1989  $is_html = false;
1990 
1991  if (strlen(strip_tags($result)) < strlen($result)) {
1992  $is_html = true;
1993  }
1994 
1995  // removed: did not work with magic_quotes_gpc = On
1996  if (!$is_html) {
1997  if (!$omitNl2BrWhenTextArea) {
1998  // if the string does not contain HTML code, replace the newlines with HTML line breaks
1999  $result = preg_replace("/[\n]/", "<br />", $result);
2000  }
2001  } else {
2002  // patch for problems with the <pre> tags in tinyMCE
2003  if (preg_match_all("/(<pre>.*?<\/pre>)/ims", $result, $matches)) {
2004  foreach ($matches[0] as $found) {
2005  $replacement = "";
2006  if (strpos("\n", $found) === false) {
2007  $replacement = "\n";
2008  }
2009  $removed = preg_replace("/<br\s*?\/>/ims", $replacement, $found);
2010  $result = str_replace($found, $removed, $result);
2011  }
2012  }
2013  }
2014 
2015  // since server side mathjax rendering does include svg-xml structures that indeed have linebreaks,
2016  // do latex conversion AFTER replacing linebreaks with <br>. <svg> tag MUST NOT contain any <br> tags.
2017  if ($prepare_for_latex_output) {
2018  $result = ilMathJax::getInstance()->insertLatexImages($result, "<span class\=\"latex\">", "<\/span>");
2019  $result = ilMathJax::getInstance()->insertLatexImages($result, "\[tex\]", "\[\/tex\]");
2020  }
2021 
2022  if ($prepare_for_latex_output) {
2023  // replace special characters to prevent problems with the ILIAS template system
2024  // eg. if someone uses {1} as an answer, nothing will be shown without the replacement
2025  $result = str_replace("{", "&#123;", $result);
2026  $result = str_replace("}", "&#125;", $result);
2027  $result = str_replace("\\", "&#92;", $result);
2028  }
2029 
2030  return $result;
2031  }
static getInstance()
Singleton: get instance for use in ILIAS requests with a config loaded from the settings.
+ Here is the call graph for this function:

◆ redrawHeaderAction()

assQuestionGUI::redrawHeaderAction ( )

Definition at line 176 of file class.assQuestionGUI.php.

References exit, getHeaderAction(), and ILIAS\Repository\ui().

176  : void
177  {
178  echo $this->getHeaderAction() . $this->ui->mainTemplate()->getOnLoadCodeForAsynch();
179  exit;
180  }
exit
Definition: login.php:29
+ Here is the call graph for this function:

◆ renderEditForm()

assQuestionGUI::renderEditForm ( ilPropertyFormGUI  $form)
protected

Definition at line 528 of file class.assQuestionGUI.php.

References ilPropertyFormGUI\getHTML(), and getQuestionTemplate().

Referenced by assOrderingQuestionGUI\buildEditFormAfterTypeChange(), assOrderingQuestionGUI\editNesting(), assOrderingQuestionGUI\editQuestion(), and assOrderingQuestionGUI\writePostData().

528  : void
529  {
530  $this->getQuestionTemplate();
531  $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
532  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPurposeSupportsFormHtml()

assQuestionGUI::renderPurposeSupportsFormHtml ( )

Definition at line 331 of file class.assQuestionGUI.php.

References isRenderPurposeInputValue(), and isRenderPurposePrintPdf().

Referenced by assTextQuestionGUI\getAutoSavedSolutionOutput(), assTextQuestionGUI\getSolutionOutput(), assTextQuestionGUI\renderSolutionOutput(), assMultipleChoiceGUI\renderSolutionOutput(), assSingleChoiceGUI\renderSolutionOutput(), and assKprimChoiceGUI\renderSolutionOutput().

331  : bool
332  {
333  if ($this->isRenderPurposePrintPdf()) {
334  return false;
335  }
336 
337  if ($this->isRenderPurposeInputValue()) {
338  return false;
339  }
340 
341  return true;
342  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderSolutionOutput()

assQuestionGUI::renderSolutionOutput ( mixed  $user_solutions,
int  $active_id,
int  $pass,
bool  $graphical_output = false,
bool  $result_output = false,
bool  $show_question_only = true,
bool  $show_feedback = false,
bool  $show_correct_solution = false,
bool  $show_manual_scoring = false,
bool  $show_question_text = true,
bool  $show_autosave_title = false,
bool  $show_inline_feedback = false 
)

Definition at line 1750 of file class.assQuestionGUI.php.

Referenced by getAutoSavedSolutionOutput(), and assImagemapQuestionGUI\getSolutionOutput().

1763  : ?string {
1764  return null;
1765  }
+ Here is the caller graph for this function:

◆ save()

assQuestionGUI::save ( )

Definition at line 718 of file class.assQuestionGUI.php.

References callNewIdListeners(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), saveQuestionToTest(), and writePostData().

718  : void
719  {
720  $this->ilTabs->setTabActive('edit_question');
721  $result = $this->writePostData();
722 
723  if ($result !== 0) {
724  return;
725  }
726 
727  $old_id = $this->request->int('q_id');
728 
729  $this->ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
730  $this->ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
731  $this->object->saveToDb();
732 
733  if ($this->object->getId() !== $old_id) {
734  $this->callNewIdListeners($this->object->getId());
735  }
736 
737  if ($this->request->int('calling_test') !== 0) {
738  if (($q_id = $this->saveQuestionToTest()) === self::RETURN_AFTER_EXISTING_WITH_ORIGINAL_SAVE) {
739  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
740  $this->ctrl->setParameter($this, 'return_to', 'editQuestion');
741  $this->ctrl->redirect($this, "originalSyncForm");
742  }
743 
744  $this->ctrl->setParameter(
745  $this,
746  'q_id',
747  $q_id === self::RETURN_AFTER_EXISTING_SAVE ? $this->object->getId() : $q_id
748  );
749  $this->ctrl->setParameter($this, 'ref_id', $this->request->raw('calling_test'));
750  $this->ctrl->setParameter($this, 'calling_test', $this->request->raw('calling_test'));
751  }
752 
753  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
754  $this->ctrl->redirect($this, 'editQuestion');
755  }
writePostData(bool $always=false)
Evaluates a posted edit form and writes the form data in the question object.
callNewIdListeners(int $a_new_id)
+ Here is the call graph for this function:

◆ saveCorrectionsFormProperties()

assQuestionGUI::saveCorrectionsFormProperties ( ilPropertyFormGUI  $form)

Definition at line 1940 of file class.assQuestionGUI.php.

1940  : void
1941  {
1942  }

◆ saveEdit()

assQuestionGUI::saveEdit ( )

Definition at line 674 of file class.assQuestionGUI.php.

References $_GET, $ilUser, assQuestion\_isWriteable(), ILIAS\Repository\ctrl(), ilObject\getId(), ilObjTest\getQuestionSetConfig(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), ILIAS\Repository\object(), ilUtil\redirect(), ilObjUser\setPref(), writePostData(), and ilObjUser\writePref().

674  : void
675  {
677  $result = $this->writePostData();
678  if ($result == 0) {
679  $ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
680  $ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
681  $this->object->saveToDb();
682  $originalexists = $this->questioninfo->questionExists($this->object->getOriginalId());
683 
684  if ($this->request->raw("calling_test") && $originalexists && assQuestion::_isWriteable($this->object->getOriginalId(), $ilUser->getId())) {
685  $this->ctrl->redirect($this, "originalSyncForm");
686  } elseif ($this->request->raw("calling_test")) {
687  $_GET["ref_id"] = $this->request->raw("calling_test");
688  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $this->request->raw("calling_test"));
689  return;
690  } elseif ($this->request->raw("test_ref_id")) {
691  // TODO: Courier Antipattern!
692  $_GET["ref_id"] = $this->request->raw("test_ref_id");
693  $test = new ilObjTest($this->request->raw("test_ref_id"), true);
694 
695  $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory(
696  $this->tree,
697  $this->db,
698  $this->lng,
699  $this->logger,
700  $this->component_repository,
701  $test,
702  $this->questioninfo
703  );
704 
705  $test->insertQuestion($testQuestionSetConfigFactory->getQuestionSetConfig(), $this->object->getId());
706 
707  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $this->request->raw("test_ref_id"));
708  } else {
709  $this->ctrl->setParameter($this, "q_id", $this->object->getId());
710  $this->editQuestion();
711  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), false);
712  $this->ctrl->setParameterByClass(ilAssQuestionPageGUI::class, "q_id", $this->object->getId());
713  $this->ctrl->redirectByClass(ilAssQuestionPageGUI::class, "edit");
714  }
715  }
716  }
$_GET["client_id"]
Definition: webdav.php:30
writePref(string $a_keyword, string $a_value)
writePostData(bool $always=false)
Evaluates a posted edit form and writes the form data in the question object.
setPref(string $a_keyword, ?string $a_value)
static redirect(string $a_script)
static _isWriteable(int $question_id, int $user_id)
+ Here is the call graph for this function:

◆ saveQuestionToTest()

assQuestionGUI::saveQuestionToTest ( )
private

Definition at line 786 of file class.assQuestionGUI.php.

References assQuestion\_isWriteable(), assQuestion\_questionExistsInTest(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\logger(), and ILIAS\Repository\object().

Referenced by save(), and saveReturn().

786  : int
787  {
788  $originalexists = !is_null($this->object->getOriginalId())
789  && $this->questioninfo->questionExistsInPool($this->object->getOriginalId());
790 
791  if ($originalexists
792  && assQuestion::_isWriteable($this->object->getOriginalId(), $this->ilUser->getId())) {
793  return self::RETURN_AFTER_EXISTING_WITH_ORIGINAL_SAVE;
794  }
795 
796  $test = new ilObjTest($this->request->raw("calling_test"), true);
797  if (assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId())) {
798  return self::RETURN_AFTER_EXISTING_SAVE;
799  }
800 
801  $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory(
802  $this->tree,
803  $this->db,
804  $this->lng,
805  $this->logger,
806  $this->component_repository,
807  $test,
808  $this->questioninfo
809  );
810 
811  $new_q_id = $this->object->getId();
812  if ($test->getRefId() !== $this->request->int('ref_id')) {
813  $new_q_id = $this->object->duplicate(true, $this->object->getTitle(), $this->object->getAuthor(), $this->object->getOwner(), $test->getId());
814  }
815 
816  $test->insertQuestion(
817  $testQuestionSetConfigFactory->getQuestionSetConfig(),
818  $new_q_id,
819  true
820  );
821 
822  if ($this->request->isset('prev_qid')) {
823  $test->moveQuestionAfter($new_q_id, $this->request->raw('prev_qid'));
824  }
825 
826  $this->ctrl->setParameter($this, 'calling_test', $this->request->raw("calling_test"));
827  return $new_q_id;
828  }
static _questionExistsInTest(int $question_id, int $test_id)
static _isWriteable(int $question_id, int $user_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveReturn()

assQuestionGUI::saveReturn ( )

Definition at line 757 of file class.assQuestionGUI.php.

References callNewIdListeners(), ilAssQuestionPreviewGUI\CMD_SHOW, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), saveQuestionToTest(), and writePostData().

757  : void
758  {
759  $this->ilTabs->setTabActive('edit_question');
760  $result = $this->writePostData();
761  if ($result !== 0) {
762  return;
763  }
764 
765  $old_id = $this->request->getQuestionId();
766 
767  $this->ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
768  $this->ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
769  $this->object->saveToDb();
770 
771  if ($this->object->getId() !== $old_id) {
772  $this->callNewIdListeners($this->object->getId());
773  }
774 
775  if ($this->request->int('calling_test') !== 0
776  && $this->saveQuestionToTest() === self::RETURN_AFTER_EXISTING_WITH_ORIGINAL_SAVE) {
777  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
778  $this->ctrl->setParameter($this, 'test_express_mode', $this->request->raw('test_express_mode'));
779  $this->ctrl->redirect($this, "originalSyncForm");
780  }
781 
782  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
783  $this->ctrl->redirectByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW);
784  }
writePostData(bool $always=false)
Evaluates a posted edit form and writes the form data in the question object.
callNewIdListeners(int $a_new_id)
+ Here is the call graph for this function:

◆ saveSuggestedSolutionType()

assQuestionGUI::saveSuggestedSolutionType ( )

Definition at line 1389 of file class.assQuestionGUI.php.

References ILIAS\Repository\ctrl(), and suggestedsolution().

1389  : void
1390  {
1391  switch ($_POST["solutiontype"]) {
1392  case "lm":
1393  $type = "lm";
1394  $search = "lm";
1395  break;
1396  case "git":
1397  $type = "glo";
1398  $search = "glo";
1399  break;
1400  case "st":
1401  $type = "lm";
1402  $search = "st";
1403  break;
1404  case "pg":
1405  $type = "lm";
1406  $search = "pg";
1407  break;
1408  case "file":
1409  case "text":
1410  default:
1411  $this->suggestedsolution();
1412  return;
1413  }
1414  if (isset($_POST['solutiontype'])) {
1415  $this->ctrl->setParameter($this, 'expandCurrentPath', 1);
1416  }
1417  $this->ctrl->setParameter($this, "link_new_type", $type);
1418  $this->ctrl->setParameter($this, "search_link_type", $search);
1419  $this->ctrl->redirect($this, "outSolutionExplorer");
1420  }
+ Here is the call graph for this function:

◆ saveTaxonomyAssignments()

assQuestionGUI::saveTaxonomyAssignments ( )
protected

Definition at line 1030 of file class.assQuestionGUI.php.

References getTaxonomyIds(), and ILIAS\Repository\object().

Referenced by assErrorTextGUI\analyze(), assTextQuestionGUI\writePostData(), assErrorTextGUI\writePostData(), assMatchingQuestionGUI\writePostData(), assTextSubsetGUI\writePostData(), assLongMenuGUI\writePostData(), assOrderingHorizontalGUI\writePostData(), assSingleChoiceGUI\writePostData(), assNumericGUI\writePostData(), assFileUploadGUI\writePostData(), assMultipleChoiceGUI\writePostData(), assFormulaQuestionGUI\writePostData(), assImagemapQuestionGUI\writePostData(), assKprimChoiceGUI\writePostData(), assClozeTestGUI\writePostData(), assOrderingQuestionGUI\writePostData(), and assLongMenuGUI\writeQuestionSpecificPostData().

1030  : void
1031  {
1032  if (count($this->getTaxonomyIds())) {
1033  foreach ($this->getTaxonomyIds() as $taxonomyId) {
1034  $postvar = "tax_node_assign_$taxonomyId";
1035 
1036  $tax_node_assign = new ilTaxAssignInputGUI($taxonomyId, true, '', $postvar);
1037  // TODO: determine tst/qpl when tax assigns become maintainable within tests
1038  $tax_node_assign->saveInput("qpl", $this->object->getObjId(), "quest", $this->object->getId());
1039  }
1040  }
1041  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAdjustmentEditContext()

assQuestionGUI::setAdjustmentEditContext ( )

Definition at line 364 of file class.assQuestionGUI.php.

References setEditContext().

364  : void
365  {
366  $this->setEditContext(self::EDIT_CONTEXT_ADJUSTMENT);
367  }
setEditContext(string $editContext)
+ Here is the call graph for this function:

◆ setDefaultTabs()

assQuestionGUI::setDefaultTabs ( ilTabsGUI  $ilTabs)
protected

Definition at line 1631 of file class.assQuestionGUI.php.

References addBackTab(), addTab_Question(), addTab_QuestionFeedback(), addTab_QuestionHints(), addTab_SuggestedSolution(), and ILIAS\Repository\ctrl().

Referenced by setQuestionTabs().

1631  : void
1632  {
1633  $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $this->request->getQuestionId());
1634  $q_type = $this->object->getQuestionType();
1635 
1636  if (strlen($q_type)) {
1637  $classname = $q_type . "GUI";
1638  $this->ctrl->setParameterByClass(strtolower($classname), "sel_question_types", $q_type);
1639  $this->ctrl->setParameterByClass(strtolower($classname), "q_id", $this->request->getQuestionId());
1640  }
1641 
1642  if ($this->request->isset("q_id")) {
1643  $this->addTab_Question($ilTabs);
1644  }
1645 
1646  // add tab for question feedback within common class assQuestionGUI
1647  $this->addTab_QuestionFeedback($ilTabs);
1648 
1649  // add tab for question hint within common class assQuestionGUI
1650  $this->addTab_QuestionHints($ilTabs);
1651 
1652  // add tab for question's suggested solution within common class assQuestionGUI
1653  $this->addTab_SuggestedSolution($ilTabs, $classname);
1654 
1655  $this->addBackTab($ilTabs);
1656  }
addTab_SuggestedSolution(ilTabsGUI $tabs, string $classname)
addTab_QuestionHints(ilTabsGUI $tabs)
addTab_Question(ilTabsGUI $tabsGUI)
addTab_QuestionFeedback(ilTabsGUI $tabs)
addBackTab(ilTabsGUI $ilTabs)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditContext()

assQuestionGUI::setEditContext ( string  $editContext)

Definition at line 349 of file class.assQuestionGUI.php.

References $editContext.

Referenced by setAdjustmentEditContext().

349  : void
350  {
351  $this->editContext = $editContext;
352  }
+ Here is the caller graph for this function:

◆ setErrorMessage()

assQuestionGUI::setErrorMessage ( string  $errormessage)

Definition at line 884 of file class.assQuestionGUI.php.

References $errormessage.

Referenced by assErrorTextGUI\__construct(), assOrderingHorizontalGUI\__construct(), assMatchingQuestionGUI\__construct(), and assFileUploadGUI\__construct().

884  : void
885  {
886  $this->errormessage = $errormessage;
887  }
+ Here is the caller graph for this function:

◆ setInLearningModuleContext()

assQuestionGUI::setInLearningModuleContext ( bool  $flag)

Definition at line 2072 of file class.assQuestionGUI.php.

2072  : void
2073  {
2074  $this->parent_type_is_lm = $flag;
2075  }

◆ setNavigationGUI()

assQuestionGUI::setNavigationGUI ( ?ilTestQuestionNavigationGUI  $navigationGUI)

Definition at line 374 of file class.assQuestionGUI.php.

References $navigationGUI.

Referenced by ilTestPlayerAbstractGUI\populateInstantResponseModal(), ilTestPlayerAbstractGUI\showQuestionEditable(), and ilTestPlayerAbstractGUI\showQuestionViewable().

374  : void
375  {
376  $this->navigationGUI = $navigationGUI;
377  }
ilTestQuestionNavigationGUI $navigationGUI
+ Here is the caller graph for this function:

◆ setPresentationContext()

assQuestionGUI::setPresentationContext ( string  $presentationContext)

Definition at line 274 of file class.assQuestionGUI.php.

References $presentationContext.

274  : void
275  {
276  $this->presentationContext = $presentationContext;
277  }

◆ setPreviewSession()

assQuestionGUI::setPreviewSession ( ilAssQuestionPreviewSession  $previewSession)

Definition at line 1863 of file class.assQuestionGUI.php.

References $previewSession.

1863  : void
1864  {
1865  $this->previewSession = $previewSession;
1866  }

◆ setPreviousSolutionPrefilled()

assQuestionGUI::setPreviousSolutionPrefilled ( bool  $previousSolutionPrefilled)

Definition at line 290 of file class.assQuestionGUI.php.

References $previousSolutionPrefilled.

290  : void
291  {
292  $this->previousSolutionPrefilled = $previousSolutionPrefilled;
293  }

◆ setQuestionActionCmd()

assQuestionGUI::setQuestionActionCmd ( string  $questionActionCmd)

Definition at line 416 of file class.assQuestionGUI.php.

References $questionActionCmd.

416  : void
417  {
418  $this->questionActionCmd = $questionActionCmd;
419 
420  if (is_object($this->object)) {
421  $this->object->questionActionCmd = $questionActionCmd;
422  }
423  }

◆ setQuestionCount()

assQuestionGUI::setQuestionCount ( int  $a_question_count)

Definition at line 869 of file class.assQuestionGUI.php.

869  : void
870  {
871  $this->question_count = $a_question_count;
872  }

◆ setQuestionHeaderBlockBuilder()

assQuestionGUI::setQuestionHeaderBlockBuilder ( \ilQuestionHeaderBlockBuilder  $questionHeaderBlockBuilder)

Definition at line 404 of file class.assQuestionGUI.php.

References $questionHeaderBlockBuilder.

404  : void
405  {
406  $this->questionHeaderBlockBuilder = $questionHeaderBlockBuilder;
407  }
ilQuestionHeaderBlockBuilder $questionHeaderBlockBuilder

◆ setQuestionSpecificTabs()

assQuestionGUI::setQuestionSpecificTabs ( ilTabsGUI  $ilTabs)
protected

Definition at line 1658 of file class.assQuestionGUI.php.

Referenced by setQuestionTabs().

1658  : void
1659  {
1660  }
+ Here is the caller graph for this function:

◆ setQuestionTabs()

assQuestionGUI::setQuestionTabs ( )

Definition at line 1622 of file class.assQuestionGUI.php.

References addBackTab(), setDefaultTabs(), and setQuestionSpecificTabs().

1622  : void
1623  {
1624  $this->ilTabs->clearTargets();
1625 
1626  $this->setDefaultTabs($this->ilTabs);
1627  $this->setQuestionSpecificTabs($this->ilTabs);
1628  $this->addBackTab($this->ilTabs);
1629  }
setDefaultTabs(ilTabsGUI $ilTabs)
addBackTab(ilTabsGUI $ilTabs)
setQuestionSpecificTabs(ilTabsGUI $ilTabs)
+ Here is the call graph for this function:

◆ setRenderPurpose()

assQuestionGUI::setRenderPurpose ( string  $renderPurpose)

Definition at line 301 of file class.assQuestionGUI.php.

References $renderPurpose.

301  : void
302  {
303  $this->renderPurpose = $renderPurpose;
304  }

◆ setSequenceNumber()

assQuestionGUI::setSequenceNumber ( int  $nr)

Definition at line 859 of file class.assQuestionGUI.php.

859  : void
860  {
861  $this->sequence_no = $nr;
862  }

◆ setTargetGui()

assQuestionGUI::setTargetGui (   $linkTargetGui)

Definition at line 389 of file class.assQuestionGUI.php.

References setTargetGuiClass().

389  : void
390  {
391  $this->setTargetGuiClass(get_class($linkTargetGui));
392  }
setTargetGuiClass($targetGuiClass)
+ Here is the call graph for this function:

◆ setTargetGuiClass()

assQuestionGUI::setTargetGuiClass (   $targetGuiClass)

Definition at line 394 of file class.assQuestionGUI.php.

References $targetGuiClass.

Referenced by setTargetGui().

394  : void
395  {
396  $this->targetGuiClass = $targetGuiClass;
397  }
+ Here is the caller graph for this function:

◆ setTaxonomyIds()

assQuestionGUI::setTaxonomyIds ( array  $taxonomyIds)

Definition at line 379 of file class.assQuestionGUI.php.

References $taxonomyIds.

379  : void
380  {
381  $this->taxonomyIds = $taxonomyIds;
382  }

◆ showHints()

assQuestionGUI::showHints ( )

Definition at line 1887 of file class.assQuestionGUI.php.

References ilAssQuestionHintsGUI\CMD_SHOW_LIST, and ILIAS\Repository\ctrl().

1887  : void
1888  {
1889  $this->ctrl->redirectByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
1890  }
const CMD_SHOW_LIST
command constants
+ Here is the call graph for this function:

◆ suggestedsolution()

assQuestionGUI::suggestedsolution ( )

Definition at line 1157 of file class.assQuestionGUI.php.

References $access, $ilUser, $res, assQuestion\_getInternalLinkHref(), assQuestion\_isWriteable(), ilRadioGroupInputGUI\addOption(), ILIAS\Repository\ctrl(), ilObject\getId(), getSuggestedSolutionsRepo(), getTypeOptions(), ILIAS\Repository\lng(), ilFileUtils\makeDirParents(), ilFileUtils\moveUploadedFile(), ILIAS\Repository\object(), originalSyncForm(), ilLegacyFormElementsUtil\prepareFormOutput(), ilFileUtils\renameExecutables(), ilCustomInputGUI\setHtml(), and ilFormPropertyGUI\setRequired().

Referenced by executeCommand(), and saveSuggestedSolutionType().

1157  : void
1158  {
1160  $ilAccess = $this->access;
1161 
1162  $cmd = $this->request->raw('cmd');
1163  $save = is_array($cmd) && array_key_exists('saveSuggestedSolution', $cmd);
1164  if ($save && $this->request->int('deleteSuggestedSolution') === 1) {
1165  $this->object->deleteSuggestedSolutions();
1166  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1167  $this->ctrl->redirect($this, "suggestedsolution");
1168  }
1169 
1170  $output = "";
1171 
1172  $solution = $this->object->getSuggestedSolution();
1173  $options = $this->getTypeOptions();
1174 
1175  $solution_type = $this->ctrl->getCmd() === 'cancelSuggestedSolution'
1176  ? $solution->getType()
1177  : $this->request->string('solutiontype');
1178  if (is_string($solution_type) && strcmp($solution_type, "file") == 0
1179  && (!$solution || $solution->getType() !== assQuestionSuggestedSolution::TYPE_FILE)
1180  ) {
1181  $solution = $this->getSuggestedSolutionsRepo()->create(
1182  $this->object->getId(),
1183  assQuestionSuggestedSolution::TYPE_FILE
1184  );
1185  }
1186 
1187  $solution_filename = $this->request->raw('filename');
1188  if ($save &&
1189  is_string($solution_filename) &&
1190  strlen($solution_filename)) {
1191  $solution = $solution->withTitle($solution_filename);
1192  }
1193 
1194  if ($solution) {
1195  $form = new ilPropertyFormGUI();
1196  $form->setFormAction($this->ctrl->getFormAction($this));
1197  $form->setTitle($this->lng->txt("solution_hint"));
1198  $form->setMultipart(true);
1199  $form->setTableWidth("100%");
1200  $form->setId("suggestedsolutiondisplay");
1201 
1202  $title = new ilSolutionTitleInputGUI($this->lng->txt("showSuggestedSolution"), "solutiontype");
1203  $template = new ilTemplate("tpl.il_as_qpl_suggested_solution_input_presentation.html", true, true, "Modules/TestQuestionPool");
1204 
1205  if ($solution->isOfTypeLink()) {
1206  $href = assQuestion::_getInternalLinkHref($solution->getInternalLink());
1207  $template->setCurrentBlock("preview");
1208  $template->setVariable("TEXT_SOLUTION", $this->lng->txt("suggested_solution"));
1209  $template->setVariable("VALUE_SOLUTION", " <a href=\"$href\" target=\"content\">" . $this->lng->txt("view") . "</a> ");
1210  $template->parseCurrentBlock();
1211  } elseif (
1212  $solution->isOfTypeFile()
1213  && $solution->getFilename()
1214  ) {
1215  $href = $this->object->getSuggestedSolutionPathWeb() . $solution->getFilename();
1216  $link = " <a href=\"$href\" target=\"content\">"
1217  . ilLegacyFormElementsUtil::prepareFormOutput($solution->getTitle())
1218  . "</a> ";
1219  $template->setCurrentBlock("preview");
1220  $template->setVariable("TEXT_SOLUTION", $this->lng->txt("suggested_solution"));
1221  $template->setVariable("VALUE_SOLUTION", $link);
1222  $template->parseCurrentBlock();
1223  }
1224 
1225  $template->setVariable("TEXT_TYPE", $this->lng->txt("type"));
1226  $template->setVariable("VALUE_TYPE", $options[$solution->getType()]);
1227 
1228  $title->setHtml($template->get());
1229  $deletesolution = new ilCheckboxInputGUI("", "deleteSuggestedSolution");
1230  $deletesolution->setOptionTitle($this->lng->txt("deleteSuggestedSolution"));
1231  $title->addSubItem($deletesolution);
1232  $form->addItem($title);
1233 
1234  if ($solution->isOfTypeFile()) {
1235  $file = new ilFileInputGUI($this->lng->txt("fileDownload"), "file");
1236  $file->setRequired(true);
1237  $file->enableFileNameSelection("filename");
1238 
1239  //$file->setSuffixes(array("doc","xls","png","jpg","gif","pdf"));
1240  if ($save && $_FILES && $_FILES["file"]["tmp_name"] && $file->checkInput()) {
1241  if (!file_exists($this->object->getSuggestedSolutionPath())) {
1242  ilFileUtils::makeDirParents($this->object->getSuggestedSolutionPath());
1243  }
1244 
1246  $_FILES["file"]["tmp_name"],
1247  $_FILES["file"]["name"],
1248  $this->object->getSuggestedSolutionPath() . $_FILES["file"]["name"]
1249  );
1250  if ($res) {
1251  ilFileUtils::renameExecutables($this->object->getSuggestedSolutionPath());
1252 
1253  // remove an old file download
1254  if ($solution->getFilename()) {
1255  @unlink($this->object->getSuggestedSolutionPath() . $solution->getFilename());
1256  }
1257 
1258  $file->setValue($_FILES["file"]["name"]);
1259  $solution = $solution
1260  ->withFilename($_FILES["file"]["name"])
1261  ->withMime($_FILES["file"]["type"])
1262  ->withSize($_FILES["file"]["size"])
1263  ->withTitle($_POST["filename"]);
1264 
1265  $this->getSuggestedSolutionsRepo()->update([$solution]);
1266 
1267  $originalexists = $this->object->getOriginalId() &&
1268  $this->questioninfo->questionExistsInPool($this->object->getOriginalId());
1269  if ($this->request->raw("calling_test") && $originalexists
1270  && assQuestion::_isWriteable($this->object->getOriginalId(), $ilUser->getId())) {
1271  $this->originalSyncForm("suggestedsolution");
1272  return;
1273  } else {
1274  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1275  $this->ctrl->redirect($this, "suggestedsolution");
1276  }
1277  } else {
1278  // BH: $res as info string? wtf? it holds a bool or something else!!?
1279  $this->tpl->setOnScreenMessage('info', $res);
1280  }
1281  } else {
1282  if ($solution->getFilename()) {
1283  $file->setValue($solution->getFilename());
1284  $file->setFilename($solution->getTitle());
1285  }
1286  }
1287  $form->addItem($file);
1288  $hidden = new ilHiddenInputGUI("solutiontype");
1289  $hidden->setValue("file");
1290  $form->addItem($hidden);
1291  }
1292  if ($ilAccess->checkAccess("write", "", $this->request->getRefId())) {
1293  $form->addCommandButton('cancelSuggestedSolution', $this->lng->txt('cancel'));
1294  $form->addCommandButton('saveSuggestedSolution', $this->lng->txt('save'));
1295  }
1296 
1297  if ($save) {
1298  if ($form->checkInput()) {
1299  if ($solution->isOfTypeFile()) {
1300  $solution = $solution->withTitle($_POST["filename"]);
1301  }
1302 
1303  if (!$solution->isOfTypeLink()) {
1304  $this->getSuggestedSolutionsRepo()->update([$solution]);
1305  }
1306 
1307  $originalexists = !is_null($this->object->getOriginalId()) &&
1308  $this->questioninfo->questionExistsInPool($this->object->getOriginalId());
1309  if ($this->request->raw("calling_test") && $originalexists
1310  && assQuestion::_isWriteable($this->object->getOriginalId(), $ilUser->getId())) {
1311  $this->originalSyncForm("suggestedsolution");
1312  return;
1313  } else {
1314  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1315  $this->ctrl->redirect($this, "suggestedsolution");
1316  }
1317  }
1318  }
1319 
1320  $output = $form->getHTML();
1321  }
1322 
1323  $savechange = $this->ctrl->getCmd() === "saveSuggestedSolutionType";
1324 
1325  $changeoutput = "";
1326  if ($ilAccess->checkAccess("write", "", $this->request->getRefId())) {
1327  $formchange = new ilPropertyFormGUI();
1328  $formchange->setFormAction($this->ctrl->getFormAction($this));
1329 
1330  $title = $solution ? $this->lng->txt("changeSuggestedSolution") : $this->lng->txt("addSuggestedSolution");
1331  $formchange->setTitle($title);
1332  $formchange->setMultipart(false);
1333  $formchange->setTableWidth("100%");
1334  $formchange->setId("suggestedsolution");
1335 
1336  $solutiontype = new ilRadioGroupInputGUI($this->lng->txt("suggestedSolutionType"), "solutiontype");
1337  foreach ($options as $opt_value => $opt_caption) {
1338  $solutiontype->addOption(new ilRadioOption($opt_caption, $opt_value));
1339  }
1340  if ($solution) {
1341  $solutiontype->setValue($solution->getType());
1342  }
1343  $solutiontype->setRequired(true);
1344  $formchange->addItem($solutiontype);
1345 
1346  $formchange->addCommandButton("saveSuggestedSolutionType", $this->lng->txt("select"));
1347 
1348  if ($savechange) {
1349  $formchange->checkInput();
1350  }
1351  $changeoutput = $formchange->getHTML();
1352  }
1353 
1354  $this->tpl->setVariable("ADM_CONTENT", $changeoutput . $output);
1355  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$res
Definition: ltiservices.php:69
This class represents a file property in a property form.
static _getInternalLinkHref(string $target="")
addOption(ilRadioOption $a_option)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static prepareFormOutput($a_str, bool $a_strip=false)
originalSyncForm(string $return_to="", string $return_to_feedback='')
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static renameExecutables(string $a_dir)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
setRequired(bool $a_required)
static _isWriteable(int $question_id, int $user_id)
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sync()

assQuestionGUI::sync ( )

Definition at line 637 of file class.assQuestionGUI.php.

References ilAssQuestionPreviewGUI\CMD_SHOW, ILIAS\Repository\ctrl(), ilTestExpressPage\getReturnToPageLink(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

637  : void
638  {
639  $original_id = $this->object->getOriginalId();
640  if ($original_id !== null) {
641  $this->object->syncWithOriginal();
642  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
643  }
644  if ($this->request->raw("return_to") !== null) {
645  $this->ctrl->redirect($this, $this->request->raw("return_to"));
646  }
647  if ($this->request->raw("return_to_fb") !== null) {
648  $this->ctrl->redirectByClass(ilAssQuestionFeedbackEditingGUI::class, 'showFeedbackForm');
649  }
650 
651  if ($this->request->raw('test_express_mode')) {
652  $this->ctrl->redirectToURL(ilTestExpressPage::getReturnToPageLink($this->object->getId()));
653  }
654 
655  $this->ctrl->redirectByClass(ilAssQuestionPreviewGUI::class, ilAssQuestionPreviewGUI::CMD_SHOW);
656  }
static getReturnToPageLink($q_id=null)
+ Here is the call graph for this function:

◆ writePostData()

assQuestionGUI::writePostData ( bool  $always = false)
protected

Evaluates a posted edit form and writes the form data in the question object.

Returns
integer A positive value, if one of the required fields wasn't set, else 0

Definition at line 434 of file class.assQuestionGUI.php.

Referenced by apply(), save(), saveEdit(), and saveReturn().

434  : int
435  {
436  return 0;
437  }
+ Here is the caller graph for this function:

◆ writeQuestionGenericPostData()

assQuestionGUI::writeQuestionGenericPostData ( )
protected

Definition at line 1781 of file class.assQuestionGUI.php.

References Vendor\Package\$e, $lifecycle, ilAssQuestionLifecycle\getInstance(), getPreview(), ILIAS\Repository\object(), and ilUtil\stripOnlySlashes().

Referenced by assOrderingQuestionGUI\uploadElementImage(), assErrorTextGUI\writePostData(), assTextQuestionGUI\writePostData(), assMatchingQuestionGUI\writePostData(), assTextSubsetGUI\writePostData(), assOrderingHorizontalGUI\writePostData(), assLongMenuGUI\writePostData(), assSingleChoiceGUI\writePostData(), assNumericGUI\writePostData(), assMultipleChoiceGUI\writePostData(), assFileUploadGUI\writePostData(), assImagemapQuestionGUI\writePostData(), assKprimChoiceGUI\writePostData(), assClozeTestGUI\writePostData(), and assOrderingQuestionGUI\writePostData().

1781  : void
1782  {
1783  $this->object->setTitle($_POST["title"]);
1784  $this->object->setAuthor($_POST["author"]);
1785  $this->object->setComment($_POST["comment"] ?? '');
1786  if ($this->object->getSelfAssessmentEditingMode()) {
1787  $this->object->setNrOfTries((int) ($_POST['nr_of_tries'] ?? 0));
1788  }
1789 
1790  try {
1791  $lifecycle = ilAssQuestionLifecycle::getInstance($_POST['lifecycle']);
1792  $this->object->setLifecycle($lifecycle);
1794  }
1795 
1796  $this->object->setQuestion(ilUtil::stripOnlySlashes($_POST['question']));
1797  }
$lifecycle
static stripOnlySlashes(string $a_str)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler assQuestionGUI::$access
private

Definition at line 65 of file class.assQuestionGUI.php.

Referenced by suggestedsolution().

◆ $component_repository

ilComponentRepository assQuestionGUI::$component_repository
private

Definition at line 73 of file class.assQuestionGUI.php.

◆ $ctrl

ilCtrl assQuestionGUI::$ctrl
protected

Definition at line 78 of file class.assQuestionGUI.php.

◆ $db

ilDBInterface assQuestionGUI::$db
private

Definition at line 71 of file class.assQuestionGUI.php.

◆ $editContext

string assQuestionGUI::$editContext = self::EDIT_CONTEXT_AUTHORING
private

Definition at line 125 of file class.assQuestionGUI.php.

Referenced by getEditContext(), and setEditContext().

◆ $editForm

ilPropertyFormGUI assQuestionGUI::$editForm
protected

Definition at line 129 of file class.assQuestionGUI.php.

Referenced by buildEditForm().

◆ $error

assQuestionGUI::$error

Definition at line 90 of file class.assQuestionGUI.php.

◆ $errormessage

string assQuestionGUI::$errormessage

Definition at line 91 of file class.assQuestionGUI.php.

Referenced by addErrorMessage(), getErrorMessage(), and setErrorMessage().

◆ $ilHelp

ilHelpGUI assQuestionGUI::$ilHelp
private

Definition at line 64 of file class.assQuestionGUI.php.

◆ $ilObjDataCache

ilObjectDataCache assQuestionGUI::$ilObjDataCache
private

Definition at line 63 of file class.assQuestionGUI.php.

◆ $ilTabs

ilTabsGUI assQuestionGUI::$ilTabs
private

Definition at line 67 of file class.assQuestionGUI.php.

◆ $ilUser

ilObjUser assQuestionGUI::$ilUser
private

◆ $lng

ilLanguage assQuestionGUI::$lng

Definition at line 87 of file class.assQuestionGUI.php.

◆ $logger

ilLogger assQuestionGUI::$logger
protected

Definition at line 72 of file class.assQuestionGUI.php.

◆ $navigationGUI

ilTestQuestionNavigationGUI assQuestionGUI::$navigationGUI = null
private

Definition at line 107 of file class.assQuestionGUI.php.

Referenced by getNavigationGUI(), and setNavigationGUI().

◆ $new_id_listener_cnt

int assQuestionGUI::$new_id_listener_cnt = 0
private

Definition at line 80 of file class.assQuestionGUI.php.

Referenced by addNewIdListener(), and callNewIdListeners().

◆ $new_id_listeners

array assQuestionGUI::$new_id_listeners = array()
private

Definition at line 79 of file class.assQuestionGUI.php.

◆ $notes_gui

ILIAS Notes GUIService assQuestionGUI::$notes_gui
protected

Definition at line 76 of file class.assQuestionGUI.php.

◆ $object

assQuestion assQuestionGUI::$object

Definition at line 85 of file class.assQuestionGUI.php.

Referenced by assFormulaQuestionGUI\isSaveCommand().

◆ $parent_type_is_lm

bool assQuestionGUI::$parent_type_is_lm = false
protected

Definition at line 131 of file class.assQuestionGUI.php.

Referenced by isInLearningModuleContext().

◆ $presentationContext

string assQuestionGUI::$presentationContext = null
private

Definition at line 112 of file class.assQuestionGUI.php.

Referenced by getPresentationContext(), and setPresentationContext().

◆ $previewSession

assQuestionGUI::$previewSession
private

Definition at line 83 of file class.assQuestionGUI.php.

Referenced by getPreviewSession(), and setPreviewSession().

◆ $previousSolutionPrefilled

bool assQuestionGUI::$previousSolutionPrefilled = false
private

◆ $question_count

int assQuestionGUI::$question_count

question count in test

Definition at line 97 of file class.assQuestionGUI.php.

Referenced by getQuestionCount().

◆ $questionActionCmd

string assQuestionGUI::$questionActionCmd = 'handleQuestionAction'
private

Definition at line 103 of file class.assQuestionGUI.php.

Referenced by getQuestionActionCmd(), and setQuestionActionCmd().

◆ $questionHeaderBlockBuilder

ilQuestionHeaderBlockBuilder assQuestionGUI::$questionHeaderBlockBuilder
private

◆ $questioninfo

ILIAS TestQuestionPool QuestionInfoService assQuestionGUI::$questioninfo
protected

Definition at line 74 of file class.assQuestionGUI.php.

◆ $rbacsystem

ilRbacSystem assQuestionGUI::$rbacsystem
private

Definition at line 68 of file class.assQuestionGUI.php.

◆ $refinery

Refinery assQuestionGUI::$refinery
protected

Definition at line 88 of file class.assQuestionGUI.php.

◆ $renderPurpose

string assQuestionGUI::$renderPurpose = self::RENDER_PURPOSE_PLAYBACK
private

Definition at line 120 of file class.assQuestionGUI.php.

Referenced by getRenderPurpose(), and setRenderPurpose().

◆ $request

ILIAS TestQuestionPool InternalRequestService assQuestionGUI::$request
protected

Definition at line 130 of file class.assQuestionGUI.php.

◆ $sequence_no

int assQuestionGUI::$sequence_no

sequence number in test

Definition at line 94 of file class.assQuestionGUI.php.

Referenced by getSequenceNumber().

◆ $suggestedsolution_repo

assQuestionSuggestedSolutionsDatabaseRepository assQuestionGUI::$suggestedsolution_repo = null
protected

Definition at line 2033 of file class.assQuestionGUI.php.

Referenced by getSuggestedSolutionsRepo().

◆ $targetGuiClass

assQuestionGUI::$targetGuiClass = null
private

Definition at line 101 of file class.assQuestionGUI.php.

Referenced by getTargetGuiClass(), and setTargetGuiClass().

◆ $taxonomyIds

assQuestionGUI::$taxonomyIds = []
private

Definition at line 99 of file class.assQuestionGUI.php.

Referenced by getTaxonomyIds(), and setTaxonomyIds().

◆ $tpl

◆ $tree

ilTree assQuestionGUI::$tree
private

Definition at line 70 of file class.assQuestionGUI.php.

◆ $ui

assQuestionGUI::$ui
private

Definition at line 62 of file class.assQuestionGUI.php.

◆ ALLOWED_PLAIN_TEXT_TAGS

const assQuestionGUI::ALLOWED_PLAIN_TEXT_TAGS = "<em>, <strong>"

sk - 12.05.2023: This const is also used in ilKprimChoiceWizardInputGUI.

Don't ask, but I didn't find an easy fix without undoing two more question types.

Definition at line 56 of file class.assQuestionGUI.php.

Referenced by ilKprimChoiceWizardInputGUI\cleanupAnswerText().

◆ CORRECTNESS_MOSTLY_OK

const assQuestionGUI::CORRECTNESS_MOSTLY_OK = 1

Definition at line 46 of file class.assQuestionGUI.php.

◆ CORRECTNESS_NOT_OK

const assQuestionGUI::CORRECTNESS_NOT_OK = 0

Definition at line 45 of file class.assQuestionGUI.php.

◆ CORRECTNESS_OK

const assQuestionGUI::CORRECTNESS_OK = 2

Definition at line 47 of file class.assQuestionGUI.php.

◆ EDIT_CONTEXT_ADJUSTMENT

const assQuestionGUI::EDIT_CONTEXT_ADJUSTMENT = 'adjustment'

Definition at line 123 of file class.assQuestionGUI.php.

◆ EDIT_CONTEXT_AUTHORING

const assQuestionGUI::EDIT_CONTEXT_AUTHORING = 'authoring'

◆ FORM_ENCODING_MULTIPART

const assQuestionGUI::FORM_ENCODING_MULTIPART = 'multipart/form-data'

Definition at line 39 of file class.assQuestionGUI.php.

◆ FORM_ENCODING_URLENCODE

const assQuestionGUI::FORM_ENCODING_URLENCODE = 'application/x-www-form-urlencoded'

Definition at line 38 of file class.assQuestionGUI.php.

◆ FORM_MODE_ADJUST

const assQuestionGUI::FORM_MODE_ADJUST = 'adjust'

Definition at line 36 of file class.assQuestionGUI.php.

◆ FORM_MODE_EDIT

const assQuestionGUI::FORM_MODE_EDIT = 'edit'

Definition at line 35 of file class.assQuestionGUI.php.

◆ HAS_SPECIAL_QUESTION_COMMANDS

const assQuestionGUI::HAS_SPECIAL_QUESTION_COMMANDS = false
protected

Definition at line 49 of file class.assQuestionGUI.php.

◆ PRESENTATION_CONTEXT_RESULTS

const assQuestionGUI::PRESENTATION_CONTEXT_RESULTS = 'pContextResults'

Definition at line 110 of file class.assQuestionGUI.php.

◆ PRESENTATION_CONTEXT_TEST

const assQuestionGUI::PRESENTATION_CONTEXT_TEST = 'pContextTest'

◆ RENDER_PURPOSE_DEMOPLAY

const assQuestionGUI::RENDER_PURPOSE_DEMOPLAY = 'renderPurposeDemoplay'

Definition at line 115 of file class.assQuestionGUI.php.

Referenced by ilAssQuestionPreviewGUI\initQuestion().

◆ RENDER_PURPOSE_INPUT_VALUE

const assQuestionGUI::RENDER_PURPOSE_INPUT_VALUE = 'renderPurposeInputValue'

Definition at line 118 of file class.assQuestionGUI.php.

◆ RENDER_PURPOSE_PLAYBACK

const assQuestionGUI::RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'

Definition at line 114 of file class.assQuestionGUI.php.

◆ RENDER_PURPOSE_PREVIEW

◆ RENDER_PURPOSE_PRINT_PDF

const assQuestionGUI::RENDER_PURPOSE_PRINT_PDF = 'renderPurposePrintPdf'

◆ RETURN_AFTER_EXISTING_SAVE

const assQuestionGUI::RETURN_AFTER_EXISTING_SAVE = 0
private

Definition at line 59 of file class.assQuestionGUI.php.

◆ RETURN_AFTER_EXISTING_WITH_ORIGINAL_SAVE

const assQuestionGUI::RETURN_AFTER_EXISTING_WITH_ORIGINAL_SAVE = -1
private

Definition at line 58 of file class.assQuestionGUI.php.

◆ SESSION_PREVIEW_DATA_BASE_INDEX

const assQuestionGUI::SESSION_PREVIEW_DATA_BASE_INDEX = 'ilAssQuestionPreviewAnswers'

Definition at line 61 of file class.assQuestionGUI.php.

◆ SUGGESTED_SOLUTION_COMMANDS_CANCEL

const assQuestionGUI::SUGGESTED_SOLUTION_COMMANDS_CANCEL = 'cancelSuggestedSolution'
protected

Definition at line 41 of file class.assQuestionGUI.php.

◆ SUGGESTED_SOLUTION_COMMANDS_DEFAULT

const assQuestionGUI::SUGGESTED_SOLUTION_COMMANDS_DEFAULT = 'suggestedsolution'
protected

Definition at line 43 of file class.assQuestionGUI.php.

◆ SUGGESTED_SOLUTION_COMMANDS_SAVE

const assQuestionGUI::SUGGESTED_SOLUTION_COMMANDS_SAVE = 'saveSuggestedSolution'
protected

Definition at line 42 of file class.assQuestionGUI.php.


The documentation for this class was generated from the following file: