ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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...
 
 getCommand ($cmd)
 
 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
 
 $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

 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)
 
 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_QuestionPreview (ilTabsGUI $tabsGUI)
 
 hasCorrectSolution ($activeId, $passIndex)
 
 writeQuestionGenericPostData ()
 
 completeTestOutputFormAction ($formAction, $active_id, $pass)
 
 addBackTab (ilTabsGUI $ilTabs)
 
 buildBasicEditFormObject ()
 
 buildEditForm ()
 

Protected Attributes

 $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 20 of file class.assQuestionGUI.php.

Constructor & Destructor Documentation

◆ __construct()

assQuestionGUI::__construct ( )

assQuestionGUI constructor

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

119 {
120 global $DIC;
121 $lng = $DIC['lng'];
122 $tpl = $DIC['tpl'];
123 $ilCtrl = $DIC['ilCtrl'];
124
125 $this->lng = &$lng;
126 $this->tpl = &$tpl;
127 $this->ctrl = &$ilCtrl;
128 $this->ctrl->saveParameter($this, "q_id");
129 $this->ctrl->saveParameter($this, "prev_qid");
130 $this->ctrl->saveParameter($this, "calling_test");
131 $this->ctrl->saveParameter($this, "calling_consumer");
132 $this->ctrl->saveParameter($this, "consumer_context");
133 $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'test_express_mode');
134 $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'calling_consumer');
135 $this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'consumer_context');
136 $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'test_express_mode');
137 $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'calling_consumer');
138 $this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'consumer_context');
139
140 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
141 $this->errormessage = $this->lng->txt("fill_out_all_required_fields");
142
143 $this->selfassessmenteditingmode = false;
144 $this->new_id_listeners = array();
145 $this->new_id_listener_cnt = 0;
146
147 $this->navigationGUI = null;
148 }
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46

References $DIC, $ilCtrl, $lng, and $tpl.

Member Function Documentation

◆ _getClassNameForQType()

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

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

558 {
559 return $q_type . "GUI";
560 }

Referenced by _getGUIClassNameForId().

+ Here is the caller graph for this function:

◆ _getGUIClassNameForId()

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

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

546 {
547 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
548 include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
549 $q_type = assQuestion::getQuestionTypeFromDb($a_q_id);
550 $class_name = assQuestionGUI::_getClassNameForQType($q_type);
551 return $class_name;
552 }
static _getClassNameForQType($q_type)
static getQuestionTypeFromDb($question_id)
get question type for question id

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

Referenced by ilQuestionBrowserTableGUI\fillRow().

+ 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 510 of file class.assQuestionGUI.php.

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

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

Referenced by ilObjQuestionPoolGUI\addLocatorItems(), ilTestExpressPageObjectGUI\addPageOfQuestions(), ilObjQuestionPoolGUI\createQuestionForTestObject(), createQuestionGUI(), ilObjQuestionPoolGUI\createQuestionObject(), ilPCQuestionGUI\edit(), ilObjQuestionPoolGUI\editQuestionForTestObject(), ilObjTestGUI\executeCommand(), ilTestExpressPageObjectGUI\executeCommand(), ilObjQuestionPoolGUI\executeCommand(), ilQuestionEditGUI\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().

+ 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 2274 of file class.assQuestionGUI.php.

2275 {
2276 if (($_GET["calling_test"] > 0) || ($_GET["test_ref_id"] > 0)) {
2277 $ref_id = $_GET["calling_test"];
2278 if (strlen($ref_id) == 0) {
2279 $ref_id = $_GET["test_ref_id"];
2280 }
2281
2282 if (!$_GET['test_express_mode'] && !$GLOBALS['___test_express_mode']) {
2283 $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), "ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=$ref_id");
2284 } else {
2286 $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), $link);
2287 }
2288 } elseif (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
2289 $ref_id = (int) $_GET['calling_consumer'];
2290 $consumer = ilObjectFactory::getInstanceByRefId($ref_id);
2291 if ($consumer instanceof ilQuestionEditingFormConsumer) {
2292 $ilTabs->setBackTarget($consumer->getQuestionEditingFormBackTargetLabel(), $consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
2293 } else {
2294 require_once 'Services/Link/classes/class.ilLink.php';
2295 $ilTabs->setBackTarget($this->lng->txt("qpl"), ilLink::_getLink($ref_id));
2296 }
2297 } else {
2298 $ilTabs->setBackTarget($this->lng->txt("qpl"), $this->ctrl->getLinkTargetByClass("ilobjquestionpoolgui", "questions"));
2299 }
2300 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$_GET["client_id"]
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
setBackTarget($a_title, $a_target, $a_frame="")
back target for upper context
static getReturnToPageLink($q_id=null)

References $_GET, $GLOBALS, ilLink\_getLink(), ilObjectFactory\getInstanceByRefId(), ilTestExpressPage\getReturnToPageLink(), and ilTabsGUI\setBackTarget().

Referenced by assClozeTestGUI\setQuestionTabs(), assErrorTextGUI\setQuestionTabs(), assFlashQuestionGUI\setQuestionTabs(), assFormulaQuestionGUI\setQuestionTabs(), assImagemapQuestionGUI\setQuestionTabs(), assJavaAppletGUI\setQuestionTabs(), assLongMenuGUI\setQuestionTabs(), assMatchingQuestionGUI\setQuestionTabs(), assMultipleChoiceGUI\setQuestionTabs(), assOrderingHorizontalGUI\setQuestionTabs(), assOrderingQuestionGUI\setQuestionTabs(), setQuestionTabs(), assSingleChoiceGUI\setQuestionTabs(), assTextQuestionGUI\setQuestionTabs(), and assTextSubsetGUI\setQuestionTabs().

+ 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

Reimplemented in assClozeTestGUI, and assMultipleChoiceGUI.

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

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

References ilObjAdvancedEditing\_getUsedHTMLTags(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT, ilAssSelfAssessmentQuestionFormatter\getSelfAssessmentTags(), and ilUtil\prepareFormOutput().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addErrorMessage()

assQuestionGUI::addErrorMessage (   $errormessage)

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

1119 {
1120 $this->errormessage .= ((strlen($this->errormessage)) ? "<br />" : "") . $errormessage;
1121 }

References $errormessage.

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

+ Here is the caller graph for this function:

◆ addGIT()

assQuestionGUI::addGIT ( )

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

1894 {
1895 $subquestion_index = 0;
1896 if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0) {
1897 $subquestion_index = $_GET["subquestion_index"];
1898 }
1899 $this->object->saveSuggestedSolution("git", "il__git_" . $_GET["git"], $subquestion_index);
1900 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1901 $this->ctrl->redirect($this, "suggestedsolution");
1902 }

References $_GET.

◆ addHeaderAction()

assQuestionGUI::addHeaderAction ( )

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

161 {
162 global $DIC; /* @var ILIAS\DI\Container $DIC */
163
164 $DIC->ui()->mainTemplate()->setVariable(
165 "HEAD_ACTION",
166 $this->getHeaderAction()
167 );
168
169 $notesUrl = $this->ctrl->getLinkTargetByClass(
170 array("ilcommonactiondispatchergui", "ilnotegui"),
171 "",
172 "",
173 true,
174 false
175 );
176
177 ilNoteGUI::initJavascript($notesUrl, IL_NOTE_PUBLIC, $DIC->ui()->mainTemplate());
178
179 $redrawActionsUrl = $DIC->ctrl()->getLinkTarget($this, 'redrawHeaderAction', '', true);
180 $DIC->ui()->mainTemplate()->addOnLoadCode("il.Object.setRedrawAHUrl('$redrawActionsUrl');");
181 }
const IL_NOTE_PUBLIC
Definition: class.ilNote.php:6
static initJavascript($a_ajax_url, $a_type=IL_NOTE_PRIVATE, ilGlobalTemplateInterface $a_main_tpl=null)
Init javascript.

References $DIC, getHeaderAction(), IL_NOTE_PUBLIC, and ilNoteGUI\initJavascript().

+ Here is the call graph for this function:

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

1162 {
1163 $cnt = $this->new_id_listener_cnt;
1164 $this->new_id_listeners[$cnt]["object"] = &$a_object;
1165 $this->new_id_listeners[$cnt]["method"] = $a_method;
1166 $this->new_id_listeners[$cnt]["parameters"] = $a_parameters;
1167 $this->new_id_listener_cnt++;
1168 }

◆ addPG()

assQuestionGUI::addPG ( )

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

1872 {
1873 $subquestion_index = 0;
1874 if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0) {
1875 $subquestion_index = $_GET["subquestion_index"];
1876 }
1877 $this->object->saveSuggestedSolution("pg", "il__pg_" . $_GET["pg"], $subquestion_index);
1878 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1879 $this->ctrl->redirect($this, "suggestedsolution");
1880 }

References $_GET.

◆ addQuestionFormCommandButtons()

assQuestionGUI::addQuestionFormCommandButtons (   $form)

Add the command buttons of a question properties form.

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

