ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
assQuestionGUI Class Reference

Basic GUI class for assessment questions. More...

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

Public Member Functions

 __construct ()
 assQuestionGUI constructor More...
 
 hasInlineFeedback ()
 this method can be overwritten per question type More...
 
 addHeaderAction ()
 
 redrawHeaderAction ()
 
 getHeaderAction ()
 
 getNotesHTML ()
 
 executeCommand ()
 execute command More...
 
 getType ()
 needed for page editor compliance More...
 
 getPresentationContext ()
 
 setPresentationContext ($presentationContext)
 
 isTestPresentationContext ()
 
 isPreviousSolutionPrefilled ()
 
 setPreviousSolutionPrefilled ($previousSolutionPrefilled)
 
 getRenderPurpose ()
 
 setRenderPurpose ($renderPurpose)
 
 isRenderPurposePrintPdf ()
 
 isRenderPurposePreview ()
 
 isRenderPurposeInputValue ()
 
 isRenderPurposePlayback ()
 
 isRenderPurposeDemoplay ()
 
 renderPurposeSupportsFormHtml ()
 
 getEditContext ()
 
 setEditContext ($editContext)
 
 isAuthoringEditContext ()
 
 isAdjustmentEditContext ()
 
 setAdjustmentEditContext ()
 
 getNavigationGUI ()
 
 setNavigationGUI ($navigationGUI)
 
 setTaxonomyIds ($taxonomyIds)
 
 getTaxonomyIds ()
 
 setTargetGui ($linkTargetGui)
 
 setTargetGuiClass ($targetGuiClass)
 
 getTargetGuiClass ()
 
 setQuestionHeaderBlockBuilder ($questionHeaderBlockBuilder)
 
 getQuestionHeaderBlockBuilder ()
 
 setQuestionActionCmd ($questionActionCmd)
 
 getQuestionActionCmd ()
 
createQuestionGUI ($question_type, $question_id=-1)
 Creates a question gui representation. More...
 
 populateJavascriptFilesRequiredForWorkForm (ilGlobalTemplateInterface $tpl)
 
 getPresentationJavascripts ()
 
 getQuestionTemplate ()
 get question template More...
 
 getILIASPage ($html="")
 Returns the ILIAS Page around a question. More...
 
 outQuestionPage ($a_temp_var, $a_postponed=false, $active_id="", $html="", $inlineFeedbackEnabled=false)
 output question page More...
 
 cancel ()
 cancel action More...
 
 originalSyncForm ($return_to="", $return_to_feedback='')
 
 sync ()
 
 cancelSync ()
 
 saveEdit ()
 save question More...
 
 save ()
 save question More...
 
 saveReturn ()
 save question More...
 
 apply ()
 apply changes More...
 
 getContextPath ($cont_obj, $a_endnode_id, $a_startnode_id=1)
 get context path in content object tree More...
 
 setSequenceNumber ($nr)
 
 getSequenceNumber ()
 
 setQuestionCount ($a_question_count)
 
 getQuestionCount ()
 
 getErrorMessage ()
 
 setErrorMessage ($errormessage)
 
 addErrorMessage ($errormessage)
 
 outAdditionalOutput ()
 
 getQuestionType ()
 Returns the question type string. More...
 
 getAsValueAttribute ($a_value)
 Returns a HTML value attribute. More...
 
 addNewIdListener (&$a_object, $a_method, $a_parameters="")
 Add a listener that is notified with the new question ID, when a new question is saved. More...
 
 callNewIdListeners ($a_new_id)
 Call the new id listeners. More...
 
 addQuestionFormCommandButtons ($form)
 Add the command buttons of a question properties form. More...
 
 addBasicQuestionFormProperties ($form)
 Add basic question form properties: assessment: title, author, description, question, working time. More...
 
 getAnswerFeedbackOutput ($active_id, $pass)
 Returns the answer generic feedback depending on the results of the question. More...
 
 getGenericFeedbackOutput ($active_id, $pass)
 Returns the answer specific feedback for the question. More...
 
 getGenericFeedbackOutputForCorrectSolution ()
 
 getGenericFeedbackOutputForIncorrectSolution ()
 
 getSpecificFeedbackOutput ($userSolution)
 Returns the answer specific feedback for the question. More...
 
 outQuestionType ()
 
 showSuggestedSolution ()
 
 suggestedsolution ()
 Allows to add suggested solutions for questions. More...
 
 outSolutionExplorer ()
 
 saveSuggestedSolution ()
 
 cancelExplorer ()
 
 outPageSelector ()
 
 outChapterSelector ()
 
 outGlossarySelector ()
 
 linkChilds ()
 
 addPG ()
 
 addST ()
 
 addGIT ()
 
 isSaveCommand ()
 
 setQuestionTabs ()
 
 addTab_SuggestedSolution (ilTabsGUI $tabs, $classname)
 
 getEditQuestionTabCommands ()
 
 getSolutionOutput ( $active_id, $pass=null, $graphicalOutput=false, $result_output=false, $show_question_only=true, $show_feedback=false, $show_correct_solution=false, $show_manual_scoring=false, $show_question_text=true)
 
 supportsIntermediateSolutionOutput ()
 Question type specific support of intermediate solution output The function getSolutionOutput respects getUseIntermediateSolution() More...
 
 hasIntermediateSolution ($activeId, $passIndex)
 Check if the question has an intermediate solution. More...
 
 setUseIntermediateSolution ($use)
 
 getUseIntermediateSolution ()
 Get if intermediate solution should be used for solution output. More...
 
 isAutosaveable ()
 
 getPreview ($show_question_only=false, $showInlineFeedback=false)
 
 outQuestionForTest ( $formaction, $active_id, $pass, $is_question_postponed=false, $user_post_solutions=false, $show_specific_inline_feedback=false)
 
 magicAfterTestOutput ()
 
 getTestOutput ( $active_id, $pass, $is_question_postponed, $user_post_solutions, $show_specific_inline_feedback)
 
 getFormEncodingType ()
 
 setPreviewSession ($previewSession)
 
 getPreviewSession ()
 
 showHints ()
 
 buildFocusAnchorHtml ()
 
 isAnswerFreuqencyStatisticSupported ()
 
 getSubQuestionsIndex ()
 
 getAnswersFrequency ($relevantAnswers, $questionIndex)
 
 getAnswerFrequencyTableGUI ($parentGui, $parentCmd, $relevantAnswers, $questionIndex)
 
 prepareReprintableCorrectionsForm (ilPropertyFormGUI $form)
 
 populateCorrectionsFormProperties (ilPropertyFormGUI $form)
 
 saveCorrectionsFormProperties (ilPropertyFormGUI $form)
 

Static Public Member Functions

static _getQuestionGUI ($question_type, $question_id=-1)
 Creates a question gui representation and returns the alias to the question gui note: please do not use $this inside this method to allow static calls. More...
 
static _getGUIClassNameForId ($a_q_id)
 
static _getClassNameForQType ($q_type)
 
static getCommandsFromClassConstants ($guiClassName, $cmdConstantNameBegin='CMD_')
 extracts values of all constants of given class with given prefix as array can be used to get all possible commands in case of these commands are defined as constants More...
 

Data Fields

const FORM_MODE_EDIT = 'edit'
 
const FORM_MODE_ADJUST = 'adjust'
 
const FORM_ENCODING_URLENCODE = 'application/x-www-form-urlencoded'
 
const FORM_ENCODING_MULTIPART = 'multipart/form-data'
 
const SESSION_PREVIEW_DATA_BASE_INDEX = 'ilAssQuestionPreviewAnswers'
 
 $object
 
 $tpl
 
 $lng
 
 $error
 
 $errormessage
 
 $request
 
 $sequence_no
 sequence number in test More...
 
 $question_count
 question count in test More...
 
const PRESENTATION_CONTEXT_TEST = 'pContextTest'
 
const PRESENTATION_CONTEXT_RESULTS = 'pContextResults'
 
const RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'
 
const RENDER_PURPOSE_DEMOPLAY = 'renderPurposeDemoplay'
 
const RENDER_PURPOSE_PREVIEW = 'renderPurposePreview'
 
const RENDER_PURPOSE_PRINT_PDF = 'renderPurposePrintPdf'
 
const RENDER_PURPOSE_INPUT_VALUE = 'renderPurposeInputValue'
 
const EDIT_CONTEXT_AUTHORING = 'authoring'
 
const EDIT_CONTEXT_ADJUSTMENT = 'adjustment'
 

Protected Member Functions

 hasSpecialQuestionCommands ()
 
 writePostData ($always=false)
 Evaluates a posted edit form and writes the form data in the question object. More...
 
 renderEditForm ($form)
 
 getUseUnchangedAnswerCheckboxHtml ()
 
 getPreviousSolutionProvidedMessage ()
 
 getPreviousSolutionConfirmationCheckboxHtml ()
 
 saveTaxonomyAssignments ()
 
 populateTaxonomyFormSection (ilPropertyFormGUI $form)
 
 setDefaultTabs (ilTabsGUI $ilTabs)
 
 setQuestionSpecificTabs (ilTabsGUI $ilTabs)
 
 getBasicEditQuestionTabCommands ()
 
 getAdditionalEditQuestionCommands ()
 
 addTab_QuestionFeedback (ilTabsGUI $tabs)
 adds the feedback tab to ilTabsGUI More...
 
 addTab_QuestionHints (ilTabsGUI $tabs)
 adds the hints tab to ilTabsGUI More...
 
 addTab_Question (ilTabsGUI $tabsGUI)
 
 hasCorrectSolution ($activeId, $passIndex)
 
 writeQuestionGenericPostData ()
 
 completeTestOutputFormAction ($formAction, $active_id, $pass)
 
 addBackTab (ilTabsGUI $ilTabs)
 
 buildBasicEditFormObject ()
 
 escapeTemplatePlaceholders (string $text)
 
 buildEditForm ()
 
 addSaveOnEnterOnLoadCode ()
 

Protected Attributes

const HAS_SPECIAL_QUESTION_COMMANDS = false
 
 $ctrl
 
 $editForm
 
 $use_intermediate_solution = false
 

Private Attributes

 $taxonomyIds = array()
 
 $targetGuiClass = null
 
 $questionActionCmd = 'handleQuestionAction'
 
 $questionHeaderBlockBuilder
 
 $navigationGUI
 
 $presentationContext = null
 
 $renderPurpose = self::RENDER_PURPOSE_PLAYBACK
 
 $editContext = self::EDIT_CONTEXT_AUTHORING
 
 $previousSolutionPrefilled = false
 
 $previewSession
 

Detailed Description

Basic GUI class for assessment questions.

The assQuestionGUI class encapsulates basic GUI functions for assessment questions.

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

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

Constructor & Destructor Documentation

◆ __construct()

assQuestionGUI::__construct ( )

assQuestionGUI constructor

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

References $DIC, $lng, and $tpl.

134  {
135  global $DIC;
136  $lng = $DIC['lng'];
137  $tpl = $DIC['tpl'];
138  $ilCtrl = $DIC['ilCtrl'];
139 
140  $this->lng = &$lng;
141  $this->tpl = &$tpl;
142  $this->ctrl = &$ilCtrl;
143  $this->request = $DIC->http()->request();
144 
145  $this->ctrl->saveParameter($this, "q_id");
146  $this->ctrl->saveParameter($this, "prev_qid");
147  $this->ctrl->saveParameter($this, "calling_test");
148  $this->ctrl->saveParameter($this, "calling_consumer");
149  $this->ctrl->saveParameter($this, "consumer_context");
150  $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'test_express_mode');
151  $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'calling_consumer');
152  $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'consumer_context');
153  $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'test_express_mode');
154  $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'calling_consumer');
155  $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'consumer_context');
156 
157  $this->errormessage = $this->lng->txt("fill_out_all_required_fields");
158  $this->selfassessmenteditingmode = false;
159  $this->new_id_listeners = array();
160  $this->new_id_listener_cnt = 0;
161  $this->navigationGUI = null;
162  }
global $DIC
Definition: goto.php:24

Member Function Documentation

◆ _getClassNameForQType()

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

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

Referenced by _getGUIClassNameForId().

557  {
558  return $q_type . "GUI";
559  }
+ Here is the caller graph for this function:

◆ _getGUIClassNameForId()

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

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

References _getClassNameForQType(), and assQuestion\getQuestionTypeFromDb().

Referenced by ilQuestionBrowserTableGUI\fillRow().

