ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
assQuestionGUI Class Reference
+ Inheritance diagram for assQuestionGUI:
+ Collaboration diagram for assQuestionGUI:

Public Member Functions

 editQuestion (bool $checkonly=false, ?bool $is_save_cmd=null)
 
 getSpecificFeedbackOutput (array $userSolution)
 Returns the answer specific feedback for the question. More...
 
 getSolutionOutput (int $active_id, ?int $pass=null, 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_inline_feedback=true)
 
 getPreview (bool $show_question_only=false, bool $show_inline_feedback=false)
 
 getTestOutput (int $active_id, int $pass, bool $is_question_postponed=false, array|bool $user_post_solutions=false, bool $show_specific_inline_feedback=false)
 
 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,)
 
 getObject ()
 
 setObject (assQuestion $question)
 
 setCopyToExistingPoolOnSave (?int $pool_ref_id)
 
 getCopyToExistingPoolOnSave ()
 
 setCopyToNewPoolOnSave (?string $pool_title)
 
 getCopyToNewPoolOnSave ()
 
 setMoveAfterQuestionId (?int $question_id)
 
 getMoveAfterQuestionId ()
 
 hasInlineFeedback ()
 
 addHeaderAction ()
 
 redrawHeaderAction ()
 
 getHeaderAction ()
 
 getCommentsPanelHTML ()
 
 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 (string $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)
 
 syncQuestion ()
 
 saveReturn ()
 
 saveQuestion ()
 
 setAdditionalContentEditingModeFromPost ()
 
 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)
 
 getQuestionType ()
 
 getAsValueAttribute (string $a_value)
 
 addQuestionFormCommandButtons (ilPropertyFormGUI $form)
 
 addBasicQuestionFormProperties (ilPropertyFormGUI $form)
 
 getGenericFeedbackOutput (int $active_id, ?int $pass)
 
 getGenericFeedbackOutputForCorrectSolution ()
 
 getGenericFeedbackOutputForIncorrectSolution ()
 
 outQuestionType ()
 
 saveSuggestedSolution ()
 
 cancelSuggestedSolution ()
 
 suggestedsolution (bool $save=false)
 
 outSolutionExplorer ()
 
 saveSuggestedSolutionType ()
 
 cancelExplorer ()
 
 outPageSelector ()
 
 outChapterSelector ()
 
 outGlossarySelector ()
 
 linkChilds ()
 
 addPG ()
 
 addST ()
 
 addGIT ()
 
 isSaveCommand ()
 
 setQuestionTabs ()
 
 addTab_SuggestedSolution (ilTabsGUI $tabs, string $classname)
 
 getEditQuestionTabCommands ()
 
 isAutosaveable ()
 
 outQuestionForTest (string $formaction, int $active_id, ?int $pass, bool $is_question_postponed=false, array|bool $user_post_solutions=false, bool $show_specific_inline_feedback=false)
 
 magicAfterTestOutput ()
 
 getFormEncodingType ()
 
 setPreviewSession (ilAssQuestionPreviewSession $preview_session)
 
 getPreviewSession ()
 
 buildFocusAnchorHtml ()
 
 isAnswerFrequencyStatisticSupported ()
 
 getSubQuestionsIndex ()
 
 getAnswersFrequency ($relevantAnswers, $questionIndex)
 
 getAnswerFrequencyTableGUI ($parentGui, $parentCmd, $relevantAnswers, $questionIndex)
 
 prepareReprintableCorrectionsForm (ilPropertyFormGUI $form)
 
 populateCorrectionsFormProperties (ilPropertyFormGUI $form)
 
 saveCorrectionsFormProperties (ilPropertyFormGUI $form)
 
 isInLearningModuleContext ()
 
 setInLearningModuleContext (bool $flag)
 
 cmdNeedsExistingQuestion (string $cmd)
 
 setContextAllowsSyncToPool (bool $sync_allowed)
 
 needsSyncQuery ()
 
 getQuestionSyncModal (string $cmd, string $cmd_class='')
 
 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)
 
 buildFileDownloadLink ()
 

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 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 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'
 
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 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'
 
const PRESENTATION_CONTEXT_TEST = 'pContextTest'
 
const PRESENTATION_CONTEXT_RESULTS = 'pContextResults'
 
const CMD_SYNC_QUESTION_AND_RETURN = 'syncQuestionReturn'
 

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 ()
 
 setTestSpecificProperties ()
 
 addNumberOfTriesToFormIfNecessary (ilPropertyFormGUI $form)
 
 saveTaxonomyAssignments ()
 
 populateTaxonomyFormSection (ilPropertyFormGUI $form)
 
 genericFeedbackOutputBuilder (int $active_id, ?int $pass)
 
 getTypeOptions ()
 
 createSuggestedSolutionLinkingTo (string $type, string $target)
 
 setDefaultTabs (ilTabsGUI $tabs_gui)
 
 setQuestionSpecificTabs (ilTabsGUI $tabs_gui)
 
 getBasicEditQuestionTabCommands ()
 
 getAdditionalEditQuestionCommands ()
 
 addTab_QuestionFeedback (ilTabsGUI $tabs)
 
 addTab_Question (ilTabsGUI $tabs_gui)
 
 hasCorrectSolution ($activeId, $passIndex)
 
 writeQuestionGenericPostData ()
 
 completeTestOutputFormAction (string $form_action, int $active_id, int $pass)
 
 addBackTab (ilTabsGUI $tabs_gui)
 
 buildBasicEditFormObject ()
 
 escapeTemplatePlaceholders (string $text)
 
 buildEditForm ()
 
 generateCorrectnessIconsForCorrectness (int $correctness)
 
 renderLatex ($content)
 Wrap content with latex in a LatexContent UI component and render it to be processed by MathJax in the browser. More...
 
 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 HAS_SPECIAL_QUESTION_COMMANDS = false
 
const SUGGESTED_SOLUTION_COMMANDS_CANCEL = 'cancelSuggestedSolution'
 
const SUGGESTED_SOLUTION_COMMANDS_SAVE = 'saveSuggestedSolution'
 
const SUGGESTED_SOLUTION_COMMANDS_DEFAULT = 'suggestedsolution'
 
const QUESTION_SAVE_CMDS
 
const ADDITIONAL_CMDS_NEEDING_EXISTING_QST
 There are functions that need an existing question. More...
 
ilLogger $logger
 
GeneralQuestionPropertiesRepository $questionrepository
 
GUIService $notes_gui
 
ilCtrl $ctrl
 
assQuestion $object
 
ilGlobalPageTemplate $tpl
 
ilLanguage $lng
 
Refinery $refinery
 
 $error
 
string $errormessage
 
int $sequence_no
 sequence number in test More...
 
int $question_count
 question count in test More...
 
ilPropertyFormGUI $editForm = null
 
readonly ilTestLegacyFormsHelper $forms_helper
 
readonly RequestDataCollector $request_data_collector
 
bool $parent_type_is_lm = false
 
SuggestedSolutionsDatabaseRepository $suggestedsolution_repo = null
 

Private Attributes

const CMD_SAVE = 'save'
 
const CMD_SAVE_AND_RETURN = 'saveReturn'
 
const CMD_SYNC_QUESTION = 'syncQuestion'
 
 $ui
 
ilObjectDataCache $ilObjDataCache
 
ilHelpGUI $ilHelp
 
ilAccessHandler $access
 
ilTabsGUI $tabs_gui
 
ilRbacSystem $rbacsystem
 
ilTree $tree
 
ilDBInterface $db
 
ilComponentRepository $component_repository
 
ilAssQuestionPreviewSession $preview_session = null
 
 $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
 
int $copy_to_existing_pool_on_save = null
 
string $copy_to_new_pool_on_save = null
 
int $move_after_question_with_id = null
 
bool $context_allows_sync_to_pool = false
 
string $question_sync_modal = ''
 

Detailed Description

Member Function Documentation

◆ _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 570 of file class.assQuestionGUI.php.

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

Referenced by ilObjQuestionPoolGUI\addLocatorItems(), ilObjQuestionPoolGUI\cleanupAfterImport(), ilObjTestGUI\createQuestionPool(), ilPCQuestionGUI\edit(), ilQuestionEditGUI\executeCommand(), ilObjTestGUI\executeCommand(), ilPageObjectGUI\executeCommand(), ilQuestionExporter\exportQuestion(), ilAssQuestionPageCommandForwarder\forward(), ilObjTestGUI\forwardCommandToQuestion(), ilPCQuestion\getJavascriptFiles(), ilPCQuestion\modifyPageContentPostXsl(), ilAssQuestionSkillAssignmentsGUI\saveSkillQuestionAssignmentPropertiesFormCmd(), ilObjQuestionPoolGUI\setTitleAndDescription(), and ilAssQuestionSkillAssignmentsGUI\showSkillQuestionAssignmentPropertiesFormCmd().

570  : ?assQuestionGUI
571  {
572  global $DIC;
573  $ilCtrl = $DIC['ilCtrl'];
574  $ilDB = $DIC['ilDB'];
575  $lng = $DIC['lng'];
576 
577  if (($question_type === '') && ($question_id > 0)) {
578  $question_type = QuestionPoolDIC::dic()['question.general_properties.repository']
579  ->getForQuestionId($question_id)?->getClassName();
580  }
581 
582  if ($question_type === null || $question_type === '') {
583  return null;
584  }
585 
586  $question_type_gui = $question_type . 'GUI';
587  $question = new $question_type_gui();
588 
589  $feedbackObjectClassname = assQuestion::getFeedbackClassNameByQuestionType($question_type);
590  $question->object->feedbackOBJ = new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
591 
592  if ($question_id > 0) {
593  $question->object->loadFromDb($question_id);
594  }
595 
596  return $question;
597  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:26
static getFeedbackClassNameByQuestionType(string $questionType)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addBackTab()

assQuestionGUI::addBackTab ( ilTabsGUI  $tabs_gui)
protected

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

References ilObject\_lookupType(), ilAssQuestionPreviewGUI\CMD_SHOW, ILIAS\Repository\ctrl(), ilObjectFactory\getClassByType(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilTabsGUI\setBackTarget().

Referenced by setQuestionTabs().

1712  : void
1713  {
1714  if ($this->object->getId() <= 0) {
1715  $tabs_gui->setBackTarget(
1716  $this->lng->txt('cancel'),
1717  $this->ctrl->getParentReturnByClass(
1719  ilObject::_lookupType($this->object->getObjId())
1720  ) . 'GUI'
1721  )
1722  );
1723  return;
1724  }
1725  $this->ctrl->setParameterByClass(
1726  ilAssQuestionPreviewGUI::class,
1727  'q_id',
1728  $this->object->getId()
1729  );
1730  $this->ctrl->saveParameterByClass(ilAssQuestionPreviewGUI::class, 'prev_qid');
1731  $tabs_gui->setBackTarget(
1732  $this->lng->txt('backtocallingpage'),
1733  $this->ctrl->getLinkTargetByClass(
1734  ilAssQuestionPreviewGUI::class,
1736  )
1737  );
1738  $this->ctrl->clearParameterByClass(ilAssQuestionPreviewGUI::class, 'prev_qid');
1739  }
setBackTarget(string $a_title, string $a_target, string $a_frame="")
static getClassByType(string $obj_type)
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addBasicQuestionFormProperties()

assQuestionGUI::addBasicQuestionFormProperties ( ilPropertyFormGUI  $form)

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

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

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

853  : void
854  {
855  $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
856  $title->setMaxLength(100);
857  $title->setValue($this->object->getTitle());
858  $title->setRequired(true);
859  $form->addItem($title);
860 
861  if (!$this->object->getSelfAssessmentEditingMode()) {
862  // author
863  $author = new ilTextInputGUI($this->lng->txt('author'), 'author');
864  $author->setValue($this->object->getAuthor());
865  $author->setMaxLength(512);
866  $author->setRequired(true);
867  $form->addItem($author);
868 
869  // description
870  $description = new ilTextInputGUI($this->lng->txt('description'), 'comment');
871  $description->setValue($this->object->getComment());
872  $description->setRequired(false);
873  $description->setMaxLength(1000);
874  $form->addItem($description);
875  } else {
876  // author as hidden field
877  $hi = new ilHiddenInputGUI('author');
878  $author = ilLegacyFormElementsUtil::prepareFormOutput($this->object->getAuthor());
879  if (trim($author) == "") {
880  $author = "-";
881  }
882  $hi->setValue($author);
883  $form->addItem($hi);
884  }
885 
886  // lifecycle
887  $lifecycle = new ilSelectInputGUI($this->lng->txt('qst_lifecycle'), 'lifecycle');
888  $lifecycle->setOptions($this->object->getLifecycle()->getSelectOptions($this->lng));
889  $lifecycle->setValue($this->object->getLifecycle()->getIdentifier());
890  $form->addItem($lifecycle);
891 
892  // questiontext
893  $question = new ilTextAreaInputGUI($this->lng->txt('question'), 'question');
894  $question->setValue($this->object->getQuestion());
895  $question->setRequired(true);
896  $question->setRows(10);
897  $question->setCols(80);
898 
899  if (!$this->object->getSelfAssessmentEditingMode()) {
900  if ($this->object->getAdditionalContentEditingMode() !== assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_IPE) {
901  $question->setUseRte(true);
902  $question->setRteTags(ilRTESettings::_getUsedHTMLTags('assessment'));
903  $question->setRTESupport($this->object->getId(), 'qpl', 'assessment');
904  }
905  } else {
907  $question->setUseTagsForRteOnly(false);
908  }
909  $question->setInfo($this->lng->txt('latex_edit_info'));
910  $form->addItem($question);
911 
912  $question_type = new ilHiddenInputGUI('question_type');
913  $question_type->setValue((string) $this->getQuestionType());
914  $form->addItem($question_type);
915 
916  if ($this->copy_to_existing_pool_on_save !== null) {
917  $pool_ref = new ilHiddenInputGUI('pool_ref');
918  $pool_ref->setValue((string) $this->copy_to_existing_pool_on_save);
919  $form->addItem($pool_ref);
920  }
921 
922  if ($this->copy_to_new_pool_on_save !== null) {
923  $pool_title = new ilHiddenInputGUI('pool_title');
924  $pool_title->setValue($this->copy_to_new_pool_on_save);
925  $form->addItem($pool_title);
926  }
927 
928  if ($this->move_after_question_with_id !== null) {
929  $move_after_question_id = new ilHiddenInputGUI('move_after_question_with_id');
930  $move_after_question_id->setValue((string) $this->move_after_question_with_id);
931  $form->addItem($move_after_question_id);
932  }
933 
934  $additional_content_editing_mode = new ilHiddenInputGUI('additional_content_editing_mode');
935  $additional_content_editing_mode->setValue($this->object->getAdditionalContentEditingMode());
936  $form->addItem($additional_content_editing_mode);
937 
938  $this->addNumberOfTriesToFormIfNecessary($form);
939  }
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)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _getUsedHTMLTags(string $module='')
This class represents a hidden form property in a property form.
$lifecycle
This class represents a text area property in a property form.
addNumberOfTriesToFormIfNecessary(ilPropertyFormGUI $form)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addErrorMessage()