1192 {
1193 //if (!$this->object->getSelfAssessmentEditingMode() && !$_GET["calling_test"]) $form->addCommandButton("saveEdit", $this->lng->txt("save_edit"));
1194 if (!$this->object->getSelfAssessmentEditingMode()) {
1195 $form->addCommandButton("saveReturn", $this->lng->txt("save_return"));
1196 }
1197 $form->addCommandButton("save", $this->lng->txt("save"));
1198 }

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

+ Here is the caller graph for this function:

◆ addST()

assQuestionGUI::addST ( )

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

1883 {
1884 $subquestion_index = 0;
1885 if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0) {
1886 $subquestion_index = $_GET["subquestion_index"];
1887 }
1888 $this->object->saveSuggestedSolution("st", "il__st_" . $_GET["st"], $subquestion_index);
1889 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1890 $this->ctrl->redirect($this, "suggestedsolution");
1891 }

References $_GET.

◆ addTab_QuestionFeedback()

assQuestionGUI::addTab_QuestionFeedback ( ilTabsGUI  $tabs)
protected

adds the feedback tab to ilTabsGUI

@global ilCtrl $ilCtrl

Parameters
ilTabsGUI$tabs

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

2047 {
2048 global $DIC;
2049 $ilCtrl = $DIC['ilCtrl'];
2050
2051 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
2052 $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionFeedbackEditingGUI');
2053
2054 $tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
2055
2056 $tabs->addTarget('tst_feedback', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
2057 }
static getCommandsFromClassConstants($guiClassName, $cmdConstantNameBegin='CMD_')
extracts values of all constants of given class with given prefix as array can be used to get all pos...
addTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)

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

Referenced by assClozeTestGUI\setQuestionTabs(), assErrorTextGUI\setQuestionTabs(), assFileUploadGUI\setQuestionTabs(), assFlashQuestionGUI\setQuestionTabs(), assFormulaQuestionGUI\setQuestionTabs(), assImagemapQuestionGUI\setQuestionTabs(), assJavaAppletGUI\setQuestionTabs(), assLongMenuGUI\setQuestionTabs(), assMatchingQuestionGUI\setQuestionTabs(), assMultipleChoiceGUI\setQuestionTabs(), assOrderingHorizontalGUI\setQuestionTabs(), assOrderingQuestionGUI\setQuestionTabs(), setQuestionTabs(), assSingleChoiceGUI\setQuestionTabs(), assTextQuestionGUI\setQuestionTabs(), and assTextSubsetGUI\setQuestionTabs().

+ 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

@global ilCtrl $ilCtrl

Parameters
ilTabsGUI$tabs

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

2080 {
2081 global $DIC;
2082 $ilCtrl = $DIC['ilCtrl'];
2083
2084 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
2085
2086 switch ($ilCtrl->getCmdClass()) {
2087 case 'ilassquestionhintsgui':
2088
2089 $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintsGUI');
2090 break;
2091
2092 case 'ilassquestionhintgui':
2093
2094 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php';
2095 $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintGUI');
2096 break;
2097
2098 default:
2099
2100 $tabCommands = array();
2101 }
2102
2103 $tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
2104
2105 $tabs->addTarget('tst_question_hints_tab', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
2106 }
const CMD_SHOW_LIST
command constants

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

Referenced by assClozeTestGUI\setQuestionTabs(), assErrorTextGUI\setQuestionTabs(), assFileUploadGUI\setQuestionTabs(), assFlashQuestionGUI\setQuestionTabs(), assFormulaQuestionGUI\setQuestionTabs(), assImagemapQuestionGUI\setQuestionTabs(), assJavaAppletGUI\setQuestionTabs(), assLongMenuGUI\setQuestionTabs(), assMatchingQuestionGUI\setQuestionTabs(), assMultipleChoiceGUI\setQuestionTabs(), assOrderingHorizontalGUI\setQuestionTabs(), assOrderingQuestionGUI\setQuestionTabs(), setQuestionTabs(), assSingleChoiceGUI\setQuestionTabs(), assTextQuestionGUI\setQuestionTabs(), and assTextSubsetGUI\setQuestionTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addTab_QuestionPreview()

assQuestionGUI::addTab_QuestionPreview ( ilTabsGUI  $tabsGUI)
protected

◆ addTab_SuggestedSolution()

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

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

2011 {
2012 if ($_GET["q_id"]) {
2013 $tabs->addTarget(
2014 "suggested_solution",
2015 $this->ctrl->getLinkTargetByClass($classname, "suggestedsolution"),
2016 array("suggestedsolution", "saveSuggestedSolution", "outSolutionExplorer", "cancel",
2017 "addSuggestedSolution","cancelExplorer", "linkChilds", "removeSuggestedSolution"
2018 ),
2019 $classname,
2020 ""
2021 );
2022 }
2023 }

References $_GET, and ilTabsGUI\addTarget().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply()

assQuestionGUI::apply ( )

apply changes

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

1057 {
1058 $this->writePostData();
1059 $this->object->saveToDb();
1060 $this->ctrl->setParameter($this, "q_id", $this->object->getId());
1061 $this->editQuestion();
1062 }
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.

References writePostData().

+ Here is the call graph for this function:

◆ buildBasicEditFormObject()

assQuestionGUI::buildBasicEditFormObject ( )
protected
Returns
ilPropertyFormGUI

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

2327 {
2328 require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
2329 $form = new ilPropertyFormGUI();
2330
2331 $form->setFormAction($this->ctrl->getFormAction($this));
2332
2333 $form->setId($this->getType());
2334 $form->setTitle($this->outQuestionType());
2335
2336 $form->setTableWidth('100%');
2337
2338 $form->setMultipart(true);
2339
2340 return $form;
2341 }
getType()
needed for page editor compliance
This class represents a property form user interface.

References getType(), and outQuestionType().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildEditForm()

assQuestionGUI::buildEditForm ( )
protected

Reimplemented in assImagemapQuestionGUI, assKprimChoiceGUI, assLongMenuGUI, assMultipleChoiceGUI, and assOrderingQuestionGUI.

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

2354 {
2355 $errors = $this->editQuestion(true); // TODO bheyser: editQuestion should be added to the abstract base class with a unified signature
2356 return $this->editForm;
2357 }
$errors

References $editForm, and $errors.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ buildFocusAnchorHtml()

assQuestionGUI::buildFocusAnchorHtml ( )
Returns
string

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

2363 {
2364 return '<div id="focus"></div>';
2365 }

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

+ Here is the caller graph for this function:

◆ callNewIdListeners()

assQuestionGUI::callNewIdListeners (   $a_new_id)

Call the new id listeners.

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

1174 {
1175 for ($i = 0; $i < $this->new_id_listener_cnt; $i++) {
1176 $this->new_id_listeners[$i]["parameters"]["new_id"] = $a_new_id;
1177 $object = &$this->new_id_listeners[$i]["object"];
1178 $method = $this->new_id_listeners[$i]["method"];
1179 $parameters = $this->new_id_listeners[$i]["parameters"];
1180 //var_dump($object);
1181 //var_dump($method);
1182 //var_dump($parameters);
1183
1184 $object->$method($parameters);
1185 }
1186 }
$i
Definition: metadata.php:24

References $i, and $object.

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

+ Here is the caller graph for this function:

◆ cancel()

assQuestionGUI::cancel ( )

cancel action

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

718 {
719 if ($_GET["calling_test"]) {
720 $_GET["ref_id"] = $_GET["calling_test"];
721 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
722 } elseif ($_GET["test_ref_id"]) {
723 $_GET["ref_id"] = $_GET["test_ref_id"];
724 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["test_ref_id"]);
725 } else {
726 if ($_GET["q_id"] > 0) {
727 $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
728 $this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
729 } else {
730 $this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
731 }
732 }
733 }
static redirect($a_script)

References $_GET, and ilUtil\redirect().

+ Here is the call graph for this function:

◆ cancelExplorer()

assQuestionGUI::cancelExplorer ( )

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

1727 {
1728 $this->ctrl->redirect($this, "suggestedsolution");
1729 }

◆ cancelSync()

assQuestionGUI::cancelSync ( )

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

792 {
793 if (strlen($_GET["return_to"])) {
794 $this->ctrl->redirect($this, $_GET["return_to"]);
795 }
796 if (strlen($_REQUEST['return_to_fb'])) {
797 $this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', 'showFeedbackForm');
798 } else {
799 if (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
800 $ref_id = (int) $_GET['calling_consumer'];
801 $consumer = ilObjectFactory::getInstanceByRefId($ref_id);
802 if ($consumer instanceof ilQuestionEditingFormConsumer) {
803 ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
804 }
805 require_once 'Services/Link/classes/class.ilLink.php';
807 }
808 $_GET["ref_id"] = $_GET["calling_test"];
809
810 if ($_REQUEST['test_express_mode']) {
812 } else {
813 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
814 }
815 }
816 }

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

+ Here is the call graph for this function:

◆ completeTestOutputFormAction()

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

Reimplemented in assImagemapQuestionGUI.

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

2249 {
2250 return $formAction;
2251 }

Referenced by outQuestionForTest().