545  {
546  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
547  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
548  $q_type = assQuestion::getQuestionTypeFromDb($a_q_id);
549  $class_name = assQuestionGUI::_getClassNameForQType($q_type);
550  return $class_name;
551  }
static getQuestionTypeFromDb($question_id)
get question type for question id
static _getClassNameForQType($q_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getQuestionGUI()

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

Creates a question gui representation and returns the alias to the question gui note: please do not use $this inside this method to allow static calls.

Parameters
string$question_typeThe question type as it is used in the language database
integer$question_idThe database ID of an existing question to load it into assQuestionGUI
Returns
assQuestionGUI The alias to the question object

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

References $DIC, $ilDB, $lng, assQuestion\_includeClass(), assQuestion\getFeedbackClassNameByQuestionType(), assQuestion\getGuiClassNameByQuestionType(), and assQuestion\getQuestionTypeFromDb().

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

510  {
511  global $DIC;
512  $ilCtrl = $DIC['ilCtrl'];
513  $ilDB = $DIC['ilDB'];
514  $lng = $DIC['lng'];
515 
516  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
517 
518  if ((!$question_type) and ($question_id > 0)) {
519  $question_type = assQuestion::getQuestionTypeFromDb($question_id);
520  }
521 
522  if (strlen($question_type) == 0) {
523  return null;
524  }
525 
526  assQuestion::_includeClass($question_type, 1);
527 
528  $question_type_gui = assQuestion::getGuiClassNameByQuestionType($question_type);
529  $question = new $question_type_gui();
530 
531  $feedbackObjectClassname = assQuestion::getFeedbackClassNameByQuestionType($question_type);
532  $question->object->feedbackOBJ = new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
533 
534  if ($question_id > 0) {
535  $question->object->loadFromDb($question_id);
536  }
537 
538  return $question;
539  }
static _includeClass($question_type, $gui=0)
Include the php class file for a given question type.
static getQuestionTypeFromDb($question_id)
get question type for question id
global $DIC
Definition: goto.php:24
global $ilDB
static getGuiClassNameByQuestionType($questionType)
static getFeedbackClassNameByQuestionType($questionType)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addBackTab()

assQuestionGUI::addBackTab ( ilTabsGUI  $ilTabs)
protected
Parameters
ilTabsGUI$ilTabs

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

References ilAssQuestionPreviewGUI\CMD_SHOW, and ilTabsGUI\setBackTarget().

Referenced by setQuestionTabs().

2226  {
2227  $this->ctrl->saveParameterByClass(ilAssQuestionPreviewGUI::class, 'prev_qid');
2228  $ilTabs->setBackTarget(
2229  $this->lng->txt('backtocallingpage'),
2230  $this->ctrl->getLinkTargetByClass(ilAssQuestionPreviewGUI::class, ilAssQuestionPreviewGUI::CMD_SHOW)
2231  );
2232  }
setBackTarget($a_title, $a_target, $a_frame="")
back target for upper context
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addBasicQuestionFormProperties()

assQuestionGUI::addBasicQuestionFormProperties (   $form)

Add basic question form properties: assessment: title, author, description, question, working time.

Returns
int Default Nr of Tries

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

References ilObjAdvancedEditing\_getUsedHTMLTags(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_IPE, ilAssSelfAssessmentQuestionFormatter\getSelfAssessmentTags(), ilUtil\prepareFormOutput(), ilDurationInputGUI\setShowHours(), ilNumberInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

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

1197  {
1198  // title
1199  $title = new ilTextInputGUI($this->lng->txt("title"), "title");
1200  $title->setMaxLength(100);
1201  $title->setValue($this->object->getTitle());
1202  $title->setRequired(true);
1203  $form->addItem($title);
1204 
1205  if (!$this->object->getSelfAssessmentEditingMode()) {
1206  // author
1207  $author = new ilTextInputGUI($this->lng->txt("author"), "author");
1208  $author->setValue($this->object->getAuthor());
1209  $author->setRequired(true);
1210  $form->addItem($author);
1211 
1212  // description
1213  $description = new ilTextInputGUI($this->lng->txt("description"), "comment");
1214  $description->setValue($this->object->getComment());
1215  $description->setRequired(false);
1216  $form->addItem($description);
1217  } else {
1218  // author as hidden field
1219  $hi = new ilHiddenInputGUI("author");
1220  $author = ilUtil::prepareFormOutput($this->object->getAuthor());
1221  if (trim($author) == "") {
1222  $author = "-";
1223  }
1224  $hi->setValue($author);
1225  $form->addItem($hi);
1226  }
1227 
1228  // lifecycle
1229  $lifecycle = new ilSelectInputGUI($this->lng->txt('qst_lifecycle'), 'lifecycle');
1230  $lifecycle->setOptions($this->object->getLifecycle()->getSelectOptions($this->lng));
1231  $lifecycle->setValue($this->object->getLifecycle()->getIdentifier());
1232  $form->addItem($lifecycle);
1233 
1234  // questiontext
1235  $question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
1236  $question->setValue($this->object->getQuestion());
1237  $question->setRequired(true);
1238  $question->setRows(10);
1239  $question->setCols(80);
1240 
1241  if (!$this->object->getSelfAssessmentEditingMode()) {
1242  if ($this->object->getAdditionalContentEditingMode() != assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_IPE) {
1243  $question->setUseRte(true);
1244  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
1245  $question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
1246  $question->addPlugin("latex");
1247  $question->addButton("latex");
1248  $question->addButton("pastelatex");
1249  $question->setRTESupport($this->object->getId(), "qpl", "assessment");
1250  }
1251  } else {
1252  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssSelfAssessmentQuestionFormatter.php';
1254  $question->setUseTagsForRteOnly(false);
1255  }
1256  $form->addItem($question);
1257 
1258  if (!$this->object->getSelfAssessmentEditingMode()) {
1259  // duration
1260  $duration = new ilDurationInputGUI($this->lng->txt("working_time"), "Estimated");
1261  $duration->setShowHours(true);
1262  $duration->setShowMinutes(true);
1263  $duration->setShowSeconds(true);
1264  $ewt = $this->object->getEstimatedWorkingTime();
1265  $duration->setHours($ewt["h"]);
1266  $duration->setMinutes($ewt["m"]);
1267  $duration->setSeconds($ewt["s"]);
1268  $duration->setRequired(false);
1269  $form->addItem($duration);
1270  } else {
1271  // number of tries
1272  if (strlen($this->object->getNrOfTries())) {
1273  $nr_tries = $this->object->getNrOfTries();
1274  } else {
1275  $nr_tries = $this->object->getDefaultNrOfTries();
1276  }
1277  if ($nr_tries < 1) {
1278  $nr_tries = "";
1279  }
1280 
1281  $ni = new ilNumberInputGUI($this->lng->txt("qst_nr_of_tries"), "nr_of_tries");
1282  $ni->setValue($nr_tries);
1283  $ni->setMinValue(0);
1284  $ni->setSize(5);
1285  $ni->setMaxLength(5);
1286  $form->addItem($ni);
1287  }
1288  }
const ADDITIONAL_CONTENT_EDITING_MODE_IPE
constant for additional content editing mode "pageobject"
static getSelfAssessmentTags()
Get tags allowed in question tags in self assessment mode.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
This class represents a duration (typical hh:mm:ss) property in a property form.
setValue($a_value)
Set Value.
setShowHours($a_showhours)
Set Show Hours.
static _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
setValue($a_value)
Set Value.
This class represents a hidden form property in a property form.
This class represents a number property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addErrorMessage()

assQuestionGUI::addErrorMessage (   $errormessage)

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

References $errormessage.

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

1109  {
1110  $this->errormessage .= ((strlen($this->errormessage)) ? "<br />" : "") . $errormessage;
1111  }
+ Here is the caller graph for this function:

◆ addGIT()

assQuestionGUI::addGIT ( )

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

References $_GET.

1888  {
1889  $subquestion_index = 0;
1890  if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0) {
1891  $subquestion_index = $_GET["subquestion_index"];
1892  }
1893  $this->object->saveSuggestedSolution("git", "il__git_" . $_GET["git"], $subquestion_index);
1894  ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1895  $this->ctrl->redirect($this, "suggestedsolution");
1896  }
$_GET["client_id"]

◆ addHeaderAction()

assQuestionGUI::addHeaderAction ( )

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

175  {
176  }

◆ addNewIdListener()

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

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

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

1152  {
1153  $cnt = $this->new_id_listener_cnt;
1154  $this->new_id_listeners[$cnt]["object"] = &$a_object;
1155  $this->new_id_listeners[$cnt]["method"] = $a_method;
1156  $this->new_id_listeners[$cnt]["parameters"] = $a_parameters;
1157  $this->new_id_listener_cnt++;
1158  }

◆ addPG()

assQuestionGUI::addPG ( )

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

References $_GET.

1866  {
1867  $subquestion_index = 0;
1868  if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0) {
1869  $subquestion_index = $_GET["subquestion_index"];
1870  }
1871  $this->object->saveSuggestedSolution("pg", "il__pg_" . $_GET["pg"], $subquestion_index);
1872  ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1873  $this->ctrl->redirect($this, "suggestedsolution");
1874  }
$_GET["client_id"]

◆ addQuestionFormCommandButtons()

assQuestionGUI::addQuestionFormCommandButtons (   $form)

Add the command buttons of a question properties form.

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

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

1182  {
1183  //if (!$this->object->getSelfAssessmentEditingMode() && !$_GET["calling_test"]) $form->addCommandButton("saveEdit", $this->lng->txt("save_edit"));
1184  if (!$this->object->getSelfAssessmentEditingMode()) {
1185  $form->addCommandButton("saveReturn", $this->lng->txt("save_return"));
1186  }
1187  $form->addCommandButton("save", $this->lng->txt("save"));
1188  }
+ Here is the caller graph for this function:

◆ addSaveOnEnterOnLoadCode()

assQuestionGUI::addSaveOnEnterOnLoadCode ( )
protected

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

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

2359  : void
2360  {
2361  $this->tpl->addOnloadCode("
2362  let form = document.querySelector('#ilContentContainer form');
2363  let button = form.querySelector('input[name=\"cmd[save]\"]');
2364  if (button === null) {
2365  button = form.querySelector('input[name=\"cmd[saveFQ]\"]');
2366  };
2367  if (form && button) {
2368  form.addEventListener('keydown', function (e) {
2369  if (e.key === 'Enter'
2370  && e.target.type !== 'textarea'
2371  && e.target.type !== 'submit'
2372  && e.target.type !== 'file'
2373  ) {
2374  e.preventDefault();
2375  form.requestSubmit(button);
2376  }
2377  })
2378  }
2379  ");
2380  }
+ Here is the caller graph for this function:

◆ addST()

assQuestionGUI::addST ( )

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

References $_GET.

1877  {
1878  $subquestion_index = 0;
1879  if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0) {
1880  $subquestion_index = $_GET["subquestion_index"];
1881  }
1882  $this->object->saveSuggestedSolution("st", "il__st_" . $_GET["st"], $subquestion_index);
1883  ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1884  $this->ctrl->redirect($this, "suggestedsolution");
1885  }
$_GET["client_id"]

◆ addTab_Question()

assQuestionGUI::addTab_Question ( ilTabsGUI  $tabsGUI)
protected

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

References $pass, ilTabsGUI\addTarget(), and getSolutionOutput().

Referenced by setDefaultTabs().

2055  {
2056  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
2057 
2058  $tabsGUI->addTarget(
2059  'edit_question',
2060  $this->ctrl->getLinkTargetByClass(
2061  array('ilrepositorygui','ilobjquestionpoolgui', get_class($this)),
2062  'editQuestion'
2063  ),
2064  'editQuestion',
2065  '',
2066  '',
2067  false
2068  );
2069  }
addTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $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

adds the feedback tab to ilTabsGUI

ilCtrl $ilCtrl

Parameters
ilTabsGUI$tabs

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

References $DIC, ilTabsGUI\addTarget(), and ilAssQuestionFeedbackEditingGUI\CMD_SHOW.

Referenced by setDefaultTabs().

