ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 (ilTemplate $tpl)
 
 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 117 of file class.assQuestionGUI.php.

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

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

Member Function Documentation

◆ _getClassNameForQType()

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

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

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

Referenced by _getGUIClassNameForId().

+ Here is the caller graph for this function:

◆ _getGUIClassNameForId()

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

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

545 {
546 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
547 include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
548 $q_type = assQuestion::getQuestionTypeFromDb($a_q_id);
549 $class_name = assQuestionGUI::_getClassNameForQType($q_type);
550 return $class_name;
551 }
static _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 509 of file class.assQuestionGUI.php.

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

2257 {
2258 if (($_GET["calling_test"] > 0) || ($_GET["test_ref_id"] > 0)) {
2259 $ref_id = $_GET["calling_test"];
2260 if (strlen($ref_id) == 0) {
2261 $ref_id = $_GET["test_ref_id"];
2262 }
2263
2264 if (!$_GET['test_express_mode'] && !$GLOBALS['___test_express_mode']) {
2265 $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), "ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=$ref_id");
2266 } else {
2268 $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), $link);
2269 }
2270 } elseif (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) {
2271 $ref_id = (int) $_GET['calling_consumer'];
2272 $consumer = ilObjectFactory::getInstanceByRefId($ref_id);
2273 if ($consumer instanceof ilQuestionEditingFormConsumer) {
2274 $ilTabs->setBackTarget($consumer->getQuestionEditingFormBackTargetLabel(), $consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
2275 } else {
2276 require_once 'Services/Link/classes/class.ilLink.php';
2277 $ilTabs->setBackTarget($this->lng->txt("qpl"), ilLink::_getLink($ref_id));
2278 }
2279 } else {
2280 $ilTabs->setBackTarget($this->lng->txt("qpl"), $this->ctrl->getLinkTargetByClass("ilobjquestionpoolgui", "questions"));
2281 }
2282 }
$_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)
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

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

1199 {
1200 // title
1201 $title = new ilTextInputGUI($this->lng->txt("title"), "title");
1202 $title->setMaxLength(100);
1203 $title->setValue($this->object->getTitle());
1204 $title->setRequired(true);
1205 $form->addItem($title);
1206
1207 if (!$this->object->getSelfAssessmentEditingMode()) {
1208 // author
1209 $author = new ilTextInputGUI($this->lng->txt("author"), "author");
1210 $author->setValue($this->object->getAuthor());
1211 $author->setRequired(true);
1212 $form->addItem($author);
1213
1214 // description
1215 $description = new ilTextInputGUI($this->lng->txt("description"), "comment");
1216 $description->setValue($this->object->getComment());
1217 $description->setRequired(false);
1218 $form->addItem($description);
1219 } else {
1220 // author as hidden field
1221 $hi = new ilHiddenInputGUI("author");
1222 $author = ilUtil::prepareFormOutput($this->object->getAuthor());
1223 if (trim($author) == "") {
1224 $author = "-";
1225 }
1226 $hi->setValue($author);
1227 $form->addItem($hi);
1228 }
1229
1230 // questiontext
1231 $question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
1232 $question->setValue($this->object->getQuestion());
1233 $question->setRequired(true);
1234 $question->setRows(10);
1235 $question->setCols(80);
1236
1237 if (!$this->object->getSelfAssessmentEditingMode()) {
1238 if ($this->object->getAdditionalContentEditingMode() != assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT) {
1239 $question->setUseRte(true);
1240 include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
1241 $question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
1242 $question->addPlugin("latex");
1243 $question->addButton("latex");
1244 $question->addButton("pastelatex");
1245 $question->setRTESupport($this->object->getId(), "qpl", "assessment");
1246 }
1247 } else {
1248 require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssSelfAssessmentQuestionFormatter.php';
1250 $question->setUseTagsForRteOnly(false);
1251 }
1252 $form->addItem($question);
1253
1254 if (!$this->object->getSelfAssessmentEditingMode()) {
1255 // duration
1256 $duration = new ilDurationInputGUI($this->lng->txt("working_time"), "Estimated");
1257 $duration->setShowHours(true);
1258 $duration->setShowMinutes(true);
1259 $duration->setShowSeconds(true);
1260 $ewt = $this->object->getEstimatedWorkingTime();
1261 $duration->setHours($ewt["h"]);
1262 $duration->setMinutes($ewt["m"]);
1263 $duration->setSeconds($ewt["s"]);
1264 $duration->setRequired(false);
1265 $form->addItem($duration);
1266 } else {
1267 // number of tries
1268 if (strlen($this->object->getNrOfTries())) {
1269 $nr_tries = $this->object->getNrOfTries();
1270 } else {
1271 $nr_tries = $this->object->getDefaultNrOfTries();
1272 }
1273 if ($nr_tries < 1) {
1274 $nr_tries = "";
1275 }
1276
1277 $ni = new ilNumberInputGUI($this->lng->txt("qst_nr_of_tries"), "nr_of_tries");
1278 $ni->setValue($nr_tries);
1279 $ni->setMinValue(0);
1280 $ni->setSize(5);
1281 $ni->setMaxLength(5);
1282 $form->addItem($ni);
1283 }
1284 }
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 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
if(isset($_POST['submit'])) $form

References $description, $form, $title, 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 1110 of file class.assQuestionGUI.php.

1111 {
1112 $this->errormessage .= ((strlen($this->errormessage)) ? "<br />" : "") . $errormessage;
1113 }

References $errormessage.

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

+ Here is the caller graph for this function:

◆ addGIT()

assQuestionGUI::addGIT ( )

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("git", "il__git_" . $_GET["git"], $subquestion_index);
1889 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1890 $this->ctrl->redirect($this, "suggestedsolution");
1891 }