assQuestionGUI::addErrorMessage ( string  $errormessage)

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

References $errormessage.

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

826  : void
827  {
828  $this->errormessage .= ((strlen($this->errormessage)) ? "<br />" : "") . $errormessage;
829  }
+ Here is the caller graph for this function:

◆ addGIT()

assQuestionGUI::addGIT ( )

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

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

1508  : void
1509  {
1510  $target = "il__git_" . $this->request_data_collector->raw("git");
1511  $this->createSuggestedSolutionLinkingTo('git', $target);
1512  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1513  $this->ctrl->redirect($this, 'suggestedsolution');
1514  }
createSuggestedSolutionLinkingTo(string $type, string $target)
+ Here is the call graph for this function:

◆ addHeaderAction()

assQuestionGUI::addHeaderAction ( )

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

296  : void
297  {
298  }

◆ addNumberOfTriesToFormIfNecessary()

assQuestionGUI::addNumberOfTriesToFormIfNecessary ( ilPropertyFormGUI  $form)
protected

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

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

Referenced by addBasicQuestionFormProperties().

942  {
943  if (!$this->object->getSelfAssessmentEditingMode()) {
944  return;
945  }
946 
947  $nr_tries = $this->object->getNrOfTries() ?? $this->object->getDefaultNrOfTries();
948 
949  if ($nr_tries < 1) {
950  $nr_tries = "";
951  }
952 
953  $ni = new ilNumberInputGUI($this->lng->txt("qst_nr_of_tries"), "nr_of_tries");
954  $ni->setValue((string) $nr_tries);
955  $ni->setMinValue(0);
956  $ni->setSize(5);
957  $ni->setMaxLength(5);
958  $form->addItem($ni);
959  }
This class represents a number property in a property form.
setValue(?string $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPG()

assQuestionGUI::addPG ( )

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

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

1492  : void
1493  {
1494  $target = "il__pg_" . $this->request_data_collector->raw("pg");
1495  $this->createSuggestedSolutionLinkingTo('pg', $target);
1496  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1497  $this->ctrl->redirect($this, 'suggestedsolution');
1498  }
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 1953 of file class.assQuestionGUI.php.

Referenced by assFormulaQuestionGUI\parseQuestion(), and renderEditForm().

1953  : void
1954  {
1955  $this->tpl->addOnloadCode("
1956  let form = document.querySelector('#ilContentContainer form');
1957  let button = form.querySelector('input[name=\"cmd[save]\"]');
1958  if (form && button) {
1959  form.addEventListener('keydown', function (e) {
1960  if (e.key === 'Enter'
1961  && e.target.type !== 'textarea'
1962  && e.target.type !== 'submit'
1963  && e.target.type !== 'file'
1964  ) {
1965  e.preventDefault();
1966  form.requestSubmit(button);
1967  }
1968  })
1969  }
1970  ");
1971  }
+ Here is the caller graph for this function:

◆ addST()

assQuestionGUI::addST ( )

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

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

1500  : void
1501  {
1502  $target = "il__st_" . $this->request_data_collector->raw("st");
1503  $this->createSuggestedSolutionLinkingTo('st', $target);
1504  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1505  $this->ctrl->redirect($this, 'suggestedsolution');
1506  }
createSuggestedSolutionLinkingTo(string $type, string $target)
+ Here is the call graph for this function:

◆ addTab_Question()

assQuestionGUI::addTab_Question ( ilTabsGUI  $tabs_gui)
protected

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

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

Referenced by setDefaultTabs().

1612  : void
1613  {
1614  $tabs_gui->addTarget(
1615  'edit_question',
1616  $this->ctrl->getLinkTargetByClass(
1617  static::class,
1618  'editQuestion'
1619  ),
1620  'editQuestion',
1621  '',
1622  '',
1623  false
1624  );
1625  }
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 1602 of file class.assQuestionGUI.php.

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

Referenced by setDefaultTabs().

1602  : void
1603  {
1604  $tabCommands = self::getCommandsFromClassConstants(ilAssQuestionFeedbackEditingGUI::class);
1605 
1606  $this->ctrl->setParameterByClass(ilAssQuestionFeedbackEditingGUI::class, 'q_id', $this->object->getId());
1607  $tabLink = $this->ctrl->getLinkTargetByClass(ilAssQuestionFeedbackEditingGUI::class, ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
1608 
1609  $tabs->addTarget('feedback', $tabLink, $tabCommands, $this->ctrl->getCmdClass(), '');
1610  }
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_SuggestedSolution()

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

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

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

Referenced by setDefaultTabs().

1568  : void
1569  {
1570  $this->ctrl->setParameterByClass($classname, 'q_id', $this->object->getId());
1571  $tabs->addTarget(
1572  'suggested_solution',
1573  $this->ctrl->getLinkTargetByClass($classname, 'suggestedsolution'),
1574  [
1575  'suggestedsolution',
1576  'saveSuggestedSolution',
1577  'outSolutionExplorer',
1578  'cancel',
1579  'addSuggestedSolution',
1580  'cancelExplorer' ,
1581  'linkChilds',
1582  'removeSuggestedSolution'
1583  ]
1584  );
1585  }
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:

◆ assessment()

assQuestionGUI::assessment ( )

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

556  : void
557  {
558  $stats_table = new ilQuestionCumulatedStatisticsTableGUI($this, 'assessment', '', $this->object, $this->questionrepository);
559  $usage_table = new ilQuestionUsagesTableGUI($this, 'assessment', '', $this->object);
560 
561  $this->tpl->setContent(implode('<br />', [
562  $stats_table->getHTML(),
563  $usage_table->getHTML()
564  ]));
565  }
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 1754 of file class.assQuestionGUI.php.

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

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

1755  {
1756  $form = new ilPropertyFormGUI();
1757  $form->setFormAction($this->ctrl->getFormAction($this));
1758  $form->setId($this->getType());
1759  $form->setTitle($this->outQuestionType());
1760  $form->setTableWidth('100%');
1761  $form->setMultipart(true);
1762  return $form;
1763  }
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 1770 of file class.assQuestionGUI.php.

References $editForm, and editQuestion().

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

1771  {
1772  $this->editQuestion(true); // TODO bheyser: editQuestion should be added to the abstract base class with a unified signature
1773  return $this->editForm;
1774  }
ilPropertyFormGUI $editForm
editQuestion(bool $checkonly=false, ?bool $is_save_cmd=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFileDownloadLink()

assQuestionGUI::buildFileDownloadLink ( )

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

References ILIAS\Repository\ctrl().

Referenced by ilAssQuestionSkillAssignmentsGUI\buildQuestionPage(), getILIASPage(), and outQuestionPage().

2042  : string
2043  {
2044  if (strtolower($this->request_data_collector->string('cmdClass')) === 'ilassquestionpreviewgui') {
2045  return $this->ctrl->getLinkTargetByClass(ilObjQuestionPoolGUI::class, 'downloadFile');
2046  }
2047  return $this->ctrl->getLinkTargetByClass(ilObjTestGUI::class, 'downloadFile');
2048  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFocusAnchorHtml()

assQuestionGUI::buildFocusAnchorHtml ( )

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

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

1776  : string
1777  {
1778  return '<div id="focus"></div>';
1779  }
+ Here is the caller graph for this function:

◆ cancelExplorer()

assQuestionGUI::cancelExplorer ( )

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

References ILIAS\Repository\ctrl().

1341  : void
1342  {
1343  $this->ctrl->redirect($this, 'suggestedsolution');
1344  }
+ Here is the call graph for this function:

◆ cancelSuggestedSolution()

assQuestionGUI::cancelSuggestedSolution ( )

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

References suggestedsolution().

1084  : void
1085  {
1086  $this->suggestedsolution();
1087  }
suggestedsolution(bool $save=false)
+ 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 1923 of file class.assQuestionGUI.php.

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

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

1923  : array
1924  {
1925  if (!is_array($answer_text)) {
1926  return [];
1927  }
1928 
1929  if ($is_rte) {
1931  $answer_text,
1932  false,
1934  );
1935  }
1936 
1938  $answer_text,
1939  true,
1940  self::ALLOWED_PLAIN_TEXT_TAGS
1941  );
1942  }
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")
static _getUsedHTMLTagsAsString(string $module='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmdNeedsExistingQuestion()

assQuestionGUI::cmdNeedsExistingQuestion ( string  $cmd)

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

1973  : bool
1974  {
1975  return in_array($cmd, static::ADDITIONAL_CMDS_NEEDING_EXISTING_QST);
1976  }

◆ completeTestOutputFormAction()

assQuestionGUI::completeTestOutputFormAction ( string  $form_action,
int  $active_id,
int  $pass 
)
protected

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

Referenced by outQuestionForTest().

1698  : string {
1699  return $form_action;
1700  }
+ Here is the caller graph for this function:

◆ createSuggestedSolutionLinkingTo()

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

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

References getSuggestedSolutionsRepo().

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

1457  {
1458  $repo = $this->getSuggestedSolutionsRepo();
1459  $question_id = $this->object->getId();
1460  $subquestion_index = $this->request_data_collector->int('subquestion_index');
1461  $subquestion_index = ($subquestion_index > 0) ? $subquestion_index : 0;
1462 
1463  $solution = $repo->create($question_id, $type)
1464  ->withSubquestionIndex($subquestion_index)
1465  ->withInternalLink($target);
1466 
1467  $repo->update([$solution]);
1468  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editQuestion()

assQuestionGUI::editQuestion ( bool  $checkonly = false,
?bool  $is_save_cmd = null 
)
abstract

◆ escapeTemplatePlaceholders()

assQuestionGUI::escapeTemplatePlaceholders ( string  $text)
protected

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

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

1765  : string
1766  {
1767  return str_replace(['{','}'], ['&#123;','&#125;'], $text);
1768  }
+ Here is the caller graph for this function:

◆ executeCommand()

assQuestionGUI::executeCommand ( )

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

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

333  {
334  $this->ilHelp->setScreenIdComponent('qpl');
335 
336  $next_class = $this->ctrl->getNextClass($this);
337 
338  switch ($next_class) {
339  case 'ilformpropertydispatchgui':
340  $form = $this->buildEditForm();
341  $form_prop_dispatch = new ilFormPropertyDispatchGUI();
342  $form_prop_dispatch->setItem($form->getItemByPostVar(ilUtil::stripSlashes($this->request_data_collector->string('postvar'))));
343  $this->ctrl->forwardCommand($form_prop_dispatch);
344  break;
345  default:
346  $cmd = $this->ctrl->getCmd('editQuestion');
347  switch ($cmd) {
348  case self::SUGGESTED_SOLUTION_COMMANDS_CANCEL:
349  case self::SUGGESTED_SOLUTION_COMMANDS_SAVE:
350  case self::SUGGESTED_SOLUTION_COMMANDS_DEFAULT:
351  case 'saveSuggestedSolutionType':
352  case 'saveContentsSuggestedSolution':
353  case 'deleteSuggestedSolution':
354  case 'linkChilds':
355  case 'cancelExplorer':
356  case 'outSolutionExplorer':
357  case 'addST':
358  case 'addPG':
359  case 'addGIT':
360  case 'save':
361  case 'saveReturn':
362  case self::CMD_SYNC_QUESTION:
363  case self::CMD_SYNC_QUESTION_AND_RETURN:
364  case 'editQuestion':
365  $this->$cmd();
366  break;
367  default:
368  if (method_exists($this, $cmd)) {
369  $this->$cmd();
370  }
371  }
372  }
373  }
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...
+ Here is the call graph for this function:

◆ generateCorrectnessIconsForCorrectness()

assQuestionGUI::generateCorrectnessIconsForCorrectness ( int  $correctness)
protected

Definition at line 1818 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(), assSingleChoiceGUI\renderSolutionOutput(), assMultipleChoiceGUI\renderSolutionOutput(), assErrorTextGUI\renderSolutionOutput(), assMatchingQuestionGUI\renderSolutionOutput(), assKprimChoiceGUI\renderSolutionOutput(), assClozeTestGUI\renderSolutionOutput(), and assFormulaQuestionGUI\renderSolutionOutput().

1818  : string
1819  {
1820  switch ($correctness) {
1821  case self::CORRECTNESS_NOT_OK:
1822  $icon_name = 'standard/icon_not_ok.svg';
1823  $label = $this->lng->txt("answer_is_wrong");
1824  break;
1825  case self::CORRECTNESS_MOSTLY_OK:
1826  $icon_name = 'standard/icon_mostly_ok.svg';
1827  $label = $this->lng->txt("answer_is_not_correct_but_positive");
1828  break;
1829  case self::CORRECTNESS_OK:
1830  $icon_name = 'standard/icon_ok.svg';
1831  $label = $this->lng->txt("answer_is_right");
1832  break;
1833  default:
1834  return '';
1835  }
1836  $path = ilUtil::getImagePath($icon_name);
1837  $icon = $this->ui->factory()->symbol()->icon()->custom(
1838  $path,
1839  $label
1840  );
1841  return $this->ui->renderer()->render($icon);
1842  }
$path
Definition: ltiservices.php:29
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ genericFeedbackOutputBuilder()

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

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

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

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

1022  : string {
1023  if ($pass === null) {
1024  return '';
1025  }
1026  $reached_points = $this->object->calculateReachedPoints($active_id, $pass);
1027  $max_points = $this->object->getMaximumPoints();
1028 
1029  $is_correct = false;
1030  if ($reached_points == $max_points) {
1031  $is_correct = true;
1032  }
1033 
1034  return $this->object->feedbackOBJ->getGenericFeedbackTestPresentation(
1035  $this->object->getId(),
1036  $is_correct
1037  );
1038  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdditionalEditQuestionCommands()

assQuestionGUI::getAdditionalEditQuestionCommands ( )
protected

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

Referenced by getEditQuestionTabCommands().

1597  : array
1598  {
1599  return [];
1600  }
+ Here is the caller graph for this function:

◆ getAnswerFrequencyTableGUI()

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

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

References getAnswersFrequency().

1797  {
1798  $table = new ilAnswerFrequencyStatisticTableGUI($parentGui, $parentCmd, $this->object);
1799  $table->setQuestionIndex($questionIndex);
1800  $table->setData($this->getAnswersFrequency($relevantAnswers, $questionIndex));
1801  $table->initColumns();
1802  return $table;
1803  }
getAnswersFrequency($relevantAnswers, $questionIndex)
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:

◆ getAnswersFrequency()

assQuestionGUI::getAnswersFrequency (   $relevantAnswers,
  $questionIndex 
)

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

Referenced by getAnswerFrequencyTableGUI().

1791  : array
1792  {
1793  return [];
1794  }
+ Here is the caller graph for this function:

◆ getAsValueAttribute()

assQuestionGUI::getAsValueAttribute ( string  $a_value)

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

836  : string
837  {
838  $result = "";
839  if (strlen($a_value)) {
840  $result = " value=\"$a_value\" ";
841  }
842  return $result;
843  }

◆ 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 2009 of file class.assQuestionGUI.php.

References null, and renderSolutionOutput().

Referenced by ILIAS\Test\Scoring\Manual\TestScoringByQuestionGUI\buildAutosavedSolutionPanel().

2021  : ?string {
2022  $autosave_solutions = $this->object->getSolutionValues($active_id, $pass, false);
2023  if ($autosave_solutions === []) {
2024  return null;
2025  }
2026  return $this->renderSolutionOutput(
2027  $autosave_solutions,
2028  $active_id,
2029  $pass,
2030  $graphical_output,
2031  $result_output,
2032  $show_question_only,
2033  $show_feedback,
2034  $show_correct_solution,
2035  $show_manual_scoring,
2036  $show_question_text,
2037  $show_autosave_title,
2038  $show_inline_feedback
2039  );
2040  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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:
+ Here is the caller graph for this function:

◆ getBasicEditQuestionTabCommands()

assQuestionGUI::getBasicEditQuestionTabCommands ( )
protected

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

Referenced by getEditQuestionTabCommands().

1592  : array
1593  {
1594  return ['editQuestion', 'save', 'originalSyncForm'];
1595  }
+ Here is the caller graph for this function:

◆ getCommandsFromClassConstants()

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

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

References null.

Referenced by ilPCQuestionGUI\setTabs().

1524  : array {
1525  $reflectionClass = new ReflectionClass($guiClassName);
1526 
1527  $commands = null;
1528 
1529  if ($reflectionClass instanceof ReflectionClass) {
1530  $commands = [];
1531 
1532  foreach ($reflectionClass->getConstants() as $constName => $constValue) {
1533  if (substr($constName, 0, strlen($cmdConstantNameBegin)) == $cmdConstantNameBegin) {
1534  $commands[] = $constValue;
1535  }
1536  }
1537  }
1538 
1539  return $commands;
1540  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ getCommentsPanelHTML()

assQuestionGUI::getCommentsPanelHTML ( )

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

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

326  : string
327  {
328  $comment_gui = new ilCommentGUI($this->object->getObjId(), $this->object->getId(), 'quest');
329  return $comment_gui->getListHTML();
330  }
getListHTML(bool $a_init_form=true)
Comment GUI.
+ Here is the call 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 778 of file class.assQuestionGUI.php.

References $path.

Referenced by outPageSelector().

778  : string
779  {
780  $path = "";
781 
782  $tmpPath = $cont_obj->getLMTree()->getPathFull($a_endnode_id, $a_startnode_id);
783 
784  // count -1, to exclude the learning module itself
785  for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
786  if ($path != "") {
787  $path .= " > ";
788  }
789 
790  $path .= $tmpPath[$i]["title"];
791  }
792 
793  return $path;
794  }
$path
Definition: ltiservices.php:29
+ Here is the caller graph for this function:

◆ getCopyToExistingPoolOnSave()

assQuestionGUI::getCopyToExistingPoolOnSave ( )

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

References $copy_to_existing_pool_on_save.

Referenced by ilObjTestGUI\executeAfterQuestionCreationTasks().

266  : ?int
267  {
269  }
+ Here is the caller graph for this function:

◆ getCopyToNewPoolOnSave()

assQuestionGUI::getCopyToNewPoolOnSave ( )

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

References $copy_to_new_pool_on_save.

Referenced by ilObjTestGUI\executeAfterQuestionCreationTasks().

276  : ?string
277  {
279  }
+ Here is the caller graph for this function:

◆ getEditContext()

assQuestionGUI::getEditContext ( )

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

References $editContext.

Referenced by isAdjustmentEditContext(), and isAuthoringEditContext().

461  : string
462  {
463  return $this->editContext;
464  }
+ Here is the caller graph for this function:

◆ getEditQuestionTabCommands()

assQuestionGUI::getEditQuestionTabCommands ( )
final

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

References getAdditionalEditQuestionCommands(), and getBasicEditQuestionTabCommands().

1587  : array
1588  {
1589  return array_merge($this->getBasicEditQuestionTabCommands(), $this->getAdditionalEditQuestionCommands());
1590  }
+ Here is the call graph for this function:

◆ getErrorMessage()

assQuestionGUI::getErrorMessage ( )

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

References $errormessage.

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

816  : string
817  {
818  return $this->errormessage;
819  }
+ Here is the caller graph for this function:

◆ getFormEncodingType()

assQuestionGUI::getFormEncodingType ( )

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

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

1707  : string
1708  {
1709  return self::FORM_ENCODING_URLENCODE;
1710  }
+ Here is the caller graph for this function:

◆ getGenericFeedbackOutput()

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

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

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

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

1004  : string
1005  {
1006  $manual_feedback = ilObjTest::getManualFeedback($active_id, $this->object->getId(), $pass);
1007  if ($manual_feedback !== '') {
1008  return $manual_feedback;
1009  }
1010 
1011  $output = $this->genericFeedbackOutputBuilder($active_id, $pass);
1012 
1013  if ($this->object->isAdditionalContentEditingModePageObject()) {
1014  return $output;
1015  }
1016  return $this->renderLatex(ilLegacyFormElementsUtil::prepareTextareaOutput($output, true));
1017  }
genericFeedbackOutputBuilder(int $active_id, ?int $pass)
renderLatex($content)
Wrap content with latex in a LatexContent UI component and render it to be processed by MathJax in th...
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 1040 of file class.assQuestionGUI.php.

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

1040  : string
1041  {
1043  $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true),
1044  true
1045  ));
1046  }
renderLatex($content)
Wrap content with latex in a LatexContent UI component and render it to be processed by MathJax in th...
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 1048 of file class.assQuestionGUI.php.

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

1048  : string
1049  {
1050  return $this->renderLatex(
1052  $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false),
1053  true
1054  )
1055  );
1056  }
renderLatex($content)
Wrap content with latex in a LatexContent UI component and render it to be processed by MathJax in th...
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 306 of file class.assQuestionGUI.php.

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

Referenced by redrawHeaderAction().

306  : string
307  {
308  $parentObjType = $this->ilObjDataCache->lookupType($this->object->getObjId());
309 
310  $dispatcher = new ilCommonActionDispatcherGUI(
312  $this->access,
313  $parentObjType,
314  $this->request_data_collector->getRefId(),
315  $this->object->getObjId()
316  );
317 
318  $dispatcher->setSubObject("quest", $this->object->getId());
319 
320  $ha = $dispatcher->initHeaderAction();
321  $ha->enableComments(true, false);
322 
323  return $ha->getHeaderAction($this->ui->mainTemplate());
324  }
setSubObject(?string $sub_obj_type, ?int $sub_obj_id)
Set sub object attributes.
Class ilCommonActionDispatcherGUI.
+ 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 629 of file class.assQuestionGUI.php.

References buildFileDownloadLink(), ILIAS\Repository\object(), and ilPageObjectGUI\setFileDownloadLink().

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

629  : string
630  {
631  $page_gui = new ilAssQuestionPageGUI($this->object->getId());
632  $page_gui->setFileDownloadLink($this->buildFileDownloadLink());
633  $page_gui->setQuestionHTML(
634  [$this->object->getId() => $html]
635  );
636  $presentation = $page_gui->presentation();
637  $presentation = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $presentation);
638  return $presentation;
639  }
Question page GUI class.
setFileDownloadLink(string $a_download_link)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMoveAfterQuestionId()

assQuestionGUI::getMoveAfterQuestionId ( )

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

References $move_after_question_with_id.

Referenced by ilObjTestGUI\executeAfterQuestionCreationTasks().

286  : ?int
287  {
289  }
+ Here is the caller graph for this function:

◆ getNavigationGUI()

assQuestionGUI::getNavigationGUI ( )

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

References $navigationGUI.

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ getObject()

assQuestionGUI::getObject ( )
Deprecated:
sk 25 FEB 2024: I introduce this to not have to have the object public, I don't think the process to access the question object through the QuestiionGUI is correct and should go asap!

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

References $object.

Referenced by ILIAS\Test\Questions\Presentation\Printer\addQuestionResultForTestUsersToTemplate(), ilTestCorrectionsGUI\buildQuestionCorrectionForm(), ilAssQuestionSkillAssignmentsGUI\buildQuestionPage(), ILIAS\Test\Scoring\Manual\TestScoringByQuestionGUI\buildSolutionPanel(), ilObjTestGUI\copyQuestionToPool(), ilTestPlayerAbstractGUI\determineSolutionPassIndex(), ilObjTestGUI\executeAfterQuestionCreationTasks(), ilObjTestGUI\executeAfterQuestionSaveTasks(), ilTestCorrectionsGUI\getQuestionGUI(), ilAssQuestionPreviewGUI\initQuestion(), ilTestPlayerAbstractGUI\populateInstantResponseBlocks(), ilTestPlayerAbstractGUI\populateInstantResponseModal(), ilTestCorrectionsGUI\populatePageTitleAndDescription(), ilTestPlayerAbstractGUI\populateQuestionEditControl(), ilTestPlayerAbstractGUI\populateSpecificFeedbackBlock(), ilTestCorrectionsGUI\saveQuestion(), ilTestCorrectionsGUI\setCorrectionTabsContext(), ilObjTestGUI\showNextViewAfterQuestionSave(), ilTestPlayerAbstractGUI\showQuestionEditable(), ilTestPlayerAbstractGUI\showQuestionViewable(), ilTestCorrectionsGUI\showSolution(), and ilTestCorrectionsGUI\supportsAdjustment().

247  : assQuestion
248  {
249  return $this->object;
250  }
+ Here is the caller graph for this function:

◆ getPresentationContext()

assQuestionGUI::getPresentationContext ( )

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

References $presentationContext.

Referenced by isTestPresentationContext().

386  : ?string
387  {
389  }
+ Here is the caller graph for this function:

◆ getPresentationJavascripts()

assQuestionGUI::getPresentationJavascripts ( )

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

Referenced by populateJavascriptFilesRequiredForWorkForm().

606  : array
607  {
608  return [];
609  }
+ Here is the caller graph for this function:

◆ getPreview()

assQuestionGUI::getPreview ( bool  $show_question_only = false,
bool  $show_inline_feedback = false 
)
abstract

◆ getPreviewSession()

◆ getPreviousSolutionConfirmationCheckboxHtml()

assQuestionGUI::getPreviousSolutionConfirmationCheckboxHtml ( )
protected

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

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

Referenced by outQuestionPage().

685  : string
686  {
687  $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'components/ILIAS/TestQuestionPool');
688  $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->lng->txt('use_previous_solution'));
689  return $tpl->get();
690  }
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 680 of file class.assQuestionGUI.php.