2007  {
2008  global $DIC;
2009  $ilCtrl = $DIC['ilCtrl'];
2010 
2011  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
2012  $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionFeedbackEditingGUI');
2013 
2014  $tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
2015 
2016  $tabs->addTarget('tst_feedback', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
2017  }
addTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTab_QuestionHints()

assQuestionGUI::addTab_QuestionHints ( ilTabsGUI  $tabs)
protected

adds the hints tab to ilTabsGUI

ilCtrl $ilCtrl

Parameters
ilTabsGUI$tabs

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

References $DIC, ilTabsGUI\addTarget(), and ilAssQuestionHintsGUI\CMD_SHOW_LIST.

Referenced by setDefaultTabs().

2026  {
2027  global $DIC;
2028  $ilCtrl = $DIC['ilCtrl'];
2029 
2030  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
2031 
2032  switch ($ilCtrl->getCmdClass()) {
2033  case 'ilassquestionhintsgui':
2034 
2035  $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintsGUI');
2036  break;
2037 
2038  case 'ilassquestionhintgui':
2039 
2040  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php';
2041  $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintGUI');
2042  break;
2043 
2044  default:
2045 
2046  $tabCommands = array();
2047  }
2048 
2049  $tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
2050 
2051  $tabs->addTarget('tst_question_hints_tab', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
2052  }
addTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
const CMD_SHOW_LIST
command constants
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTab_SuggestedSolution()

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

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

References $_GET, and ilTabsGUI\addTarget().

Referenced by setDefaultTabs().

1971  {
1972  if ($_GET["q_id"]) {
1973  $tabs->addTarget(
1974  "suggested_solution",
1975  $this->ctrl->getLinkTargetByClass($classname, "suggestedsolution"),
1976  array("suggestedsolution", "saveSuggestedSolution", "outSolutionExplorer", "cancel",
1977  "addSuggestedSolution","cancelExplorer", "linkChilds", "removeSuggestedSolution"
1978  ),
1979  $classname,
1980  ""
1981  );
1982  }
1983  }
$_GET["client_id"]
addTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply()

assQuestionGUI::apply ( )

apply changes

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

References writePostData().

1047  {
1048  $this->writePostData();
1049  $this->object->saveToDb();
1050  $this->ctrl->setParameter($this, "q_id", $this->object->getId());
1051  $this->editQuestion();
1052  }
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.
+ Here is the call graph for this function:

◆ buildBasicEditFormObject()

assQuestionGUI::buildBasicEditFormObject ( )
protected
Returns
ilPropertyFormGUI

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

References getType(), and outQuestionType().

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

2259  {
2260  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
2261  $form = new ilPropertyFormGUI();
2262 
2263  $form->setFormAction($this->ctrl->getFormAction($this));
2264 
2265  $form->setId($this->getType());
2266  $form->setTitle($this->outQuestionType());
2267 
2268  $form->setTableWidth('100%');
2269 
2270  $form->setMultipart(true);
2271 
2272  return $form;
2273  }
This class represents a property form user interface.
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 2290 of file class.assQuestionGUI.php.

References $editForm, and $errors.

Referenced by executeCommand().

2291  {
2292  $errors = $this->editQuestion(true); // TODO bheyser: editQuestion should be added to the abstract base class with a unified signature
2293  return $this->editForm;
2294  }
$errors
Definition: imgupload.php:49
+ Here is the caller graph for this function:

◆ buildFocusAnchorHtml()

assQuestionGUI::buildFocusAnchorHtml ( )
Returns
string

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

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

2300  {
2301  return '<div id="focus"></div>';
2302  }
+ Here is the caller graph for this function:

◆ callNewIdListeners()

assQuestionGUI::callNewIdListeners (   $a_new_id)

Call the new id listeners.

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

References $i, and $object.

Referenced by save(), saveReturn(), and assFormulaQuestionGUI\saveReturnFQ().

1164  {
1165  for ($i = 0; $i < $this->new_id_listener_cnt; $i++) {
1166  $this->new_id_listeners[$i]["parameters"]["new_id"] = $a_new_id;
1167  $object = &$this->new_id_listeners[$i]["object"];
1168  $method = $this->new_id_listeners[$i]["method"];
1169  $parameters = $this->new_id_listeners[$i]["parameters"];
1170  //var_dump($object);
1171  //var_dump($method);
1172  //var_dump($parameters);
1173 
1174  $object->$method($parameters);
1175  }
1176  }
$i
Definition: metadata.php:24
+ Here is the caller graph for this function:

◆ cancel()

assQuestionGUI::cancel ( )

cancel action

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

References $_GET, and ilUtil\redirect().

713  {
714  if ($_GET["calling_test"]) {
715  $_GET["ref_id"] = $_GET["calling_test"];
716  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
717  } elseif ($_GET["test_ref_id"]) {
718  $_GET["ref_id"] = $_GET["test_ref_id"];
719  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["test_ref_id"]);
720  } else {
721  if ($_GET["q_id"] > 0) {
722  $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
723  $this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
724  } else {
725  $this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
726  }
727  }
728  }
$_GET["client_id"]
static redirect($a_script)
+ Here is the call graph for this function:

◆ cancelExplorer()

assQuestionGUI::cancelExplorer ( )

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

1721  {
1722  $this->ctrl->redirect($this, "suggestedsolution");
1723  }

◆ cancelSync()

assQuestionGUI::cancelSync ( )

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

References $_GET, ilLink\_getLink(), ilAssQuestionPreviewGUI\CMD_SHOW, ilObjectFactory\getInstanceByRefId(), ilTestExpressPage\getReturnToPageLink(), and ilUtil\redirect().

787  {
788  if (strlen($_GET["return_to"])) {
789  $this->ctrl->redirect($this, $_GET["return_to"]);
790  }
791  if (strlen($_REQUEST['return_to_fb'])) {
792  $this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', 'showFeedbackForm');
793  } else {
794  if (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
795  $ref_id = (int) $_GET['calling_consumer'];
796  $consumer = ilObjectFactory::getInstanceByRefId($ref_id);
797  if ($consumer instanceof ilQuestionEditingFormConsumer) {
798  ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
799  }
800  require_once 'Services/Link/classes/class.ilLink.php';
802  }
803  $_GET["ref_id"] = $_GET["calling_test"];
804 
805  if ($_REQUEST['test_express_mode']) {
807  } else {
808  $this->ctrl->redirectByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW);
809  }
810  }
811  }
$_GET["client_id"]
static getReturnToPageLink($q_id=null)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static redirect($a_script)
+ Here is the call graph for this function:

◆ completeTestOutputFormAction()

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

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

Referenced by outQuestionForTest().

2200  {
2201  return $formAction;
2202  }
+ Here is the caller graph for this function:

◆ createQuestionGUI()

& assQuestionGUI::createQuestionGUI (   $question_type,
  $question_id = -1 
)

Creates a question gui representation.

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

Parameters
string$question_typeThe question type as it is used in the language database
integer$question_idThe database ID of an existing question to load it into assQuestionGUI
Returns
object The alias to the question object public
Deprecated:
: WTF is this? GUIobject::question should be a GUIobject !? WTF is a question alias !?

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

References _getQuestionGUI().

574  {
575  include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
576  $this->question = &assQuestionGUI::_getQuestionGUI($question_type, $question_id);
577  }
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
+ Here is the call graph for this function:

◆ escapeTemplatePlaceholders()

assQuestionGUI::escapeTemplatePlaceholders ( string  $text)
protected

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

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

2282  : string
2283  {
2284  return str_replace(['{','}'], ['&#123;','&#125;'], $text);
2285  }
+ Here is the caller graph for this function:

◆ executeCommand()

assQuestionGUI::executeCommand ( )

execute command

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

References $_GET, $DIC, addSaveOnEnterOnLoadCode(), buildEditForm(), hasSpecialQuestionCommands(), and ilUtil\stripSlashes().

222  {
223  global $DIC;
224  $DIC['ilHelp']->setScreenIdComponent('qpl');
225 
226  $next_class = $this->ctrl->getNextClass($this);
227 
228  switch ($next_class) {
229  case 'ilformpropertydispatchgui':
230  $form = $this->buildEditForm();
231  $form_prop_dispatch = new ilFormPropertyDispatchGUI();
232  $form_prop_dispatch->setItem($form->getItemByPostVar(ilUtil::stripSlashes($_GET['postvar'])));
233  $this->ctrl->forwardCommand($form_prop_dispatch);
234  break;
235 
236  default:
237  $cmd = $this->ctrl->getCmd('editQuestion');
238 
239  if (in_array($cmd, ['save', 'saveReturn','saveFQ', 'saveReturnFQ', 'editQuestion'])) {
240  $this->addSaveOnEnterOnLoadCode();
241  $this->$cmd();
242  return;
243  }
244 
245  if (method_exists($this, $cmd)) {
246  $this->$cmd();
247  return;
248  }
249 
250  if ($this->hasSpecialQuestionCommands() === true) {
251  $this->callSpecialQuestionCommands($cmd);
252  }
253  }
254  }
$_GET["client_id"]
global $DIC
Definition: goto.php:24
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ getAdditionalEditQuestionCommands()

assQuestionGUI::getAdditionalEditQuestionCommands ( )
protected

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

Referenced by getEditQuestionTabCommands().

1996  {
1997  return array();
1998  }
+ Here is the caller graph for this function:

◆ getAnswerFeedbackOutput()

assQuestionGUI::getAnswerFeedbackOutput (   $active_id,
  $pass 
)

Returns the answer generic feedback depending on the results of the question.

Deprecated:
Use getGenericFeedbackOutput instead.
Parameters
integer$active_idActive ID of the user
integer$passActive pass
Returns
string HTML Code with the answer specific feedback public

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

References $pass, and getGenericFeedbackOutput().

Referenced by assTextSubsetGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), assMultipleChoiceGUI\getSolutionOutput(), assFileUploadGUI\getSolutionOutput(), assJavaAppletGUI\getSolutionOutput(), and assImagemapQuestionGUI\supportsIntermediateSolutionOutput().

1348  {
1349  return $this->getGenericFeedbackOutput($active_id, $pass);
1350  }
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAnswerFrequencyTableGUI()

assQuestionGUI::getAnswerFrequencyTableGUI (   $parentGui,
  $parentCmd,
  $relevantAnswers,
  $questionIndex 
)
Parameters
$parentGui
$parentCmd
$relevantAnswers
$questionIndex
Returns
ilAnswerFrequencyStatisticTableGUI

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

References getAnswersFrequency().

2327  {
2328  require_once 'Modules/TestQuestionPool/classes/tables/class.ilAnswerFrequencyStatisticTableGUI.php';
2329 
2330  $table = new ilAnswerFrequencyStatisticTableGUI($parentGui, $parentCmd, $this->object);
2331  $table->setQuestionIndex($questionIndex);
2332  $table->setData($this->getAnswersFrequency($relevantAnswers, $questionIndex));
2333  $table->initColumns();
2334 
2335  return $table;
2336  }
getAnswersFrequency($relevantAnswers, $questionIndex)
+ Here is the call graph for this function:

◆ getAnswersFrequency()

assQuestionGUI::getAnswersFrequency (   $relevantAnswers,
  $questionIndex 
)

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

Referenced by getAnswerFrequencyTableGUI().

2315  {
2316  return array();
2317  }
+ Here is the caller graph for this function:

◆ getAsValueAttribute()

assQuestionGUI::getAsValueAttribute (   $a_value)

Returns a HTML value attribute.

Parameters
mixed$a_valueA given text or value
Returns
string The value as HTML value attribute public

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

References $result.

1138  {
1139  $result = "";
1140  if (strlen($a_value)) {
1141  $result = " value=\"$a_value\" ";
1142  }
1143  return $result;
1144  }
$result

◆ getBasicEditQuestionTabCommands()

assQuestionGUI::getBasicEditQuestionTabCommands ( )
protected

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

Referenced by getEditQuestionTabCommands().

1991  {
1992  return array('editQuestion', 'save', 'saveEdit', 'originalSyncForm');
1993  }
+ Here is the caller graph for this function:

◆ getCommandsFromClassConstants()

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

extracts values of all constants of given class with given prefix as array can be used to get all possible commands in case of these commands are defined as constants

Parameters
string$guiClassName
string$cmdConstantNameBegin
Returns
array

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

Referenced by ilPCQuestionGUI\setTabs().

1912  {
1913  $reflectionClass = new ReflectionClass($guiClassName);
1914 
1915  $commands = null;
1916 
1917  if ($reflectionClass instanceof ReflectionClass) {
1918  $commands = array();
1919 
1920  foreach ($reflectionClass->getConstants() as $constName => $constValue) {
1921  if (substr($constName, 0, strlen($cmdConstantNameBegin)) == $cmdConstantNameBegin) {
1922  $commands[] = $constValue;
1923  }
1924  }
1925  }
1926 
1927  return $commands;
1928  }
+ Here is the caller graph for this function:

◆ getContextPath()

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

get context path in content object tree

Parameters
int$a_endnode_idid of endnode
int$a_startnode_idid of startnode

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

References $i.

Referenced by outPageSelector().

1061  {
1062  $path = "";
1063 
1064  $tmpPath = $cont_obj->getLMTree()->getPathFull($a_endnode_id, $a_startnode_id);
1065 
1066  // count -1, to exclude the learning module itself
1067  for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1068  if ($path != "") {
1069  $path .= " > ";
1070  }
1071 
1072  $path .= $tmpPath[$i]["title"];
1073  }
1074 
1075  return $path;
1076  }
$i
Definition: metadata.php:24
+ Here is the caller graph for this function:

◆ getEditContext()

assQuestionGUI::getEditContext ( )
Returns
string

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

References $editContext.

Referenced by isAdjustmentEditContext(), and isAuthoringEditContext().

366  {
367  return $this->editContext;
368  }
+ Here is the caller graph for this function:

◆ getEditQuestionTabCommands()

assQuestionGUI::getEditQuestionTabCommands ( )
final

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

References getAdditionalEditQuestionCommands(), and getBasicEditQuestionTabCommands().

1986  {
1987  return array_merge($this->getBasicEditQuestionTabCommands(), $this->getAdditionalEditQuestionCommands());
1988  }
+ Here is the call graph for this function:

◆ getErrorMessage()

assQuestionGUI::getErrorMessage ( )

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

References $errormessage.

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

1099  {
1100  return $this->errormessage;
1101  }
+ Here is the caller graph for this function:

◆ getFormEncodingType()

assQuestionGUI::getFormEncodingType ( )

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

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

2218  {
2219  return self::FORM_ENCODING_URLENCODE;
2220  }
+ Here is the caller graph for this function:

◆ getGenericFeedbackOutput()

assQuestionGUI::getGenericFeedbackOutput (   $active_id,
  $pass 
)

Returns the answer specific feedback for the question.

Parameters
integer$active_idActive ID of the user
integer$passActive pass
Returns
string HTML Code with the answer specific feedback public

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

References $pass, and ilObjTest\getManualFeedback().

Referenced by getAnswerFeedbackOutput(), assOrderingHorizontalGUI\getSolutionOutput(), assTextQuestionGUI\getSolutionOutput(), assNumericGUI\getSolutionOutput(), assErrorTextGUI\getSolutionOutput(), assLongMenuGUI\getSolutionOutput(), assOrderingQuestionGUI\getSolutionOutput(), assMatchingQuestionGUI\getSolutionOutput(), assKprimChoiceGUI\getSolutionOutput(), assFormulaQuestionGUI\getSolutionOutput(), assClozeTestGUI\getSolutionOutput(), and ilTestPlayerAbstractGUI\populateGenericFeedbackBlock().

1362  {
1363  $output = "";
1364  include_once "./Modules/Test/classes/class.ilObjTest.php";
1365  $manual_feedback = ilObjTest::getManualFeedback($active_id, $this->object->getId(), $pass);
1366  if (strlen($manual_feedback)) {
1367  return $manual_feedback;
1368  }
1369 
1370  $correct_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true);
1371  $incorrect_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false);
1372  if (strlen($correct_feedback . $incorrect_feedback)) {
1373  $reached_points = $this->object->calculateReachedPoints($active_id, $pass);
1374  $max_points = $this->object->getMaximumPoints();
1375  if ($reached_points == $max_points) {
1376  $output = $correct_feedback;
1377  } else {
1378  $output = $incorrect_feedback;
1379  }
1380  }
1381 
1382  if ($this->object->isAdditionalContentEditingModePageObject()) {
1383  return $output;
1384  }
1385  return $this->object->prepareTextareaOutput($output, true);
1386  }
static getManualFeedback($active_id, $question_id, $pass)
Retrieves the feedback comment for a question in a test if it is finalized.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGenericFeedbackOutputForCorrectSolution()

assQuestionGUI::getGenericFeedbackOutputForCorrectSolution ( )

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

1389  {
1390  return $this->object->prepareTextareaOutput(
1391  $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true),
1392  true
1393  );
1394  }

◆ getGenericFeedbackOutputForIncorrectSolution()

assQuestionGUI::getGenericFeedbackOutputForIncorrectSolution ( )

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

References getSpecificFeedbackOutput().

1397  {
1398  return $this->object->prepareTextareaOutput(
1399  $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false),
1400  true
1401  );
1402  }
+ Here is the call graph for this function:

◆ getHeaderAction()

assQuestionGUI::getHeaderAction ( )

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

References $_GET, $DIC, ilCommonActionDispatcherGUI\setSubObject(), and ilCommonActionDispatcherGUI\TYPE_REPOSITORY.

Referenced by redrawHeaderAction().

186  {
187  global $DIC; /* @var ILIAS\DI\Container $DIC */
188  /* @var ilObjectDataCache $ilObjDataCache */
189  $ilObjDataCache = $DIC['ilObjDataCache'];
190 
191  $parentObjType = $ilObjDataCache->lookupType($this->object->getObjId());
192 
193  $dispatcher = new ilCommonActionDispatcherGUI(
195  $DIC->access(),
196  $parentObjType,
197  $_GET["ref_id"],
198  $this->object->getObjId()
199  );
200 
201  $dispatcher->setSubObject("quest", $this->object->getId());
202 
203  $ha = $dispatcher->initHeaderAction();
204  $ha->enableComments(true, false);
205 
206  return $ha->getHeaderAction($DIC->ui()->mainTemplate());
207  }
$_GET["client_id"]
global $DIC
Definition: goto.php:24
Class ilCommonActionDispatcherGUI.
setSubObject($a_sub_obj_type, $a_sub_obj_id)
Set sub object attributes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getILIASPage()

assQuestionGUI::getILIASPage (   $html = "")

Returns the ILIAS Page around a question.

Returns
string The ILIAS page content public

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

References ilPageObjectGUI\setQuestionHTML().

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

626  {
627  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
628  $page_gui = new ilAssQuestionPageGUI($this->object->getId());
629  $page_gui->setQuestionHTML(array($this->object->getId() => $html));
630  $presentation = $page_gui->presentation();
631  $presentation = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $presentation);
632  return $presentation;
633  }
Question page GUI class.
setQuestionHTML($question_html)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNavigationGUI()

assQuestionGUI::getNavigationGUI ( )
Returns
ilTestQuestionNavigationGUI

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

References $navigationGUI.

Referenced by outQuestionPage().

403  {
404  return $this->navigationGUI;
405  }
+ Here is the caller graph for this function:

◆ getNotesHTML()

assQuestionGUI::getNotesHTML ( )

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

References ilNoteGUI\enablePublicNotes().

210  {
211  $notesGUI = new ilNoteGUI($this->object->getObjId(), $this->object->getId(), 'quest');
212  $notesGUI->enablePublicNotes(true);
213  $notesGUI->enablePublicNotesDeletion(true);
214 
215  return $notesGUI->getNotesHTML();
216  }
enablePublicNotes($a_enable=true)
enable public notes
Notes GUI class.
+ Here is the call graph for this function:

◆ getPresentationContext()

assQuestionGUI::getPresentationContext ( )
Returns
string

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

References $presentationContext.

Referenced by isTestPresentationContext().

273  {
275  }
+ Here is the caller graph for this function:

◆ getPresentationJavascripts()

assQuestionGUI::getPresentationJavascripts ( )

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

Referenced by populateJavascriptFilesRequiredForWorkForm().

587  {
588  return array();
589  }
+ Here is the caller graph for this function:

◆ getPreview()

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

Referenced by writeQuestionGenericPostData().

+ Here is the caller graph for this function:

◆ getPreviewSession()

◆ getPreviousSolutionConfirmationCheckboxHtml()

assQuestionGUI::getPreviousSolutionConfirmationCheckboxHtml ( )
protected

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

References $tpl.

Referenced by outQuestionPage().

700  {
701  $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
702  // hey: prevPassSolutions - use abtract template
703  $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->lng->txt('use_previous_solution'));
704  // hey.
705  return $tpl->get();
706  }
+ Here is the caller graph for this function:

◆ getPreviousSolutionProvidedMessage()

assQuestionGUI::getPreviousSolutionProvidedMessage ( )
protected

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

Referenced by outQuestionPage().

695  {
696  return $this->lng->txt('use_previous_solution_advice');
697  }
+ Here is the caller graph for this function:

◆ getQuestionActionCmd()

◆ getQuestionCount()

assQuestionGUI::getQuestionCount ( )

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

References $question_count.

1094  {
1095  return $this->question_count;
1096  }
$question_count
question count in test

◆ getQuestionHeaderBlockBuilder()

assQuestionGUI::getQuestionHeaderBlockBuilder ( )
Returns
$questionHeaderBlockBuilder

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

References $questionHeaderBlockBuilder.

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

453  {
455  }
+ Here is the caller graph for this function:

◆ getQuestionTemplate()

assQuestionGUI::getQuestionTemplate ( )

get question template

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

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

595  {
596  // @todo Björn: Maybe this has to be changed for PHP 7/ILIAS 5.2.x (ilObjTestGUI::executeCommand, switch -> default case -> $this->prepareOutput(); already added a template to the CONTENT variable wrapped in a block named content)
597  if (!$this->tpl->blockExists('content')) {
598  $this->tpl->addBlockFile("CONTENT", "content", "tpl.il_as_qpl_content.html", "Modules/TestQuestionPool");
599  }
600  // @todo Björn: Maybe this has to be changed for PHP 7/ILIAS 5.2.x (ilObjTestGUI::executeCommand, switch -> default case -> $this->prepareOutput(); already added a template to the STATUSLINE variable wrapped in a block named statusline)
601  if (!$this->tpl->blockExists('statusline')) {
602  $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
603  }
604  // @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
605  if (!$this->tpl->blockExists('adm_content')) {
606  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_question.html", "Modules/TestQuestionPool");
607  }
608  }
+ Here is the caller graph for this function:

◆ getQuestionType()

assQuestionGUI::getQuestionType ( )

Returns the question type string.

Returns the question type string

Returns
string The question type string public

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

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

1126  {
1127  return $this->object->getQuestionType();
1128  }
+ Here is the caller graph for this function:

◆ getRenderPurpose()

assQuestionGUI::getRenderPurpose ( )
Returns
string

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

References $renderPurpose.

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

312  {
313  return $this->renderPurpose;
314  }
+ Here is the caller graph for this function:

◆ getSequenceNumber()

assQuestionGUI::getSequenceNumber ( )

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

References $sequence_no.

1084  {
1085  return $this->sequence_no;
1086  }
$sequence_no
sequence number in test

◆ getSolutionOutput()

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

◆ getSpecificFeedbackOutput()

assQuestionGUI::getSpecificFeedbackOutput (   $userSolution)
abstract

Returns the answer specific feedback for the question.

This method should be overwritten by the actual question.

Todo:
Mark this method abstract!
Parameters
array$userSolution($userSolution[<value1>] = <value2>)
Returns
string HTML Code with the answer specific feedback public

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

+ Here is the caller graph for this function:

◆ getSubQuestionsIndex()

assQuestionGUI::getSubQuestionsIndex ( )

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

2310  {
2311  return array(0);
2312  }

◆ getTargetGuiClass()

assQuestionGUI::getTargetGuiClass ( )

◆ getTaxonomyIds()

assQuestionGUI::getTaxonomyIds ( )

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

References $taxonomyIds.

Referenced by populateTaxonomyFormSection(), and saveTaxonomyAssignments().

421  {
422  return $this->taxonomyIds;
423  }
+ Here is the caller graph for this function:

◆ getTestOutput()

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

Referenced by magicAfterTestOutput(), and outQuestionForTest().

+ Here is the caller graph for this function:

◆ getType()

assQuestionGUI::getType ( )

needed for page editor compliance

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

References getQuestionType().

Referenced by buildBasicEditFormObject().

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

◆ getUseIntermediateSolution()

◆ getUseUnchangedAnswerCheckboxHtml()

assQuestionGUI::getUseUnchangedAnswerCheckboxHtml ( )
protected

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

References $tpl.

Referenced by outQuestionPage().

684  {
685  // hey: prevPassSolutions - use abstracted template to share with other purposes of this kind
686  $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
687  $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->object->getTestPresentationConfig()->getUseUnchangedAnswerLabel());
688  // hey.
689  return $tpl->get();
690  }
+ Here is the caller graph for this function:

◆ hasCorrectSolution()

◆ hasInlineFeedback()

assQuestionGUI::hasInlineFeedback ( )

this method can be overwritten per question type

Returns
bool

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

Referenced by ilTestPlayerAbstractGUI\populateInstantResponseBlocks().

170  {
171  return false;
172  }
+ Here is the caller graph for this function:

◆ hasIntermediateSolution()

assQuestionGUI::hasIntermediateSolution (   $activeId,
  $passIndex 
)

Check if the question has an intermediate solution.

Parameters
int$activeId
int$passIndex
Returns
bool

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

References $result.

2100  {
2101  $result = $this->object->lookupForExistingSolutions($activeId, $passIndex);
2102  return ($result['intermediate']);
2103  }
$result

◆ hasSpecialQuestionCommands()

assQuestionGUI::hasSpecialQuestionCommands ( )
protected

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

Referenced by executeCommand().

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

◆ isAdjustmentEditContext()

assQuestionGUI::isAdjustmentEditContext ( )
Parameters
bool$isAdjustmentEditContext

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

References getEditContext().

390  {
391  return $this->getEditContext() == self::EDIT_CONTEXT_ADJUSTMENT;
392  }
+ Here is the call graph for this function:

◆ isAnswerFreuqencyStatisticSupported()

assQuestionGUI::isAnswerFreuqencyStatisticSupported ( )

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

Referenced by ilTestCorrectionsGUI\setCorrectionTabsContext().

2305  {
2306  return true;
2307  }
+ Here is the caller graph for this function:

◆ isAuthoringEditContext()

assQuestionGUI::isAuthoringEditContext ( )
Parameters
bool$isAuthoringEditContext

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

References getEditContext().

382  {
383  return $this->getEditContext() == self::EDIT_CONTEXT_AUTHORING;
384  }
+ Here is the call graph for this function:

◆ isAutosaveable()

assQuestionGUI::isAutosaveable ( )

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

2132  {
2133  return $this->object->isAutosaveable();
2134  }

◆ isPreviousSolutionPrefilled()

assQuestionGUI::isPreviousSolutionPrefilled ( )
Returns
boolean

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

References $previousSolutionPrefilled.

295  {
297  }

◆ isRenderPurposeDemoplay()

assQuestionGUI::isRenderPurposeDemoplay ( )

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

References getRenderPurpose().

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