References $_GET.

◆ addHeaderAction()

assQuestionGUI::addHeaderAction ( )

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

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

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

◆ addPG()

assQuestionGUI::addPG ( )

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

1861 {
1862 $subquestion_index = 0;
1863 if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0) {
1864 $subquestion_index = $_GET["subquestion_index"];
1865 }
1866 $this->object->saveSuggestedSolution("pg", "il__pg_" . $_GET["pg"], $subquestion_index);
1867 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1868 $this->ctrl->redirect($this, "suggestedsolution");
1869 }

References $_GET.

◆ addQuestionFormCommandButtons()

assQuestionGUI::addQuestionFormCommandButtons (   $form)

Add the command buttons of a question properties form.

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

1184 {
1185 //if (!$this->object->getSelfAssessmentEditingMode() && !$_GET["calling_test"]) $form->addCommandButton("saveEdit", $this->lng->txt("save_edit"));
1186 if (!$this->object->getSelfAssessmentEditingMode()) {
1187 $form->addCommandButton("saveReturn", $this->lng->txt("save_return"));
1188 }
1189 $form->addCommandButton("save", $this->lng->txt("save"));
1190 }

References $form.

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 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("st", "il__st_" . $_GET["st"], $subquestion_index);
1878 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1879 $this->ctrl->redirect($this, "suggestedsolution");
1880 }

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

2036 {
2037 global $DIC;
2038 $ilCtrl = $DIC['ilCtrl'];
2039
2040 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
2041 $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionFeedbackEditingGUI');
2042
2043 $tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
2044
2045 $tabs->addTarget('tst_feedback', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
2046 }
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...
if(!empty($this->data['faventry'])) $tabs
Definition: disco.tpl.php:124

References $DIC, $ilCtrl, $tabs, 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 2068 of file class.assQuestionGUI.php.

2069 {
2070 global $DIC;
2071 $ilCtrl = $DIC['ilCtrl'];
2072
2073 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
2074
2075 switch ($ilCtrl->getCmdClass()) {
2076 case 'ilassquestionhintsgui':
2077
2078 $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintsGUI');
2079 break;
2080
2081 case 'ilassquestionhintgui':
2082
2083 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php';
2084 $tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintGUI');
2085 break;
2086
2087 default:
2088
2089 $tabCommands = array();
2090 }
2091
2092 $tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
2093
2094 $tabs->addTarget('tst_question_hints_tab', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
2095 }
const CMD_SHOW_LIST
command constants

References $DIC, $ilCtrl, $tabs, 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

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

2098 {
2099 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
2100
2101 $tabsGUI->addTarget(
2103 $this->ctrl->getLinkTargetByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW),
2104 array(),
2105 array('ilAssQuestionPreviewGUI')
2106 );
2107 }
addTarget( $a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)

References ilTabsGUI\addTarget(), ilAssQuestionPreviewGUI\CMD_SHOW, and ilAssQuestionPreviewGUI\TAB_ID_QUESTION_PREVIEW.

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_SuggestedSolution()

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

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

2000 {
2001 if ($_GET["q_id"]) {
2002 $tabs->addTarget(
2003 "suggested_solution",
2004 $this->ctrl->getLinkTargetByClass($classname, "suggestedsolution"),
2005 array("suggestedsolution", "saveSuggestedSolution", "outSolutionExplorer", "cancel",
2006 "addSuggestedSolution","cancelExplorer", "linkChilds", "removeSuggestedSolution"
2007 ),
2008 $classname,
2009 ""
2010 );
2011 }
2012 }

References $_GET, and $tabs.

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 caller graph for this function:

◆ apply()

assQuestionGUI::apply ( )

apply changes

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

1049 {
1050 $this->writePostData();
1051 $this->object->saveToDb();
1052 $this->ctrl->setParameter($this, "q_id", $this->object->getId());
1053 $this->editQuestion();
1054 }
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 2308 of file class.assQuestionGUI.php.

2309 {
2310 require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
2311 $form = new ilPropertyFormGUI();
2312
2313 $form->setFormAction($this->ctrl->getFormAction($this));
2314
2315 $form->setId($this->getType());
2316 $form->setTitle($this->outQuestionType());
2317
2318 $form->setTableWidth('100%');
2319
2320 $form->setMultipart(true);
2321
2322 return $form;
2323 }
getType()
needed for page editor compliance
This class represents a property form user interface.

References $form, 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 2335 of file class.assQuestionGUI.php.

2336 {
2337 $errors = $this->editQuestion(true); // TODO bheyser: editQuestion should be added to the abstract base class with a unified signature
2338 return $this->editForm;
2339 }
$errors
Definition: index.php:6

References $editForm, and $errors.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ buildFocusAnchorHtml()

assQuestionGUI::buildFocusAnchorHtml ( )
Returns
string

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

2345 {
2346 return '<div id="focus"></div>';
2347 }

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

1166 {
1167 for ($i = 0; $i < $this->new_id_listener_cnt; $i++) {
1168 $this->new_id_listeners[$i]["parameters"]["new_id"] = $a_new_id;
1169 $object = &$this->new_id_listeners[$i]["object"];
1170 $method = $this->new_id_listeners[$i]["method"];
1171 $parameters = $this->new_id_listeners[$i]["parameters"];
1172 //var_dump($object);
1173 //var_dump($method);
1174 //var_dump($parameters);
1175
1176 $object->$method($parameters);
1177 }
1178 }
$i
Definition: disco.tpl.php:19

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

710 {
711 if ($_GET["calling_test"]) {
712 $_GET["ref_id"] = $_GET["calling_test"];
713 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
714 } elseif ($_GET["test_ref_id"]) {
715 $_GET["ref_id"] = $_GET["test_ref_id"];
716 ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["test_ref_id"]);
717 } else {
718 if ($_GET["q_id"] > 0) {
719 $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
720 $this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
721 } else {
722 $this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
723 }
724 }
725 }
static redirect($a_script)