+ 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 @access public
Deprecated:
: WTF is this? GUIobject::question should be a GUIobject !? WTF is a question alias !?

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

575 {
576 include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
577 $this->question = &assQuestionGUI::_getQuestionGUI($question_type, $question_id);
578 }
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...

References _getQuestionGUI().

+ Here is the call graph for this function:

◆ executeCommand()

assQuestionGUI::executeCommand ( )

execute command

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

227 {
228 global $DIC; /* @var \ILIAS\DI\Container $DIC */
229 $ilHelp = $DIC['ilHelp']; /* @var ilHelpGUI $ilHelp */
230 $ilHelp->setScreenIdComponent('qpl');
231
232 $cmd = $this->ctrl->getCmd("editQuestion");
233 $next_class = $this->ctrl->getNextClass($this);
234
235 $cmd = $this->getCommand($cmd);
236
237 switch ($next_class) {
238 case 'ilformpropertydispatchgui':
239 $form = $this->buildEditForm();
240
241 require_once 'Services/Form/classes/class.ilFormPropertyDispatchGUI.php';
242 $form_prop_dispatch = new ilFormPropertyDispatchGUI();
243 $form_prop_dispatch->setItem($form->getItemByPostVar(ilUtil::stripSlashes($_GET['postvar'])));
244 return $this->ctrl->forwardCommand($form_prop_dispatch);
245 break;
246
247 default:
248 $ret = $this->$cmd();
249 break;
250 }
251 return $ret;
252 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$ret
Definition: parser.php:6

References $_GET, $DIC, $ret, buildEditForm(), getCommand(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ getAdditionalEditQuestionCommands()

assQuestionGUI::getAdditionalEditQuestionCommands ( )
protected

Reimplemented in assKprimChoiceGUI.

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

2036 {
2037 return array();
2038 }

Referenced by getEditQuestionTabCommands().

+ 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 @access public

Reimplemented in assClozeTestGUI.

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

1358 {
1359 return $this->getGenericFeedbackOutput($active_id, $pass);
1360 }
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.

References $pass, and getGenericFeedbackOutput().

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

+ 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

Reimplemented in assClozeTestGUI, assKprimChoiceGUI, assLongMenuGUI, and assMatchingQuestionGUI.

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

2390 {
2391 require_once 'Modules/TestQuestionPool/classes/tables/class.ilAnswerFrequencyStatisticTableGUI.php';
2392
2393 $table = new ilAnswerFrequencyStatisticTableGUI($parentGui, $parentCmd, $this->object);
2394 $table->setQuestionIndex($questionIndex);
2395 $table->setData($this->getAnswersFrequency($relevantAnswers, $questionIndex));
2396 $table->initColumns();
2397
2398 return $table;
2399 }
getAnswersFrequency($relevantAnswers, $questionIndex)

References getAnswersFrequency().

+ Here is the call graph for this function:

◆ getAnswersFrequency()

assQuestionGUI::getAnswersFrequency (   $relevantAnswers,
  $questionIndex 
)

◆ 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 @access public

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

1148 {
1149 $result = "";
1150 if (strlen($a_value)) {
1151 $result = " value=\"$a_value\" ";
1152 }
1153 return $result;
1154 }
$result

References $result.

◆ getBasicEditQuestionTabCommands()

assQuestionGUI::getBasicEditQuestionTabCommands ( )
protected

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

2031 {
2032 return array('editQuestion', 'save', 'saveEdit', 'originalSyncForm');
2033 }

Referenced by getEditQuestionTabCommands().

+ Here is the caller graph for this function:

◆ getCommand()

assQuestionGUI::getCommand (   $cmd)

Reimplemented in assClozeTestGUI, assFlashQuestionGUI, assFormulaQuestionGUI, assImagemapQuestionGUI, assJavaAppletGUI, assLongMenuGUI, assNumericGUI, and assOrderingHorizontalGUI.

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

255 {
256 return $cmd;
257 }

Referenced by executeCommand().

+ 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 1917 of file class.assQuestionGUI.php.

1918 {
1919 $reflectionClass = new ReflectionClass($guiClassName);
1920
1921 $commands = null;
1922
1923 if ($reflectionClass instanceof ReflectionClass) {
1924 $commands = array();
1925
1926 foreach ($reflectionClass->getConstants() as $constName => $constValue) {
1927 if (substr($constName, 0, strlen($cmdConstantNameBegin)) == $cmdConstantNameBegin) {
1928 $commands[] = $constValue;
1929 }
1930 }
1931 }
1932
1933 return $commands;
1934 }

Referenced by addTab_QuestionFeedback(), addTab_QuestionHints(), and ilPCQuestionGUI\setTabs().

+ 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 1070 of file class.assQuestionGUI.php.

1071 {
1072 $path = "";
1073
1074 $tmpPath = $cont_obj->getLMTree()->getPathFull($a_endnode_id, $a_startnode_id);
1075
1076 // count -1, to exclude the learning module itself
1077 for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1078 if ($path != "") {
1079 $path .= " > ";
1080 }
1081
1082 $path .= $tmpPath[$i]["title"];
1083 }
1084
1085 return $path;
1086 }

References $i.

Referenced by outPageSelector().

+ Here is the caller graph for this function:

◆ getEditContext()

assQuestionGUI::getEditContext ( )
Returns
string

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

364 {
365 return $this->editContext;
366 }

References $editContext.

Referenced by isAdjustmentEditContext(), and isAuthoringEditContext().

+ Here is the caller graph for this function:

◆ getEditQuestionTabCommands()

assQuestionGUI::getEditQuestionTabCommands ( )
final

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

2026 {
2027 return array_merge($this->getBasicEditQuestionTabCommands(), $this->getAdditionalEditQuestionCommands());
2028 }

References getAdditionalEditQuestionCommands(), and getBasicEditQuestionTabCommands().

Referenced by setQuestionTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getErrorMessage()

assQuestionGUI::getErrorMessage ( )

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

1109 {
1110 return $this->errormessage;
1111 }

References $errormessage.

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

+ Here is the caller graph for this function:

◆ getFormEncodingType()

assQuestionGUI::getFormEncodingType ( )

Reimplemented in assFileUploadGUI.

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

2267 {
2269 }

References FORM_ENCODING_URLENCODE.

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

+ 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 @access public

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

1372 {
1373 $output = "";
1374 include_once "./Modules/Test/classes/class.ilObjTest.php";
1375 $manual_feedback = ilObjTest::getManualFeedback($active_id, $this->object->getId(), $pass);
1376 if (strlen($manual_feedback)) {
1377 return $manual_feedback;
1378 }
1379 $correct_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true);
1380 $incorrect_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false);
1381 if (strlen($correct_feedback . $incorrect_feedback)) {
1382 $reached_points = $this->object->calculateReachedPoints($active_id, $pass);
1383 $max_points = $this->object->getMaximumPoints();
1384 if ($reached_points == $max_points) {
1385 $output = $correct_feedback;
1386 } else {
1387 $output = $incorrect_feedback;
1388 }
1389 }
1390 return $this->object->prepareTextareaOutput($output, true);
1391 }
static getManualFeedback($active_id, $question_id, $pass)
Retrieves the feedback comment for a question in a test if it is finalized.

References $pass, and ilObjTest\getManualFeedback().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGenericFeedbackOutputForCorrectSolution()

assQuestionGUI::getGenericFeedbackOutputForCorrectSolution ( )

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

1394 {
1395 return $this->object->prepareTextareaOutput(
1396 $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true),
1397 true
1398 );
1399 }

◆ getGenericFeedbackOutputForIncorrectSolution()

assQuestionGUI::getGenericFeedbackOutputForIncorrectSolution ( )

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

1402 {
1403 return $this->object->prepareTextareaOutput(
1404 $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false),
1405 true
1406 );
1407 }

◆ getHeaderAction()

assQuestionGUI::getHeaderAction ( )

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

191 {
192 global $DIC; /* @var ILIAS\DI\Container $DIC */
193 /* @var ilObjectDataCache $ilObjDataCache */
194 $ilObjDataCache = $DIC['ilObjDataCache'];
195
196 $parentObjType = $ilObjDataCache->lookupType($this->object->getObjId());
197
198 $dispatcher = new ilCommonActionDispatcherGUI(
200 $DIC->access(),
201 $parentObjType,
202 $_GET["ref_id"],
203 $this->object->getObjId()
204 );
205
206 $dispatcher->setSubObject("quest", $this->object->getId());
207
208 $ha = $dispatcher->initHeaderAction();
209 $ha->enableComments(true, false);
210
211 return $ha->getHeaderAction($DIC->ui()->mainTemplate());
212 }
Class ilCommonActionDispatcherGUI.

References $_GET, $DIC, and ilCommonActionDispatcherGUI\TYPE_REPOSITORY.

Referenced by addHeaderAction(), and redrawHeaderAction().

+ 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 @access public

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

627 {
628 include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
629 $page_gui = new ilAssQuestionPageGUI($this->object->getId());
630 $page_gui->setQuestionHTML(array($this->object->getId() => $html));
631 $presentation = $page_gui->presentation();
632 $presentation = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $presentation);
633 return $presentation;
634 }
Question page GUI class.