345  {
346  return $this->getRenderPurpose() == self::RENDER_PURPOSE_DEMOPLAY;
347  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposeInputValue()

assQuestionGUI::isRenderPurposeInputValue ( )

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

References getRenderPurpose().

Referenced by renderPurposeSupportsFormHtml().

335  {
336  return $this->getRenderPurpose() == self::RENDER_PURPOSE_INPUT_VALUE;
337  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePlayback()

assQuestionGUI::isRenderPurposePlayback ( )

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

References getRenderPurpose().

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

340  {
341  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PLAYBACK;
342  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePreview()

assQuestionGUI::isRenderPurposePreview ( )

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

References getRenderPurpose().

330  {
331  return $this->getRenderPurpose() == self::RENDER_PURPOSE_PREVIEW;
332  }
+ Here is the call graph for this function:

◆ isRenderPurposePrintPdf()

assQuestionGUI::isRenderPurposePrintPdf ( )

◆ isSaveCommand()

◆ isTestPresentationContext()

◆ linkChilds()

assQuestionGUI::linkChilds ( )

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

References $_GET, outChapterSelector(), outGlossarySelector(), and outPageSelector().

1844  {
1845  $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1846  switch ($_GET["search_link_type"]) {
1847  case "pg":
1848  return $this->outPageSelector();
1849  break;
1850  case "st":
1851  return $this->outChapterSelector();
1852  break;
1853  case "glo":
1854  return $this->outGlossarySelector();
1855  break;
1856  case "lm":
1857  $subquestion_index = ($_GET["subquestion_index"] > 0) ? $_GET["subquestion_index"] : 0;
1858  $this->object->saveSuggestedSolution("lm", "il__lm_" . $_GET["source_id"], $subquestion_index);
1859  ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1860  $this->ctrl->redirect($this, "suggestedsolution");
1861  break;
1862  }
1863  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ magicAfterTestOutput()

assQuestionGUI::magicAfterTestOutput ( )

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

References $pass, and getTestOutput().

Referenced by outQuestionForTest().

2205  {
2206  return;
2207  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ originalSyncForm()

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

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

Referenced by suggestedsolution().

735  {
736  if (strlen($return_to)) {
737  $this->ctrl->setParameter($this, "return_to", $return_to);
738  } elseif ($_REQUEST['return_to']) {
739  $this->ctrl->setParameter($this, "return_to", $_REQUEST['return_to']);
740  }
741  if (strlen($return_to_feedback)) {
742  $this->ctrl->setParameter($this, 'return_to_fb', 'true');
743  }
744 
745  $this->ctrl->saveParameter($this, 'test_express_mode');
746 
747  $template = new ilTemplate("tpl.il_as_qpl_sync_original.html", true, true, "Modules/TestQuestionPool");
748  $template->setVariable("BUTTON_YES", $this->lng->txt("yes"));
749  $template->setVariable("BUTTON_NO", $this->lng->txt("no"));
750  $template->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
751  $template->setVariable("TEXT_SYNC", $this->lng->txt("confirm_sync_questions"));
752  $this->tpl->setVariable("ADM_CONTENT", $template->get());
753  }
+ Here is the caller graph for this function:

◆ outAdditionalOutput()

assQuestionGUI::outAdditionalOutput ( )

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

1114  {
1115  }

◆ outChapterSelector()

assQuestionGUI::outChapterSelector ( )

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

References $_GET, $rows, and ilUtil\stripSlashes().

Referenced by linkChilds().

1785  {
1786  require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1787  require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1788 
1789  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1790 
1791  $cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
1792  $cont_obj = $cont_obj_gui->object;
1793  $ctree = $cont_obj->getLMTree();
1794  $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
1795 
1796  $rows = array();
1797 
1798  foreach ($nodes as $node) {
1799  if ($node['type'] == $_GET['search_link_type']) {
1800  $this->ctrl->setParameter($this, $node['type'], $node['obj_id']);
1801  $rows[] = array(
1802  'title' => $node['title'],
1803  'description' => '',
1804  'text_add' => $this->lng->txt('add'),
1805  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($node['type']))
1806  );
1807  }
1808  }
1809 
1810  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1811  $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
1812  $table->setData($rows);
1813 
1814  $this->tpl->setContent($table->getHTML());
1815  }
$_GET["client_id"]
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$rows
Definition: xhr_table.php:10
Class ilObjContentObjectGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outGlossarySelector()

assQuestionGUI::outGlossarySelector ( )

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

References $_GET, and $rows.

Referenced by linkChilds().

1818  {
1819  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1820 
1821  $glossary = new ilObjGlossary($_GET['source_id'], true);
1822  $terms = $glossary->getTermList();
1823 
1824  $rows = array();
1825 
1826  foreach ($terms as $term) {
1827  $this->ctrl->setParameter($this, 'git', $term['id']);
1828  $rows[] = array(
1829  'title' => $term['term'],
1830  'description' => '',
1831  'text_add' => $this->lng->txt('add'),
1832  'href_add' => $this->ctrl->getLinkTarget($this, 'addGIT')
1833  );
1834  }
1835 
1836  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1837  $table->setTitle($this->lng->txt('glossary_term'));
1838  $table->setData($rows);
1839 
1840  $this->tpl->setContent($table->getHTML());
1841  }
$_GET["client_id"]
Class ilObjGlossary.
$rows
Definition: xhr_table.php:10
+ Here is the caller graph for this function:

◆ outPageSelector()

assQuestionGUI::outPageSelector ( )

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

References $_GET, $rows, getContextPath(), ilLMPageObject\getPageList(), ilUtil\prepareFormOutput(), and ilUtil\stripSlashes().

Referenced by linkChilds().

1726  {
1727  require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1728  require_once 'Modules/LearningModule/classes/class.ilLMPageObject.php';
1729  require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1730 
1731  $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1732 
1733  $cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
1734  $cont_obj = $cont_obj_gui->object;
1735  $pages = ilLMPageObject::getPageList($cont_obj->getId());
1736  $shownpages = array();
1737  $tree = $cont_obj->getLMTree();
1738  $chapters = $tree->getSubtree($tree->getNodeData($tree->getRootId()));
1739 
1740  $rows = array();
1741 
1742  foreach ($chapters as $chapter) {
1743  $chapterpages = $tree->getChildsByType($chapter['obj_id'], 'pg');
1744  foreach ($chapterpages as $page) {
1745  if ($page['type'] == $_GET['search_link_type']) {
1746  array_push($shownpages, $page['obj_id']);
1747 
1748  if ($tree->isInTree($page['obj_id'])) {
1749  $path_str = $this->getContextPath($cont_obj, $page['obj_id']);
1750  } else {
1751  $path_str = '---';
1752  }
1753 
1754  $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1755  $rows[] = array(
1756  'title' => $page['title'],
1757  'description' => ilUtil::prepareFormOutput($path_str),
1758  'text_add' => $this->lng->txt('add'),
1759  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1760  );
1761  }
1762  }
1763  }
1764  foreach ($pages as $page) {
1765  if (!in_array($page['obj_id'], $shownpages)) {
1766  $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1767  $rows[] = array(
1768  'title' => $page['title'],
1769  'description' => '---',
1770  'text_add' => $this->lng->txt('add'),
1771  'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1772  );
1773  }
1774  }
1775 
1776  require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1777  $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1778  $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
1779  $table->setData($rows);
1780 
1781  $this->tpl->setContent($table->getHTML());
1782  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$_GET["client_id"]
getContextPath($cont_obj, $a_endnode_id, $a_startnode_id=1)
get context path in content object tree
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$rows
Definition: xhr_table.php:10
Class ilObjContentObjectGUI.
static getPageList($lm_id)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionForTest()

assQuestionGUI::outQuestionForTest (   $formaction,
  $active_id,
  $pass,
  $is_question_postponed = false,
  $user_post_solutions = false,
  $show_specific_inline_feedback = false 
)
final
Parameters
string$formaction
integer$active_id
integer | null$pass
bool$is_question_postponed
bool$user_post_solutions
bool$show_specific_inline_feedback

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

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

Referenced by ilTestPlayerAbstractGUI\showQuestionEditable().

2178  {
2179  $formaction = $this->completeTestOutputFormAction($formaction, $active_id, $pass);
2180 
2181  $test_output = $this->getTestOutput(
2182  $active_id,
2183  $pass,
2184  $is_question_postponed,
2185  $user_post_solutions,
2186  $show_specific_inline_feedback
2187  );
2188 
2189  $this->magicAfterTestOutput();
2190 
2191  $this->tpl->setVariable("QUESTION_OUTPUT", $test_output);
2192  $this->tpl->setVariable("FORMACTION", $formaction);
2193  $this->tpl->setVariable("ENCTYPE", 'enctype="' . $this->getFormEncodingType() . '"');
2194  $this->tpl->setVariable("FORM_TIMESTAMP", time());
2195  }
getTestOutput( $active_id, $pass, $is_question_postponed, $user_post_solutions, $show_specific_inline_feedback)
completeTestOutputFormAction($formAction, $active_id, $pass)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionPage()

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

output question page

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

References getNavigationGUI(), getPreviousSolutionConfirmationCheckboxHtml(), getPreviousSolutionProvidedMessage(), getUseUnchangedAnswerCheckboxHtml(), ilUtil\sendInfo(), and ilPageObjectGUI\setOutputMode().

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

639  {
640  // hey: prevPassSolutions - add the "use previous answer"
641  // hey: prevPassSolutions - refactored identifiers
642  if ($this->object->getTestPresentationConfig()->isSolutionInitiallyPrefilled()) {
643  // hey
646  } elseif // (!) --> if ($this->object->getTestQuestionConfig()->isUnchangedAnswerPossible())
647  // hey.
648 // fau: testNav - add the "use unchanged answer checkbox"
649  // hey: prevPassSolutions - refactored identifiers
650  ($this->object->getTestPresentationConfig()->isUnchangedAnswerPossible()) {
651  // hey.
652  $html .= $this->getUseUnchangedAnswerCheckboxHtml();
653  }
654  // fau.
655 
656  $this->lng->loadLanguageModule("content");
657 
658  // fau: testNav - add question buttons below question, add actions menu
659  include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
660  $page_gui = new ilAssQuestionPageGUI($this->object->getId());
661  $page_gui->setOutputMode("presentation");
662  $page_gui->setTemplateTargetVar($a_temp_var);
663 
664  if ($this->getNavigationGUI()) {
665  $html .= $this->getNavigationGUI()->getHTML();
666  $page_gui->setQuestionActionsHTML($this->getNavigationGUI()->getActionsHTML());
667  }
668  // fau.
669 
670  if (strlen($html)) {
671  $page_gui->setQuestionHTML(array($this->object->getId() => $html));
672  }
673 
674  // fau: testNav - fill the header with subtitle blocks for question info an actions
675  $page_gui->setPresentationTitle($this->questionHeaderBlockBuilder->getPresentationTitle());
676  $page_gui->setQuestionInfoHTML($this->questionHeaderBlockBuilder->getQuestionInfoHTML());
677  // fau.
678 
679  return $page_gui->presentation();
680  }
Question page GUI class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
setOutputMode($a_mode=self::PRESENTATION)
Set Output Mode.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionType()

assQuestionGUI::outQuestionType ( )

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

References $_GET, $DIC, assQuestion\_getQuestionTypeName(), and ilUtil\sendInfo().

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

1417  {
1418  $count = $this->object->isInUse();
1419 
1420  if ($this->object->_questionExistsInPool($this->object->getId()) && $count) {
1421  global $DIC;
1422  $rbacsystem = $DIC['rbacsystem'];
1423  if ($rbacsystem->checkAccess("write", $_GET["ref_id"])) {
1424  ilUtil::sendInfo(sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
1425  }
1426  }
1427 
1428  return assQuestion::_getQuestionTypeName($this->object->getQuestionType());
1429  }
$_GET["client_id"]
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outSolutionExplorer()

assQuestionGUI::outSolutionExplorer ( )

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

References $_GET, $DIC, $type, ilUtil\sendInfo(), and ilExplorer\setExpand().

1646  {
1647  global $DIC;
1648  $tree = $DIC['tree'];
1649 
1650  include_once("./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
1651  $type = $_GET["link_new_type"];
1652  $search = $_GET["search_link_type"];
1653  $this->ctrl->setParameter($this, "link_new_type", $type);
1654  $this->ctrl->setParameter($this, "search_link_type", $search);
1655  $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1656 
1657  ilUtil::sendInfo($this->lng->txt("select_object_to_link"));
1658 
1659  $parent_ref_id = $tree->getParentId($_GET["ref_id"]);
1660  $exp = new ilSolutionExplorer($this->ctrl->getLinkTarget($this, 'suggestedsolution'), get_class($this));
1661  $exp->setExpand($_GET['expand_sol'] ? $_GET['expand_sol'] : $parent_ref_id);
1662  $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'outSolutionExplorer'));
1663  $exp->setTargetGet("ref_id");
1664  $exp->setRefId($_GET["ref_id"]);
1665  $exp->addFilter($type);
1666  $exp->setSelectableType($type);
1667  if (isset($_GET['expandCurrentPath']) && $_GET['expandCurrentPath']) {
1668  $exp->expandPathByRefId($parent_ref_id);
1669  }
1670 
1671  // build html-output
1672  $exp->setOutput(0);
1673 
1674  $template = new ilTemplate("tpl.il_as_qpl_explorer.html", true, true, "Modules/TestQuestionPool");
1675  $template->setVariable("EXPLORER_TREE", $exp->getOutput());
1676  $template->setVariable("BUTTON_CANCEL", $this->lng->txt("cancel"));
1677  $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "suggestedsolution"));
1678  $this->tpl->setVariable("ADM_CONTENT", $template->get());
1679  }
$type
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $DIC
Definition: goto.php:24
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)
Parameters
ilPropertyFormGUI$form

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

Referenced by ilTestCorrectionsGUI\buildQuestionCorrectionForm().

2349  {
2350  }
+ Here is the caller graph for this function:

◆ populateJavascriptFilesRequiredForWorkForm()

assQuestionGUI::populateJavascriptFilesRequiredForWorkForm ( ilGlobalTemplateInterface  $tpl)

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

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

580  {
581  foreach ($this->getPresentationJavascripts() as $jsFile) {
582  $tpl->addJavaScript($jsFile);
583  }
584  }
addJavaScript($a_js_file, $a_add_version_parameter=true, $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 1305 of file class.assQuestionGUI.php.

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

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

1306  {
1307  if ($this->getTaxonomyIds() !== []) {
1308  // this is needed by ilTaxSelectInputGUI in some cases
1309  require_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
1310  ilOverlayGUI::initJavaScript();
1311 
1312  $sectHeader = new ilFormSectionHeaderGUI();
1313  $sectHeader->setTitle($this->lng->txt('qpl_qst_edit_form_taxonomy_section'));
1314  $form->addItem($sectHeader);
1315 
1316  require_once 'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
1317 
1318  foreach ($this->getTaxonomyIds() as $taxonomyId) {
1319  $taxonomy = new ilObjTaxonomy($taxonomyId);
1320  $label = sprintf($this->lng->txt('qpl_qst_edit_form_taxonomy'), $taxonomy->getTitle());
1321  $postvar = "tax_node_assign_$taxonomyId";
1322 
1323  $taxSelect = new ilTaxSelectInputGUI($taxonomy->getId(), $postvar, true);
1324  $taxSelect->setTitle($label);
1325 
1326  require_once 'Services/Taxonomy/classes/class.ilTaxNodeAssignment.php';
1327  $taxNodeAssignments = new ilTaxNodeAssignment(ilObject::_lookupType($this->object->getObjId()), $this->object->getObjId(), 'quest', $taxonomyId);
1328  $assignedNodes = $taxNodeAssignments->getAssignmentsOfItem($this->object->getId());
1329 
1330  $taxSelect->setValue(array_map(function ($assignedNode) {
1331  return $assignedNode['node_id'];
1332  }, $assignedNodes));
1333  $form->addItem($taxSelect);
1334  }
1335  }
1336  }
getAssignmentsOfItem($a_item_id)
Get assignments for item.
Taxonomy node <-> item assignment.
Select taxonomy nodes input GUI.
This class represents a section header in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
setTitle($a_title)
Set Title.
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareReprintableCorrectionsForm()

assQuestionGUI::prepareReprintableCorrectionsForm ( ilPropertyFormGUI  $form)
Parameters
ilPropertyFormGUI$form

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

2342  {
2343  }

◆ redrawHeaderAction()

assQuestionGUI::redrawHeaderAction ( )

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

References $DIC, exit, and getHeaderAction().

179  {
180  global $DIC; /* @var ILIAS\DI\Container $DIC */
181  echo $this->getHeaderAction() . $DIC->ui()->mainTemplate()->getOnLoadCodeForAsynch();
182  exit;
183  }
exit
Definition: login.php:29
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ renderEditForm()

assQuestionGUI::renderEditForm (   $form)
protected
Parameters
$form

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

References getQuestionTemplate().

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

614  {
615  $this->getQuestionTemplate();
616  $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
617  }
getQuestionTemplate()
get question template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPurposeSupportsFormHtml()

assQuestionGUI::renderPurposeSupportsFormHtml ( )

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

References isRenderPurposeInputValue(), and isRenderPurposePrintPdf().

Referenced by assTextQuestionGUI\getSolutionOutput(), assSingleChoiceGUI\getSolutionOutput(), assMultipleChoiceGUI\getSolutionOutput(), assKprimChoiceGUI\getSolutionOutput(), and assClozeTestGUI\populateSolutiontextToGapTpl().

350  {
351  if ($this->isRenderPurposePrintPdf()) {
352  return false;
353  }
354 
355  if ($this->isRenderPurposeInputValue()) {
356  return false;
357  }
358 
359  return true;
360  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

assQuestionGUI::save ( )

save question

in express mode, so add question to test directly

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

References $_GET, $_SESSION, $DIC, $ilDB, $ilUser, $result, $test, assQuestion\_isWriteable(), assQuestion\_questionExistsInTest(), callNewIdListeners(), ilTestExpressPage\getReturnToPageLink(), ilUtil\redirect(), and writePostData().

Referenced by assFormulaQuestionGUI\saveFQ().

868  {
869  global $DIC;
870  $ilUser = $DIC['ilUser'];
871  $old_id = $_GET["q_id"];
872  $result = $this->writePostData();
873 
874  if ($result == 0) {
875  $ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
876  $ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
877  $this->object->saveToDb();
878  $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
879 
880 
881  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
882  if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
883  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
884  $this->ctrl->setParameter($this, 'return_to', 'editQuestion');
885  $this->ctrl->redirect($this, "originalSyncForm");
886  return;
887  } elseif ($_GET["calling_test"]) {
888  require_once 'Modules/Test/classes/class.ilObjTest.php';
889  $test = new ilObjTest($_GET["calling_test"]);
890  if (!assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId())) {
891  $tree = $DIC['tree'];
892  $ilDB = $DIC['ilDB'];
893  $ilPluginAdmin = $DIC['ilPluginAdmin'];
894 
895  include_once("./Modules/Test/classes/class.ilObjTest.php");
896  $_GET["ref_id"] = $_GET["calling_test"];
897  $test = new ilObjTest($_GET["calling_test"], true);
898 
899  require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
900  $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
901 
902  $new_id = $test->insertQuestion(
903  $testQuestionSetConfigFactory->getQuestionSetConfig(),
904  $this->object->getId()
905  );
906 
907  if (isset($_REQUEST['prev_qid'])) {
908  $test->moveQuestionAfter($this->object->getId() + 1, $_REQUEST['prev_qid']);
909  }
910 
911  $this->ctrl->setParameter($this, 'q_id', $new_id);
912  $this->ctrl->setParameter($this, 'calling_test', $_GET['calling_test']);
913  #$this->ctrl->setParameter($this, 'test_ref_id', false);
914  }
915  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
916  $this->ctrl->redirect($this, 'editQuestion');
917  } else {
918  $this->callNewIdListeners($this->object->getId());
919 
920  if ($this->object->getId() != $old_id) {
921  // first save
922  $this->ctrl->setParameterByClass($_GET["cmdClass"], "q_id", $this->object->getId());
923  $this->ctrl->setParameterByClass($_GET["cmdClass"], "sel_question_types", $_GET["sel_question_types"]);
924  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
925 
926  //global $___test_express_mode;
930  if ($_REQUEST['prev_qid']) {
931  // @todo: bheyser/mbecker wtf? ..... thx@jposselt ....
932  // mbecker: Possible fix: Just instantiate the obj?
933  include_once("./Modules/Test/classes/class.ilObjTest.php");
934  $test = new ilObjTest($_GET["ref_id"], true);
935  $test->moveQuestionAfter($_REQUEST['prev_qid'], $this->object->getId());
936  }
937  if ( /*$___test_express_mode || */ $_REQUEST['express_mode']) {
938  $tree = $DIC['tree'];
939  $ilDB = $DIC['ilDB'];
940  $ilPluginAdmin = $DIC['ilPluginAdmin'];
941 
942  include_once("./Modules/Test/classes/class.ilObjTest.php");
943  $test = new ilObjTest($_GET["ref_id"], true);
944 
945  require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
946  $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
947 
948  $test->insertQuestion(
949  $testQuestionSetConfigFactory->getQuestionSetConfig(),
950  $this->object->getId()
951  );
952 
953  require_once 'Modules/Test/classes/class.ilTestExpressPage.php';
954  $_REQUEST['q_id'] = $this->object->getId();
956  }
957 
958  $this->ctrl->redirectByClass($_GET["cmdClass"], "editQuestion");
959  }
960  if (strcmp($_SESSION["info"], "") != 0) {
961  ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), true);
962  } else {
963  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
964  }
965  $this->ctrl->redirect($this, 'editQuestion');
966  }
967  }
968  $tabs = $DIC['ilTabs'];
969  $tabs->setTabActive('edit_question');
970  }
$_SESSION["AccountId"]
$result
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.
$_GET["client_id"]
callNewIdListeners($a_new_id)
Call the new id listeners.
static getReturnToPageLink($q_id=null)
global $DIC
Definition: goto.php:24
static _questionExistsInTest($question_id, $test_id)
global $ilDB
$ilUser
Definition: imgupload.php:18
static redirect($a_script)
$test
Definition: Utf8Test.php:84
static _isWriteable($question_id, $user_id)
Returns true if the question is writeable by a certain user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCorrectionsFormProperties()

assQuestionGUI::saveCorrectionsFormProperties ( ilPropertyFormGUI  $form)
Parameters
ilPropertyFormGUI$form

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

2356  {
2357  }

◆ saveEdit()

assQuestionGUI::saveEdit ( )

save question

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

References $_GET, $_SESSION, $DIC, $ilDB, $ilUser, $result, $test, assQuestion\_isWriteable(), ilUtil\redirect(), and writePostData().

817  {
818  global $DIC;
819  $ilUser = $DIC['ilUser'];
820 
821  $result = $this->writePostData();
822  if ($result == 0) {
823  $ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
824  $ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
825  $this->object->saveToDb();
826  $originalexists = $this->object->_questionExists($this->object->original_id);
827  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
828  if ($_GET["calling_test"] && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
829  $this->ctrl->redirect($this, "originalSyncForm");
830  } elseif ($_GET["calling_test"]) {
831  $_GET["ref_id"] = $_GET["calling_test"];
832  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
833  return;
834  } elseif ($_GET["test_ref_id"]) {
835  global $DIC;
836  $tree = $DIC['tree'];
837  $ilDB = $DIC['ilDB'];
838  $ilPluginAdmin = $DIC['ilPluginAdmin'];
839 
840  include_once("./Modules/Test/classes/class.ilObjTest.php");
841  $_GET["ref_id"] = $_GET["test_ref_id"];
842  $test = new ilObjTest($_GET["test_ref_id"], true);
843 
844  require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
845  $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
846 
847  $test->insertQuestion($testQuestionSetConfigFactory->getQuestionSetConfig(), $this->object->getId());
848 
849  ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["test_ref_id"]);
850  } else {
851  $this->ctrl->setParameter($this, "q_id", $this->object->getId());
852  $this->editQuestion();
853  if (strcmp($_SESSION["info"], "") != 0) {
854  ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), false);
855  } else {
856  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), false);
857  }
858  $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $this->object->getId());
859  $this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
860  }
861  }
862  }
$_SESSION["AccountId"]
$result
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.
$_GET["client_id"]
global $DIC
Definition: goto.php:24
global $ilDB
$ilUser
Definition: imgupload.php:18
static redirect($a_script)
$test
Definition: Utf8Test.php:84
static _isWriteable($question_id, $user_id)
Returns true if the question is writeable by a certain user.
+ Here is the call graph for this function:

◆ saveReturn()

assQuestionGUI::saveReturn ( )

save question

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

References $_GET, $_SESSION, $DIC, $ilDB, $ilUser, $result, $test, assQuestion\_isWriteable(), assQuestion\_questionExistsInTest(), callNewIdListeners(), ilAssQuestionPreviewGUI\CMD_SHOW, and writePostData().

976  {
977  global $DIC;
978  $ilUser = $DIC['ilUser'];
979  $old_id = $_GET["q_id"];
980  $result = $this->writePostData();
981  if ($result == 0) {
982  $ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
983  $ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
984  $this->object->saveToDb();
985  $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
986 
987  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
988  if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
989  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
990  $this->ctrl->setParameter($this, 'test_express_mode', $_REQUEST['test_express_mode']);
991  $this->ctrl->redirect($this, "originalSyncForm");
992  return;
993  } elseif ($_GET["calling_test"]) {
994  require_once 'Modules/Test/classes/class.ilObjTest.php';
995  $test = new ilObjTest($_GET["calling_test"]);
996  $q_id = $this->object->getId();
997  if (!assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId())) {
998  $tree = $DIC['tree'];
999  $ilDB = $DIC['ilDB'];
1000  $ilPluginAdmin = $DIC['ilPluginAdmin'];
1001 
1002  include_once("./Modules/Test/classes/class.ilObjTest.php");
1003  $_GET["ref_id"] = $_GET["calling_test"];
1004  $test = new ilObjTest($_GET["calling_test"], true);
1005 
1006  require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
1007  $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
1008 
1009  $new_id = $test->insertQuestion(
1010  $testQuestionSetConfigFactory->getQuestionSetConfig(),
1011  $this->object->getId()
1012  );
1013 
1014  $q_id = $new_id;
1015  if (isset($_REQUEST['prev_qid'])) {
1016  $test->moveQuestionAfter($this->object->getId() + 1, $_REQUEST['prev_qid']);
1017  }
1018 
1019  $this->ctrl->setParameter($this, 'q_id', $new_id);
1020  $this->ctrl->setParameter($this, 'calling_test', $_GET['calling_test']);
1021  }
1022  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1023  $this->ctrl->setParameterByClass('ilAssQuestionPreviewGUI', 'q_id', $q_id);
1024  $this->ctrl->redirectByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW);
1025  } else {
1026  if ($this->object->getId() != $old_id) {
1027  $this->callNewIdListeners($this->object->getId());
1028  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1029  $this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
1030  }
1031  if (strcmp($_SESSION["info"], "") != 0) {
1032  ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), true);
1033  } else {
1034  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1035  }
1036  $this->ctrl->redirectByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW);
1037  }
1038  }
1039  $tabs = $DIC['ilTabs'];
1040  $tabs->setTabActive('edit_question');
1041  }
$_SESSION["AccountId"]
$result
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.
$_GET["client_id"]
callNewIdListeners($a_new_id)
Call the new id listeners.
global $DIC
Definition: goto.php:24
static _questionExistsInTest($question_id, $test_id)
global $ilDB
$ilUser
Definition: imgupload.php:18
$test
Definition: Utf8Test.php:84
static _isWriteable($question_id, $user_id)
Returns true if the question is writeable by a certain user.
+ Here is the call graph for this function:

◆ saveSuggestedSolution()

assQuestionGUI::saveSuggestedSolution ( )

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

References $_POST, $DIC, $type, and suggestedsolution().

1682  {
1683  global $DIC;
1684  $tree = $DIC['tree'];
1685 
1686  include_once("./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
1687  switch ($_POST["solutiontype"]) {
1688  case "lm":
1689  $type = "lm";
1690  $search = "lm";
1691  break;
1692  case "git":
1693  $type = "glo";
1694  $search = "glo";
1695  break;
1696  case "st":
1697  $type = "lm";
1698  $search = "st";
1699  break;
1700  case "pg":
1701  $type = "lm";
1702  $search = "pg";
1703  break;
1704  case "file":
1705  case "text":
1706  return $this->suggestedsolution();
1707  break;
1708  default:
1709  return $this->suggestedsolution();
1710  break;
1711  }
1712  if (isset($_POST['solutiontype'])) {
1713  $this->ctrl->setParameter($this, 'expandCurrentPath', 1);
1714  }
1715  $this->ctrl->setParameter($this, "link_new_type", $type);
1716  $this->ctrl->setParameter($this, "search_link_type", $search);
1717  $this->ctrl->redirect($this, "outSolutionExplorer");
1718  }
suggestedsolution()
Allows to add suggested solutions for questions.
$type
global $DIC
Definition: goto.php:24
$_POST["username"]
+ Here is the call graph for this function:

◆ saveTaxonomyAssignments()

assQuestionGUI::saveTaxonomyAssignments ( )
protected

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

References getTaxonomyIds().

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

1291  {
1292  if (count($this->getTaxonomyIds())) {
1293  require_once 'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
1294 
1295  foreach ($this->getTaxonomyIds() as $taxonomyId) {
1296  $postvar = "tax_node_assign_$taxonomyId";
1297 
1298  $tax_node_assign = new ilTaxAssignInputGUI($taxonomyId, true, '', $postvar);
1299  // TODO: determine tst/qpl when tax assigns become maintainable within tests
1300  $tax_node_assign->saveInput("qpl", $this->object->getObjId(), "quest", $this->object->getId());
1301  }
1302  }
1303  }
Input GUI class for taxonomy assignments.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAdjustmentEditContext()

assQuestionGUI::setAdjustmentEditContext ( )

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

References setEditContext().

395  {
396  return $this->setEditContext(self::EDIT_CONTEXT_ADJUSTMENT);
397  }
setEditContext($editContext)
+ Here is the call graph for this function:

◆ setDefaultTabs()

assQuestionGUI::setDefaultTabs ( ilTabsGUI  $ilTabs)
protected

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

References $_GET, addTab_Question(), addTab_QuestionFeedback(), addTab_QuestionHints(), and addTab_SuggestedSolution().

Referenced by setQuestionTabs().

1942  {
1943  $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
1944  $q_type = $this->object->getQuestionType();
1945 
1946  if (strlen($q_type)) {
1947  $classname = $q_type . "GUI";
1948  $this->ctrl->setParameterByClass(strtolower($classname), "sel_question_types", $q_type);
1949  $this->ctrl->setParameterByClass(strtolower($classname), "q_id", $_GET["q_id"]);
1950  }
1951 
1952  if ($_GET["q_id"]) {
1953  $this->addTab_Question($ilTabs);
1954  }
1955 
1956  // add tab for question feedback within common class assQuestionGUI
1957  $this->addTab_QuestionFeedback($ilTabs);
1958 
1959  // add tab for question hint within common class assQuestionGUI
1960  $this->addTab_QuestionHints($ilTabs);
1961 
1962  // add tab for question's suggested solution within common class assQuestionGUI
1963  $this->addTab_SuggestedSolution($ilTabs, $classname);
1964  }
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
$_GET["client_id"]
addTab_Question(ilTabsGUI $tabsGUI)
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
addTab_SuggestedSolution(ilTabsGUI $tabs, $classname)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditContext()

assQuestionGUI::setEditContext (   $editContext)
Parameters
string$editContext

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

References $editContext.

Referenced by setAdjustmentEditContext().

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

◆ setErrorMessage()

assQuestionGUI::setErrorMessage (   $errormessage)

◆ setNavigationGUI()

assQuestionGUI::setNavigationGUI (   $navigationGUI)
Parameters
ilTestQuestionNavigationGUI$navigationGUI

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

References $navigationGUI.

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

411  {
412  $this->navigationGUI = $navigationGUI;
413  }
+ Here is the caller graph for this function:

◆ setPresentationContext()

assQuestionGUI::setPresentationContext (   $presentationContext)
Parameters
string$presentationContext

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

References $presentationContext.

281  {
282  $this->presentationContext = $presentationContext;
283  }

◆ setPreviewSession()

assQuestionGUI::setPreviewSession (   $previewSession)
Parameters
\ilAssQuestionPreviewSession$previewSession

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

References $previewSession.

2243  {
2244  $this->previewSession = $previewSession;
2245  }

◆ setPreviousSolutionPrefilled()

assQuestionGUI::setPreviousSolutionPrefilled (   $previousSolutionPrefilled)
Parameters
boolean$previousSolutionPrefilled

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

References $previousSolutionPrefilled.

303  {
304  $this->previousSolutionPrefilled = $previousSolutionPrefilled;
305  }

◆ setQuestionActionCmd()

assQuestionGUI::setQuestionActionCmd (   $questionActionCmd)

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

References $questionActionCmd.

459  {
460  $this->questionActionCmd = $questionActionCmd;
461 
462  if (is_object($this->object)) {
463  $this->object->questionActionCmd = $questionActionCmd;
464  }
465  }

◆ setQuestionCount()

assQuestionGUI::setQuestionCount (   $a_question_count)

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

1089  {
1090  $this->question_count = $a_question_count;
1091  }

◆ setQuestionHeaderBlockBuilder()

assQuestionGUI::setQuestionHeaderBlockBuilder (   $questionHeaderBlockBuilder)
Parameters
\ilQuestionHeaderBlockBuilder$questionHeaderBlockBuilder

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

References $questionHeaderBlockBuilder.

444  {
445  $this->questionHeaderBlockBuilder = $questionHeaderBlockBuilder;
446  }

◆ setQuestionSpecificTabs()

assQuestionGUI::setQuestionSpecificTabs ( ilTabsGUI  $ilTabs)
protected

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

Referenced by setQuestionTabs().

1967  {
1968  }
+ Here is the caller graph for this function:

◆ setQuestionTabs()

assQuestionGUI::setQuestionTabs ( )

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

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

1931  {
1932  global $DIC;
1933  $ilTabs = $DIC['ilTabs'];
1934 
1935  $ilTabs->clearTargets();
1936  $this->setDefaultTabs($ilTabs);
1937  $this->setQuestionSpecificTabs($ilTabs);
1938  $this->addBackTab($ilTabs);
1939  }
setDefaultTabs(ilTabsGUI $ilTabs)
global $DIC
Definition: goto.php:24
addBackTab(ilTabsGUI $ilTabs)
setQuestionSpecificTabs(ilTabsGUI $ilTabs)
+ Here is the call graph for this function:

◆ setRenderPurpose()

assQuestionGUI::setRenderPurpose (   $renderPurpose)
Parameters
string$renderPurpose

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

References $renderPurpose.

Referenced by suggestedsolution().

320  {
321  $this->renderPurpose = $renderPurpose;
322  }
+ Here is the caller graph for this function:

◆ setSequenceNumber()

assQuestionGUI::setSequenceNumber (   $nr)

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

1079  {
1080  $this->sequence_no = $nr;
1081  }

◆ setTargetGui()

assQuestionGUI::setTargetGui (   $linkTargetGui)

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

References setTargetGuiClass().

426  {
427  $this->setTargetGuiClass(get_class($linkTargetGui));
428  }
setTargetGuiClass($targetGuiClass)
+ Here is the call graph for this function:

◆ setTargetGuiClass()

assQuestionGUI::setTargetGuiClass (   $targetGuiClass)

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

References $targetGuiClass.

Referenced by setTargetGui().

431  {
432  $this->targetGuiClass = $targetGuiClass;
433  }
+ Here is the caller graph for this function:

◆ setTaxonomyIds()

assQuestionGUI::setTaxonomyIds (   $taxonomyIds)

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

References $taxonomyIds.

416  {
417  $this->taxonomyIds = $taxonomyIds;
418  }

◆ setUseIntermediateSolution()

assQuestionGUI::setUseIntermediateSolution (   $use)

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

2110  {
2111  $this->use_intermediate_solution = (bool) $use;
2112  }

◆ showHints()

assQuestionGUI::showHints ( )

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

References $DIC, and ilAssQuestionHintsGUI\CMD_SHOW_LIST.

2276  {
2277  global $DIC;
2278  $ilCtrl = $DIC['ilCtrl'];
2279  $ilCtrl->redirectByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
2280  }
const CMD_SHOW_LIST
command constants
global $DIC
Definition: goto.php:24

◆ showSuggestedSolution()

assQuestionGUI::showSuggestedSolution ( )

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

References suggestedsolution().

1432  {
1433  $this->suggestedsolution();
1434  }
suggestedsolution()
Allows to add suggested solutions for questions.
+ Here is the call graph for this function:

◆ suggestedsolution()

assQuestionGUI::suggestedsolution ( )

Allows to add suggested solutions for questions.

public

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

References $_GET, $_POST, $DIC, $ilUser, $res, assQuestion\_getInternalLinkHref(), assQuestion\_isWriteable(), ilRadioGroupInputGUI\addOption(), getRenderPurpose(), getSolutionOutput(), ilUtil\makeDirParents(), ilUtil\moveUploadedFile(), originalSyncForm(), ilUtil\prepareFormOutput(), ilUtil\renameExecutables(), ilUtil\sendInfo(), ilCustomInputGUI\setHtml(), setRenderPurpose(), ilFormPropertyGUI\setRequired(), and ilTextAreaInputGUI\setValue().

Referenced by saveSuggestedSolution(), and showSuggestedSolution().

1442  {
1443  global $DIC;
1444  $ilUser = $DIC['ilUser'];
1445  $ilAccess = $DIC['ilAccess'];
1446 
1447  $save = (is_array($_POST["cmd"]) && array_key_exists("suggestedsolution", $_POST["cmd"])) ? true : false;
1448 
1449  if ($save && $_POST["deleteSuggestedSolution"] == 1) {
1450  $this->object->deleteSuggestedSolutions();
1451  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1452  $this->ctrl->redirect($this, "suggestedsolution");
1453  }
1454 
1455  $output = "";
1456  $solution_array = $this->object->getSuggestedSolution(0);
1457  $options = array(
1458  "lm" => $this->lng->txt("obj_lm"),
1459  "st" => $this->lng->txt("obj_st"),
1460  "pg" => $this->lng->txt("obj_pg"),
1461  "git" => $this->lng->txt("glossary_term"),
1462  "file" => $this->lng->txt("fileDownload"),
1463  "text" => $this->lng->txt("solutionText")
1464  );
1465 
1466  if ((strcmp($_POST["solutiontype"], "file") == 0) && (strcmp($solution_array["type"], "file") != 0)) {
1467  $solution_array = array(
1468  "type" => "file"
1469  );
1470  } elseif ((strcmp($_POST["solutiontype"], "text") == 0) && (strcmp($solution_array["type"], "text") != 0)) {
1471  $oldOutputMode = $this->getRenderPurpose();
1472  $this->setRenderPurpose(self::RENDER_PURPOSE_INPUT_VALUE);
1473 
1474  $solution_array = array(
1475  "type" => "text",
1476  "value" => $this->getSolutionOutput(0, null, false, false, true, false, true)
1477  );
1478  $this->setRenderPurpose($oldsaveSuggestedSolutionOutputMode);
1479  }
1480  if ($save && strlen($_POST["filename"])) {
1481  $solution_array["value"]["filename"] = $_POST["filename"];
1482  }
1483  if ($save && strlen($_POST["solutiontext"])) {
1484  $solution_array["value"] = $_POST["solutiontext"];
1485  }
1486  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1487  if (count($solution_array)) {
1488  $form = new ilPropertyFormGUI();
1489  $form->setFormAction($this->ctrl->getFormAction($this));
1490  $form->setTitle($this->lng->txt("solution_hint"));
1491  $form->setMultipart(true);
1492  $form->setTableWidth("100%");
1493  $form->setId("suggestedsolutiondisplay");
1494 
1495  // suggested solution output
1496  include_once "./Modules/TestQuestionPool/classes/class.ilSolutionTitleInputGUI.php";
1497  $title = new ilSolutionTitleInputGUI($this->lng->txt("showSuggestedSolution"), "solutiontype");
1498  $template = new ilTemplate("tpl.il_as_qpl_suggested_solution_input_presentation.html", true, true, "Modules/TestQuestionPool");
1499  if (strlen($solution_array["internal_link"])) {
1500  $href = assQuestion::_getInternalLinkHref($solution_array["internal_link"]);
1501  $template->setCurrentBlock("preview");
1502  $template->setVariable("TEXT_SOLUTION", $this->lng->txt("suggested_solution"));
1503  $template->setVariable("VALUE_SOLUTION", " <a href=\"$href\" target=\"content\">" . $this->lng->txt("view") . "</a> ");
1504  $template->parseCurrentBlock();
1505  } elseif ((strcmp($solution_array["type"], "file") == 0) && (is_array($solution_array["value"]))) {
1506  $href = $this->object->getSuggestedSolutionPathWeb() . $solution_array["value"]["name"];
1507  $template->setCurrentBlock("preview");
1508  $template->setVariable("TEXT_SOLUTION", $this->lng->txt("suggested_solution"));
1509  $template->setVariable("VALUE_SOLUTION", " <a href=\"$href\" target=\"content\">" . ilUtil::prepareFormOutput((strlen($solution_array["value"]["filename"])) ? $solution_array["value"]["filename"] : $solution_array["value"]["name"]) . "</a> ");
1510  $template->parseCurrentBlock();
1511  }
1512  $template->setVariable("TEXT_TYPE", $this->lng->txt("type"));
1513  $template->setVariable("VALUE_TYPE", $options[$solution_array["type"]]);
1514  $title->setHtml($template->get());
1515  $deletesolution = new ilCheckboxInputGUI("", "deleteSuggestedSolution");
1516  $deletesolution->setOptionTitle($this->lng->txt("deleteSuggestedSolution"));
1517  $title->addSubItem($deletesolution);
1518  $form->addItem($title);
1519 
1520  if (strcmp($solution_array["type"], "file") == 0) {
1521  // file
1522  $file = new ilFileInputGUI($this->lng->txt("fileDownload"), "file");
1523  $file->setRequired(true);
1524  $file->enableFileNameSelection("filename");
1525  //$file->setSuffixes(array("doc","xls","png","jpg","gif","pdf"));
1526  if ($_FILES["file"]["tmp_name"] && $file->checkInput()) {
1527  if (!file_exists($this->object->getSuggestedSolutionPath())) {
1528  ilUtil::makeDirParents($this->object->getSuggestedSolutionPath());
1529  }
1530 
1531  $res = ilUtil::moveUploadedFile($_FILES["file"]["tmp_name"], $_FILES["file"]["name"], $this->object->getSuggestedSolutionPath() . $_FILES["file"]["name"]);
1532  if ($res) {
1533  ilUtil::renameExecutables($this->object->getSuggestedSolutionPath());
1534 
1535  // remove an old file download
1536  if (is_array($solution_array["value"])) {
1537  @unlink($this->object->getSuggestedSolutionPath() . $solution_array["value"]["name"]);
1538  }
1539  $file->setValue($_FILES["file"]["name"]);
1540  $this->object->saveSuggestedSolution("file", "", 0, array("name" => $_FILES["file"]["name"], "type" => $_FILES["file"]["type"], "size" => $_FILES["file"]["size"], "filename" => $_POST["filename"]));
1541  $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
1542  if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
1543  return $this->originalSyncForm("suggestedsolution");
1544  } else {
1545  ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1546  $this->ctrl->redirect($this, "suggestedsolution");
1547  }
1548  } else {
1549  // BH: $res as info string? wtf? it holds a bool or something else!!?
1550  ilUtil::sendInfo($res);
1551  }
1552  } else {
1553  if (is_array($solution_array["value"])) {
1554  $file->setValue($solution_array["value"]["name"]);
1555  $file->setFilename((strlen($solution_array["value"]["filename"])) ? $solution_array["value"]["filename"] : $solution_array["value"]["name"]);
1556  }
1557  }
1558  $form->addItem($file);
1559  $hidden = new ilHiddenInputGUI("solutiontype");
1560  $hidden->setValue("file");
1561  $form->addItem($hidden);
1562  } elseif (strcmp($solution_array["type"], "text") == 0) {
1563  $solutionContent = $solution_array['value'];
1564  $solutionContent = $this->object->fixSvgToPng($solutionContent);
1565  $solutionContent = $this->object->fixUnavailableSkinImageSources($solutionContent);
1566  $question = new ilTextAreaInputGUI($this->lng->txt("solutionText"), "solutiontext");
1567  $question->setValue($this->object->prepareTextareaOutput($solutionContent));
1568  $question->setRequired(true);
1569  $question->setRows(10);
1570  $question->setCols(80);
1571  $question->setUseRte(true);
1572  $question->addPlugin("latex");
1573  $question->addButton("latex");
1574  $question->setRTESupport($this->object->getId(), "qpl", "assessment");
1575  $hidden = new ilHiddenInputGUI("solutiontype");
1576  $hidden->setValue("text");
1577  $form->addItem($hidden);
1578  $form->addItem($question);
1579  }
1580  if ($ilAccess->checkAccess("write", "", $_GET['ref_id'])) {
1581  $form->addCommandButton('showSuggestedSolution', $this->lng->txt('cancel'));
1582  $form->addCommandButton('suggestedsolution', $this->lng->txt('save'));
1583  }
1584 
1585  if ($save) {
1586  if ($form->checkInput()) {
1587  switch ($solution_array["type"]) {
1588  case "file":
1589  $this->object->saveSuggestedSolution("file", "", 0, array(
1590  "name" => $solution_array["value"]["name"],
1591  "type" => $solution_array["value"]["type"],
1592  "size" => $solution_array["value"]["size"],
1593  "filename" => $_POST["filename"]
1594  ));
1595  break;
1596  case "text":
1597  $this->object->saveSuggestedSolution("text", "", 0, $solution_array["value"]);
1598  break;
1599  }
1600  $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
1601  if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
1602  return $this->originalSyncForm("suggestedsolution");
1603  } else {
1604  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1605  $this->ctrl->redirect($this, "suggestedsolution");
1606  }
1607  }
1608  }
1609 
1610  $output = $form->getHTML();
1611  }
1612 
1613  $savechange = (strcmp($this->ctrl->getCmd(), "saveSuggestedSolution") == 0) ? true : false;
1614 
1615  $changeoutput = "";
1616  if ($ilAccess->checkAccess("write", "", $_GET['ref_id'])) {
1617  $formchange = new ilPropertyFormGUI();
1618  $formchange->setFormAction($this->ctrl->getFormAction($this));
1619  $formchange->setTitle((count($solution_array)) ? $this->lng->txt("changeSuggestedSolution") : $this->lng->txt("addSuggestedSolution"));
1620  $formchange->setMultipart(false);
1621  $formchange->setTableWidth("100%");
1622  $formchange->setId("suggestedsolution");
1623 
1624  $solutiontype = new ilRadioGroupInputGUI($this->lng->txt("suggestedSolutionType"), "solutiontype");
1625  foreach ($options as $opt_value => $opt_caption) {
1626  $solutiontype->addOption(new ilRadioOption($opt_caption, $opt_value));
1627  }
1628  if (count($solution_array)) {
1629  $solutiontype->setValue($solution_array["type"]);
1630  }
1631  $solutiontype->setRequired(true);
1632  $formchange->addItem($solutiontype);
1633 
1634  $formchange->addCommandButton("saveSuggestedSolution", $this->lng->txt("select"));
1635 
1636  if ($savechange) {
1637  $formchange->checkInput();
1638  }
1639  $changeoutput = $formchange->getHTML();
1640  }
1641 
1642  $this->tpl->setVariable("ADM_CONTENT", $changeoutput . $output);
1643  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
This class represents an option in a radio group.
setHtml($a_html)
Set Html.
This class represents a property form user interface.
$_GET["client_id"]
This class represents a file property in a property form.
setValue($a_value)
Set Value.
This class represents a checkbox property in a property form.
setRenderPurpose($renderPurpose)
This class represents a custom property in a property form.
static _getInternalLinkHref($target="")
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
This class represents a hidden form property in a property form.
This class represents a property in a property form.
addOption($a_option)
Add Option.
foreach($_POST as $key=> $value) $res
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
global $DIC
Definition: goto.php:24
originalSyncForm($return_to="", $return_to_feedback='')
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
getSolutionOutput( $active_id, $pass=null, $graphicalOutput=false, $result_output=false, $show_question_only=true, $show_feedback=false, $show_correct_solution=false, $show_manual_scoring=false, $show_question_text=true)
This class represents a text area property in a property form.
$ilUser
Definition: imgupload.php:18
$_POST["username"]
setRequired($a_required)
Set Required.
static _isWriteable($question_id, $user_id)
Returns true if the question is writeable by a certain user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supportsIntermediateSolutionOutput()

assQuestionGUI::supportsIntermediateSolutionOutput ( )

Question type specific support of intermediate solution output The function getSolutionOutput respects getUseIntermediateSolution()

Returns
bool

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

2089  {
2090  return false;
2091  }

◆ sync()

assQuestionGUI::sync ( )

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

References $_GET, ilLink\_getLink(), ilAssQuestionPreviewGUI\CMD_SHOW, ilObjectFactory\getInstanceByRefId(), ilTestExpressPage\getReturnToPageLink(), and ilUtil\redirect().

756  {
757  $original_id = $this->object->original_id;
758  if ($original_id) {
759  $this->object->syncWithOriginal();
760  }
761  if (strlen($_GET["return_to"])) {
762  $this->ctrl->redirect($this, $_GET["return_to"]);
763  }
764  if (strlen($_REQUEST["return_to_fb"])) {
765  $this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', 'showFeedbackForm');
766  } else {
767  if (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
768  $ref_id = (int) $_GET['calling_consumer'];
769  $consumer = ilObjectFactory::getInstanceByRefId($ref_id);
770  if ($consumer instanceof ilQuestionEditingFormConsumer) {
771  ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
772  }
773  require_once 'Services/Link/classes/class.ilLink.php';
775  }
776  $_GET["ref_id"] = $_GET["calling_test"];
777 
778  if ($_REQUEST['test_express_mode']) {
780  } else {
781  $this->ctrl->redirectByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW);
782  }
783  }
784  }
$_GET["client_id"]
static getReturnToPageLink($q_id=null)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static redirect($a_script)
+ Here is the call graph for this function:

◆ writePostData()

assQuestionGUI::writePostData (   $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 476 of file class.assQuestionGUI.php.

References $DIC, and $tpl.

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

477  {
478  }
+ Here is the caller graph for this function:

◆ writeQuestionGenericPostData()

assQuestionGUI::writeQuestionGenericPostData ( )
protected

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

References $_POST, Vendor\Package\$e, ilAssQuestionLifecycle\getInstance(), getPreview(), and ilUtil\stripOnlySlashes().

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

2137  {
2138  $this->object->setTitle($_POST["title"]);
2139  $this->object->setAuthor($_POST["author"]);
2140  $this->object->setComment($_POST["comment"]);
2141  if ($this->object->getSelfAssessmentEditingMode()) {
2142  $this->object->setNrOfTries($_POST['nr_of_tries']);
2143  }
2144 
2145  try {
2146  $lifecycle = ilAssQuestionLifecycle::getInstance($_POST['lifecycle']);
2147  $this->object->setLifecycle($lifecycle);
2149  }
2150 
2151  $this->object->setQuestion(ilUtil::stripOnlySlashes($_POST['question'])); // ?
2152  $this->object->setEstimatedWorkingTime(
2153  $_POST["Estimated"]["hh"],
2154  $_POST["Estimated"]["mm"],
2155  $_POST["Estimated"]["ss"]
2156  );
2157  }
static stripOnlySlashes($a_str)
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

assQuestionGUI::$ctrl
protected

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

◆ $editContext

assQuestionGUI::$editContext = self::EDIT_CONTEXT_AUTHORING
private

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

Referenced by getEditContext(), and setEditContext().

◆ $editForm

assQuestionGUI::$editForm
protected

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

Referenced by buildEditForm().

◆ $error

assQuestionGUI::$error

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

◆ $errormessage

assQuestionGUI::$errormessage

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

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

◆ $lng

assQuestionGUI::$lng

◆ $navigationGUI

assQuestionGUI::$navigationGUI
private

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

Referenced by getNavigationGUI(), and setNavigationGUI().

◆ $object

assQuestionGUI::$object

◆ $presentationContext

assQuestionGUI::$presentationContext = null
private

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

Referenced by getPresentationContext(), and setPresentationContext().

◆ $previewSession

assQuestionGUI::$previewSession
private

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

Referenced by getPreviewSession(), and setPreviewSession().

◆ $previousSolutionPrefilled

assQuestionGUI::$previousSolutionPrefilled = false
private

◆ $question_count

assQuestionGUI::$question_count

question count in test

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

Referenced by getQuestionCount().

◆ $questionActionCmd

assQuestionGUI::$questionActionCmd = 'handleQuestionAction'
private

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

Referenced by getQuestionActionCmd(), and setQuestionActionCmd().

◆ $questionHeaderBlockBuilder

assQuestionGUI::$questionHeaderBlockBuilder
private

◆ $renderPurpose

assQuestionGUI::$renderPurpose = self::RENDER_PURPOSE_PLAYBACK
private

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

Referenced by getRenderPurpose(), and setRenderPurpose().

◆ $request

assQuestionGUI::$request

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

◆ $sequence_no

assQuestionGUI::$sequence_no

sequence number in test

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

Referenced by getSequenceNumber().

◆ $targetGuiClass

assQuestionGUI::$targetGuiClass = null
private

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

Referenced by getTargetGuiClass(), and setTargetGuiClass().

◆ $taxonomyIds

assQuestionGUI::$taxonomyIds = array()
private

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

Referenced by getTaxonomyIds(), and setTaxonomyIds().

◆ $tpl

◆ $use_intermediate_solution

assQuestionGUI::$use_intermediate_solution = false
protected

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

Referenced by getUseIntermediateSolution().

◆ EDIT_CONTEXT_ADJUSTMENT

const assQuestionGUI::EDIT_CONTEXT_ADJUSTMENT = 'adjustment'

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

◆ FORM_ENCODING_URLENCODE

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

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

◆ FORM_MODE_ADJUST

const assQuestionGUI::FORM_MODE_ADJUST = 'adjust'

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

◆ FORM_MODE_EDIT

const assQuestionGUI::FORM_MODE_EDIT = 'edit'

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

◆ HAS_SPECIAL_QUESTION_COMMANDS

const assQuestionGUI::HAS_SPECIAL_QUESTION_COMMANDS = false
protected

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

◆ PRESENTATION_CONTEXT_RESULTS

const assQuestionGUI::PRESENTATION_CONTEXT_RESULTS = 'pContextResults'

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

◆ PRESENTATION_CONTEXT_TEST

const assQuestionGUI::PRESENTATION_CONTEXT_TEST = 'pContextTest'

◆ RENDER_PURPOSE_DEMOPLAY

const assQuestionGUI::RENDER_PURPOSE_DEMOPLAY = 'renderPurposeDemoplay'

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

Referenced by ilAssQuestionPreviewGUI\initQuestion().

◆ RENDER_PURPOSE_INPUT_VALUE

const assQuestionGUI::RENDER_PURPOSE_INPUT_VALUE = 'renderPurposeInputValue'

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

◆ RENDER_PURPOSE_PLAYBACK

const assQuestionGUI::RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'

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

◆ RENDER_PURPOSE_PREVIEW

◆ RENDER_PURPOSE_PRINT_PDF

const assQuestionGUI::RENDER_PURPOSE_PRINT_PDF = 'renderPurposePrintPdf'

◆ SESSION_PREVIEW_DATA_BASE_INDEX

const assQuestionGUI::SESSION_PREVIEW_DATA_BASE_INDEX = 'ilAssQuestionPreviewAnswers'

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


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