References $_GET, and ilUtil\redirect().

+ Here is the call graph for this function:

◆ cancelExplorer()

assQuestionGUI::cancelExplorer ( )

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

1713 {
1714 $this->ctrl->redirect($this, "suggestedsolution");
1715 }

◆ cancelSync()

assQuestionGUI::cancelSync ( )

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

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

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

2231 {
2232 return $formAction;
2233 }

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

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

References _getQuestionGUI().

+ Here is the call graph for this function:

◆ executeCommand()

assQuestionGUI::executeCommand ( )

execute command

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

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

+ Here is the call graph for this function:

◆ getAdditionalEditQuestionCommands()

assQuestionGUI::getAdditionalEditQuestionCommands ( )
protected

Reimplemented in assKprimChoiceGUI.

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

2025 {
2026 return array();
2027 }

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

1344 {
1345 return $this->getGenericFeedbackOutput($active_id, $pass);
1346 }
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.

References $pass, and getGenericFeedbackOutput().

Referenced by assFileUploadGUI\getSolutionOutput(), assImagemapQuestionGUI\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 2371 of file class.assQuestionGUI.php.

2372 {
2373 require_once 'Modules/TestQuestionPool/classes/tables/class.ilAnswerFrequencyStatisticTableGUI.php';
2374
2375 $table = new ilAnswerFrequencyStatisticTableGUI($parentGui, $parentCmd, $this->object);
2376 $table->setQuestionIndex($questionIndex);
2377 $table->setData($this->getAnswersFrequency($relevantAnswers, $questionIndex));
2378 $table->initColumns();
2379
2380 return $table;
2381 }
getAnswersFrequency($relevantAnswers, $questionIndex)
if(empty($password)) $table
Definition: pwgen.php:24

References $table, and 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 1139 of file class.assQuestionGUI.php.

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

References $result.

◆ getBasicEditQuestionTabCommands()

assQuestionGUI::getBasicEditQuestionTabCommands ( )
protected

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

2020 {
2021 return array('editQuestion', 'save', 'saveEdit', 'originalSyncForm');
2022 }

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

254 {
255 return $cmd;
256 }

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

1907 {
1908 $reflectionClass = new ReflectionClass($guiClassName);
1909
1910 $commands = null;
1911
1912 if ($reflectionClass instanceof ReflectionClass) {
1913 $commands = array();
1914
1915 foreach ($reflectionClass->getConstants() as $constName => $constValue) {
1916 if (substr($constName, 0, strlen($cmdConstantNameBegin)) == $cmdConstantNameBegin) {
1917 $commands[] = $constValue;
1918 }
1919 }
1920 }
1921
1922 return $commands;
1923 }

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

1063 {
1064 $path = "";
1065
1066 $tmpPath = $cont_obj->getLMTree()->getPathFull($a_endnode_id, $a_startnode_id);
1067
1068 // count -1, to exclude the learning module itself
1069 for ($i = 1; $i < (count($tmpPath) - 1); $i++) {
1070 if ($path != "") {
1071 $path .= " > ";
1072 }
1073
1074 $path .= $tmpPath[$i]["title"];
1075 }
1076
1077 return $path;
1078 }
$path
Definition: aliased.php:25

References $i, and $path.

Referenced by outPageSelector().

+ Here is the caller graph for this function:

◆ getEditContext()

assQuestionGUI::getEditContext ( )
Returns
string

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

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

References $editContext.

Referenced by isAdjustmentEditContext(), and isAuthoringEditContext().

+ Here is the caller graph for this function:

◆ getEditQuestionTabCommands()

assQuestionGUI::getEditQuestionTabCommands ( )
final

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

2015 {
2016 return array_merge($this->getBasicEditQuestionTabCommands(), $this->getAdditionalEditQuestionCommands());
2017 }

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

1101 {
1102 return $this->errormessage;
1103 }

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

2249 {
2251 }

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

1358 {
1359 $output = "";
1360 include_once "./Modules/Test/classes/class.ilObjTest.php";
1361 $manual_feedback = ilObjTest::getManualFeedback($active_id, $this->object->getId(), $pass);
1362 if (strlen($manual_feedback)) {
1363 return $manual_feedback;
1364 }
1365 $correct_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true);
1366 $incorrect_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false);
1367 if (strlen($correct_feedback . $incorrect_feedback)) {
1368 $reached_points = $this->object->calculateReachedPoints($active_id, $pass);
1369 $max_points = $this->object->getMaximumPoints();
1370 if ($reached_points == $max_points) {
1371 $output = $correct_feedback;
1372 } else {
1373 $output = $incorrect_feedback;
1374 }
1375 }
1376 return $this->object->prepareTextareaOutput($output, true);
1377 }
static getManualFeedback($active_id, $question_id, $pass)
Retrieves the manual feedback for a question in a test.

References Sabre\VObject\$output, $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 1379 of file class.assQuestionGUI.php.

1380 {
1381 return $this->object->prepareTextareaOutput(
1382 $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true),
1383 true
1384 );
1385 }

◆ getGenericFeedbackOutputForIncorrectSolution()

assQuestionGUI::getGenericFeedbackOutputForIncorrectSolution ( )

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

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

◆ getHeaderAction()

assQuestionGUI::getHeaderAction ( )

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

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

619 {
620 include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
621 $page_gui = new ilAssQuestionPageGUI($this->object->getId());
622 $page_gui->setQuestionHTML(array($this->object->getId() => $html));
623 $presentation = $page_gui->presentation();
624 $presentation = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $presentation);
625 return $presentation;
626 }
Question page GUI class.
$html
Definition: example_001.php:87