References ILIAS\Repository\lng().

Referenced by outQuestionPage().

680  : string
681  {
682  return $this->lng->txt('use_previous_solution_advice');
683  }
+ 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 811 of file class.assQuestionGUI.php.

References $question_count.

811  : int
812  {
813  return $this->question_count;
814  }
int $question_count
question count in test

◆ getQuestionHeaderBlockBuilder()

assQuestionGUI::getQuestionHeaderBlockBuilder ( )

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

References $questionHeaderBlockBuilder.

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

528  {
530  }
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:

◆ getQuestionSyncModal()

assQuestionGUI::getQuestionSyncModal ( string  $cmd,
string  $cmd_class = '' 
)

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

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

Referenced by saveQuestion().

1989  : string
1990  {
1991  if ($cmd_class === '') {
1992  $cmd_class = static::class;
1993  }
1994  $modal = $this->ui->factory()->modal()->interruptive(
1995  $this->lng->txt('confirm'),
1996  $this->lng->txt('confirm_sync_questions'),
1997  $this->ctrl->getFormActionByClass($cmd_class, $cmd)
1998  )->withAffectedItems([
1999  $this->ui->factory()->modal()->interruptiveItem()->standard(
2000  (string) $this->object->getOriginalId(),
2001  $this->object->getTitleForHTMLOutput()
2002  )
2003  ])->withActionButtonLabel($this->lng->txt('sync_question_to_pool'));
2004  return $this->ui->renderer()->render(
2005  $modal->withOnLoad($modal->getShowSignal())
2006  );
2007  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionTemplate()

assQuestionGUI::getQuestionTemplate ( )

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

Referenced by assTextQuestionGUI\addSuggestedSolution(), assImagemapQuestionGUI\areaEditor(), and renderEditForm().

611  : void
612  {
613  // @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
614  if (!$this->tpl->blockExists('adm_content')) {
615  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.il_as_question.html', 'components/ILIAS/TestQuestionPool');
616  }
617  }
+ Here is the caller graph for this function:

◆ getQuestionType()

assQuestionGUI::getQuestionType ( )

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

Referenced by addBasicQuestionFormProperties(), and getType().

831  : string
832  {
833  return $this->object->getQuestionType();
834  }
+ Here is the caller graph for this function:

◆ getRenderPurpose()

assQuestionGUI::getRenderPurpose ( )

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

References $renderPurpose.

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

413  : string
414  {
415  return $this->renderPurpose;
416  }
+ Here is the caller graph for this function:

◆ getSequenceNumber()

assQuestionGUI::getSequenceNumber ( )

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

References $sequence_no.

801  : int
802  {
803  return $this->sequence_no;
804  }
int $sequence_no
sequence number in test

◆ getSolutionOutput()

assQuestionGUI::getSolutionOutput ( int  $active_id,
?int  $pass = null,
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_inline_feedback = true 
)
abstract

◆ getSpecificFeedbackOutput()

assQuestionGUI::getSpecificFeedbackOutput ( array  $userSolution)
abstract

Returns the answer specific feedback for the question.

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

Referenced by ilTestPlayerAbstractGUI\populateSpecificFeedbackBlock().

+ Here is the caller graph for this function:

◆ getSubQuestionsIndex()

assQuestionGUI::getSubQuestionsIndex ( )

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

1786  : array
1787  {
1788  return [0];
1789  }

◆ getSuggestedSolutionsRepo()

assQuestionGUI::getSuggestedSolutionsRepo ( )
protected

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

References $dic, and $suggestedsolution_repo.

Referenced by createSuggestedSolutionLinkingTo(), and suggestedsolution().

1911  {
1912  if (is_null($this->suggestedsolution_repo)) {
1913  $dic = QuestionPoolDIC::dic();
1914  $this->suggestedsolution_repo = $dic['question.repo.suggestedsolutions'];
1915  }
1917  }
SuggestedSolutionsDatabaseRepository $suggestedsolution_repo
$dic
Definition: result.php:31
+ Here is the caller graph for this function:

◆ getTargetGuiClass()

assQuestionGUI::getTargetGuiClass ( )

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

References $targetGuiClass.

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

516  : ?string
517  {
518  return $this->targetGuiClass;
519  }
+ Here is the caller graph for this function:

◆ getTaxonomyIds()

assQuestionGUI::getTaxonomyIds ( )

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

References $taxonomyIds.

Referenced by populateTaxonomyFormSection(), and saveTaxonomyAssignments().

501  : array
502  {
503  return $this->taxonomyIds;
504  }
+ Here is the caller graph for this function:

◆ getTestOutput()

assQuestionGUI::getTestOutput ( int  $active_id,
int  $pass,
bool  $is_question_postponed = false,
array|bool  $user_post_solutions = false,
bool  $show_specific_inline_feedback = false 
)
abstract

Referenced by outQuestionForTest().

+ Here is the caller graph for this function:

◆ getType()

assQuestionGUI::getType ( )

needed for page editor compliance

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

References getQuestionType().

Referenced by buildBasicEditFormObject().

381  : string
382  {
383  return $this->getQuestionType();
384  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTypeOptions()

assQuestionGUI::getTypeOptions ( )
protected

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

References ILIAS\Repository\lng().

Referenced by suggestedsolution().

1071  : array
1072  {
1073  foreach (SuggestedSolution::TYPES as $k => $v) {
1074  $options[$k] = $this->lng->txt($v);
1075  }
1076  return $options;
1077  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUseUnchangedAnswerCheckboxHtml()

assQuestionGUI::getUseUnchangedAnswerCheckboxHtml ( )
protected

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

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

Referenced by outQuestionPage().

673  : string
674  {
675  $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'components/ILIAS/TestQuestionPool');
676  $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->object->getTestPresentationConfig()->getUseUnchangedAnswerLabel());
677  return $tpl->get();
678  }
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 291 of file class.assQuestionGUI.php.

Referenced by ilTestPlayerAbstractGUI\populateInstantResponseBlocks().

291  : bool
292  {
293  return false;
294  }
+ Here is the caller graph for this function:

◆ hasSpecialQuestionCommands()

assQuestionGUI::hasSpecialQuestionCommands ( )
protected

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

375  : bool
376  {
377  return static::HAS_SPECIAL_QUESTION_COMMANDS;
378  }

◆ isAdjustmentEditContext()

assQuestionGUI::isAdjustmentEditContext ( )

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

References getEditContext().

476  : bool
477  {
478  return $this->getEditContext() == self::EDIT_CONTEXT_ADJUSTMENT;
479  }
+ Here is the call graph for this function:

◆ isAnswerFrequencyStatisticSupported()

assQuestionGUI::isAnswerFrequencyStatisticSupported ( )

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

Referenced by ilTestCorrectionsGUI\setCorrectionTabsContext().

1781  : bool
1782  {
1783  return true;
1784  }
+ Here is the caller graph for this function:

◆ isAuthoringEditContext()

assQuestionGUI::isAuthoringEditContext ( )

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

References getEditContext().

471  : bool
472  {
473  return $this->getEditContext() == self::EDIT_CONTEXT_AUTHORING;
474  }
+ Here is the call graph for this function:

◆ isAutosaveable()

assQuestionGUI::isAutosaveable ( )

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

1635  : bool
1636  {
1637  return $this->object instanceof QuestionAutosaveable;
1638  }

◆ isInLearningModuleContext()

assQuestionGUI::isInLearningModuleContext ( )

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

References $parent_type_is_lm.

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

1944  : bool
1945  {
1946  return $this->parent_type_is_lm;
1947  }
+ Here is the caller graph for this function:

◆ isPreviousSolutionPrefilled()

assQuestionGUI::isPreviousSolutionPrefilled ( )

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

References $previousSolutionPrefilled.

402  : bool
403  {
405  }

◆ isRenderPurposeDemoplay()

assQuestionGUI::isRenderPurposeDemoplay ( )

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

References getRenderPurpose().

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

443  : bool
444  {
445  return $this->getRenderPurpose() == self::RENDER_PURPOSE_DEMOPLAY;
446  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposeInputValue()

assQuestionGUI::isRenderPurposeInputValue ( )

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

References getRenderPurpose().

Referenced by renderPurposeSupportsFormHtml().

433  : bool
434  {
435  return $this->getRenderPurpose() == self::RENDER_PURPOSE_INPUT_VALUE;
436  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePlayback()

assQuestionGUI::isRenderPurposePlayback ( )

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

References getRenderPurpose().

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

438  : bool
439  {
440  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PLAYBACK;
441  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePreview()

assQuestionGUI::isRenderPurposePreview ( )

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

References getRenderPurpose().

428  : bool
429  {
430  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PREVIEW;
431  }
+ Here is the call graph for this function:

◆ isRenderPurposePrintPdf()

assQuestionGUI::isRenderPurposePrintPdf ( )

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

References getRenderPurpose().

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

423  : bool
424  {
425  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PRINT_PDF;
426  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSaveCommand()

◆ isTestPresentationContext()

◆ linkChilds()

assQuestionGUI::linkChilds ( )

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

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

1470  : void
1471  {
1472  $this->ctrl->saveParameter($this, ["subquestion_index", "link_new_type", "search_link_type"]);
1473  switch ($this->request_data_collector->string("search_link_type")) {
1474  case "pg":
1475  $this->outPageSelector();
1476  break;
1477  case "st":
1478  $this->outChapterSelector();
1479  break;
1480  case "glo":
1481  $this->outGlossarySelector();
1482  break;
1483  case "lm":
1484  $target = "il__lm_" . $this->request_data_collector->raw("source_id");
1485  $this->createSuggestedSolutionLinkingTo('lm', $target);
1486  $this->tpl->setOnScreenMessage('success', $this->lng->txt("suggested_solution_added_successfully"), true);
1487  $this->ctrl->redirect($this, 'suggestedsolution');
1488  break;
1489  }
1490  }
createSuggestedSolutionLinkingTo(string $type, string $target)
+ Here is the call graph for this function:

◆ magicAfterTestOutput()

assQuestionGUI::magicAfterTestOutput ( )

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

Referenced by outQuestionForTest().

1702  : void
1703  {
1704  return;
1705  }
+ Here is the caller graph for this function:

◆ needsSyncQuery()

assQuestionGUI::needsSyncQuery ( )

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

Referenced by saveQuestion().

1983  : bool
1984  {
1985  return $this->context_allows_sync_to_pool
1986  && $this->object->hasWritableOriginalInQuestionPool();
1987  }
+ Here is the caller graph for this function:

◆ outChapterSelector()

assQuestionGUI::outChapterSelector ( )

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

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

Referenced by linkChilds().

1400  : void
1401  {
1402  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1403 
1404  $cont_obj_gui = new ilObjContentObjectGUI('', $this->request_data_collector->int('source_id'), true);
1405  $cont_obj = $cont_obj_gui->getObject();
1406  $ctree = $cont_obj->getLMTree();
1407  $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
1408 
1409  $rows = [];
1410 
1411  foreach ($nodes as $node) {
1412  if ($node['type'] == $this->request_data_collector->raw('search_link_type')) {
1413  $this->ctrl->setParameter($this, $node['type'], $node['obj_id']);
1414  $rows[] = [
1415  'title' => $node['title'],
1416  'description' => '',
1417  'text_add' => $this->lng->txt('add'),
1418  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($node['type']))
1419  ];
1420  }
1421  }
1422 
1423  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1424  $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($this->request_data_collector->string('search_link_type'))));
1425  $table->setData($rows);
1426 
1427  $this->tpl->setContent($table->getHTML());
1428  }
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 1430 of file class.assQuestionGUI.php.

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

Referenced by linkChilds().

1430  : void
1431  {
1432  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1433 
1434  $glossary = new ilObjGlossary($this->request_data_collector->int('source_id'), true);
1435  $terms = $glossary->getTermList();
1436 
1437  $rows = [];
1438 
1439  foreach ($terms as $term) {
1440  $this->ctrl->setParameter($this, 'git', $term['id']);
1441  $rows[] = [
1442  'title' => $term['term'],
1443  'description' => '',
1444  'text_add' => $this->lng->txt('add'),
1445  'href_add' => $this->ctrl->getLinkTarget($this, 'addGIT')
1446  ];
1447  }
1448 
1449  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1450  $table->setTitle($this->lng->txt('glossary_term'));
1451  $table->setData($rows);
1452 
1453  $this->tpl->setContent($table->getHTML());
1454  }
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...
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 1346 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().

1346  : void
1347  {
1348  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1349 
1350  $cont_obj_gui = new ilObjContentObjectGUI('', $this->request_data_collector->int('source_id'), true);
1351  $cont_obj = $cont_obj_gui->getObject();
1352  $pages = ilLMPageObject::getPageList($cont_obj->getId());
1353  $shownpages = [];
1354  $tree = $cont_obj->getLMTree();
1355  $chapters = $tree->getSubtree($tree->getNodeData($tree->getRootId()));
1356 
1357  $rows = [];
1358 
1359  foreach ($chapters as $chapter) {
1360  $chapterpages = $tree->getChildsByType($chapter['obj_id'], 'pg');
1361  foreach ($chapterpages as $page) {
1362  if ($page['type'] == $this->request_data_collector->raw('search_link_type')) {
1363  array_push($shownpages, $page['obj_id']);
1364 
1365  if ($tree->isInTree($page['obj_id'])) {
1366  $path_str = $this->getContextPath($cont_obj, $page['obj_id']);
1367  } else {
1368  $path_str = '---';
1369  }
1370 
1371  $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1372  $rows[] = [
1373  'title' => $page['title'],
1374  'description' => ilLegacyFormElementsUtil::prepareFormOutput($path_str),
1375  'text_add' => $this->lng->txt('add'),
1376  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1377  ];
1378  }
1379  }
1380  }
1381  foreach ($pages as $page) {
1382  if (!in_array($page['obj_id'], $shownpages)) {
1383  $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1384  $rows[] = [
1385  'title' => $page['title'],
1386  'description' => '---',
1387  'text_add' => $this->lng->txt('add'),
1388  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1389  ];
1390  }
1391  }
1392 
1393  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1394  $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($this->request_data_collector->string('search_link_type'))));
1395  $table->setData($rows);
1396 
1397  $this->tpl->setContent($table->getHTML());
1398  }
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,
array|bool  $user_post_solutions = false,
bool  $show_specific_inline_feedback = false 
)
final

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

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