References ILIAS_HTTP_PATH.

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

+ Here is the caller graph for this function:

◆ getNavigationGUI()

assQuestionGUI::getNavigationGUI ( )
Returns
ilTestQuestionNavigationGUI

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

401 {
403 }

References $navigationGUI.

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ getNotesHTML()

assQuestionGUI::getNotesHTML ( )

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

215 {
216 $notesGUI = new ilNoteGUI($this->object->getObjId(), $this->object->getId(), 'quest');
217 $notesGUI->enablePublicNotes(true);
218 $notesGUI->enablePublicNotesDeletion(true);
219
220 return $notesGUI->getNotesHTML();
221 }
Notes GUI class.

◆ getPresentationContext()

assQuestionGUI::getPresentationContext ( )
Returns
string

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

271 {
273 }

References $presentationContext.

Referenced by isTestPresentationContext().

+ Here is the caller graph for this function:

◆ getPresentationJavascripts()

assQuestionGUI::getPresentationJavascripts ( )

Reimplemented in assMatchingQuestionGUI, assMultipleChoiceGUI, assOrderingHorizontalGUI, and assOrderingQuestionGUI.

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

588 {
589 return array();
590 }

Referenced by populateJavascriptFilesRequiredForWorkForm().

+ Here is the caller graph for this function:

◆ getPreview()

◆ getPreviewSession()

◆ getPreviousSolutionConfirmationCheckboxHtml()

assQuestionGUI::getPreviousSolutionConfirmationCheckboxHtml ( )
protected

Reimplemented in assFileUploadGUI, and assImagemapQuestionGUI.

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

705 {
706 $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
707 // hey: prevPassSolutions - use abtract template
708 $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->lng->txt('use_previous_solution'));
709 // hey.
710 return $tpl->get();
711 }
special template class to simplify handling of ITX/PEAR

References $tpl.

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ getPreviousSolutionProvidedMessage()

assQuestionGUI::getPreviousSolutionProvidedMessage ( )
protected

Reimplemented in assFileUploadGUI.

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

700 {
701 return $this->lng->txt('use_previous_solution_advice');
702 }

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ getQuestionActionCmd()

◆ getQuestionCount()

assQuestionGUI::getQuestionCount ( )

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

1104 {
1105 return $this->question_count;
1106 }
$question_count
question count in test

References $question_count.

◆ getQuestionHeaderBlockBuilder()

assQuestionGUI::getQuestionHeaderBlockBuilder ( )
Returns
\ilQuestionHeaderBlockBuilder $questionHeaderBlockBuilder

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

References $questionHeaderBlockBuilder.

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

+ Here is the caller graph for this function:

◆ getQuestionTemplate()

assQuestionGUI::getQuestionTemplate ( )

get question template

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

596 {
597 // @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)
598 if (!$this->tpl->blockExists('content')) {
599 $this->tpl->addBlockFile("CONTENT", "content", "tpl.il_as_qpl_content.html", "Modules/TestQuestionPool");
600 }
601 // @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)
602 if (!$this->tpl->blockExists('statusline')) {
603 $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
604 }
605 // @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
606 if (!$this->tpl->blockExists('adm_content')) {
607 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_question.html", "Modules/TestQuestionPool");
608 }
609 }

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

+ 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 @access public

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

1136 {
1137 return $this->object->getQuestionType();
1138 }

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

+ Here is the caller graph for this function:

◆ getRenderPurpose()

assQuestionGUI::getRenderPurpose ( )
Returns
string

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

310 {
312 }

References $renderPurpose.

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

+ Here is the caller graph for this function:

◆ getSequenceNumber()

assQuestionGUI::getSequenceNumber ( )

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

1094 {
1095 return $this->sequence_no;
1096 }
$sequence_no
sequence number in test

References $sequence_no.

◆ 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 @access public

Reimplemented in assClozeTestGUI, assErrorTextGUI, assFileUploadGUI, assFlashQuestionGUI, assFormulaQuestionGUI, assImagemapQuestionGUI, assJavaAppletGUI, assKprimChoiceGUI, assLongMenuGUI, assMatchingQuestionGUI, assMultipleChoiceGUI, assNumericGUI, assOrderingHorizontalGUI, assOrderingQuestionGUI, assSingleChoiceGUI, assTextQuestionGUI, and assTextSubsetGUI.

Referenced by ilTestPlayerAbstractGUI\populateSpecificFeedbackBlock().

+ Here is the caller graph for this function:

◆ getSubQuestionsIndex()

assQuestionGUI::getSubQuestionsIndex ( )

Reimplemented in assClozeTestGUI, and assLongMenuGUI.

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

2373 {
2374 return array(0);
2375 }

◆ getTargetGuiClass()

assQuestionGUI::getTargetGuiClass ( )

◆ getTaxonomyIds()

assQuestionGUI::getTaxonomyIds ( )

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

419 {
420 return $this->taxonomyIds;
421 }

References $taxonomyIds.

Referenced by populateTaxonomyFormSection(), and saveTaxonomyAssignments().

+ 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

◆ getType()

assQuestionGUI::getType ( )

needed for page editor compliance

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

263 {
264 return $this->getQuestionType();
265 }
getQuestionType()
Returns the question type string.

References getQuestionType().

Referenced by buildBasicEditFormObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getUseIntermediateSolution()

◆ getUseUnchangedAnswerCheckboxHtml()

assQuestionGUI::getUseUnchangedAnswerCheckboxHtml ( )
protected

Reimplemented in assMultipleChoiceGUI.

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

689 {
690 // hey: prevPassSolutions - use abstracted template to share with other purposes of this kind
691 $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
692 $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->object->getTestPresentationConfig()->getUseUnchangedAnswerLabel());
693 // hey.
694 return $tpl->get();
695 }

References $tpl.

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ hasCorrectSolution()

assQuestionGUI::hasCorrectSolution (   $activeId,
  $passIndex 
)
protected

◆ hasInlineFeedback()

assQuestionGUI::hasInlineFeedback ( )

this method can be overwritten per question type

Returns
bool

Reimplemented in assKprimChoiceGUI, assMultipleChoiceGUI, and assSingleChoiceGUI.

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

156 {
157 return false;
158 }

Referenced by outQuestionPage(), and ilTestPlayerAbstractGUI\populateInstantResponseBlocks().

+ 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 2148 of file class.assQuestionGUI.php.

2149 {
2150 $result = $this->object->lookupForExistingSolutions($activeId, $passIndex);
2151 return ($result['intermediate']);
2152 }

References $result.

◆ isAdjustmentEditContext()

assQuestionGUI::isAdjustmentEditContext ( )
Parameters
bool$isAdjustmentEditContext

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

388 {
390 }

References EDIT_CONTEXT_ADJUSTMENT, and getEditContext().

Referenced by assOrderingQuestionGUI\populateAnswerSpecificFormPart(), and assOrderingQuestionGUI\writeAnswerSpecificPostData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAnswerFreuqencyStatisticSupported()

assQuestionGUI::isAnswerFreuqencyStatisticSupported ( )

Reimplemented in assFileUploadGUI, and assTextQuestionGUI.

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

2368 {
2369 return true;
2370 }

Referenced by ilTestCorrectionsGUI\setCorrectionTabsContext().

+ Here is the caller graph for this function:

◆ isAuthoringEditContext()

assQuestionGUI::isAuthoringEditContext ( )
Parameters
bool$isAuthoringEditContext

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

380 {
382 }

References EDIT_CONTEXT_AUTHORING, and getEditContext().

+ Here is the call graph for this function:

◆ isAutosaveable()

assQuestionGUI::isAutosaveable ( )

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

2181 {
2182 return $this->object->isAutosaveable();
2183 }

◆ isPreviousSolutionPrefilled()

assQuestionGUI::isPreviousSolutionPrefilled ( )
Returns
boolean

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

References $previousSolutionPrefilled.

◆ isRenderPurposeDemoplay()

assQuestionGUI::isRenderPurposeDemoplay ( )

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

References getRenderPurpose(), and RENDER_PURPOSE_DEMOPLAY.

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposeInputValue()

assQuestionGUI::isRenderPurposeInputValue ( )

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

333 {
335 }

References getRenderPurpose(), and RENDER_PURPOSE_INPUT_VALUE.

Referenced by renderPurposeSupportsFormHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePlayback()

assQuestionGUI::isRenderPurposePlayback ( )

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

338 {
340 }

References getRenderPurpose(), and RENDER_PURPOSE_PLAYBACK.

Referenced by assOrderingQuestionGUI\isInteractivePresentation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRenderPurposePreview()

assQuestionGUI::isRenderPurposePreview ( )

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

328 {
330 }

References getRenderPurpose(), and RENDER_PURPOSE_PREVIEW.

+ Here is the call graph for this function:

◆ isRenderPurposePrintPdf()

assQuestionGUI::isRenderPurposePrintPdf ( )

◆ isSaveCommand()