References $html.

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(), assImagemapQuestionGUI\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 399 of file class.assQuestionGUI.php.

400 {
402 }

References $navigationGUI.

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ getNotesHTML()

assQuestionGUI::getNotesHTML ( )

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

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

◆ getPresentationContext()

assQuestionGUI::getPresentationContext ( )
Returns
string

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

270 {
272 }

References $presentationContext.

Referenced by isTestPresentationContext().

+ Here is the caller graph for this function:

◆ getPreview()

◆ getPreviewSession()

◆ getPreviousSolutionConfirmationCheckboxHtml()

assQuestionGUI::getPreviousSolutionConfirmationCheckboxHtml ( )
protected

Reimplemented in assFileUploadGUI, and assImagemapQuestionGUI.

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

697 {
698 $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
699 // hey: prevPassSolutions - use abtract template
700 $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->lng->txt('use_previous_solution'));
701 // hey.
702 return $tpl->get();
703 }
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 691 of file class.assQuestionGUI.php.

692 {
693 return $this->lng->txt('use_previous_solution_advice');
694 }

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ getQuestionActionCmd()

◆ getQuestionCount()

assQuestionGUI::getQuestionCount ( )

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

1096 {
1097 return $this->question_count;
1098 }
$question_count
question count in test

References $question_count.

◆ getQuestionHeaderBlockBuilder()

assQuestionGUI::getQuestionHeaderBlockBuilder ( )
Returns
\ilQuestionHeaderBlockBuilder $questionHeaderBlockBuilder

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

588 {
589 // @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)
590 if (!$this->tpl->blockExists('content')) {
591 $this->tpl->addBlockFile("CONTENT", "content", "tpl.il_as_qpl_content.html", "Modules/TestQuestionPool");
592 }
593 // @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)
594 if (!$this->tpl->blockExists('statusline')) {
595 $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
596 }
597 // @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
598 if (!$this->tpl->blockExists('adm_content')) {
599 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_question.html", "Modules/TestQuestionPool");
600 }
601 }

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

1128 {
1129 return $this->object->getQuestionType();
1130 }

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

+ Here is the caller graph for this function:

◆ getRenderPurpose()

assQuestionGUI::getRenderPurpose ( )
Returns
string

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

309 {
311 }

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

1086 {
1087 return $this->sequence_no;
1088 }
$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 2354 of file class.assQuestionGUI.php.

2355 {
2356 return array(0);
2357 }

◆ getTargetGuiClass()

assQuestionGUI::getTargetGuiClass ( )

◆ getTaxonomyIds()

assQuestionGUI::getTaxonomyIds ( )

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

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

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

262 {
263 return $this->getQuestionType();
264 }
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 680 of file class.assQuestionGUI.php.

681 {
682 // hey: prevPassSolutions - use abstracted template to share with other purposes of this kind
683 $tpl = new ilTemplate('tpl.tst_question_additional_behaviour_checkbox.html', true, true, 'Modules/TestQuestionPool');
684 $tpl->setVariable('TXT_FORCE_FORM_DIFF_LABEL', $this->object->getTestPresentationConfig()->getUseUnchangedAnswerLabel());
685 // hey.
686 return $tpl->get();
687 }

References $tpl.

Referenced by outQuestionPage().

+ Here is the caller graph for this function:

◆ hasCorrectSolution()

◆ hasInlineFeedback()

assQuestionGUI::hasInlineFeedback ( )

this method can be overwritten per question type

Returns
bool

Reimplemented in assKprimChoiceGUI, assMultipleChoiceGUI, and assSingleChoiceGUI.

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

155 {
156 return false;
157 }

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

2138 {
2139 $result = $this->object->lookupForExistingSolutions($activeId, $passIndex);
2140 return ($result['intermediate']);
2141 }

References $result.

◆ isAdjustmentEditContext()

assQuestionGUI::isAdjustmentEditContext ( )
Parameters
bool$isAdjustmentEditContext

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

387 {
389 }

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

2350 {
2351 return true;
2352 }

Referenced by ilTestCorrectionsGUI\setCorrectionTabsContext().

+ Here is the caller graph for this function:

◆ isAuthoringEditContext()

assQuestionGUI::isAuthoringEditContext ( )
Parameters
bool$isAuthoringEditContext

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

379 {
381 }

References EDIT_CONTEXT_AUTHORING, and getEditContext().

+ Here is the call graph for this function:

◆ isAutosaveable()

assQuestionGUI::isAutosaveable ( )

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

2170 {
2171 return $this->object->isAutosaveable();
2172 }

◆ isPreviousSolutionPrefilled()

assQuestionGUI::isPreviousSolutionPrefilled ( )
Returns
boolean

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

References $previousSolutionPrefilled.

◆ isRenderPurposeDemoplay()

assQuestionGUI::isRenderPurposeDemoplay ( )

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

332 {
334 }

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

337 {
339 }

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

327 {
329 }

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

1839 {
1840 $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1841 switch ($_GET["search_link_type"]) {
1842 case "pg":
1843 return $this->outPageSelector();
1844 break;
1845 case "st":
1846 return $this->outChapterSelector();
1847 break;
1848 case "glo":
1849 return $this->outGlossarySelector();
1850 break;
1851 case "lm":
1852 $subquestion_index = ($_GET["subquestion_index"] > 0) ? $_GET["subquestion_index"] : 0;
1853 $this->object->saveSuggestedSolution("lm", "il__lm_" . $_GET["source_id"], $subquestion_index);
1854 ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), true);
1855 $this->ctrl->redirect($this, "suggestedsolution");
1856 break;
1857 }
1858 }

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