Referenced by ilTestPlayerAbstractGUI\showQuestionEditable().

1675  : void {
1676  $formaction = $this->completeTestOutputFormAction($formaction, $active_id, $pass);
1677 
1678  $test_output = $this->getTestOutput(
1679  $active_id,
1680  $pass,
1681  $is_question_postponed,
1682  $user_post_solutions,
1683  $show_specific_inline_feedback
1684  );
1685 
1686  $this->magicAfterTestOutput();
1687 
1688  $this->tpl->setVariable("QUESTION_OUTPUT", $test_output);
1689  $this->tpl->setVariable("FORMACTION", $formaction);
1690  $this->tpl->setVariable("ENCTYPE", 'enctype="' . $this->getFormEncodingType() . '"');
1691  $this->tpl->setVariable("FORM_TIMESTAMP", (string) time());
1692  }
getTestOutput(int $active_id, int $pass, bool $is_question_postponed=false, array|bool $user_post_solutions=false, bool $show_specific_inline_feedback=false)
completeTestOutputFormAction(string $form_action, int $active_id, int $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 641 of file class.assQuestionGUI.php.

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

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

641  : string
642  {
643  if ($this->object->getTestPresentationConfig()->isSolutionInitiallyPrefilled()) {
644  // hey
645  $this->tpl->setOnScreenMessage('info', $this->getPreviousSolutionProvidedMessage());
647  } elseif ($this->object->getTestPresentationConfig()->isUnchangedAnswerPossible()) {
648  $html .= $this->getUseUnchangedAnswerCheckboxHtml();
649  }
650 
651  $this->lng->loadLanguageModule("content");
652 
653  $page_gui = new ilAssQuestionPageGUI($this->object->getId());
654  $page_gui->setFileDownloadLink($this->buildFileDownloadLink());
655  $page_gui->setOutputMode('presentation');
656  $page_gui->setTemplateTargetVar($a_temp_var);
657 
658  if ($this->getNavigationGUI()) {
659  $html .= $this->getNavigationGUI()->getHTML();
660  $page_gui->setQuestionActionsHTML($this->getNavigationGUI()->getActionsHTML());
661  }
662 
663  if (strlen($html)) {
664  $page_gui->setQuestionHTML([$this->object->getId() => $html]);
665  }
666 
667  $page_gui->setPresentationTitle($this->questionHeaderBlockBuilder->getPresentationTitle());
668  $page_gui->setQuestionInfoHTML($this->questionHeaderBlockBuilder->getQuestionInfoHTML());
669 
670  return $page_gui->presentation();
671  }
Question page GUI class.
setFileDownloadLink(string $a_download_link)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionType()

assQuestionGUI::outQuestionType ( )

Definition at line 1058 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(), assNumericGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assFileUploadGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assErrorTextGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), assClozeTestGUI\editQuestion(), ilTestCorrectionsGUI\populatePageTitleAndDescription(), and assFormulaQuestionGUI\resetSavedPreviewSession().