◆ isTestPresentationContext()

◆ linkChilds()

assQuestionGUI::linkChilds ( )

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

1850 {
1851 $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1852 switch ($_GET["search_link_type"]) {
1853 case "pg":
1854 return $this->outPageSelector();
1855 break;
1856 case "st":
1857 return $this->outChapterSelector();
1858 break;
1859 case "glo":
1860 return $this->outGlossarySelector();
1861 break;
1862 case "lm":
1863 $subquestion_index = ($_GET["subquestion_index"] > 0) ? $_GET["subquestion_index"] : 0;
1864 $this->object->saveSuggestedSolution("lm", "il__lm_" . $_GET["source_id"], $subquestion_index);
1865 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1866 $this->ctrl->redirect($this, "suggestedsolution");
1867 break;
1868 }
1869 }

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

+ Here is the call graph for this function:

◆ magicAfterTestOutput()

assQuestionGUI::magicAfterTestOutput ( )

Reimplemented in assTextQuestionGUI.

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

2254 {
2255 return;
2256 }

Referenced by outQuestionForTest().

+ 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 739 of file class.assQuestionGUI.php.

740 {
741 if (strlen($return_to)) {
742 $this->ctrl->setParameter($this, "return_to", $return_to);
743 } elseif ($_REQUEST['return_to']) {
744 $this->ctrl->setParameter($this, "return_to", $_REQUEST['return_to']);
745 }
746 if (strlen($return_to_feedback)) {
747 $this->ctrl->setParameter($this, 'return_to_fb', 'true');
748 }
749
750 $this->ctrl->saveParameter($this, 'test_express_mode');
751
752 $template = new ilTemplate("tpl.il_as_qpl_sync_original.html", true, true, "Modules/TestQuestionPool");
753 $template->setVariable("BUTTON_YES", $this->lng->txt("yes"));
754 $template->setVariable("BUTTON_NO", $this->lng->txt("no"));
755 $template->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
756 $template->setVariable("TEXT_SYNC", $this->lng->txt("confirm_sync_questions"));
757 $this->tpl->setVariable("ADM_CONTENT", $template->get());
758 }

Referenced by suggestedsolution().

+ Here is the caller graph for this function:

◆ outAdditionalOutput()

assQuestionGUI::outAdditionalOutput ( )

Reimplemented in assTextQuestionGUI.

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

1124 {
1125 }

◆ outChapterSelector()

assQuestionGUI::outChapterSelector ( )

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

1791 {
1792 require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1793 require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1794
1795 $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1796
1797 $cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
1798 $cont_obj = $cont_obj_gui->object;
1799 $ctree = $cont_obj->getLMTree();
1800 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
1801
1802 $rows = array();
1803
1804 foreach ($nodes as $node) {
1805 if ($node['type'] == $_GET['search_link_type']) {
1806 $this->ctrl->setParameter($this, $node['type'], $node['obj_id']);
1807 $rows[] = array(
1808 'title' => $node['title'],
1809 'description' => '',
1810 'text_add' => $this->lng->txt('add'),
1811 'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($node['type']))
1812 );
1813 }
1814 }
1815
1816 $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1817 $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
1818 $table->setData($rows);
1819
1820 $this->tpl->setContent($table->getHTML());
1821 }
Class ilObjContentObjectGUI.
$rows
Definition: xhr_table.php:10

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

Referenced by linkChilds().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outGlossarySelector()

assQuestionGUI::outGlossarySelector ( )

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

1824 {
1825 $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1826
1827 $glossary = new ilObjGlossary($_GET['source_id'], true);
1828 $terms = $glossary->getTermList();
1829
1830 $rows = array();
1831
1832 foreach ($terms as $term) {
1833 $this->ctrl->setParameter($this, 'git', $term['id']);
1834 $rows[] = array(
1835 'title' => $term['term'],
1836 'description' => '',
1837 'text_add' => $this->lng->txt('add'),
1838 'href_add' => $this->ctrl->getLinkTarget($this, 'addGIT')
1839 );
1840 }
1841
1842 $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1843 $table->setTitle($this->lng->txt('glossary_term'));
1844 $table->setData($rows);
1845
1846 $this->tpl->setContent($table->getHTML());
1847 }
Class ilObjGlossary.

References $_GET, and $rows.

Referenced by linkChilds().

+ Here is the caller graph for this function:

◆ outPageSelector()

assQuestionGUI::outPageSelector ( )

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

1732 {
1733 require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1734 require_once 'Modules/LearningModule/classes/class.ilLMPageObject.php';
1735 require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1736
1737 $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1738
1739 $cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
1740 $cont_obj = $cont_obj_gui->object;
1741 $pages = ilLMPageObject::getPageList($cont_obj->getId());
1742 $shownpages = array();
1743 $tree = $cont_obj->getLMTree();
1744 $chapters = $tree->getSubtree($tree->getNodeData($tree->getRootId()));
1745
1746 $rows = array();
1747
1748 foreach ($chapters as $chapter) {
1749 $chapterpages = $tree->getChildsByType($chapter['obj_id'], 'pg');
1750 foreach ($chapterpages as $page) {
1751 if ($page['type'] == $_GET['search_link_type']) {
1752 array_push($shownpages, $page['obj_id']);
1753
1754 if ($tree->isInTree($page['obj_id'])) {
1755 $path_str = $this->getContextPath($cont_obj, $page['obj_id']);
1756 } else {
1757 $path_str = '---';
1758 }
1759
1760 $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1761 $rows[] = array(
1762 'title' => $page['title'],
1763 'description' => ilUtil::prepareFormOutput($path_str),
1764 'text_add' => $this->lng->txt('add'),
1765 'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1766 );
1767 }
1768 }
1769 }
1770 foreach ($pages as $page) {
1771 if (!in_array($page['obj_id'], $shownpages)) {
1772 $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1773 $rows[] = array(
1774 'title' => $page['title'],
1775 'description' => '---',
1776 'text_add' => $this->lng->txt('add'),
1777 'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1778 );
1779 }
1780 }
1781
1782 require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1783 $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1784 $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
1785 $table->setData($rows);
1786
1787 $this->tpl->setContent($table->getHTML());
1788 }
getContextPath($cont_obj, $a_endnode_id, $a_startnode_id=1)
get context path in content object tree
static getPageList($lm_id)
static

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

Referenced by linkChilds().

+ 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 2218 of file class.assQuestionGUI.php.

2227 {
2228 $formaction = $this->completeTestOutputFormAction($formaction, $active_id, $pass);
2229
2230 $test_output = $this->getTestOutput(
2231 $active_id,
2232 $pass,
2233 $is_question_postponed,
2234 $user_post_solutions,
2235 $show_specific_inline_feedback
2236 );
2237
2238 $this->magicAfterTestOutput();
2239
2240 $this->tpl->setVariable("QUESTION_OUTPUT", $test_output);
2241 $this->tpl->setVariable("FORMACTION", $formaction);
2242 $this->tpl->setVariable("ENCTYPE", 'enctype="' . $this->getFormEncodingType() . '"');
2243 $this->tpl->setVariable("FORM_TIMESTAMP", time());
2244 }
getTestOutput( $active_id, $pass, $is_question_postponed, $user_post_solutions, $show_specific_inline_feedback)
completeTestOutputFormAction($formAction, $active_id, $pass)

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

Referenced by ilTestPlayerAbstractGUI\showQuestionEditable().

+ 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 639 of file class.assQuestionGUI.php.

640 {
641 // hey: prevPassSolutions - add the "use previous answer"
642 // hey: prevPassSolutions - refactored identifiers
643 if ($this->object->getTestPresentationConfig()->isSolutionInitiallyPrefilled()) {
644 // hey
647 } elseif // (!) --> if ($this->object->getTestQuestionConfig()->isUnchangedAnswerPossible())
648 // hey.
649// fau: testNav - add the "use unchanged answer checkbox"
650 // hey: prevPassSolutions - refactored identifiers
651 ($this->object->getTestPresentationConfig()->isUnchangedAnswerPossible()) {
652 // hey.
653 $html .= $this->getUseUnchangedAnswerCheckboxHtml();
654 }
655 // fau.
656
657 $this->lng->loadLanguageModule("content");
658
659 // fau: testNav - add question buttons below question, add actions menu
660 include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
661 $page_gui = new ilAssQuestionPageGUI($this->object->getId());
662 $page_gui->setOutputMode("presentation");
663 $page_gui->setTemplateTargetVar($a_temp_var);
664
665 if ($this->getNavigationGUI()) {
666 $html .= $this->getNavigationGUI()->getHTML();
667 $page_gui->setQuestionActionsHTML($this->getNavigationGUI()->getActionsHTML());
668 }
669 // fau.
670
671 if (strlen($html)) {
672 if ($inlineFeedbackEnabled && $this->hasInlineFeedback()) {
673 $html = $this->buildFocusAnchorHtml() . $html;
674 }
675
676 $page_gui->setQuestionHTML(array($this->object->getId() => $html));
677 }
678
679 // fau: testNav - fill the header with subtitle blocks for question info an actions
680 $page_gui->setPresentationTitle($this->questionHeaderBlockBuilder->getPresentationTitle());
681 $page_gui->setQuestionInfoHTML($this->questionHeaderBlockBuilder->getQuestionInfoHTML());
682 // fau.
683
684 return $page_gui->presentation();
685 }
hasInlineFeedback()
this method can be overwritten per question type
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References buildFocusAnchorHtml(), getNavigationGUI(), getPreviousSolutionConfirmationCheckboxHtml(), getPreviousSolutionProvidedMessage(), getUseUnchangedAnswerCheckboxHtml(), hasInlineFeedback(), and ilUtil\sendInfo().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outQuestionType()

assQuestionGUI::outQuestionType ( )

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

1422 {
1423 $count = $this->object->isInUse();
1424
1425 if ($this->object->_questionExistsInPool($this->object->getId()) && $count) {
1426 global $DIC;
1427 $rbacsystem = $DIC['rbacsystem'];
1428 if ($rbacsystem->checkAccess("write", $_GET["ref_id"])) {
1429 ilUtil::sendInfo(sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
1430 }
1431 }
1432
1433 return assQuestion::_getQuestionTypeName($this->object->getQuestionType());
1434 }
static _getQuestionTypeName($type_tag)
Return the translation for a given question type tag.

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outSolutionExplorer()

assQuestionGUI::outSolutionExplorer ( )

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

1652 {
1653 global $DIC;
1654 $tree = $DIC['tree'];
1655
1656 include_once("./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
1657 $type = $_GET["link_new_type"];
1658 $search = $_GET["search_link_type"];
1659 $this->ctrl->setParameter($this, "link_new_type", $type);
1660 $this->ctrl->setParameter($this, "search_link_type", $search);
1661 $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1662
1663 ilUtil::sendInfo($this->lng->txt("select_object_to_link"));
1664
1665 $parent_ref_id = $tree->getParentId($_GET["ref_id"]);
1666 $exp = new ilSolutionExplorer($this->ctrl->getLinkTarget($this, 'suggestedsolution'), get_class($this));
1667 $exp->setExpand($_GET['expand_sol'] ? $_GET['expand_sol'] : $parent_ref_id);
1668 $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'outSolutionExplorer'));
1669 $exp->setTargetGet("ref_id");
1670 $exp->setRefId($_GET["ref_id"]);
1671 $exp->addFilter($type);
1672 $exp->setSelectableType($type);
1673 if (isset($_GET['expandCurrentPath']) && $_GET['expandCurrentPath']) {
1674 $exp->expandPathByRefId($parent_ref_id);
1675 }
1676
1677 // build html-output
1678 $exp->setOutput(0);
1679
1680 $template = new ilTemplate("tpl.il_as_qpl_explorer.html", true, true, "Modules/TestQuestionPool");
1681 $template->setVariable("EXPLORER_TREE", $exp->getOutput());
1682 $template->setVariable("BUTTON_CANCEL", $this->lng->txt("cancel"));
1683 $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "suggestedsolution"));
1684 $this->tpl->setVariable("ADM_CONTENT", $template->get());
1685 }
$type

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