+ Here is the call graph for this function:

◆ magicAfterTestOutput()

assQuestionGUI::magicAfterTestOutput ( )

Reimplemented in assTextQuestionGUI.

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

2236 {
2237 return;
2238 }

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

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

References $template.

Referenced by suggestedsolution().

+ Here is the caller graph for this function:

◆ outAdditionalOutput()

assQuestionGUI::outAdditionalOutput ( )

Reimplemented in assTextQuestionGUI.

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

1116 {
1117 }

◆ outChapterSelector()

assQuestionGUI::outChapterSelector ( )

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

1777 {
1778 require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1779 require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1780
1781 $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1782
1783 $cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
1784 $cont_obj = $cont_obj_gui->object;
1785 $ctree = $cont_obj->getLMTree();
1786 $nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
1787
1788 $rows = array();
1789
1790 foreach ($nodes as $node) {
1791 if ($node['type'] == $_GET['search_link_type']) {
1792 $this->ctrl->setParameter($this, $node['type'], $node['obj_id']);
1793 $rows[] = array(
1794 'title' => $node['title'],
1795 'description' => '',
1796 'text_add' => $this->lng->txt('add'),
1797 'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($node['type']))
1798 );
1799 }
1800 }
1801
1802 $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1803 $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
1804 $table->setData($rows);
1805
1806 $this->tpl->setContent($table->getHTML());
1807 }
Class ilObjContentObjectGUI.
$rows
Definition: xhr_table.php:10

References $_GET, $nodes, $rows, $table, 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 1809 of file class.assQuestionGUI.php.

1810 {
1811 require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1812 require_once 'Modules/Glossary/classes/class.ilObjGlossary.php';
1813
1814 $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1815
1816 $glossary = new ilObjGlossary($_GET['source_id'], true);
1817 $terms = $glossary->getTermList();
1818
1819 $rows = array();
1820
1821 foreach ($terms as $term) {
1822 $this->ctrl->setParameter($this, 'git', $term['id']);
1823 $rows[] = array(
1824 'title' => $term['term'],
1825 'description' => '',
1826 'text_add' => $this->lng->txt('add'),
1827 'href_add' => $this->ctrl->getLinkTarget($this, 'addGIT')
1828 );
1829 }
1830
1831 $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1832 $table->setTitle($this->lng->txt('glossary_term'));
1833 $table->setData($rows);
1834
1835 $this->tpl->setContent($table->getHTML());
1836 }
Class ilObjGlossary.

References $_GET, $rows, and $table.

Referenced by linkChilds().

+ Here is the caller graph for this function:

◆ outPageSelector()

assQuestionGUI::outPageSelector ( )

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

1718 {
1719 require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1720 require_once 'Modules/LearningModule/classes/class.ilLMPageObject.php';
1721 require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
1722
1723 $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
1724
1725 $cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
1726 $cont_obj = $cont_obj_gui->object;
1727 $pages = ilLMPageObject::getPageList($cont_obj->getId());
1728 $shownpages = array();
1729 $tree = $cont_obj->getLMTree();
1730 $chapters = $tree->getSubtree($tree->getNodeData($tree->getRootId()));
1731
1732 $rows = array();
1733
1734 foreach ($chapters as $chapter) {
1735 $chapterpages = $tree->getChildsByType($chapter['obj_id'], 'pg');
1736 foreach ($chapterpages as $page) {
1737 if ($page['type'] == $_GET['search_link_type']) {
1738 array_push($shownpages, $page['obj_id']);
1739
1740 if ($tree->isInTree($page['obj_id'])) {
1741 $path_str = $this->getContextPath($cont_obj, $page['obj_id']);
1742 } else {
1743 $path_str = '---';
1744 }
1745
1746 $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1747 $rows[] = array(
1748 'title' => $page['title'],
1749 'description' => ilUtil::prepareFormOutput($path_str),
1750 'text_add' => $this->lng->txt('add'),
1751 'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1752 );
1753 }
1754 }
1755 }
1756 foreach ($pages as $page) {
1757 if (!in_array($page['obj_id'], $shownpages)) {
1758 $this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
1759 $rows[] = array(
1760 'title' => $page['title'],
1761 'description' => '---',
1762 'text_add' => $this->lng->txt('add'),
1763 'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
1764 );
1765 }
1766 }
1767
1768 require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
1769 $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
1770 $table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
1771 $table->setData($rows);
1772
1773 $this->tpl->setContent($table->getHTML());
1774 }
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, $table, $tree, 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 2200 of file class.assQuestionGUI.php.

2209 {
2210 $formaction = $this->completeTestOutputFormAction($formaction, $active_id, $pass);
2211
2212 $test_output = $this->getTestOutput(
2213 $active_id,
2214 $pass,
2215 $is_question_postponed,
2216 $user_post_solutions,
2217 $show_specific_inline_feedback
2218 );
2219
2220 $this->magicAfterTestOutput();
2221
2222 $this->tpl->setVariable("QUESTION_OUTPUT", $test_output);
2223 $this->tpl->setVariable("FORMACTION", $formaction);
2224 $this->tpl->setVariable("ENCTYPE", 'enctype="' . $this->getFormEncodingType() . '"');
2225 $this->tpl->setVariable("FORM_TIMESTAMP", time());
2226 }
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 631 of file class.assQuestionGUI.php.

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

References $html, 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 1407 of file class.assQuestionGUI.php.

1408 {
1409 $count = $this->object->isInUse();
1410
1411 if ($this->object->_questionExistsInPool($this->object->getId()) && $count) {
1412 global $DIC;
1413 $rbacsystem = $DIC['rbacsystem'];
1414 if ($rbacsystem->checkAccess("write", $_GET["ref_id"])) {
1415 ilUtil::sendInfo(sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
1416 }
1417 }
1418
1419 return assQuestion::_getQuestionTypeName($this->object->getQuestionType());
1420 }
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 1637 of file class.assQuestionGUI.php.

1638 {
1639 global $DIC;
1640 $tree = $DIC['tree'];
1641
1642 include_once("./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
1643 $type = $_GET["link_new_type"];
1644 $search = $_GET["search_link_type"];
1645 $this->ctrl->setParameter($this, "link_new_type", $type);
1646 $this->ctrl->setParameter($this, "search_link_type", $search);
1647 $this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
1648
1649 ilUtil::sendInfo($this->lng->txt("select_object_to_link"));
1650
1651 $parent_ref_id = $tree->getParentId($_GET["ref_id"]);
1652 $exp = new ilSolutionExplorer($this->ctrl->getLinkTarget($this, 'suggestedsolution'), get_class($this));
1653 $exp->setExpand($_GET['expand_sol'] ? $_GET['expand_sol'] : $parent_ref_id);
1654 $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'outSolutionExplorer'));
1655 $exp->setTargetGet("ref_id");
1656 $exp->setRefId($_GET["ref_id"]);
1657 $exp->addFilter($type);
1658 $exp->setSelectableType($type);
1659 if (isset($_GET['expandCurrentPath']) && $_GET['expandCurrentPath']) {
1660 $exp->expandPathByRefId($parent_ref_id);
1661 }
1662
1663 // build html-output
1664 $exp->setOutput(0);
1665
1666 $template = new ilTemplate("tpl.il_as_qpl_explorer.html", true, true, "Modules/TestQuestionPool");
1667 $template->setVariable("EXPLORER_TREE", $exp->getOutput());
1668 $template->setVariable("BUTTON_CANCEL", $this->lng->txt("cancel"));
1669 $template->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "suggestedsolution"));
1670 $this->tpl->setVariable("ADM_CONTENT", $template->get());
1671 }
$type

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