1058  : string
1059  {
1060  $count = $this->questionrepository->usageCount($this->object->getId());
1061 
1062  if ($this->questionrepository->questionExistsInPool($this->object->getId()) && $count) {
1063  if ($this->rbacsystem->checkAccess("write", $this->request_data_collector->getRefId())) {
1064  $this->tpl->setOnScreenMessage('info', sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
1065  }
1066  }
1067 
1068  return $this->lng->txt($this->object->getQuestionType());
1069  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outSolutionExplorer()

assQuestionGUI::outSolutionExplorer ( )

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

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

1273  : void
1274  {
1275  $type = $this->request_data_collector->string("link_new_type");
1276  $search = $this->request_data_collector->string("search_link_type");
1277  $this->ctrl->setParameter($this, "link_new_type", $type);
1278  $this->ctrl->setParameter($this, "search_link_type", $search);
1279  $this->ctrl->saveParameter($this, ["subquestion_index", "link_new_type", "search_link_type"]);
1280 
1281  $this->tpl->setOnScreenMessage('info', $this->lng->txt("select_object_to_link"));
1282 
1283  $parent_ref_id = $this->tree->getParentId($this->request_data_collector->getRefId());
1284  $exp = new ilSolutionExplorer($this->ctrl->getLinkTarget($this, 'suggestedsolution'), get_class($this));
1285  $exp->setExpand($this->request_data_collector->raw('expand_sol') ? $this->request_data_collector->raw('expand_sol') : $parent_ref_id);
1286  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'outSolutionExplorer'));
1287  $exp->setTargetGet("ref_id");
1288  $exp->setRefId($this->request_data_collector->getRefId());
1289  $exp->addFilter($type);
1290  $exp->setSelectableType($type);
1291  if ($this->request_data_collector->isset('expandCurrentPath') && $this->request_data_collector->raw('expandCurrentPath')) {
1292  $exp->expandPathByRefId($parent_ref_id);
1293  }
1294 
1295  // build html-output
1296  $exp->setOutput(0);
1297 
1298  $template = new ilTemplate("tpl.il_as_qpl_explorer.html", true, true, "components/ILIAS/TestQuestionPool");
1299  $template->setVariable("EXPLORER_TREE", $exp->getOutput());
1300  $template->setVariable("BUTTON_CANCEL", $this->lng->txt("cancel"));
1301  $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "suggestedsolution"));
1302  $this->tpl->setVariable("ADM_CONTENT", $template->get());
1303  }
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 1809 of file class.assQuestionGUI.php.

Referenced by ilTestCorrectionsGUI\buildQuestionCorrectionForm().

1809  : void
1810  {
1811  }
+ Here is the caller graph for this function:

◆ populateJavascriptFilesRequiredForWorkForm()

assQuestionGUI::populateJavascriptFilesRequiredForWorkForm ( ilGlobalTemplateInterface  $tpl)

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

References ILIAS\UICore\GlobalTemplate\addJavaScript(), and getPresentationJavascripts().

599  : void
600  {
601  foreach ($this->getPresentationJavascripts() as $jsFile) {
602  $tpl->addJavaScript($jsFile);
603  }
604  }
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 974 of file class.assQuestionGUI.php.

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

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

974  : void
975  {
976  if ($this->getTaxonomyIds() !== []) {
977  $sectHeader = new ilFormSectionHeaderGUI();
978  $sectHeader->setTitle($this->lng->txt('qpl_qst_edit_form_taxonomy_section'));
979  $form->addItem($sectHeader);
980 
981  foreach ($this->getTaxonomyIds() as $taxonomyId) {
982  $taxonomy = new ilObjTaxonomy($taxonomyId);
983  $label = sprintf($this->lng->txt('qpl_qst_edit_form_taxonomy'), $taxonomy->getTitle());
984  $postvar = "tax_node_assign_$taxonomyId";
985 
986  $taxSelect = new ilTaxSelectInputGUI($taxonomy->getId(), $postvar, true);
987  $taxSelect->setTitle($label);
988 
989 
990  $taxNodeAssignments = new ilTaxNodeAssignment(ilObject::_lookupType($this->object->getObjId()), $this->object->getObjId(), 'quest', $taxonomyId);
991  $assignedNodes = $taxNodeAssignments->getAssignmentsOfItem($this->object->getId());
992 
993  $taxSelect->setValue(array_map(function ($assignedNode) {
994  return $assignedNode['node_id'];
995  }, $assignedNodes));
996  $form->addItem($taxSelect);
997  }
998  }
999  }
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 1805 of file class.assQuestionGUI.php.

Referenced by ilTestCorrectionsGUI\saveQuestion().

1805  : void
1806  {
1807  }
+ Here is the caller graph for this function:

◆ 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 1852 of file class.assQuestionGUI.php.

References null, and ilRTE\replaceLatexSpan().

1856  : string {
1857  if ($txt_output === null || $txt_output === '') {
1858  return '';
1859  }
1860 
1861  $result = $txt_output;
1862  $is_html = false;
1863 
1864  if (strlen(strip_tags($result)) < strlen($result)) {
1865  $is_html = true;
1866  }
1867 
1868  // removed: did not work with magic_quotes_gpc = On
1869  if (!$is_html) {
1870  if (!$omitNl2BrWhenTextArea) {
1871  // if the string does not contain HTML code, replace the newlines with HTML line breaks
1872  $result = preg_replace("/[\n]/", "<br />", $result);
1873  }
1874  } else {
1875  // patch for problems with the <pre> tags in tinyMCE
1876  if (preg_match_all("/(<pre>.*?<\/pre>)/ims", $result, $matches)) {
1877  foreach ($matches[0] as $found) {
1878  $replacement = "";
1879  if (strpos("\n", $found) === false) {
1880  $replacement = "\n";
1881  }
1882  $removed = preg_replace("/<br\s*?\/>/ims", $replacement, $found);
1883  $result = str_replace($found, $removed, $result);
1884  }
1885  }
1886  }
1887 
1888  if ($prepare_for_latex_output) {
1889  $result = ilRTE::replaceLatexSpan($result);
1890 
1891  // replace special characters to prevent problems with the ILIAS template system
1892  // eg. if someone uses {1} as an answer, nothing will be shown without the replacement
1893  $result = str_replace("{", "&#123;", $result);
1894  $result = str_replace("}", "&#125;", $result);
1895  $result = str_replace("\\", "&#92;", $result);
1896  }
1897 
1898  return $result;
1899  }
static replaceLatexSpan(string $text)
Replace the latex delimiters used by the rich text editor Unfortunately these can&#39;t be processed by M...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ redrawHeaderAction()

assQuestionGUI::redrawHeaderAction ( )

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

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

300  : void
301  {
302  echo $this->getHeaderAction() . $this->ui->mainTemplate()->getOnLoadCodeForAsynch();
303  exit;
304  }
exit
+ Here is the call graph for this function:

◆ renderEditForm()

assQuestionGUI::renderEditForm ( ilPropertyFormGUI  $form)
protected

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

References $question_sync_modal, addSaveOnEnterOnLoadCode(), ilPropertyFormGUI\getHTML(), and getQuestionTemplate().

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