+ Here is the call graph for this function:

◆ populateCorrectionsFormProperties()

◆ populateJavascriptFilesRequiredForWorkForm()

assQuestionGUI::populateJavascriptFilesRequiredForWorkForm ( ilGlobalTemplateInterface  $tpl)

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

581 {
582 foreach ($this->getPresentationJavascripts() as $jsFile) {
583 $tpl->addJavaScript($jsFile);
584 }
585 }

References $tpl, and getPresentationJavascripts().

+ Here is the call graph for this function:

◆ populateTaxonomyFormSection()

assQuestionGUI::populateTaxonomyFormSection ( ilPropertyFormGUI  $form)
protected

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

1316 {
1317 if (count($this->getTaxonomyIds())) {
1318 // this is needed by ilTaxSelectInputGUI in some cases
1319 require_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
1320 ilOverlayGUI::initJavaScript();
1321
1322 $sectHeader = new ilFormSectionHeaderGUI();
1323 $sectHeader->setTitle($this->lng->txt('qpl_qst_edit_form_taxonomy_section'));
1324 $form->addItem($sectHeader);
1325
1326 require_once 'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
1327
1328 foreach ($this->getTaxonomyIds() as $taxonomyId) {
1329 $taxonomy = new ilObjTaxonomy($taxonomyId);
1330 $label = sprintf($this->lng->txt('qpl_qst_edit_form_taxonomy'), $taxonomy->getTitle());
1331 $postvar = "tax_node_assign_$taxonomyId";
1332
1333 $taxSelect = new ilTaxSelectInputGUI($taxonomy->getId(), $postvar, true);
1334 $taxSelect->setTitle($label);
1335
1336 require_once 'Services/Taxonomy/classes/class.ilTaxNodeAssignment.php';
1337 $taxNodeAssignments = new ilTaxNodeAssignment(ilObject::_lookupType($this->object->getObjId()), $this->object->getObjId(), 'quest', $taxonomyId);
1338 $assignedNodes = $taxNodeAssignments->getAssignmentsOfItem($this->object->getId());
1339
1340 $taxSelect->setValue(array_map(function ($assignedNode) {
1341 return $assignedNode['node_id'];
1342 }, $assignedNodes));
1343 $form->addItem($taxSelect);
1344 }
1345 }
1346 }
This class represents a section header in a property form.
static _lookupType($a_id, $a_reference=false)
lookup object type
addItem($a_item)
Add Item (Property, SectionHeader).
Taxonomy node <-> item assignment.
Select taxonomy nodes input GUI.

References ilObject\_lookupType(), ilPropertyFormGUI\addItem(), and getTaxonomyIds().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareReprintableCorrectionsForm()

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

Reimplemented in assOrderingQuestionGUI.

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

2405 {
2406 }

◆ redrawHeaderAction()

assQuestionGUI::redrawHeaderAction ( )

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

184 {
185 global $DIC; /* @var ILIAS\DI\Container $DIC */
186 echo $this->getHeaderAction() . $DIC->ui()->mainTemplate()->getOnLoadCodeForAsynch();
187 exit;
188 }
exit
Definition: login.php:29

References $DIC, exit, and getHeaderAction().

+ Here is the call graph for this function:

◆ renderEditForm()

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

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

615 {
616 $this->getQuestionTemplate();
617 $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
618 }
getQuestionTemplate()
get question template

References getQuestionTemplate().

Referenced by assOrderingQuestionGUI\changeToPictures(), assOrderingQuestionGUI\changeToText(), assOrderingQuestionGUI\editQuestion(), assOrderingQuestionGUI\orderNestedPictures(), assOrderingQuestionGUI\orderNestedTerms(), assOrderingQuestionGUI\removeElementImage(), assOrderingQuestionGUI\uploadElementImage(), and assOrderingQuestionGUI\writePostData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPurposeSupportsFormHtml()

assQuestionGUI::renderPurposeSupportsFormHtml ( )

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

348 {
349 if ($this->isRenderPurposePrintPdf()) {
350 return false;
351 }
352
353 if ($this->isRenderPurposeInputValue()) {
354 return false;
355 }
356
357 return true;
358 }

References isRenderPurposeInputValue(), and isRenderPurposePrintPdf().

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

+ 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 872 of file class.assQuestionGUI.php.

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

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

Referenced by assFormulaQuestionGUI\saveFQ().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCorrectionsFormProperties()

◆ saveEdit()

assQuestionGUI::saveEdit ( )

save question

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

822 {
823 global $DIC;
824 $ilUser = $DIC['ilUser'];
825
826 $result = $this->writePostData();
827 if ($result == 0) {
828 $ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
829 $ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
830 $this->object->saveToDb();
831 $originalexists = $this->object->_questionExists($this->object->original_id);
832 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
833 if ($_GET["calling_test"] && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
834 $this->ctrl->redirect($this, "originalSyncForm");
835 } elseif ($_GET["calling_test"]) {
836 $_GET["ref_id"] = $_GET["calling_test"];
837 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
838 return;
839 } elseif ($_GET["test_ref_id"]) {
840 global $DIC;
841 $tree = $DIC['tree'];
842 $ilDB = $DIC['ilDB'];
843 $ilPluginAdmin = $DIC['ilPluginAdmin'];
844
845 include_once("./Modules/Test/classes/class.ilObjTest.php");
846 $_GET["ref_id"] = $_GET["test_ref_id"];
847 $test = new ilObjTest($_GET["test_ref_id"], true);
848
849 require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
850 $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
851
852 $test->insertQuestion($testQuestionSetConfigFactory->getQuestionSetConfig(), $this->object->getId());
853
854 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["test_ref_id"]);
855 } else {
856 $this->ctrl->setParameter($this, "q_id", $this->object->getId());
857 $this->editQuestion();
858 if (strcmp($_SESSION["info"], "") != 0) {
859 ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), false);
860 } else {
861 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), false);
862 }
863 $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $this->object->getId());
864 $this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
865 }
866 }
867 }

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

+ Here is the call graph for this function:

◆ saveReturn()

assQuestionGUI::saveReturn ( )

save question

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

981 {
982 global $DIC;
983 $ilUser = $DIC['ilUser'];
984 $old_id = $_GET["q_id"];
985 $result = $this->writePostData();
986 if ($result == 0) {
987 $ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
988 $ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
989 $this->object->saveToDb();
990 $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
991 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
992 if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
993 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
994 $this->ctrl->setParameter($this, 'test_express_mode', $_REQUEST['test_express_mode']);
995 $this->ctrl->redirect($this, "originalSyncForm");
996 return;
997 } elseif ($_GET["calling_test"]) {
998 require_once 'Modules/Test/classes/class.ilObjTest.php';
999 $test = new ilObjTest($_GET["calling_test"]);
1000 #var_dump(assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId()));
1001 $q_id = $this->object->getId();
1002 if (!assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId())) {
1003 global $DIC;
1004 $tree = $DIC['tree'];
1005 $ilDB = $DIC['ilDB'];
1006 $ilPluginAdmin = $DIC['ilPluginAdmin'];
1007
1008 include_once("./Modules/Test/classes/class.ilObjTest.php");
1009 $_GET["ref_id"] = $_GET["calling_test"];
1010 $test = new ilObjTest($_GET["calling_test"], true);
1011
1012 require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
1013 $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
1014
1015 $new_id = $test->insertQuestion(
1016 $testQuestionSetConfigFactory->getQuestionSetConfig(),
1017 $this->object->getId()
1018 );
1019
1020 $q_id = $new_id;
1021 if (isset($_REQUEST['prev_qid'])) {
1022 $test->moveQuestionAfter($this->object->getId() + 1, $_REQUEST['prev_qid']);
1023 }
1024
1025 $this->ctrl->setParameter($this, 'q_id', $new_id);
1026 $this->ctrl->setParameter($this, 'calling_test', $_GET['calling_test']);
1027 #$this->ctrl->setParameter($this, 'test_ref_id', false);
1028 }
1029 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1030 if ( /*$___test_express_mode || */
1031 $_REQUEST['test_express_mode']
1032 ) {
1034 } else {
1035 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
1036 }
1037 } else {
1038 if ($this->object->getId() != $old_id) {
1039 $this->callNewIdListeners($this->object->getId());
1040 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1041 $this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
1042 }
1043 if (strcmp($_SESSION["info"], "") != 0) {
1044 ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), true);
1045 } else {
1046 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1047 }
1048 $this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
1049 }
1050 }
1051 }

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

+ Here is the call graph for this function:

◆ saveSuggestedSolution()

assQuestionGUI::saveSuggestedSolution ( )

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

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

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

+ Here is the call graph for this function:

◆ saveTaxonomyAssignments()

assQuestionGUI::saveTaxonomyAssignments ( )
protected

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

1301 {
1302 if (count($this->getTaxonomyIds())) {
1303 require_once 'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
1304
1305 foreach ($this->getTaxonomyIds() as $taxonomyId) {
1306 $postvar = "tax_node_assign_$taxonomyId";
1307
1308 $tax_node_assign = new ilTaxAssignInputGUI($taxonomyId, true, '', $postvar);
1309 // TODO: determine tst/qpl when tax assigns become maintainable within tests
1310 $tax_node_assign->saveInput("qpl", $this->object->getObjId(), "quest", $this->object->getId());
1311 }
1312 }
1313 }
Input GUI class for taxonomy assignments.

References getTaxonomyIds().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAdjustmentEditContext()

assQuestionGUI::setAdjustmentEditContext ( )

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

393 {
394 return $this->setEditContext(self::EDIT_CONTEXT_ADJUSTMENT);
395 }
setEditContext($editContext)

References setEditContext().

+ Here is the call graph for this function:

◆ setEditContext()

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

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

372 {
373 $this->editContext = $editContext;
374 }

References $editContext.

Referenced by setAdjustmentEditContext().

+ Here is the caller graph for this function:

◆ setErrorMessage()

assQuestionGUI::setErrorMessage (   $errormessage)

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

1114 {
1115 $this->errormessage = $errormessage;
1116 }

References $errormessage.

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

+ Here is the caller graph for this function:

◆ setNavigationGUI()

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

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

409 {
410 $this->navigationGUI = $navigationGUI;
411 }

References $navigationGUI.

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

+ Here is the caller graph for this function:

◆ setPresentationContext()

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

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

279 {
280 $this->presentationContext = $presentationContext;
281 }

References $presentationContext.

◆ setPreviewSession()

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

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

2311 {
2312 $this->previewSession = $previewSession;
2313 }

References $previewSession.

◆ setPreviousSolutionPrefilled()

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

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

301 {
302 $this->previousSolutionPrefilled = $previousSolutionPrefilled;
303 }

References $previousSolutionPrefilled.

◆ setQuestionActionCmd()

assQuestionGUI::setQuestionActionCmd (   $questionActionCmd)

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

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

References $questionActionCmd.

◆ setQuestionCount()

assQuestionGUI::setQuestionCount (   $a_question_count)

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

1099 {
1100 $this->question_count = $a_question_count;
1101 }

◆ setQuestionHeaderBlockBuilder()

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

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

442 {
443 $this->questionHeaderBlockBuilder = $questionHeaderBlockBuilder;
444 }

References $questionHeaderBlockBuilder.

◆ setQuestionTabs()

assQuestionGUI::setQuestionTabs ( )

Reimplemented in assClozeTestGUI, assErrorTextGUI, assFileUploadGUI, assFlashQuestionGUI, assFormulaQuestionGUI, assImagemapQuestionGUI, assJavaAppletGUI, assLongMenuGUI, assMatchingQuestionGUI, assMultipleChoiceGUI, assOrderingHorizontalGUI, assOrderingQuestionGUI, assSingleChoiceGUI, assTextQuestionGUI, and assTextSubsetGUI.

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

1937 {
1938 global $DIC;
1939 $rbacsystem = $DIC['rbacsystem'];
1940 $ilTabs = $DIC['ilTabs'];
1941
1942 $ilTabs->clearTargets();
1943
1944 $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
1945 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
1946 $q_type = $this->object->getQuestionType();
1947
1948 if (strlen($q_type)) {
1949 $classname = $q_type . "GUI";
1950 $this->ctrl->setParameterByClass(strtolower($classname), "sel_question_types", $q_type);
1951 $this->ctrl->setParameterByClass(strtolower($classname), "q_id", $_GET["q_id"]);
1952 }
1953
1954 if ($_GET["q_id"]) {
1955 if ($rbacsystem->checkAccess('write', $_GET["ref_id"])) {
1956 // edit page
1957 $ilTabs->addTarget(
1958 "edit_page",
1959 $this->ctrl->getLinkTargetByClass("ilAssQuestionPageGUI", "edit"),
1960 array("edit", "insert", "exec_pg"),
1961 "",
1962 "",
1963 $force_active
1964 );
1965 }
1966
1967 $this->addTab_QuestionPreview($ilTabs);
1968 }
1969 $force_active = false;
1970 if ($rbacsystem->checkAccess('write', $_GET["ref_id"])) {
1971 $url = "";
1972 if ($classname) {
1973 $url = $this->ctrl->getLinkTargetByClass($classname, "editQuestion");
1974 }
1975 $force_active = false;
1976 // edit question properties
1977 $ilTabs->addTarget(
1978 "edit_question",
1979 $url,
1981 $classname,
1982 "",
1983 $force_active
1984 );
1985 }
1986
1987 // add tab for question feedback within common class assQuestionGUI
1988 $this->addTab_QuestionFeedback($ilTabs);
1989
1990 // add tab for question hint within common class assQuestionGUI
1991 $this->addTab_QuestionHints($ilTabs);
1992
1993 // add tab for question's suggested solution within common class assQuestionGUI
1994 $this->addTab_SuggestedSolution($ilTabs, $classname);
1995
1996 // Assessment of questions sub menu entry
1997 if ($_GET["q_id"]) {
1998 $ilTabs->addTarget(
1999 "statistics",
2000 $this->ctrl->getLinkTargetByClass($classname, "assessment"),
2001 array("assessment"),
2002 $classname,
2003 ""
2004 );
2005 }
2006
2007 $this->addBackTab($ilTabs);
2008 }
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
addTab_SuggestedSolution(ilTabsGUI $tabs, $classname)
addBackTab(ilTabsGUI $ilTabs)
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
addTab_QuestionPreview(ilTabsGUI $tabsGUI)
$url

References $_GET, $DIC, $url, addBackTab(), addTab_QuestionFeedback(), addTab_QuestionHints(), addTab_QuestionPreview(), addTab_SuggestedSolution(), and getEditQuestionTabCommands().

+ Here is the call graph for this function:

◆ setRenderPurpose()

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

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

318 {
319 $this->renderPurpose = $renderPurpose;
320 }

References $renderPurpose.

Referenced by suggestedsolution().

+ Here is the caller graph for this function:

◆ setSequenceNumber()

assQuestionGUI::setSequenceNumber (   $nr)

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

1089 {
1090 $this->sequence_no = $nr;
1091 }

◆ setTargetGui()

assQuestionGUI::setTargetGui (   $linkTargetGui)

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

424 {
425 $this->setTargetGuiClass(get_class($linkTargetGui));
426 }
setTargetGuiClass($targetGuiClass)

References setTargetGuiClass().

+ Here is the call graph for this function:

◆ setTargetGuiClass()

assQuestionGUI::setTargetGuiClass (   $targetGuiClass)

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

429 {
430 $this->targetGuiClass = $targetGuiClass;
431 }

References $targetGuiClass.

Referenced by setTargetGui().

+ Here is the caller graph for this function:

◆ setTaxonomyIds()

assQuestionGUI::setTaxonomyIds (   $taxonomyIds)

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

414 {
415 $this->taxonomyIds = $taxonomyIds;
416 }

References $taxonomyIds.

◆ setUseIntermediateSolution()

assQuestionGUI::setUseIntermediateSolution (   $use)

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

2159 {
2160 $this->use_intermediate_solution = (bool) $use;
2161 }

◆ showHints()

assQuestionGUI::showHints ( )

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

2344 {
2345 global $DIC;
2346 $ilCtrl = $DIC['ilCtrl'];
2347 $ilCtrl->redirectByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
2348 }

References $DIC, $ilCtrl, and ilAssQuestionHintsGUI\CMD_SHOW_LIST.

◆ showSuggestedSolution()

assQuestionGUI::showSuggestedSolution ( )

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

1437 {
1438 $this->suggestedsolution();
1439 }

References suggestedsolution().

+ Here is the call graph for this function:

◆ suggestedsolution()

assQuestionGUI::suggestedsolution ( )

Allows to add suggested solutions for questions.

@access public

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

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

References $_GET, $_POST, $DIC, $ilUser, $res, assQuestion\_getInternalLinkHref(), assQuestion\_isWriteable(), getRenderPurpose(), getSolutionOutput(), ilUtil\makeDirParents(), ilUtil\moveUploadedFile(), originalSyncForm(), ilUtil\prepareFormOutput(), ilUtil\renameExecutables(), ilUtil\sendInfo(), and setRenderPurpose().

Referenced by saveSuggestedSolution(), and showSuggestedSolution().

+ 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

Reimplemented in assClozeTestGUI, assErrorTextGUI, assFormulaQuestionGUI, assImagemapQuestionGUI, assKprimChoiceGUI, assLongMenuGUI, assMatchingQuestionGUI, assMultipleChoiceGUI, assNumericGUI, assOrderingHorizontalGUI, assOrderingQuestionGUI, assSingleChoiceGUI, assTextQuestionGUI, and assTextSubsetGUI.

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

2138 {
2139 return false;
2140 }

◆ sync()

assQuestionGUI::sync ( )

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

761 {
762 $original_id = $this->object->original_id;
763 if ($original_id) {
764 $this->object->syncWithOriginal();
765 }
766 if (strlen($_GET["return_to"])) {
767 $this->ctrl->redirect($this, $_GET["return_to"]);
768 }
769 if (strlen($_REQUEST["return_to_fb"])) {
770 $this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', 'showFeedbackForm');
771 } else {
772 if (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
773 $ref_id = (int) $_GET['calling_consumer'];
774 $consumer = ilObjectFactory::getInstanceByRefId($ref_id);
775 if ($consumer instanceof ilQuestionEditingFormConsumer) {
776 ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
777 }
778 require_once 'Services/Link/classes/class.ilLink.php';
780 }
781 $_GET["ref_id"] = $_GET["calling_test"];
782
783 if ($_REQUEST['test_express_mode']) {
785 } else {
786 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
787 }
788 }
789 }

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

+ 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

Reimplemented in assClozeTestGUI, assErrorTextGUI, assFileUploadGUI, assFlashQuestionGUI, assFormulaQuestionGUI, assImagemapQuestionGUI, assJavaAppletGUI, assLongMenuGUI, assMatchingQuestionGUI, assMultipleChoiceGUI, assNumericGUI, assOrderingHorizontalGUI, assSingleChoiceGUI, assTextQuestionGUI, assTextSubsetGUI, assOrderingQuestionGUI, and assKprimChoiceGUI.

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

475 {
476 }

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

+ Here is the caller graph for this function:

◆ writeQuestionGenericPostData()

assQuestionGUI::writeQuestionGenericPostData ( )
protected

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

2186 {
2187 $this->object->setTitle($_POST["title"]);
2188 $this->object->setAuthor($_POST["author"]);
2189 $this->object->setComment($_POST["comment"]);
2190 if ($this->object->getSelfAssessmentEditingMode()) {
2191 $this->object->setNrOfTries($_POST['nr_of_tries']);
2192 }
2193
2194 try {
2195 $lifecycle = ilAssQuestionLifecycle::getInstance($_POST['lifecycle']);
2196 $this->object->setLifecycle($lifecycle);
2198 }
2199
2200 $this->object->setQuestion(ilUtil::stripOnlySlashes($_POST['question'])); // ?
2201 $this->object->setEstimatedWorkingTime(
2202 $_POST["Estimated"]["hh"],
2203 $_POST["Estimated"]["mm"],
2204 $_POST["Estimated"]["ss"]
2205 );
2206 }
static stripOnlySlashes($a_str)
strip slashes if magic qoutes is enabled

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $editContext

assQuestionGUI::$editContext = self::EDIT_CONTEXT_AUTHORING
private

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

Referenced by getEditContext(), and setEditContext().

◆ $editForm

assQuestionGUI::$editForm
protected

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

Referenced by buildEditForm().

◆ $error

assQuestionGUI::$error

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

◆ $errormessage

assQuestionGUI::$errormessage

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

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

◆ $lng

assQuestionGUI::$lng

◆ $navigationGUI

assQuestionGUI::$navigationGUI
private

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

Referenced by getNavigationGUI(), and setNavigationGUI().

◆ $object

assQuestionGUI::$object

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

Referenced by callNewIdListeners().

◆ $presentationContext

assQuestionGUI::$presentationContext = null
private

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

Referenced by getPresentationContext(), and setPresentationContext().

◆ $previewSession

assQuestionGUI::$previewSession
private

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

Referenced by getQuestionCount().

◆ $questionActionCmd

assQuestionGUI::$questionActionCmd = 'handleQuestionAction'
private

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

Referenced by getRenderPurpose(), and setRenderPurpose().

◆ $sequence_no

assQuestionGUI::$sequence_no

sequence number in test

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

Referenced by getSequenceNumber().

◆ $targetGuiClass

assQuestionGUI::$targetGuiClass = null
private

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

Referenced by getTargetGuiClass(), and setTargetGuiClass().

◆ $taxonomyIds

assQuestionGUI::$taxonomyIds = array()
private

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

Referenced by getTaxonomyIds(), and setTaxonomyIds().

◆ $tpl

◆ $use_intermediate_solution

assQuestionGUI::$use_intermediate_solution = false
protected

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

Referenced by getUseIntermediateSolution().

◆ EDIT_CONTEXT_ADJUSTMENT

const assQuestionGUI::EDIT_CONTEXT_ADJUSTMENT = 'adjustment'

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

Referenced by isAdjustmentEditContext().

◆ EDIT_CONTEXT_AUTHORING

const assQuestionGUI::EDIT_CONTEXT_AUTHORING = 'authoring'

◆ FORM_ENCODING_MULTIPART

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

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

Referenced by assFileUploadGUI\getFormEncodingType().

◆ FORM_ENCODING_URLENCODE

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

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

Referenced by getFormEncodingType().

◆ FORM_MODE_ADJUST

const assQuestionGUI::FORM_MODE_ADJUST = 'adjust'

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

◆ FORM_MODE_EDIT

const assQuestionGUI::FORM_MODE_EDIT = 'edit'

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

◆ PRESENTATION_CONTEXT_RESULTS

const assQuestionGUI::PRESENTATION_CONTEXT_RESULTS = 'pContextResults'

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

◆ PRESENTATION_CONTEXT_TEST

const assQuestionGUI::PRESENTATION_CONTEXT_TEST = 'pContextTest'

◆ RENDER_PURPOSE_DEMOPLAY

const assQuestionGUI::RENDER_PURPOSE_DEMOPLAY = 'renderPurposeDemoplay'

◆ RENDER_PURPOSE_INPUT_VALUE

const assQuestionGUI::RENDER_PURPOSE_INPUT_VALUE = 'renderPurposeInputValue'

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

Referenced by isRenderPurposeInputValue().

◆ RENDER_PURPOSE_PLAYBACK

const assQuestionGUI::RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'

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

Referenced by isRenderPurposePlayback().

◆ RENDER_PURPOSE_PREVIEW

◆ RENDER_PURPOSE_PRINT_PDF

◆ SESSION_PREVIEW_DATA_BASE_INDEX

const assQuestionGUI::SESSION_PREVIEW_DATA_BASE_INDEX = 'ilAssQuestionPreviewAnswers'

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


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