+ Here is the call graph for this function:

◆ populateCorrectionsFormProperties()

◆ populateJavascriptFilesRequiredForWorkForm()

assQuestionGUI::populateJavascriptFilesRequiredForWorkForm ( ilTemplate  $tpl)

Reimplemented in assMultipleChoiceGUI.

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

580 {
581 $tpl->addJavaScript('Modules/TestQuestionPool/js/ilAssMultipleChoice.js');
582 }

References $tpl.

◆ populateTaxonomyFormSection()

assQuestionGUI::populateTaxonomyFormSection ( ilPropertyFormGUI  $form)
protected

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

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

References $form, ilObject\_lookupType(), 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 2386 of file class.assQuestionGUI.php.

2387 {
2388 }

◆ redrawHeaderAction()

assQuestionGUI::redrawHeaderAction ( )

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

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

References $DIC, exit, and getHeaderAction().

+ Here is the call graph for this function:

◆ renderEditForm()

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

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

607 {
608 $this->getQuestionTemplate();
609 $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
610 }
getQuestionTemplate()
get question template

References $form, and 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 346 of file class.assQuestionGUI.php.

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

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

865 {
866 global $DIC;
867 $ilUser = $DIC['ilUser'];
868 $old_id = $_GET["q_id"];
869 $result = $this->writePostData();
870
871 if ($result == 0) {
872 $ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
873 $ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
874 $this->object->saveToDb();
875 $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
876
877
878 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
879 if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
880 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
881 $this->ctrl->setParameter($this, 'return_to', 'editQuestion');
882 $this->ctrl->redirect($this, "originalSyncForm");
883 return;
884 } elseif ($_GET["calling_test"]) {
885 require_once 'Modules/Test/classes/class.ilObjTest.php';
886 $test = new ilObjTest($_GET["calling_test"]);
887 if (!assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId())) {
888 global $DIC;
889 $tree = $DIC['tree'];
890 $ilDB = $DIC['ilDB'];
891 $ilPluginAdmin = $DIC['ilPluginAdmin'];
892
893 include_once("./Modules/Test/classes/class.ilObjTest.php");
894 $_GET["ref_id"] = $_GET["calling_test"];
895 $test = new ilObjTest($_GET["calling_test"], true);
896
897 require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
898 $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
899
900 $new_id = $test->insertQuestion(
901 $testQuestionSetConfigFactory->getQuestionSetConfig(),
902 $this->object->getId()
903 );
904
905 if (isset($_REQUEST['prev_qid'])) {
906 $test->moveQuestionAfter($this->object->getId() + 1, $_REQUEST['prev_qid']);
907 }
908
909 $this->ctrl->setParameter($this, 'q_id', $new_id);
910 $this->ctrl->setParameter($this, 'calling_test', $_GET['calling_test']);
911 #$this->ctrl->setParameter($this, 'test_ref_id', false);
912 }
913 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
914 $this->ctrl->redirect($this, 'editQuestion');
915 } else {
916 $this->callNewIdListeners($this->object->getId());
917
918 if ($this->object->getId() != $old_id) {
919 // first save
920 $this->ctrl->setParameterByClass($_GET["cmdClass"], "q_id", $this->object->getId());
921 $this->ctrl->setParameterByClass($_GET["cmdClass"], "sel_question_types", $_GET["sel_question_types"]);
922 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
923
924 //global $___test_express_mode;
928 if ($_REQUEST['prev_qid']) {
929 // @todo: bheyser/mbecker wtf? ..... thx@jposselt ....
930 // mbecker: Possible fix: Just instantiate the obj?
931 include_once("./Modules/Test/classes/class.ilObjTest.php");
932 $test = new ilObjTest($_GET["ref_id"], true);
933 $test->moveQuestionAfter($_REQUEST['prev_qid'], $this->object->getId());
934 }
935 if ( /*$___test_express_mode || */ $_REQUEST['express_mode']) {
936 global $DIC;
937 $tree = $DIC['tree'];
938 $ilDB = $DIC['ilDB'];
939 $ilPluginAdmin = $DIC['ilPluginAdmin'];
940
941 include_once("./Modules/Test/classes/class.ilObjTest.php");
942 $test = new ilObjTest($_GET["ref_id"], true);
943
944 require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
945 $testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
946
947 $test->insertQuestion(
948 $testQuestionSetConfigFactory->getQuestionSetConfig(),
949 $this->object->getId()
950 );
951
952 require_once 'Modules/Test/classes/class.ilTestExpressPage.php';
953 $_REQUEST['q_id'] = $this->object->getId();
955 }
956
957 $this->ctrl->redirectByClass($_GET["cmdClass"], "editQuestion");
958 }
959 if (strcmp($_SESSION["info"], "") != 0) {
960 ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), true);
961 } else {
962 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
963 }
964 $this->ctrl->redirect($this, 'editQuestion');
965 }
966 }
967 }
$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, $tree, 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 813 of file class.assQuestionGUI.php.

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

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