619  : void
620  {
621  $this->addSaveOnEnterOnLoadCode();
622  $this->getQuestionTemplate();
623  $this->tpl->setVariable('QUESTION_DATA', $form->getHTML() . $this->question_sync_modal);
624  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderLatex()

assQuestionGUI::renderLatex (   $content)
protected

Wrap content with latex in a LatexContent UI component and render it to be processed by MathJax in the browser.

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

References ILIAS\Repository\ui().

Referenced by assMatchingQuestionGUI\buildTermHtml(), assErrorTextGUI\generateQuestionOutput(), assTextQuestionGUI\getBestAnswer(), getGenericFeedbackOutput(), assClozeTestGUI\getGenericFeedbackOutput(), getGenericFeedbackOutputForCorrectSolution(), getGenericFeedbackOutputForIncorrectSolution(), assOrderingHorizontalGUI\getPreview(), assFileUploadGUI\getPreview(), assNumericGUI\getPreview(), assTextSubsetGUI\getPreview(), assSingleChoiceGUI\getPreview(), assTextQuestionGUI\getPreview(), assMultipleChoiceGUI\getPreview(), assKprimChoiceGUI\getPreview(), assOrderingQuestionGUI\getPreview(), assImagemapQuestionGUI\getPreview(), assMatchingQuestionGUI\getPreview(), assClozeTestGUI\getPreview(), assFormulaQuestionGUI\getPreview(), assFileUploadGUI\getSolutionOutput(), assImagemapQuestionGUI\getSolutionOutput(), assErrorTextGUI\getSpecificFeedbackOutput(), assImagemapQuestionGUI\getSpecificFeedbackOutput(), assMatchingQuestionGUI\getSpecificFeedbackOutput(), assClozeTestGUI\getSpecificFeedbackOutput(), assLongMenuGUI\getTemplateForPreviewAndTest(), assNumericGUI\getTestOutput(), assOrderingHorizontalGUI\getTestOutput(), assTextSubsetGUI\getTestOutput(), assFileUploadGUI\getTestOutput(), assKprimChoiceGUI\getTestOutput(), assSingleChoiceGUI\getTestOutput(), assTextQuestionGUI\getTestOutput(), assMultipleChoiceGUI\getTestOutput(), assOrderingQuestionGUI\getTestOutput(), assImagemapQuestionGUI\getTestOutput(), assMatchingQuestionGUI\getTestOutput(), assFormulaQuestionGUI\getTestOutput(), assClozeTestGUI\getTestOutput(), assMatchingQuestionGUI\populateDefinition(), assSingleChoiceGUI\populateInlineFeedback(), assKprimChoiceGUI\populateSpecificFeedbackInline(), assMultipleChoiceGUI\populateSpecificFeedbackInline(), assOrderingHorizontalGUI\renderSolutionOutput(), assTextQuestionGUI\renderSolutionOutput(), assNumericGUI\renderSolutionOutput(), assSingleChoiceGUI\renderSolutionOutput(), assMultipleChoiceGUI\renderSolutionOutput(), assErrorTextGUI\renderSolutionOutput(), assLongMenuGUI\renderSolutionOutput(), assOrderingQuestionGUI\renderSolutionOutput(), assKprimChoiceGUI\renderSolutionOutput(), assClozeTestGUI\renderSolutionOutput(), and assFormulaQuestionGUI\renderSolutionOutput().

1905  {
1906  return $this->ui->renderer()->render($this->ui->factory()->legacy()->latexContent($content));
1907  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPurposeSupportsFormHtml()

assQuestionGUI::renderPurposeSupportsFormHtml ( )

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

References isRenderPurposeInputValue(), and isRenderPurposePrintPdf().

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

448  : bool
449  {
450  if ($this->isRenderPurposePrintPdf()) {
451  return false;
452  }
453 
454  if ($this->isRenderPurposeInputValue()) {
455  return false;
456  }
457 
458  return true;
459  }
+ 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 225 of file class.assQuestionGUI.php.

References null.

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

238  : ?string {
239  return null;
240  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the caller graph for this function:

◆ saveCorrectionsFormProperties()

assQuestionGUI::saveCorrectionsFormProperties ( ilPropertyFormGUI  $form)

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

Referenced by ilTestCorrectionsGUI\saveQuestion().

1813  : void
1814  {
1815  }
+ Here is the caller graph for this function:

◆ saveQuestion()

assQuestionGUI::saveQuestion ( )

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

References ILIAS\Repository\ctrl(), getQuestionSyncModal(), needsSyncQuery(), ILIAS\Repository\object(), setAdditionalContentEditingModeFromPost(), setQuestionTabs(), and writePostData().

720  : bool
721  {
723  $result = $this->writePostData();
724  $this->tabs_gui->activateTab('edit_question');
725 
726  if ($result !== 0) {
727  return false;
728  }
729 
730  $this->object->getCurrentUser()->setPref('tst_lastquestiontype', $this->object->getQuestionType());
731  $this->object->getCurrentUser()->writePref('tst_lastquestiontype', $this->object->getQuestionType());
732 
733  if ($this->request_data_collector->getQuestionId() === 0) {
734  if ($this->object->getId() < 1) {
735  $this->object->createNewQuestion();
736  }
737  $this->setQuestionTabs();
738  }
739 
740  if ($this->needsSyncQuery()) {
741  $cmd = strpos($this->ctrl->getCmd(), 'Return') === false
742  ? self::CMD_SYNC_QUESTION
743  : self::CMD_SYNC_QUESTION_AND_RETURN;
744  $this->question_sync_modal = $this->getQuestionSyncModal($cmd);
745  }
746 
747  $this->object->saveToDb();
748  return true;
749  }
writePostData(bool $always=false)
Evaluates a posted edit form and writes the form data in the question object.
getQuestionSyncModal(string $cmd, string $cmd_class='')
+ Here is the call graph for this function:

◆ saveReturn()

assQuestionGUI::saveReturn ( )

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

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

701  : void
702  {
703  $old_id = $this->request_data_collector->getQuestionId();
705  $result = $this->writePostData();
706  if ($result !== 0) {
707  $this->tabs_gui->setTabActive('edit_question');
708  return;
709  }
710 
711  $this->object->getCurrentUser()->setPref('tst_lastquestiontype', $this->object->getQuestionType());
712  $this->object->getCurrentUser()->writePref('tst_lastquestiontype', $this->object->getQuestionType());
713  $this->object->saveToDb($old_id);
714 
715  $this->questionrepository->questionExistsInPool($this->object->getOriginalId());
716  $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
717  $this->ctrl->redirectByClass(ilAssQuestionPreviewGUI::class, ilAssQuestionPreviewGUI::CMD_SHOW);
718  }
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:

◆ saveSuggestedSolution()

assQuestionGUI::saveSuggestedSolution ( )

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

References suggestedsolution().

1079  : void
1080  {
1081  $this->suggestedsolution(true);
1082  }
suggestedsolution(bool $save=false)
+ Here is the call graph for this function:

◆ saveSuggestedSolutionType()

assQuestionGUI::saveSuggestedSolutionType ( )

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

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

1305  : void
1306  {
1307  $solution_type = $this->request_data_collector->string('solutiontype');
1308 
1309  switch ($solution_type) {
1310  case 'lm':
1311  $type = 'lm';
1312  $search = 'lm';
1313  break;
1314  case 'git':
1315  $type = 'glo';
1316  $search = 'glo';
1317  break;
1318  case 'st':
1319  $type = 'lm';
1320  $search = 'st';
1321  break;
1322  case 'pg':
1323  $type = 'lm';
1324  $search = 'pg';
1325  break;
1326  case 'file':
1327  case 'text':
1328  default:
1329  $this->suggestedsolution();
1330  return;
1331  }
1332 
1333  if (isset($solution_type)) {
1334  $this->ctrl->setParameter($this, 'expandCurrentPath', 1);
1335  }
1336  $this->ctrl->setParameter($this, 'link_new_type', $type);
1337  $this->ctrl->setParameter($this, 'search_link_type', $search);
1338  $this->ctrl->redirect($this, 'outSolutionExplorer');
1339  }
suggestedsolution(bool $save=false)
+ Here is the call graph for this function:

◆ saveTaxonomyAssignments()

assQuestionGUI::saveTaxonomyAssignments ( )
protected

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

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

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

961  : void
962  {
963  if (count($this->getTaxonomyIds())) {
964  foreach ($this->getTaxonomyIds() as $taxonomyId) {
965  $postvar = "tax_node_assign_$taxonomyId";
966 
967  $tax_node_assign = new ilTaxAssignInputGUI($taxonomyId, true, '', $postvar);
968  // TODO: determine tst/qpl when tax assigns become maintainable within tests
969  $tax_node_assign->saveInput("qpl", $this->object->getObjId(), "quest", $this->object->getId());
970  }
971  }
972  }
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:

◆ setAdditionalContentEditingModeFromPost()

assQuestionGUI::setAdditionalContentEditingModeFromPost ( )

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

References ILIAS\Repository\object().

Referenced by assTextSubsetGUI\addanswers(), assMatchingQuestionGUI\adddefinitions(), assClozeTestGUI\addgap(), assMatchingQuestionGUI\addpairs(), assTextQuestionGUI\addSuggestedSolution(), assMatchingQuestionGUI\addterms(), assErrorTextGUI\analyze(), assClozeTestGUI\createGaps(), assFormulaQuestionGUI\parseQuestion(), assTextSubsetGUI\removeanswers(), assMatchingQuestionGUI\removedefinitions(), assClozeTestGUI\removegap(), assSingleChoiceGUI\removeimagechoice(), assMultipleChoiceGUI\removeimagechoice(), assMatchingQuestionGUI\removeimagedefinitions(), assMatchingQuestionGUI\removeimageterms(), assMatchingQuestionGUI\removepairs(), assMatchingQuestionGUI\removeterms(), saveQuestion(), saveReturn(), assFormulaQuestionGUI\suggestRange(), assSingleChoiceGUI\uploadchoice(), assMultipleChoiceGUI\uploadchoice(), assMatchingQuestionGUI\uploaddefinitions(), assKprimChoiceGUI\uploadImage(), and assMatchingQuestionGUI\uploadterms().

751  : void
752  {
753  $additional_content_editing_mode = $this->request_data_collector->string('additional_content_editing_mode');
754  if ($additional_content_editing_mode !== ''
755  && in_array($additional_content_editing_mode, $this->object->getValidAdditionalContentEditingModes())) {
756  $this->object->setAdditionalContentEditingMode($additional_content_editing_mode);
757  }
758  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAdjustmentEditContext()

assQuestionGUI::setAdjustmentEditContext ( )

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

References setEditContext().

481  : void
482  {
483  $this->setEditContext(self::EDIT_CONTEXT_ADJUSTMENT);
484  }
setEditContext(string $editContext)
+ Here is the call graph for this function:

◆ setContextAllowsSyncToPool()

assQuestionGUI::setContextAllowsSyncToPool ( bool  $sync_allowed)

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

1978  : void
1979  {
1980  $this->context_allows_sync_to_pool = $sync_allowed;
1981  }

◆ setCopyToExistingPoolOnSave()

assQuestionGUI::setCopyToExistingPoolOnSave ( ?int  $pool_ref_id)

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

Referenced by ilObjTestGUI\addPostCreationTasksToQuestionGUI(), and ilObjTestGUI\executeAfterQuestionCreationTasks().

261  : void
262  {
263  $this->copy_to_existing_pool_on_save = $pool_ref_id;
264  }
+ Here is the caller graph for this function:

◆ setCopyToNewPoolOnSave()

assQuestionGUI::setCopyToNewPoolOnSave ( ?string  $pool_title)

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

Referenced by ilObjTestGUI\addPostCreationTasksToQuestionGUI(), and ilObjTestGUI\executeAfterQuestionCreationTasks().

271  : void
272  {
273  $this->copy_to_new_pool_on_save = $pool_title;
274  }
+ Here is the caller graph for this function:

◆ setDefaultTabs()

assQuestionGUI::setDefaultTabs ( ilTabsGUI  $tabs_gui)
protected

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

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

Referenced by setQuestionTabs().

1554  : void
1555  {
1556  $this->ctrl->setParameterByClass(ilAssQuestionPageGUI::class, 'q_id', $this->object->getId());
1557  $this->ctrl->setParameterByClass(static::class, 'q_id', $this->object->getId());
1558 
1559  $this->addTab_Question($tabs_gui);
1560  $this->addTab_QuestionFeedback($tabs_gui);
1561  $this->addTab_SuggestedSolution($tabs_gui, static::class);
1562  }
addTab_SuggestedSolution(ilTabsGUI $tabs, string $classname)
addTab_Question(ilTabsGUI $tabs_gui)
addTab_QuestionFeedback(ilTabsGUI $tabs)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditContext()

assQuestionGUI::setEditContext ( string  $editContext)

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

References $editContext.

Referenced by setAdjustmentEditContext().

466  : void
467  {
468  $this->editContext = $editContext;
469  }
+ Here is the caller graph for this function:

◆ setErrorMessage()

assQuestionGUI::setErrorMessage ( string  $errormessage)

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

References $errormessage.

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

821  : void
822  {
823  $this->errormessage = $errormessage;
824  }
+ Here is the caller graph for this function:

◆ setInLearningModuleContext()

assQuestionGUI::setInLearningModuleContext ( bool  $flag)

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

1948  : void
1949  {
1950  $this->parent_type_is_lm = $flag;
1951  }

◆ setMoveAfterQuestionId()

assQuestionGUI::setMoveAfterQuestionId ( ?int  $question_id)

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

Referenced by ilObjTestGUI\addPostCreationTasksToQuestionGUI(), and ilObjTestGUI\executeAfterQuestionCreationTasks().

281  : void
282  {
283  $this->move_after_question_with_id = $question_id;
284  }
+ Here is the caller graph for this function:

◆ setNavigationGUI()

assQuestionGUI::setNavigationGUI ( ?ilTestQuestionNavigationGUI  $navigationGUI)

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

References $navigationGUI.

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

491  : void
492  {
493  $this->navigationGUI = $navigationGUI;
494  }
ilTestQuestionNavigationGUI $navigationGUI
+ Here is the caller graph for this function:

◆ setObject()

assQuestionGUI::setObject ( assQuestion  $question)
Deprecated:
sk 25 FEB 2024: I introduce this to not have to have the object public, but this should NEVER EVER be used and should go asap!

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

Referenced by ilAssQuestionSkillAssignmentsGUI\buildQuestionPage(), ilTestCorrectionsGUI\getQuestionGUI(), and ilTestCorrectionsGUI\saveQuestion().

256  : void
257  {
258  $this->object = $question;
259  }
+ Here is the caller graph for this function:

◆ setPresentationContext()

assQuestionGUI::setPresentationContext ( string  $presentationContext)

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

References $presentationContext.

391  : void
392  {
393  $this->presentationContext = $presentationContext;
394  }

◆ setPreviewSession()

assQuestionGUI::setPreviewSession ( ilAssQuestionPreviewSession  $preview_session)

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

References $preview_session.

1741  : void
1742  {
1743  $this->preview_session = $preview_session;
1744  }
ilAssQuestionPreviewSession $preview_session

◆ setPreviousSolutionPrefilled()

assQuestionGUI::setPreviousSolutionPrefilled ( bool  $previousSolutionPrefilled)

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

References $previousSolutionPrefilled.

407  : void
408  {
409  $this->previousSolutionPrefilled = $previousSolutionPrefilled;
410  }

◆ setQuestionActionCmd()

assQuestionGUI::setQuestionActionCmd ( string  $questionActionCmd)

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

References $questionActionCmd.

533  : void
534  {
535  $this->questionActionCmd = $questionActionCmd;
536 
537  if (is_object($this->object)) {
538  $this->object->questionActionCmd = $questionActionCmd;
539  }
540  }

◆ setQuestionCount()

assQuestionGUI::setQuestionCount ( int  $a_question_count)

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

806  : void
807  {
808  $this->question_count = $a_question_count;
809  }

◆ setQuestionHeaderBlockBuilder()

assQuestionGUI::setQuestionHeaderBlockBuilder ( \ilQuestionHeaderBlockBuilder  $questionHeaderBlockBuilder)

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

References $questionHeaderBlockBuilder.

521  : void
522  {
523  $this->questionHeaderBlockBuilder = $questionHeaderBlockBuilder;
524  }
ilQuestionHeaderBlockBuilder $questionHeaderBlockBuilder

◆ setQuestionSpecificTabs()

assQuestionGUI::setQuestionSpecificTabs ( ilTabsGUI  $tabs_gui)
protected

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

Referenced by setQuestionTabs().

1564  : void
1565  {
1566  }
+ Here is the caller graph for this function:

◆ setQuestionTabs()

assQuestionGUI::setQuestionTabs ( )

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

References addBackTab(), ILIAS\Repository\object(), setDefaultTabs(), and setQuestionSpecificTabs().

Referenced by saveQuestion().

1542  : void
1543  {
1544  $this->tabs_gui->clearTargets();
1545 
1546  if ($this->object->getId() > 0) {
1547  $this->setDefaultTabs($this->tabs_gui);
1548  $this->setQuestionSpecificTabs($this->tabs_gui);
1549  $this->tabs_gui->activateTab('edit_question');
1550  }
1551  $this->addBackTab($this->tabs_gui);
1552  }
setDefaultTabs(ilTabsGUI $tabs_gui)
setQuestionSpecificTabs(ilTabsGUI $tabs_gui)
addBackTab(ilTabsGUI $tabs_gui)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRenderPurpose()

assQuestionGUI::setRenderPurpose ( string  $renderPurpose)

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

References $renderPurpose.

418  : void
419  {
420  $this->renderPurpose = $renderPurpose;
421  }

◆ setSequenceNumber()

assQuestionGUI::setSequenceNumber ( int  $nr)

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

796  : void
797  {
798  $this->sequence_no = $nr;
799  }

◆ setTargetGui()

assQuestionGUI::setTargetGui (   $linkTargetGui)

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

References setTargetGuiClass().

506  : void
507  {
508  $this->setTargetGuiClass(get_class($linkTargetGui));
509  }
setTargetGuiClass(string $targetGuiClass)
+ Here is the call graph for this function:

◆ setTargetGuiClass()

assQuestionGUI::setTargetGuiClass ( string  $targetGuiClass)

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

References $targetGuiClass.

Referenced by setTargetGui().

511  : void
512  {
513  $this->targetGuiClass = $targetGuiClass;
514  }
+ Here is the caller graph for this function:

◆ setTaxonomyIds()

assQuestionGUI::setTaxonomyIds ( array  $taxonomyIds)

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

References $taxonomyIds.

496  : void
497  {
498  $this->taxonomyIds = $taxonomyIds;
499  }

◆ setTestSpecificProperties()

assQuestionGUI::setTestSpecificProperties ( )
protected

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

Referenced by assFormulaQuestionGUI\parseQuestion(), assFormulaQuestionGUI\suggestRange(), and writeQuestionGenericPostData().

760  : void
761  {
762  if ($this->request_data_collector->isset('pool_ref')) {
763  $this->copy_to_existing_pool_on_save = $this->request_data_collector->int('pool_ref');
764  }
765 
766  if ($this->request_data_collector->isset('pool_title')) {
767  $this->copy_to_new_pool_on_save = $this->request_data_collector->string('pool_title');
768  }
769 
770  if ($this->request_data_collector->isset('move_after_question_with_id')) {
771  $this->move_after_question_with_id = $this->request_data_collector->int('move_after_question_with_id');
772  }
773  }
+ Here is the caller graph for this function:

◆ suggestedsolution()

assQuestionGUI::suggestedsolution ( bool  $save = false)

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

References $res, ILIAS\Repository\access(), ilRadioGroupInputGUI\addOption(), ILIAS\Repository\ctrl(), getSuggestedSolutionsRepo(), getTypeOptions(), ILIAS\Repository\lng(), ilFileUtils\makeDirParents(), ilFileUtils\moveUploadedFile(), null, ILIAS\Repository\object(), ilLegacyFormElementsUtil\prepareFormOutput(), ilFileUtils\renameExecutables(), ilCustomInputGUI\setHtml(), and ilFormPropertyGUI\setRequired().

Referenced by cancelSuggestedSolution(), saveSuggestedSolution(), and saveSuggestedSolutionType().

1089  : void
1090  {
1091  if ($save && $this->request_data_collector->int('deleteSuggestedSolution') === 1) {
1092  $this->object->deleteSuggestedSolutions();
1093  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1094  $this->ctrl->redirect($this, 'suggestedsolution');
1095  }
1096 
1097  $output = '';
1098 
1099  $solution = $this->object->getSuggestedSolution();
1100  $options = $this->getTypeOptions();
1101 
1102  $solution_type = $this->ctrl->getCmd() === 'cancelSuggestedSolution'
1103  ? $solution->getType()
1104  : $this->request_data_collector->string('solutiontype');
1105  if ($solution_type === SuggestedSolution::TYPE_FILE
1106  && ($solution === null || $solution->getType() !== SuggestedSolution::TYPE_FILE)
1107  ) {
1108  $solution = $this->getSuggestedSolutionsRepo()->create(
1109  $this->object->getId(),
1110  SuggestedSolution::TYPE_FILE
1111  );
1112  }
1113 
1114  $solution_filename = $this->request_data_collector->string('filename');
1115  if ($save && !empty($solution_filename)) {
1116  $solution = $solution->withTitle($solution_filename);
1117  }
1118 
1119  if ($solution !== null) {
1120  $form = new ilPropertyFormGUI();
1121  $form->setFormAction($this->ctrl->getFormAction($this));
1122  $form->setTitle($this->lng->txt('solution_hint'));
1123  $form->setMultipart(true);
1124  $form->setTableWidth('100%');
1125  $form->setId('suggestedsolutiondisplay');
1126 
1127  $title = new ilSolutionTitleInputGUI($this->lng->txt('showSuggestedSolution'), 'solutiontype');
1128  $template = new ilTemplate(
1129  'tpl.il_as_qpl_suggested_solution_input_presentation.html',
1130  true,
1131  true,
1132  'components/ILIAS/TestQuestionPool'
1133  );
1134 
1135  if ($solution->isOfTypeLink()) {
1136  $href = $this->object->getInternalLinkHref($solution->getInternalLink());
1137  $template->setCurrentBlock('preview');
1138  $template->setVariable('TEXT_SOLUTION', $this->lng->txt('suggested_solution'));
1139  $template->setVariable(
1140  'VALUE_SOLUTION',
1141  " <a href='{$href}' target='content'>{$this->lng->txt('view')}</a> "
1142  );
1143  $template->parseCurrentBlock();
1144  } elseif (
1145  $solution->isOfTypeFile()
1146  && $solution->getFilename()
1147  ) {
1148  $href = $this->object->getSuggestedSolutionPathWeb() . $solution->getFilename();
1149  $link = " <a href='{$href}' target='content'>"
1150  . ilLegacyFormElementsUtil::prepareFormOutput($solution->getTitle())
1151  . '</a> ';
1152  $template->setCurrentBlock('preview');
1153  $template->setVariable('TEXT_SOLUTION', $this->lng->txt('suggested_solution'));
1154  $template->setVariable('VALUE_SOLUTION', $link);
1155  $template->parseCurrentBlock();
1156  }
1157 
1158  $template->setVariable('TEXT_TYPE', $this->lng->txt('type'));
1159  $template->setVariable('VALUE_TYPE', $options[$solution->getType()]);
1160 
1161  $title->setHtml($template->get());
1162  $deletesolution = new ilCheckboxInputGUI('', 'deleteSuggestedSolution');
1163  $deletesolution->setOptionTitle($this->lng->txt('deleteSuggestedSolution'));
1164  $title->addSubItem($deletesolution);
1165  $form->addItem($title);
1166 
1167  if ($solution->isOfTypeFile()) {
1168  $file = new ilFileInputGUI($this->lng->txt('fileDownload'), 'file');
1169  $file->setRequired(true);
1170  $file->enableFileNameSelection('filename');
1171 
1172  if ($save && $_FILES && $_FILES['file']['tmp_name'] && $file->checkInput()) {
1173  if (!file_exists($this->object->getSuggestedSolutionPath())) {
1174  ilFileUtils::makeDirParents($this->object->getSuggestedSolutionPath());
1175  }
1176 
1178  $_FILES['file']['tmp_name'],
1179  $_FILES['file']['name'],
1180  $this->object->getSuggestedSolutionPath() . $_FILES['file']['name']
1181  );
1182  if ($res) {
1183  ilFileUtils::renameExecutables($this->object->getSuggestedSolutionPath());
1184 
1185  // remove an old file download
1186  if ($solution->getFilename()) {
1187  @unlink($this->object->getSuggestedSolutionPath() . $solution->getFilename());
1188  }
1189 
1190  $file->setValue($_FILES['file']['name']);
1191  $solution = $solution
1192  ->withFilename($_FILES['file']['name'])
1193  ->withMime($_FILES['file']['type'])
1194  ->withSize($_FILES['file']['size'])
1195  ->withTitle($this->request_data_collector->string('filename'));
1196 
1197  $this->getSuggestedSolutionsRepo()->update([$solution]);
1198 
1199  $this->tpl->setOnScreenMessage('success', $this->lng->txt('suggested_solution_added_successfully'), true);
1200  $this->ctrl->redirect($this, 'suggestedsolution');
1201  } else {
1202  // BH: $res as info string? wtf? it holds a bool or something else!!?
1203  $this->tpl->setOnScreenMessage('info', $res);
1204  }
1205  } else {
1206  if ($solution->getFilename()) {
1207  $file->setValue($solution->getFilename());
1208  $file->setFilename($solution->getTitle());
1209  }
1210  }
1211  $form->addItem($file);
1212  $hidden = new ilHiddenInputGUI('solutiontype');
1213  $hidden->setValue('file');
1214  $form->addItem($hidden);
1215  }
1216  if ($this->access->checkAccess('write', '', $this->request_data_collector->getRefId())) {
1217  $form->addCommandButton('cancelSuggestedSolution', $this->lng->txt('cancel'));
1218  $form->addCommandButton('saveSuggestedSolution', $this->lng->txt('save'));
1219  }
1220 
1221  if ($save) {
1222  if ($form->checkInput()) {
1223  if ($solution->isOfTypeFile()) {
1224  $solution = $solution->withTitle($this->request_data_collector->string('filename'));
1225  }
1226 
1227  if (!$solution->isOfTypeLink()) {
1228  $this->getSuggestedSolutionsRepo()->update([$solution]);
1229  }
1230 
1231  $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
1232  $this->ctrl->redirect($this, 'suggestedsolution');
1233  }
1234  }
1235 
1236  $output = $form->getHTML();
1237  }
1238 
1239  $savechange = $this->ctrl->getCmd() === 'saveSuggestedSolutionType';
1240 
1241  $changeoutput = '';
1242  if ($this->access->checkAccess('write', '', $this->request_data_collector->getRefId())) {
1243  $formchange = new ilPropertyFormGUI();
1244  $formchange->setFormAction($this->ctrl->getFormAction($this));
1245 
1246  $title = $solution ? $this->lng->txt('changeSuggestedSolution') : $this->lng->txt('addSuggestedSolution');
1247  $formchange->setTitle($title);
1248  $formchange->setMultipart(false);
1249  $formchange->setTableWidth('100%');
1250  $formchange->setId('suggestedsolution');
1251 
1252  $solutiontype = new ilRadioGroupInputGUI($this->lng->txt('suggestedSolutionType'), 'solutiontype');
1253  foreach ($options as $opt_value => $opt_caption) {
1254  $solutiontype->addOption(new ilRadioOption($opt_caption, $opt_value));
1255  }
1256  if ($solution) {
1257  $solutiontype->setValue($solution->getType());
1258  }
1259  $solutiontype->setRequired(true);
1260  $formchange->addItem($solutiontype);
1261 
1262  $formchange->addCommandButton('saveSuggestedSolutionType', $this->lng->txt('select'));
1263 
1264  if ($savechange) {
1265  $formchange->checkInput();
1266  }
1267  $changeoutput = $formchange->getHTML();
1268  }
1269  $this->tabs_gui->activateTab('suggested_solution');
1270  $this->tpl->setVariable('ADM_CONTENT', $changeoutput . $output);
1271  }
This class represents an option in a radio group.
$res
Definition: ltiservices.php:66
This class represents a file property in a property form.
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)
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static renameExecutables(string $a_dir)
This class represents a hidden form property in a property form.
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)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ syncQuestion()

assQuestionGUI::syncQuestion ( )

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

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

692  : void
693  {
694  $original_id = $this->object->getOriginalId();
695  if ($original_id !== null) {
696  $this->object->syncWithOriginal();
697  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
698  }
699  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return 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 551 of file class.assQuestionGUI.php.

Referenced by saveQuestion(), and saveReturn().

551  : int
552  {
553  return 0;
554  }
+ Here is the caller graph for this function:

◆ writeQuestionGenericPostData()

assQuestionGUI::writeQuestionGenericPostData ( )
protected

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

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

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

1640  : void
1641  {
1642  $this->object->setTitle($this->request_data_collector->string('title'));
1643  $this->object->setAuthor($this->request_data_collector->string('author'));
1644  $this->object->setComment($this->request_data_collector->string('comment'));
1645 
1646  $nr_of_tries = $this->request_data_collector->int('nr_of_tries');
1647  if ($this->object->getSelfAssessmentEditingMode()) {
1648  $this->object->setNrOfTries($nr_of_tries);
1649  }
1650 
1651  try {
1653  $this->request_data_collector->string('lifecycle')
1654  );
1655  $this->object->setLifecycle($lifecycle);
1657  }
1658 
1659  $this->object->setQuestion(
1661  $this->request_data_collector->string('question')
1662  )
1663  );
1664 
1665  $this->setTestSpecificProperties();
1666  }
$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 104 of file class.assQuestionGUI.php.

◆ $component_repository

ilComponentRepository assQuestionGUI::$component_repository
private

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

◆ $context_allows_sync_to_pool

bool assQuestionGUI::$context_allows_sync_to_pool = false
private

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

◆ $copy_to_existing_pool_on_save

int assQuestionGUI::$copy_to_existing_pool_on_save = null
private

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

Referenced by getCopyToExistingPoolOnSave().

◆ $copy_to_new_pool_on_save

string assQuestionGUI::$copy_to_new_pool_on_save = null
private

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

Referenced by getCopyToNewPoolOnSave().

◆ $ctrl

ilCtrl assQuestionGUI::$ctrl
protected

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

◆ $db

ilDBInterface assQuestionGUI::$db
private

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

◆ $editContext

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

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

Referenced by getEditContext(), and setEditContext().

◆ $editForm

ilPropertyFormGUI assQuestionGUI::$editForm = null
protected

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

Referenced by buildEditForm(), and assLongMenuGUI\editQuestion().

◆ $error

assQuestionGUI::$error
protected

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

◆ $errormessage

string assQuestionGUI::$errormessage
protected

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

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

◆ $forms_helper

readonly ilTestLegacyFormsHelper assQuestionGUI::$forms_helper
protected

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

◆ $ilHelp

ilHelpGUI assQuestionGUI::$ilHelp
private

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

◆ $ilObjDataCache

ilObjectDataCache assQuestionGUI::$ilObjDataCache
private

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

◆ $lng

ilLanguage assQuestionGUI::$lng
protected

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

◆ $logger

ilLogger assQuestionGUI::$logger
protected

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

◆ $move_after_question_with_id

int assQuestionGUI::$move_after_question_with_id = null
private

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

Referenced by getMoveAfterQuestionId().

◆ $navigationGUI

ilTestQuestionNavigationGUI assQuestionGUI::$navigationGUI = null
private

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

Referenced by getNavigationGUI(), and setNavigationGUI().

◆ $notes_gui

GUIService assQuestionGUI::$notes_gui
protected

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

◆ $object

assQuestion assQuestionGUI::$object
protected

◆ $parent_type_is_lm

bool assQuestionGUI::$parent_type_is_lm = false
protected

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

Referenced by isInLearningModuleContext().

◆ $presentationContext

string assQuestionGUI::$presentationContext = null
private

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

Referenced by getPresentationContext(), and setPresentationContext().

◆ $preview_session

ilAssQuestionPreviewSession assQuestionGUI::$preview_session = null
private

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

Referenced by getPreviewSession(), and setPreviewSession().

◆ $previousSolutionPrefilled

bool assQuestionGUI::$previousSolutionPrefilled = false
private

◆ $question_count

int assQuestionGUI::$question_count
protected

question count in test

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

Referenced by getQuestionCount().

◆ $question_sync_modal

string assQuestionGUI::$question_sync_modal = ''
private

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

Referenced by renderEditForm().

◆ $questionActionCmd

string assQuestionGUI::$questionActionCmd = 'handleQuestionAction'
private

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

Referenced by getQuestionActionCmd(), and setQuestionActionCmd().

◆ $questionHeaderBlockBuilder

ilQuestionHeaderBlockBuilder assQuestionGUI::$questionHeaderBlockBuilder
private

◆ $questionrepository

GeneralQuestionPropertiesRepository assQuestionGUI::$questionrepository
protected

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

◆ $rbacsystem

ilRbacSystem assQuestionGUI::$rbacsystem
private

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

◆ $refinery

Refinery assQuestionGUI::$refinery
protected

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

◆ $renderPurpose

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

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

Referenced by getRenderPurpose(), and setRenderPurpose().

◆ $request_data_collector

readonly RequestDataCollector assQuestionGUI::$request_data_collector
protected

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

◆ $sequence_no

int assQuestionGUI::$sequence_no
protected

sequence number in test

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

Referenced by getSequenceNumber().

◆ $suggestedsolution_repo

SuggestedSolutionsDatabaseRepository assQuestionGUI::$suggestedsolution_repo = null
protected

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

Referenced by getSuggestedSolutionsRepo().

◆ $tabs_gui

ilTabsGUI assQuestionGUI::$tabs_gui
private

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

◆ $targetGuiClass

assQuestionGUI::$targetGuiClass = null
private

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

Referenced by getTargetGuiClass(), and setTargetGuiClass().

◆ $taxonomyIds

assQuestionGUI::$taxonomyIds = []
private

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

Referenced by getTaxonomyIds(), and setTaxonomyIds().

◆ $tpl

◆ $tree

ilTree assQuestionGUI::$tree
private

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

◆ $ui

assQuestionGUI::$ui
private

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

◆ ADDITIONAL_CMDS_NEEDING_EXISTING_QST

const assQuestionGUI::ADDITIONAL_CMDS_NEEDING_EXISTING_QST
protected
Initial value:
= [
'uploadchoice',
'uploadImage',
'changeToPictures',
'uploadElementImage',
'uploadterms',
'uploaddefintions'
]

There are functions that need an existing question.

As we stop creating useless question stubs with ILIAS 10, we need to know when we absolutly need one. This is not the right solution, but it is a first step.

Todo:
We should remove the need for any separate upload commands in questions.

Definition at line 92 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 42 of file class.assQuestionGUI.php.

Referenced by ilKprimChoiceWizardInputGUI\cleanupAnswerText().

◆ CMD_SAVE

const assQuestionGUI::CMD_SAVE = 'save'
private

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

◆ CMD_SAVE_AND_RETURN

const assQuestionGUI::CMD_SAVE_AND_RETURN = 'saveReturn'
private

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

◆ CMD_SYNC_QUESTION

const assQuestionGUI::CMD_SYNC_QUESTION = 'syncQuestion'
private

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

◆ CMD_SYNC_QUESTION_AND_RETURN

const assQuestionGUI::CMD_SYNC_QUESTION_AND_RETURN = 'syncQuestionReturn'

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

Referenced by ilAssQuestionPreviewGUI\showCmd().

◆ CORRECTNESS_MOSTLY_OK

const assQuestionGUI::CORRECTNESS_MOSTLY_OK = 1

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

◆ CORRECTNESS_NOT_OK

const assQuestionGUI::CORRECTNESS_NOT_OK = 0

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

◆ CORRECTNESS_OK

const assQuestionGUI::CORRECTNESS_OK = 2

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

◆ EDIT_CONTEXT_ADJUSTMENT

const assQuestionGUI::EDIT_CONTEXT_ADJUSTMENT = 'adjustment'

Definition at line 63 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 50 of file class.assQuestionGUI.php.

◆ FORM_ENCODING_URLENCODE

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

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

◆ FORM_MODE_ADJUST

const assQuestionGUI::FORM_MODE_ADJUST = 'adjust'

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

◆ FORM_MODE_EDIT

const assQuestionGUI::FORM_MODE_EDIT = 'edit'

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

◆ HAS_SPECIAL_QUESTION_COMMANDS

const assQuestionGUI::HAS_SPECIAL_QUESTION_COMMANDS = false
protected

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

◆ PRESENTATION_CONTEXT_RESULTS

const assQuestionGUI::PRESENTATION_CONTEXT_RESULTS = 'pContextResults'

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

◆ PRESENTATION_CONTEXT_TEST

const assQuestionGUI::PRESENTATION_CONTEXT_TEST = 'pContextTest'

◆ QUESTION_SAVE_CMDS

const assQuestionGUI::QUESTION_SAVE_CMDS
protected
Initial value:
= [
self::CMD_SAVE,
self::CMD_SAVE_AND_RETURN
]

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

◆ RENDER_PURPOSE_DEMOPLAY

const assQuestionGUI::RENDER_PURPOSE_DEMOPLAY = 'renderPurposeDemoplay'

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

Referenced by ilAssQuestionPreviewGUI\initQuestion().

◆ RENDER_PURPOSE_INPUT_VALUE

const assQuestionGUI::RENDER_PURPOSE_INPUT_VALUE = 'renderPurposeInputValue'

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

◆ RENDER_PURPOSE_PLAYBACK

const assQuestionGUI::RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'

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

◆ RENDER_PURPOSE_PREVIEW

◆ RENDER_PURPOSE_PRINT_PDF

const assQuestionGUI::RENDER_PURPOSE_PRINT_PDF = 'renderPurposePrintPdf'

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

◆ SESSION_PREVIEW_DATA_BASE_INDEX

const assQuestionGUI::SESSION_PREVIEW_DATA_BASE_INDEX = 'ilAssQuestionPreviewAnswers'

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

◆ SUGGESTED_SOLUTION_COMMANDS_CANCEL

const assQuestionGUI::SUGGESTED_SOLUTION_COMMANDS_CANCEL = 'cancelSuggestedSolution'
protected

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

◆ SUGGESTED_SOLUTION_COMMANDS_DEFAULT

const assQuestionGUI::SUGGESTED_SOLUTION_COMMANDS_DEFAULT = 'suggestedsolution'
protected

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

◆ SUGGESTED_SOLUTION_COMMANDS_SAVE

const assQuestionGUI::SUGGESTED_SOLUTION_COMMANDS_SAVE = 'saveSuggestedSolution'
protected

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


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