+ Here is the call graph for this function:

◆ saveReturn()

assQuestionGUI::saveReturn ( )

save question

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

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

References $_GET, $_SESSION, $DIC, $ilDB, $ilUser, $result, $test, $tree, 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 1673 of file class.assQuestionGUI.php.

1674 {
1675 global $DIC;
1676 $tree = $DIC['tree'];
1677
1678 include_once("./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
1679 switch ($_POST["solutiontype"]) {
1680 case "lm":
1681 $type = "lm";
1682 $search = "lm";
1683 break;
1684 case "git":
1685 $type = "glo";
1686 $search = "glo";
1687 break;
1688 case "st":
1689 $type = "lm";
1690 $search = "st";
1691 break;
1692 case "pg":
1693 $type = "lm";
1694 $search = "pg";
1695 break;
1696 case "file":
1697 case "text":
1698 return $this->suggestedsolution();
1699 break;
1700 default:
1701 return $this->suggestedsolution();
1702 break;
1703 }
1704 if (isset($_POST['solutiontype'])) {
1705 $this->ctrl->setParameter($this, 'expandCurrentPath', 1);
1706 }
1707 $this->ctrl->setParameter($this, "link_new_type", $type);
1708 $this->ctrl->setParameter($this, "search_link_type", $search);
1709 $this->ctrl->redirect($this, "outSolutionExplorer");
1710 }
$_POST["username"]
suggestedsolution()
Allows to add suggested solutions for questions.

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

+ Here is the call graph for this function:

◆ saveTaxonomyAssignments()

assQuestionGUI::saveTaxonomyAssignments ( )
protected

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

1287 {
1288 if (count($this->getTaxonomyIds())) {
1289 require_once 'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
1290
1291 foreach ($this->getTaxonomyIds() as $taxonomyId) {
1292 $postvar = "tax_node_assign_$taxonomyId";
1293
1294 $tax_node_assign = new ilTaxAssignInputGUI($taxonomyId, true, '', $postvar);
1295 // TODO: determine tst/qpl when tax assigns become maintainable within tests
1296 $tax_node_assign->saveInput("qpl", $this->object->getObjId(), "quest", $this->object->getId());
1297 }
1298 }
1299 }
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 391 of file class.assQuestionGUI.php.

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

References setEditContext().

+ Here is the call graph for this function:

◆ setEditContext()

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

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

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

References $editContext.

Referenced by setAdjustmentEditContext().

+ Here is the caller graph for this function:

◆ setErrorMessage()

assQuestionGUI::setErrorMessage (   $errormessage)

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

1106 {
1107 $this->errormessage = $errormessage;
1108 }

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

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

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

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

References $presentationContext.

◆ setPreviewSession()

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

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

2293 {
2294 $this->previewSession = $previewSession;
2295 }

References $previewSession.

◆ setPreviousSolutionPrefilled()

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

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

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

References $previousSolutionPrefilled.

◆ setQuestionActionCmd()

assQuestionGUI::setQuestionActionCmd (   $questionActionCmd)

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

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

References $questionActionCmd.

◆ setQuestionCount()

assQuestionGUI::setQuestionCount (   $a_question_count)

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

1091 {
1092 $this->question_count = $a_question_count;
1093 }

◆ setQuestionHeaderBlockBuilder()

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

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

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

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

1926 {
1927 global $DIC;
1928 $rbacsystem = $DIC['rbacsystem'];
1929 $ilTabs = $DIC['ilTabs'];
1930
1931 $ilTabs->clearTargets();
1932
1933 $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
1934 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
1935 $q_type = $this->object->getQuestionType();
1936
1937 if (strlen($q_type)) {
1938 $classname = $q_type . "GUI";
1939 $this->ctrl->setParameterByClass(strtolower($classname), "sel_question_types", $q_type);
1940 $this->ctrl->setParameterByClass(strtolower($classname), "q_id", $_GET["q_id"]);
1941 }
1942
1943 if ($_GET["q_id"]) {
1944 if ($rbacsystem->checkAccess('write', $_GET["ref_id"])) {
1945 // edit page
1946 $ilTabs->addTarget(
1947 "edit_page",
1948 $this->ctrl->getLinkTargetByClass("ilAssQuestionPageGUI", "edit"),
1949 array("edit", "insert", "exec_pg"),
1950 "",
1951 "",
1952 $force_active
1953 );
1954 }
1955
1956 $this->addTab_QuestionPreview($ilTabs);
1957 }
1958 $force_active = false;
1959 if ($rbacsystem->checkAccess('write', $_GET["ref_id"])) {
1960 $url = "";
1961 if ($classname) {
1962 $url = $this->ctrl->getLinkTargetByClass($classname, "editQuestion");
1963 }
1964 $force_active = false;
1965 // edit question properties
1966 $ilTabs->addTarget(
1967 "edit_question",
1968 $url,
1970 $classname,
1971 "",
1972 $force_active
1973 );
1974 }
1975
1976 // add tab for question feedback within common class assQuestionGUI
1977 $this->addTab_QuestionFeedback($ilTabs);
1978
1979 // add tab for question hint within common class assQuestionGUI
1980 $this->addTab_QuestionHints($ilTabs);
1981
1982 // add tab for question's suggested solution within common class assQuestionGUI
1983 $this->addTab_SuggestedSolution($ilTabs, $classname);
1984
1985 // Assessment of questions sub menu entry
1986 if ($_GET["q_id"]) {
1987 $ilTabs->addTarget(
1988 "statistics",
1989 $this->ctrl->getLinkTargetByClass($classname, "assessment"),
1990 array("assessment"),
1991 $classname,
1992 ""
1993 );
1994 }
1995
1996 $this->addBackTab($ilTabs);
1997 }
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 316 of file class.assQuestionGUI.php.

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

References $renderPurpose.

Referenced by suggestedsolution().

+ Here is the caller graph for this function:

◆ setSequenceNumber()

assQuestionGUI::setSequenceNumber (   $nr)

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

1081 {
1082 $this->sequence_no = $nr;
1083 }

◆ setTargetGui()

assQuestionGUI::setTargetGui (   $linkTargetGui)

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

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

References setTargetGuiClass().

+ Here is the call graph for this function:

◆ setTargetGuiClass()

assQuestionGUI::setTargetGuiClass (   $targetGuiClass)

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

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

References $targetGuiClass.

Referenced by setTargetGui().

+ Here is the caller graph for this function:

◆ setTaxonomyIds()

assQuestionGUI::setTaxonomyIds (   $taxonomyIds)

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

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

References $taxonomyIds.

◆ setUseIntermediateSolution()

assQuestionGUI::setUseIntermediateSolution (   $use)

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

2148 {
2149 $this->use_intermediate_solution = (bool) $use;
2150 }

◆ showHints()

assQuestionGUI::showHints ( )

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

2326 {
2327 global $DIC;
2328 $ilCtrl = $DIC['ilCtrl'];
2329 $ilCtrl->redirectByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
2330 }

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

◆ showSuggestedSolution()

assQuestionGUI::showSuggestedSolution ( )

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

1423 {
1424 $this->suggestedsolution();
1425 }

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

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

2127 {
2128 return false;
2129 }

◆ sync()

assQuestionGUI::sync ( )

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

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

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

474 {
475 }

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

+ Here is the caller graph for this function:

◆ writeQuestionGenericPostData()

assQuestionGUI::writeQuestionGenericPostData ( )
protected

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

2175 {
2176 $this->object->setTitle($_POST["title"]);
2177 $this->object->setAuthor($_POST["author"]);
2178 $this->object->setComment($_POST["comment"]);
2179 if ($this->object->getSelfAssessmentEditingMode()) {
2180 $this->object->setNrOfTries($_POST['nr_of_tries']);
2181 }
2182 $this->object->setQuestion(ilUtil::stripOnlySlashes($_POST['question'])); // ?
2183 $this->object->setEstimatedWorkingTime(
2184 $_POST["Estimated"]["hh"],
2185 $_POST["Estimated"]["mm"],
2186 $_POST["Estimated"]["ss"]
2187 );
2188 }
static stripOnlySlashes($a_str)
strip slashes if magic qoutes is enabled

References $_POST, 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 94 of file class.assQuestionGUI.php.

Referenced by getEditContext(), and setEditContext().

◆ $editForm

assQuestionGUI::$editForm
protected

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

Referenced by buildEditForm().

◆ $error

assQuestionGUI::$error

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

◆ $errormessage

assQuestionGUI::$errormessage

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

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

◆ $lng

assQuestionGUI::$lng

◆ $navigationGUI

assQuestionGUI::$navigationGUI
private

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

Referenced by getPresentationContext(), and setPresentationContext().

◆ $previewSession

assQuestionGUI::$previewSession
private

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

Referenced by getQuestionCount().

◆ $questionActionCmd

assQuestionGUI::$questionActionCmd = 'handleQuestionAction'
private

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

Referenced by getRenderPurpose(), and setRenderPurpose().

◆ $sequence_no

assQuestionGUI::$sequence_no

sequence number in test

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

Referenced by getSequenceNumber().

◆ $targetGuiClass

assQuestionGUI::$targetGuiClass = null
private

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

Referenced by getTargetGuiClass(), and setTargetGuiClass().

◆ $taxonomyIds

assQuestionGUI::$taxonomyIds = array()
private

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

Referenced by getTaxonomyIds(), and setTaxonomyIds().

◆ $tpl

◆ $use_intermediate_solution

assQuestionGUI::$use_intermediate_solution = false
protected

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

Referenced by getUseIntermediateSolution().

◆ EDIT_CONTEXT_ADJUSTMENT

const assQuestionGUI::EDIT_CONTEXT_ADJUSTMENT = 'adjustment'

Definition at line 89 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 70 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 81 of file class.assQuestionGUI.php.

Referenced by isRenderPurposeInputValue().

◆ RENDER_PURPOSE_PLAYBACK

const assQuestionGUI::RENDER_PURPOSE_PLAYBACK = 'renderPurposePlayback'

Definition at line 77 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: