ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
assQuestionGUI Class Reference

Basic GUI class for assessment questions. More...

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

Public Member Functions

 __construct ()
 assQuestionGUI constructor
executeCommand ()
 execute command
 getCommand ($cmd)
 getType ()
 needed for page editor compliance
 setTaxonomyIds ($taxonomyIds)
 getTaxonomyIds ()
 setTargetGui ($linkTargetGui)
 setTargetGuiClass ($targetGuiClass)
 getTargetGuiClass ()
 setQuestionHeaderBlockBuilder ($questionHeaderBlockBuilder)
 setQuestionActionCmd ($questionActionCmd)
 getQuestionActionCmd ()
_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.
 _getGUIClassNameForId ($a_q_id)
 _getClassNameForQType ($q_type)
createQuestionGUI ($question_type, $question_id=-1)
 Creates a question gui representation.
 getQuestionTemplate ()
 get question template
 getILIASPage ($html="")
 Returns the ILIAS Page around a question.
 outQuestionPage ($a_temp_var, $a_postponed=false, $active_id="", $html="")
 output question page
 cancel ()
 cancel action
 originalSyncForm ($return_to="", $return_to_feedback= '')
 sync ()
 cancelSync ()
 saveEdit ()
 save question
 save ()
 save question
 saveReturn ()
 save question
 apply ()
 apply changes
 getContextPath ($cont_obj, $a_endnode_id, $a_startnode_id=1)
 get context path in content object tree
 setSequenceNumber ($nr)
 getSequenceNumber ()
 setQuestionCount ($a_question_count)
 getQuestionCount ()
 getErrorMessage ()
 setErrorMessage ($errormessage)
 addErrorMessage ($errormessage)
 outAdditionalOutput ()
 getQuestionType ()
 Returns the question type string.
 getAsValueAttribute ($a_value)
 Returns a HTML value attribute.
 addNewIdListener (&$a_object, $a_method, $a_parameters="")
 Add a listener that is notified with the new question ID, when a new question is saved.
 callNewIdListeners ($a_new_id)
 Call the new id listeners.
 addQuestionFormCommandButtons ($form)
 Add the command buttons of a question properties form.
 addBasicQuestionFormProperties ($form)
 Add basic question form properties: assessment: title, author, description, question, working time.
 getSelfAssessmentTags ()
 Get tags allowed in question tags in self assessment mode.
 getAnswerFeedbackOutput ($active_id, $pass)
 Returns the answer generic feedback depending on the results of the question.
 getGenericFeedbackOutput ($active_id, $pass)
 Returns the answer specific feedback for the question.
 getGenericFeedbackOutputForCorrectSolution ()
 getGenericFeedbackOutputForIncorrectSolution ()
 getSpecificFeedbackOutput ($active_id, $pass)
 Returns the answer specific feedback for the question.
 outQuestionType ()
 showSuggestedSolution ()
 suggestedsolution ()
 Allows to add suggested solutions for questions.
 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)
 isAutosaveable ()
 getPreview ($show_question_only=FALSE, $showInlineFeedback=false)
 outQuestionForTest ($formaction, $active_id, $pass=NULL, $is_question_postponed=FALSE, $user_post_solutions=FALSE, $show_specific_inline_feedback=FALSE)
 setPreviewSession ($previewSession)
 getPreviewSession ()
 showHints ()

Static Public Member Functions

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

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
 $question_count
 question count in test

Protected Member Functions

 writePostData ()
 Evaluates a posted edit form and writes the form data in the question object.
 saveTaxonomyAssignments ()
 populateTaxonomyFormSection (ilPropertyFormGUI $form)
 getBasicEditQuestionTabCommands ()
 getAdditionalEditQuestionCommands ()
 addTab_QuestionFeedback (ilTabsGUI $tabs)
 adds the feedback tab to ilTabsGUI
 addTab_QuestionHints (ilTabsGUI $tabs)
 adds the hints tab to ilTabsGUI
 addTab_QuestionPreview (ilTabsGUI $tabsGUI)
 writeQuestionGenericPostData ()
 getFormEncodingType ()
 addBackTab (ilTabsGUI $ilTabs)
 buildBasicEditFormObject ()

Private Attributes

 $taxonomyIds = array()
 $targetGuiClass = null
 $questionActionCmd = 'handleQuestionAction'
 $questionHeaderBlockBuilder
 $previewSession

Detailed Description

Basic GUI class for assessment questions.

The assQuestionGUI class encapsulates basic GUI functions for assessment questions.

assQuestionGUI: ilAssQuestionPageGUI

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:
class.assQuestionGUI.php 61294 2015-11-04 10:20:13Z gitmgr

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

Constructor & Destructor Documentation

assQuestionGUI::__construct ( )

assQuestionGUI constructor

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

References $ilCtrl, $lng, and $tpl.

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

{
global $lng, $tpl, $ilCtrl;
$this->lng =& $lng;
$this->tpl =& $tpl;
$this->ctrl =& $ilCtrl;
$this->ctrl->saveParameter($this, "q_id");
$this->ctrl->saveParameter($this, "prev_qid");
$this->ctrl->saveParameter($this, "calling_test");
$this->ctrl->saveParameter($this, "calling_consumer");
$this->ctrl->saveParameter($this, "consumer_context");
$this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'test_express_mode');
$this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'calling_consumer');
$this->ctrl->saveParameterByClass('ilAssQuestionPageGUI', 'consumer_context');
$this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'test_express_mode');
$this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'calling_consumer');
$this->ctrl->saveParameterByClass('ilobjquestionpoolgui', 'consumer_context');
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$this->errormessage = $this->lng->txt("fill_out_all_required_fields");
$this->selfassessmenteditingmode = false;
$this->new_id_listeners = array();
$this->new_id_listener_cnt = 0;
}

+ Here is the caller graph for this function:

Member Function Documentation

assQuestionGUI::_getClassNameForQType (   $q_type)
Deprecated:

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

Referenced by _getGUIClassNameForId().

{
return $q_type . "GUI";
}

+ Here is the caller graph for this function:

assQuestionGUI::_getGUIClassNameForId (   $a_q_id)
Deprecated:

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

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

Referenced by ilQuestionBrowserTableGUI\fillRow().

{
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$class_name = assQuestionGUI::_getClassNameForQType($q_type);
return $class_name;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& assQuestionGUI::_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.

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

References $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(), ilTestExpressPageObjectGUI\executeCommand(), ilObjQuestionPoolGUI\executeCommand(), ilObjTestGUI\executeCommand(), ilQuestionEditGUI\executeCommand(), ilPageObjectGUI\executeCommand(), ilSCORM2004Asset\exportHTMLPageObjects(), ilQuestionExporter\exportQuestion(), ilSCORM2004PageGUI\getQuestionHtmlOfPage(), ilTestExpressPageObjectGUI\handleToolbarCommand(), ilPCQuestion\modifyPageContentPostXsl(), and ilObjQuestionPoolGUI\setTitleAndDescription().

{
global $ilCtrl, $ilDB, $lng;
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
if ((!$question_type) and ($question_id > 0))
{
$question_type = assQuestion::getQuestionTypeFromDb($question_id);
}
if (strlen($question_type) == 0) return NULL;
assQuestion::_includeClass($question_type, 1);
$question_type_gui = assQuestion::getGuiClassNameByQuestionType($question_type);
$question =& new $question_type_gui();
$feedbackObjectClassname = assQuestion::getFeedbackClassNameByQuestionType($question_type);
$question->object->feedbackOBJ = new $feedbackObjectClassname($question->object, $ilCtrl, $ilDB, $lng);
if ($question_id > 0)
{
$question->object->loadFromDb($question_id);
}
return $question;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

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

{
if(($_GET["calling_test"] > 0) || ($_GET["test_ref_id"] > 0))
{
$ref_id = $_GET["calling_test"];
if(strlen($ref_id) == 0) $ref_id = $_GET["test_ref_id"];
if(!$_GET['test_express_mode'] && !$GLOBALS['___test_express_mode'])
{
$ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), "ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=$ref_id");
}
else
{
$ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), $link);
}
}
else if(isset($_GET['calling_consumer']) && (int)$_GET['calling_consumer'])
{
$ref_id = (int)$_GET['calling_consumer'];
if($consumer instanceof ilQuestionEditingFormConsumer)
{
$ilTabs->setBackTarget($consumer->getQuestionEditingFormBackTargetLabel(), $consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
}
else
{
require_once 'Services/Link/classes/class.ilLink.php';
$ilTabs->setBackTarget($this->lng->txt("qpl"), ilLink::_getLink($ref_id));
}
}
else
{
$ilTabs->setBackTarget($this->lng->txt("qpl"), $this->ctrl->getLinkTargetByClass("ilobjquestionpoolgui", "questions"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::addBasicQuestionFormProperties (   $form)

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

Returns
int Default Nr of Tries

Reimplemented in assClozeTestGUI.

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

References ilObjAdvancedEditing\_getUsedHTMLTags(), assQuestion\ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT, ilUtil\prepareFormOutput(), ilTextInputGUI\setMaxLength(), ilDurationInputGUI\setShowHours(), ilTextInputGUI\setValue(), ilNumberInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

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

{
// title
$title = new ilTextInputGUI($this->lng->txt("title"), "title");
$title->setMaxLength(100);
$title->setValue($this->object->getTitle());
$title->setRequired(TRUE);
$form->addItem($title);
if (!$this->object->getSelfAssessmentEditingMode())
{
// author
$author = new ilTextInputGUI($this->lng->txt("author"), "author");
$author->setValue($this->object->getAuthor());
$author->setRequired(TRUE);
$form->addItem($author);
// description
$description = new ilTextInputGUI($this->lng->txt("description"), "comment");
$description->setValue($this->object->getComment());
$description->setRequired(FALSE);
$form->addItem($description);
}
else
{
// author as hidden field
$hi = new ilHiddenInputGUI("author");
$author = ilUtil::prepareFormOutput($this->object->getAuthor());
if (trim($author) == "")
{
$author = "-";
}
$hi->setValue($author);
$form->addItem($hi);
}
// questiontext
$question = new ilTextAreaInputGUI($this->lng->txt("question"), "question");
$question->setValue($this->object->prepareTextareaOutput($this->object->getQuestion()));
$question->setRequired(TRUE);
$question->setRows(10);
$question->setCols(80);
if (!$this->object->getSelfAssessmentEditingMode())
{
if( $this->object->getAdditionalContentEditingMode() != assQuestion::ADDITIONAL_CONTENT_EDITING_MODE_PAGE_OBJECT )
{
$question->setUseRte(TRUE);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$question->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
$question->addPlugin("latex");
$question->addButton("latex");
$question->addButton("pastelatex");
$question->setRTESupport($this->object->getId(), "qpl", "assessment");
}
}
else
{
$question->setRteTags(self::getSelfAssessmentTags());
$question->setUseTagsForRteOnly(false);
}
$form->addItem($question);
if (!$this->object->getSelfAssessmentEditingMode())
{
// duration
$duration = new ilDurationInputGUI($this->lng->txt("working_time"), "Estimated");
$duration->setShowHours(TRUE);
$duration->setShowMinutes(TRUE);
$duration->setShowSeconds(TRUE);
$ewt = $this->object->getEstimatedWorkingTime();
$duration->setHours($ewt["h"]);
$duration->setMinutes($ewt["m"]);
$duration->setSeconds($ewt["s"]);
$duration->setRequired(FALSE);
$form->addItem($duration);
}
else
{
// number of tries
if (strlen($this->object->getNrOfTries()))
{
$nr_tries = $this->object->getNrOfTries();
}
else
{
$nr_tries = $this->object->getDefaultNrOfTries();
}
if ($nr_tries < 1)
{
$nr_tries = "";
}
$ni = new ilNumberInputGUI($this->lng->txt("qst_nr_of_tries"), "nr_of_tries");
$ni->setValue($nr_tries);
$ni->setMinValue(0);
$ni->setSize(5);
$ni->setMaxLength(5);
$form->addItem($ni);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::addErrorMessage (   $errormessage)

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

References $errormessage.

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

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

+ Here is the caller graph for this function:

assQuestionGUI::addGIT ( )

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

References $_GET, and ilUtil\sendSuccess().

{
$subquestion_index = 0;
if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0)
{
$subquestion_index = $_GET["subquestion_index"];
}
$this->object->saveSuggestedSolution("git", "il__git_" . $_GET["git"], $subquestion_index);
ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), TRUE);
$this->ctrl->redirect($this, "suggestedsolution");
}

+ Here is the call graph for this function:

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

{
$cnt = $this->new_id_listener_cnt;
$this->new_id_listeners[$cnt]["object"] =& $a_object;
$this->new_id_listeners[$cnt]["method"] = $a_method;
$this->new_id_listeners[$cnt]["parameters"] = $a_parameters;
$this->new_id_listener_cnt++;
}
assQuestionGUI::addPG ( )

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

References $_GET, and ilUtil\sendSuccess().

{
$subquestion_index = 0;
if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0)
{
$subquestion_index = $_GET["subquestion_index"];
}
$this->object->saveSuggestedSolution("pg", "il__pg_" . $_GET["pg"], $subquestion_index);
ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), TRUE);
$this->ctrl->redirect($this, "suggestedsolution");
}

+ Here is the call graph for this function:

assQuestionGUI::addQuestionFormCommandButtons (   $form)

Add the command buttons of a question properties form.

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

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

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

+ Here is the caller graph for this function:

assQuestionGUI::addST ( )

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

References $_GET, and ilUtil\sendSuccess().

{
$subquestion_index = 0;
if (strlen($_GET["subquestion_index"]) && $_GET["subquestion_index"] >= 0)
{
$subquestion_index = $_GET["subquestion_index"];
}
$this->object->saveSuggestedSolution("st", "il__st_" . $_GET["st"], $subquestion_index);
ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), TRUE);
$this->ctrl->redirect($this, "suggestedsolution");
}

+ Here is the call graph for this function:

assQuestionGUI::addTab_QuestionFeedback ( ilTabsGUI  $tabs)
protected

adds the feedback tab to ilTabsGUI

ilCtrl $ilCtrl

Parameters
ilTabsGUI$tabs

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

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

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

{
global $ilCtrl;
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
$tabCommands = self::getCommandsFromClassConstants('ilAssQuestionFeedbackEditingGUI');
$tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
$tabs->addTarget('tst_feedback', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::addTab_QuestionHints ( ilTabsGUI  $tabs)
protected

adds the hints tab to ilTabsGUI

ilCtrl $ilCtrl

Parameters
ilTabsGUI$tabs

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

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

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

{
global $ilCtrl;
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintsGUI.php';
switch( $ilCtrl->getCmdClass() )
{
case 'ilassquestionhintsgui':
$tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintsGUI');
break;
case 'ilassquestionhintgui':
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintGUI.php';
$tabCommands = self::getCommandsFromClassConstants('ilAssQuestionHintGUI');
break;
default:
$tabCommands = array();
}
$tabLink = $ilCtrl->getLinkTargetByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
$tabs->addTarget('tst_question_hints_tab', $tabLink, $tabCommands, $ilCtrl->getCmdClass(), '');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References $_GET, and ilTabsGUI\addTarget().

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

{
if ($_GET["q_id"])
{
$tabs->addTarget("suggested_solution",
$this->ctrl->getLinkTargetByClass($classname, "suggestedsolution"),
array("suggestedsolution", "saveSuggestedSolution", "outSolutionExplorer", "cancel",
"addSuggestedSolution","cancelExplorer", "linkChilds", "removeSuggestedSolution"
),
$classname,
""
);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::apply ( )

apply changes

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

References writePostData().

{
$this->writePostData();
$this->object->saveToDb();
$this->ctrl->setParameter($this, "q_id", $this->object->getId());
$this->editQuestion();
}

+ Here is the call graph for this function:

assQuestionGUI::buildBasicEditFormObject ( )
protected
Returns
ilPropertyFormGUI

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

References getType(), and outQuestionType().

Referenced by assKprimChoiceGUI\buildEditForm().

{
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setId($this->getType());
$form->setTitle($this->outQuestionType());
$form->setTableWidth('100%');
$form->setMultipart(true);
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::callNewIdListeners (   $a_new_id)

Call the new id listeners.

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

References $object.

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

{
for ($i=0; $i<$this->new_id_listener_cnt; $i++)
{
$this->new_id_listeners[$i]["parameters"]["new_id"] = $a_new_id;
$object =& $this->new_id_listeners[$i]["object"];
$method = $this->new_id_listeners[$i]["method"];
$parameters = $this->new_id_listeners[$i]["parameters"];
//var_dump($object);
//var_dump($method);
//var_dump($parameters);
$object->$method($parameters);
}
}

+ Here is the caller graph for this function:

assQuestionGUI::cancel ( )

cancel action

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

References $_GET, and ilUtil\redirect().

{
if ($_GET["calling_test"])
{
$_GET["ref_id"] = $_GET["calling_test"];
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET["calling_test"]);
}
elseif ($_GET["test_ref_id"])
{
$_GET["ref_id"] = $_GET["test_ref_id"];
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET["test_ref_id"]);
}
else
{
if ($_GET["q_id"] > 0)
{
$this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
$this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
}
else
{
$this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
}
}
}

+ Here is the call graph for this function:

assQuestionGUI::cancelExplorer ( )

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

{
$this->ctrl->redirect($this, "suggestedsolution");
}
assQuestionGUI::cancelSync ( )

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

References $_GET, $_REQUEST, $ref_id, ilLink\_getLink(), ilObjectFactory\getInstanceByRefId(), and ilUtil\redirect().

{
if (strlen($_GET["return_to"]))
{
$this->ctrl->redirect($this, $_GET["return_to"]);
}
if(strlen($_REQUEST['return_to_fb']))
{
$this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', 'showFeedbackForm');
}
else
{
if(isset($_GET['calling_consumer']) && (int)$_GET['calling_consumer'])
{
$ref_id = (int)$_GET['calling_consumer'];
if($consumer instanceof ilQuestionEditingFormConsumer)
{
ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
}
require_once 'Services/Link/classes/class.ilLink.php';
}
$_GET["ref_id"] = $_GET["calling_test"];
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET["calling_test"]);
}
}

+ Here is the call graph for this function:

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

Creates a question gui representation.

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

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

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

References _getQuestionGUI().

{
include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$this->question =& assQuestionGUI::_getQuestionGUI($question_type, $question_id);
}

+ Here is the call graph for this function:

& assQuestionGUI::executeCommand ( )

execute command

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

References $cmd, $ret, and getCommand().

{
$cmd = $this->ctrl->getCmd("editQuestion");
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->getCommand($cmd);
switch($next_class)
{
default:
$ret =& $this->$cmd();
break;
}
return $ret;
}

+ Here is the call graph for this function:

assQuestionGUI::getAdditionalEditQuestionCommands ( )
protected

Reimplemented in assKprimChoiceGUI.

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

Referenced by getEditQuestionTabCommands().

{
return array();
}

+ Here is the caller graph for this function:

assQuestionGUI::getAnswerFeedbackOutput (   $active_id,
  $pass 
)

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

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

Reimplemented in assClozeTestGUI.

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

References $pass, and getGenericFeedbackOutput().

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

{
return $this->getGenericFeedbackOutput($active_id, $pass);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::getAsValueAttribute (   $a_value)

Returns a HTML value attribute.

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

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

References $result.

{
$result = "";
if (strlen($a_value))
{
$result = " value=\"$a_value\" ";
}
return $result;
}
assQuestionGUI::getBasicEditQuestionTabCommands ( )
protected

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

Referenced by getEditQuestionTabCommands().

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

+ Here is the caller graph for this function:

assQuestionGUI::getCommand (   $cmd)

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

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

References $cmd.

Referenced by executeCommand().

{
return $cmd;
}

+ Here is the caller graph for this function:

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

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

{
$reflectionClass = new ReflectionClass($guiClassName);
$commands = null;
if( $reflectionClass instanceof ReflectionClass )
{
$commands = array();
foreach($reflectionClass->getConstants() as $constName => $constValue)
{
if( substr($constName, 0, strlen($cmdConstantNameBegin)) == $cmdConstantNameBegin )
{
$commands[] = $constValue;
}
}
}
return $commands;
}

+ Here is the caller graph for this function:

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

References $path.

Referenced by outPageSelector().

{
$path = "";
$tmpPath = $cont_obj->getLMTree()->getPathFull($a_endnode_id, $a_startnode_id);
// count -1, to exclude the learning module itself
for ($i = 1; $i < (count($tmpPath) - 1); $i++)
{
if ($path != "")
{
$path .= " > ";
}
$path .= $tmpPath[$i]["title"];
}
return $path;
}

+ Here is the caller graph for this function:

assQuestionGUI::getEditQuestionTabCommands ( )
final

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

References getAdditionalEditQuestionCommands(), and getBasicEditQuestionTabCommands().

Referenced by setQuestionTabs().

{
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::getErrorMessage ( )

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

References $errormessage.

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

{
}

+ Here is the caller graph for this function:

assQuestionGUI::getFormEncodingType ( )
protected

Reimplemented in assFileUploadGUI.

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

References FORM_ENCODING_URLENCODE.

Referenced by outQuestionForTest().

+ Here is the caller graph for this function:

assQuestionGUI::getGenericFeedbackOutput (   $active_id,
  $pass 
)

Returns the answer specific feedback for the question.

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

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

References $pass, and ilObjTest\getManualFeedback().

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

{
$output = "";
include_once "./Modules/Test/classes/class.ilObjTest.php";
$manual_feedback = ilObjTest::getManualFeedback($active_id, $this->object->getId(), $pass);
if (strlen($manual_feedback))
{
return $manual_feedback;
}
$correct_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true);
$incorrect_feedback = $this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false);
if (strlen($correct_feedback.$incorrect_feedback))
{
$reached_points = $this->object->calculateReachedPoints($active_id, $pass);
$max_points = $this->object->getMaximumPoints();
if ($reached_points == $max_points)
{
$output = $correct_feedback;
}
else
{
$output = $incorrect_feedback;
}
}
return $this->object->prepareTextareaOutput($output, TRUE);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::getGenericFeedbackOutputForCorrectSolution ( )

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

{
return $this->object->prepareTextareaOutput(
$this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), true), true
);
}
assQuestionGUI::getGenericFeedbackOutputForIncorrectSolution ( )

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

{
return $this->object->prepareTextareaOutput(
$this->object->feedbackOBJ->getGenericFeedbackTestPresentation($this->object->getId(), false), true
);
}
assQuestionGUI::getILIASPage (   $html = "")

Returns the ILIAS Page around a question.

Returns
string The ILIAS page content public

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

References ilPageObjectGUI\setQuestionHTML().

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

{
include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
$page_gui = new ilAssQuestionPageGUI($this->object->getId());
$page_gui->setQuestionHTML(array($this->object->getId() => $html));
$page_gui->setOutputMode("presentation");
$presentation = $page_gui->presentation();
$presentation = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $presentation);
return $presentation;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::getQuestionActionCmd ( )
assQuestionGUI::getQuestionCount ( )

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

References $question_count.

Referenced by outQuestionPage().

{
}

+ Here is the caller graph for this function:

assQuestionGUI::getQuestionTemplate ( )

get question template

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

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

{
$this->tpl->addBlockFile("CONTENT", "content", "tpl.il_as_qpl_content.html", "Modules/TestQuestionPool");
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_question.html", "Modules/TestQuestionPool");
}

+ Here is the caller graph for this function:

assQuestionGUI::getQuestionType ( )

Returns the question type string.

Returns the question type string

Returns
string The question type string public

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

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

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

+ Here is the caller graph for this function:

assQuestionGUI::getSelfAssessmentTags ( )

Get tags allowed in question tags in self assessment mode.

Returns
array array of tags

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

References ilUtil\getSecureTags().

Referenced by ilPCQuestion\copyPoolQuestionIntoPage().

{
// set tags we allow in self assessment mode
// we allow these tags, since they are typically used in the Tiny Assessment editor
// and should not be deleted, if questions are copied from pools to learning modules
$not_supported = array("img", "p");
$tags = array();
foreach ($st as $s)
{
if (!in_array($s, $not_supported))
{
$tags[] = $s;
}
}
return $tags;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::getSequenceNumber ( )

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

References $sequence_no.

Referenced by outQuestionPage().

{
}

+ Here is the caller graph for this function:

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
assQuestionGUI::getSpecificFeedbackOutput (   $active_id,
  $pass 
)
abstract

Returns the answer specific feedback for the question.

This method should be overwritten by the actual question.

Todo:
Mark this method abstract!
Parameters
integer$active_idActive ID of the user
integer$passActive pass
Returns
string HTML Code with the answer specific feedback public

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

assQuestionGUI::getTargetGuiClass ( )
assQuestionGUI::getTaxonomyIds ( )

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

References $taxonomyIds.

Referenced by populateTaxonomyFormSection(), and saveTaxonomyAssignments().

{
}

+ Here is the caller graph for this function:

assQuestionGUI::getType ( )

needed for page editor compliance

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

References getQuestionType().

Referenced by buildBasicEditFormObject().

{
return $this->getQuestionType();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::isAutosaveable ( )

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

{
return $this->object->isAutosaveable();
}
assQuestionGUI::linkChilds ( )

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

References $_GET, outChapterSelector(), outGlossarySelector(), outPageSelector(), and ilUtil\sendSuccess().

{
$this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
switch ($_GET["search_link_type"])
{
case "pg":
return $this->outPageSelector();
break;
case "st":
return $this->outChapterSelector();
break;
case "glo":
return $this->outGlossarySelector();
break;
case "lm":
$subquestion_index = ($_GET["subquestion_index"] > 0) ? $_GET["subquestion_index"] : 0;
$this->object->saveSuggestedSolution("lm", "il__lm_" . $_GET["source_id"], $subquestion_index);
ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), TRUE);
$this->ctrl->redirect($this, "suggestedsolution");
break;
}
}

+ Here is the call graph for this function:

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

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

References $_REQUEST.

Referenced by suggestedsolution().

{
if (strlen($return_to))
{
$this->ctrl->setParameter($this, "return_to", $return_to);
}
else if ($_REQUEST['return_to']) {
$this->ctrl->setParameter($this, "return_to", $_REQUEST['return_to']);
}
if(strlen($return_to_feedback))
{
$this->ctrl->setParameter($this, 'return_to_fb', 'true');
}
$template = new ilTemplate("tpl.il_as_qpl_sync_original.html",TRUE, TRUE, "Modules/TestQuestionPool");
$template->setVariable("BUTTON_YES", $this->lng->txt("yes"));
$template->setVariable("BUTTON_NO", $this->lng->txt("no"));
$template->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
$template->setVariable("TEXT_SYNC", $this->lng->txt("confirm_sync_questions"));
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}

+ Here is the caller graph for this function:

assQuestionGUI::outAdditionalOutput ( )

Reimplemented in assTextQuestionGUI.

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

{
}
assQuestionGUI::outChapterSelector ( )

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

References $_GET, and ilUtil\stripSlashes().

Referenced by linkChilds().

{
require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
$this->ctrl->setParameter($this, 'q_id', $this->object->getId());
$cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
$cont_obj = $cont_obj_gui->object;
$ctree = $cont_obj->getLMTree();
$nodes = $ctree->getSubtree($ctree->getNodeData($ctree->getRootId()));
$rows = array();
foreach($nodes as $node)
{
if($node['type'] == $_GET['search_link_type'])
{
$this->ctrl->setParameter($this, $node['type'], $node['obj_id']);
$rows[] = array(
'title' => $node['title'],
'description' => '',
'text_add' => $this->lng->txt('add'),
'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($node['type']))
);
}
}
$table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
$table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
$table->setData($rows);
$this->tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::outGlossarySelector ( )

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

References $_GET.

Referenced by linkChilds().

{
require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
require_once 'Modules/Glossary/classes/class.ilObjGlossary.php';
$this->ctrl->setParameter($this, 'q_id', $this->object->getId());
$glossary = new ilObjGlossary($_GET['source_id'], true);
$terms = $glossary->getTermList();
$rows = array();
foreach($terms as $term)
{
$this->ctrl->setParameter($this, 'git', $term['id']);
$rows[] = array(
'title' => $term['term'],
'description' => '',
'text_add' => $this->lng->txt('add'),
'href_add' => $this->ctrl->getLinkTarget($this, 'addGIT')
);
}
$table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
$table->setTitle($this->lng->txt('glossary_term'));
$table->setData($rows);
$this->tpl->setContent($table->getHTML());
}

+ Here is the caller graph for this function:

assQuestionGUI::outPageSelector ( )

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

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

Referenced by linkChilds().

{
require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
require_once 'Modules/LearningModule/classes/class.ilLMPageObject.php';
require_once 'Modules/LearningModule/classes/class.ilObjContentObjectGUI.php';
$this->ctrl->setParameter($this, 'q_id', $this->object->getId());
$cont_obj_gui = new ilObjContentObjectGUI('', $_GET['source_id'], true);
$cont_obj = $cont_obj_gui->object;
$pages = ilLMPageObject::getPageList($cont_obj->getId());
$shownpages = array();
$tree = $cont_obj->getLMTree();
$chapters = $tree->getSubtree($tree->getNodeData($tree->getRootId()));
$rows = array();
foreach($chapters as $chapter)
{
$chapterpages = $tree->getChildsByType($chapter['obj_id'], 'pg');
foreach($chapterpages as $page)
{
if($page['type'] == $_GET['search_link_type'])
{
array_push($shownpages, $page['obj_id']);
if($tree->isInTree($page['obj_id']))
{
$path_str = $this->getContextPath($cont_obj, $page['obj_id']);
}
else
{
$path_str = '---';
}
$this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
$rows[] = array(
'title' => $page['title'],
'description' => ilUtil::prepareFormOutput($path_str),
'text_add' => $this->lng->txt('add'),
'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
);
}
}
}
foreach($pages as $page)
{
if(!in_array($page['obj_id'], $shownpages))
{
$this->ctrl->setParameter($this, $page['type'], $page['obj_id']);
$rows[] = array(
'title' => $page['title'],
'description' => '---',
'text_add' => $this->lng->txt('add'),
'href_add' => $this->ctrl->getLinkTarget($this, 'add' . strtoupper($page['type']))
);
}
}
require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
$table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
$table->setTitle($this->lng->txt('obj_' . ilUtil::stripSlashes($_GET['search_link_type'])));
$table->setData($rows);
$this->tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented in assImagemapQuestionGUI.

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

References $pass, and getFormEncodingType().

{
$test_output = $this->getTestOutput(
$active_id,
$is_question_postponed,
$user_post_solutions,
$show_specific_inline_feedback
);
$this->tpl->setVariable("QUESTION_OUTPUT", $test_output);
$this->tpl->setVariable("FORMACTION", $formaction);
$this->tpl->setVariable("ENCTYPE", 'enctype="'.$this->getFormEncodingType().'"');
}

+ Here is the call graph for this function:

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

output question page

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

References ilObjTest\_getTitleOutput(), getQuestionCount(), getSequenceNumber(), ilObjTest\isQuestionObligatory(), and ilPageObjectGUI\setTemplateTargetVar().

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

{
$postponed = "";
if ($a_postponed)
{
$postponed = " (" . $this->lng->txt("postponed") . ")";
}
include_once("./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php");
$this->lng->loadLanguageModule("content");
$page_gui = new ilAssQuestionPageGUI($this->object->getId());
$page_gui->setTemplateTargetVar($a_temp_var);
if (strlen($html))
{
$page_gui->setQuestionHTML(array($this->object->getId() => $html));
}
$page_gui->setOutputMode("presentation");
include_once "./Modules/Test/classes/class.ilObjTest.php";
$title_output = ilObjTest::_getTitleOutput($active_id);
if( $this->object->areObligationsToBeConsidered() && ilObjTest::isQuestionObligatory($this->object->getId()) )
{
$obligatoryString = '([-_-])';
}
else
{
$obligatoryString = '';
}
switch ($title_output)
{
case 1:
$page_gui->setPresentationTitle(sprintf($this->lng->txt("tst_position"), $this->getSequenceNumber(), $this->getQuestionCount())." - ".$this->object->getTitle().$postponed . $obligatoryString);
break;
case 2:
$page_gui->setPresentationTitle(sprintf($this->lng->txt("tst_position"), $this->getSequenceNumber(), $this->getQuestionCount()).$postponed . $obligatoryString);
break;
case 0:
default:
if( !is_null($this->questionHeaderBlockBuilder) )
{
$questionBlockHeader = $this->questionHeaderBlockBuilder->getHTML();
}
else
{
$maxpoints = $this->object->getMaximumPoints();
if ($maxpoints == 1)
{
$maxpoints = " (".$maxpoints." ".$this->lng->txt("point").")";
}
else
{
$maxpoints = " (".$maxpoints." ".$this->lng->txt("points").")";
}
$questionBlockHeader = sprintf($this->lng->txt("tst_position"), $this->getSequenceNumber(), $this->getQuestionCount())." - ".$this->object->getTitle().$postponed.$maxpoints . $obligatoryString;
}
$page_gui->setPresentationTitle($questionBlockHeader);
break;
}
$presentation = $page_gui->presentation();
if (strlen($maxpoints)) $presentation = str_replace($maxpoints, "<em>$maxpoints</em>", $presentation);
if (strlen($obligatoryString))
{
$replacement ='<br><span class="obligatory" style="font-size:small">'.
$this->lng->txt("tst_you_have_to_answer_this_question").'</span>';
$presentation = str_replace($obligatoryString, $replacement, $presentation);
}
$presentation = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $presentation);
return $presentation;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::outQuestionType ( )
assQuestionGUI::outSolutionExplorer ( )

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

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

{
global $tree;
include_once("./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
$type = $_GET["link_new_type"];
$search = $_GET["search_link_type"];
$this->ctrl->setParameter($this, "link_new_type", $type);
$this->ctrl->setParameter($this, "search_link_type", $search);
$this->ctrl->saveParameter($this, array("subquestion_index", "link_new_type", "search_link_type"));
ilUtil::sendInfo($this->lng->txt("select_object_to_link"));
$parent_ref_id = $tree->getParentId($_GET["ref_id"]);
$exp = new ilSolutionExplorer($this->ctrl->getLinkTarget($this, 'suggestedsolution'), get_class($this));
$exp->setExpand($_GET['expand_sol'] ? $_GET['expand_sol'] : $parent_ref_id);
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'outSolutionExplorer'));
$exp->setTargetGet("ref_id");
$exp->setRefId($_GET["ref_id"]);
$exp->addFilter($type);
$exp->setSelectableType($type);
if(isset($_GET['expandCurrentPath']) && $_GET['expandCurrentPath'])
{
$exp->expandPathByRefId($parent_ref_id);
}
// build html-output
$exp->setOutput(0);
$template = new ilTemplate("tpl.il_as_qpl_explorer.html", TRUE, TRUE, "Modules/TestQuestionPool");
$template->setVariable("EXPLORER_TREE",$exp->getOutput());
$template->setVariable("BUTTON_CANCEL",$this->lng->txt("cancel"));
$template->setVariable("FORMACTION",$this->ctrl->getFormAction($this, "suggestedsolution"));
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}

+ Here is the call graph for this function:

assQuestionGUI::populateTaxonomyFormSection ( ilPropertyFormGUI  $form)
protected

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

References ilPropertyFormGUI\addItem(), getTaxonomyIds(), and ilTaxAssignInputGUI\setCurrentValues().

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

{
if( count($this->getTaxonomyIds()) )
{
$sectHeader = new ilFormSectionHeaderGUI();
$sectHeader->setTitle($this->lng->txt('qpl_qst_edit_form_taxonomy_section'));
$form->addItem($sectHeader);
require_once 'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
foreach($this->getTaxonomyIds() as $taxonomyId)
{
$taxonomy = new ilObjTaxonomy($taxonomyId);
$label = sprintf($this->lng->txt('qpl_qst_edit_form_taxonomy'), $taxonomy->getTitle());
$postvar = "tax_node_assign_$taxonomyId";
$taxNodeAssign = new ilTaxAssignInputGUI($taxonomy->getId(), true, $label, $postvar);
// TODO: determine tst/qpl when tax assigns become maintainable within tests
$taxNodeAssign->setCurrentValues('qpl', $this->object->getObjId(), 'quest', $this->object->getId());
$form->addItem($taxNodeAssign);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::save ( )

save question

in express mode, so add question to test directly

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

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

Referenced by assFormulaQuestionGUI\saveFQ().

{
global $ilUser;
$old_id = $_GET["q_id"];
$result = $this->writePostData();
if($result == 0)
{
$ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
$ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
$this->object->saveToDb();
$originalexists = $this->object->_questionExistsInPool($this->object->original_id);
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
if(($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int)$_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId()))
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->setParameter($this, 'return_to', 'editQuestion');
$this->ctrl->redirect($this, "originalSyncForm");
return;
}
elseif($_GET["calling_test"])
{
require_once 'Modules/Test/classes/class.ilObjTest.php';
$test = new ilObjTest($_GET["calling_test"]);
if(!assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId()))
{
global $tree, $ilDB, $ilPluginAdmin;
include_once("./Modules/Test/classes/class.ilObjTest.php");
$_GET["ref_id"] = $_GET["calling_test"];
$test = new ilObjTest($_GET["calling_test"], true);
require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
$testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
$new_id = $test->insertQuestion(
$testQuestionSetConfigFactory->getQuestionSetConfig(), $this->object->getId()
);
if(isset($_REQUEST['prev_qid']))
{
$test->moveQuestionAfter($this->object->getId() + 1, $_REQUEST['prev_qid']);
}
$this->ctrl->setParameter($this, 'q_id', $new_id);
$this->ctrl->setParameter($this, 'calling_test', $_GET['calling_test']);
#$this->ctrl->setParameter($this, 'test_ref_id', false);
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, 'editQuestion');
}
else
{
$this->callNewIdListeners($this->object->getId());
if($this->object->getId() != $old_id)
{
// first save
$this->ctrl->setParameterByClass($_GET["cmdClass"], "q_id", $this->object->getId());
$this->ctrl->setParameterByClass($_GET["cmdClass"], "sel_question_types", $_GET["sel_question_types"]);
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
//global $___test_express_mode;
if($_REQUEST['prev_qid'])
{
// @todo: bheyser/mbecker wtf? ..... thx@jposselt ....
// mbecker: Possible fix: Just instantiate the obj?
include_once("./Modules/Test/classes/class.ilObjTest.php");
$test =& new ilObjTest($_GET["ref_id"], true);
$test->moveQuestionAfter($_REQUEST['prev_qid'], $this->object->getId());
}
if( /*$___test_express_mode || */ $_REQUEST['express_mode'] )
{
global $tree, $ilDB, $ilPluginAdmin;
include_once("./Modules/Test/classes/class.ilObjTest.php");
$test = new ilObjTest($_GET["ref_id"], true);
require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
$testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
$test->insertQuestion(
$testQuestionSetConfigFactory->getQuestionSetConfig(), $this->object->getId()
);
require_once 'Modules/Test/classes/class.ilTestExpressPage.php';
$_REQUEST['q_id'] = $this->object->getId();
}
$this->ctrl->redirectByClass($_GET["cmdClass"], "editQuestion");
}
if(strcmp($_SESSION["info"], "") != 0)
{
ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), true);
}
else
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
}
$this->ctrl->redirect($this, 'editQuestion');
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::saveEdit ( )

save question

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

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

{
global $ilUser;
$result = $this->writePostData();
if ($result == 0)
{
$ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
$ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
$this->object->saveToDb();
$originalexists = $this->object->_questionExists($this->object->original_id);
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
if ($_GET["calling_test"] && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId()))
{
$this->ctrl->redirect($this, "originalSyncForm");
}
elseif ($_GET["calling_test"])
{
$_GET["ref_id"] = $_GET["calling_test"];
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET["calling_test"]);
return;
}
elseif ($_GET["test_ref_id"])
{
global $tree, $ilDB, $ilPluginAdmin;
include_once ("./Modules/Test/classes/class.ilObjTest.php");
$_GET["ref_id"] = $_GET["test_ref_id"];
$test =& new ilObjTest($_GET["test_ref_id"], true);
require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
$testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
$test->insertQuestion( $testQuestionSetConfigFactory->getQuestionSetConfig(), $this->object->getId() );
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET["test_ref_id"]);
}
else
{
$this->ctrl->setParameter($this, "q_id", $this->object->getId());
$this->editQuestion();
if (strcmp($_SESSION["info"], "") != 0)
{
ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), false);
}
else
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), false);
}
$this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $this->object->getId());
$this->ctrl->redirectByClass("ilAssQuestionPageGUI", "edit");
}
}
}

+ Here is the call graph for this function:

assQuestionGUI::saveReturn ( )

save question

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

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

{
global $ilUser;
$old_id = $_GET["q_id"];
$result = $this->writePostData();
if($result == 0)
{
$ilUser->setPref("tst_lastquestiontype", $this->object->getQuestionType());
$ilUser->writePref("tst_lastquestiontype", $this->object->getQuestionType());
$this->object->saveToDb();
$originalexists = $this->object->_questionExistsInPool($this->object->original_id);
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
if(($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int)$_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId()))
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "originalSyncForm");
return;
}
elseif($_GET["calling_test"])
{
require_once 'Modules/Test/classes/class.ilObjTest.php';
$test = new ilObjTest($_GET["calling_test"]);
#var_dump(assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId()));
$q_id = $this->object->getId();
if(!assQuestion::_questionExistsInTest($this->object->getId(), $test->getTestId()))
{
global $tree, $ilDB, $ilPluginAdmin;
include_once("./Modules/Test/classes/class.ilObjTest.php");
$_GET["ref_id"] = $_GET["calling_test"];
$test = new ilObjTest($_GET["calling_test"], true);
require_once 'Modules/Test/classes/class.ilTestQuestionSetConfigFactory.php';
$testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory($tree, $ilDB, $ilPluginAdmin, $test);
$new_id = $test->insertQuestion(
$testQuestionSetConfigFactory->getQuestionSetConfig(), $this->object->getId()
);
$q_id = $new_id;
if(isset($_REQUEST['prev_qid']))
{
$test->moveQuestionAfter($this->object->getId() + 1, $_REQUEST['prev_qid']);
}
$this->ctrl->setParameter($this, 'q_id', $new_id);
$this->ctrl->setParameter($this, 'calling_test', $_GET['calling_test']);
#$this->ctrl->setParameter($this, 'test_ref_id', false);
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
if( /*$___test_express_mode || */
$_REQUEST['test_express_mode']
)
{
}
else
{
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=" . $_GET["calling_test"]);
}
}
else
{
if($this->object->getId() != $old_id)
{
$this->callNewIdListeners($this->object->getId());
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
}
if(strcmp($_SESSION["info"], "") != 0)
{
ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("msg_obj_modified"), true);
}
else
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
}
$this->ctrl->redirectByClass("ilobjquestionpoolgui", "questions");
}
}
}

+ Here is the call graph for this function:

assQuestionGUI::saveSuggestedSolution ( )

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

References $_POST, and suggestedsolution().

{
global $tree;
include_once("./Modules/TestQuestionPool/classes/class.ilSolutionExplorer.php");
switch ($_POST["solutiontype"])
{
case "lm":
$type = "lm";
$search = "lm";
break;
case "git":
$type = "glo";
$search = "glo";
break;
case "st":
$type = "lm";
$search = "st";
break;
case "pg":
$type = "lm";
$search = "pg";
break;
case "file":
case "text":
return $this->suggestedsolution();
break;
default:
return $this->suggestedsolution();
break;
}
if(isset($_POST['solutiontype']))
{
$this->ctrl->setParameter($this, 'expandCurrentPath', 1);
}
$this->ctrl->setParameter($this, "link_new_type", $type);
$this->ctrl->setParameter($this, "search_link_type", $search);
$this->ctrl->redirect($this, "outSolutionExplorer");
}

+ Here is the call graph for this function:

assQuestionGUI::saveTaxonomyAssignments ( )
protected

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

References getTaxonomyIds().

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

{
if( count($this->getTaxonomyIds()) )
{
require_once 'Services/Taxonomy/classes/class.ilTaxAssignInputGUI.php';
foreach($this->getTaxonomyIds() as $taxonomyId)
{
$postvar = "tax_node_assign_$taxonomyId";
$tax_node_assign = new ilTaxAssignInputGUI($taxonomyId, true, '', $postvar);
// TODO: determine tst/qpl when tax assigns become maintainable within tests
$tax_node_assign->saveInput("qpl", $this->object->getObjId(), "quest", $this->object->getId());
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References $previewSession.

{
$this->previewSession = $previewSession;
}
assQuestionGUI::setQuestionActionCmd (   $questionActionCmd)

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

References $questionActionCmd.

{
$this->questionActionCmd = $questionActionCmd;
if( is_object($this->object) )
{
$this->object->questionActionCmd = $questionActionCmd;
}
}
assQuestionGUI::setQuestionCount (   $a_question_count)

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

{
$this->question_count = $a_question_count;
}
assQuestionGUI::setQuestionHeaderBlockBuilder (   $questionHeaderBlockBuilder)
Parameters
\ilQuestionHeaderBlockBuilder$questionHeaderBlockBuilder

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

References $questionHeaderBlockBuilder.

{
$this->questionHeaderBlockBuilder = $questionHeaderBlockBuilder;
}
assQuestionGUI::setQuestionTabs ( )

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

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

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

{
global $rbacsystem, $ilTabs;
$ilTabs->clearTargets();
$this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
$q_type = $this->object->getQuestionType();
if (strlen($q_type))
{
$classname = $q_type . "GUI";
$this->ctrl->setParameterByClass(strtolower($classname), "sel_question_types", $q_type);
$this->ctrl->setParameterByClass(strtolower($classname), "q_id", $_GET["q_id"]);
}
if ($_GET["q_id"])
{
if ($rbacsystem->checkAccess('write', $_GET["ref_id"]))
{
// edit page
$ilTabs->addTarget("edit_page",
$this->ctrl->getLinkTargetByClass("ilAssQuestionPageGUI", "edit"),
array("edit", "insert", "exec_pg"),
"", "", $force_active);
}
$this->addTab_QuestionPreview($ilTabs);
}
$force_active = false;
if ($rbacsystem->checkAccess('write', $_GET["ref_id"]))
{
$url = "";
if ($classname) $url = $this->ctrl->getLinkTargetByClass($classname, "editQuestion");
$force_active = false;
// edit question properties
$ilTabs->addTarget("edit_question",
$url,
$classname, "", $force_active);
}
// add tab for question feedback within common class assQuestionGUI
$this->addTab_QuestionFeedback($ilTabs);
// add tab for question hint within common class assQuestionGUI
$this->addTab_QuestionHints($ilTabs);
// add tab for question's suggested solution within common class assQuestionGUI
$this->addTab_SuggestedSolution($ilTabs, $classname);
// Assessment of questions sub menu entry
if ($_GET["q_id"])
{
$ilTabs->addTarget("statistics",
$this->ctrl->getLinkTargetByClass($classname, "assessment"),
array("assessment"),
$classname, "");
}
$this->addBackTab($ilTabs);
}

+ Here is the call graph for this function:

assQuestionGUI::setSequenceNumber (   $nr)

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

{
$this->sequence_no = $nr;
}
assQuestionGUI::setTargetGui (   $linkTargetGui)

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

References setTargetGuiClass().

{
$this->setTargetGuiClass( get_class($linkTargetGui) );
}

+ Here is the call graph for this function:

assQuestionGUI::setTargetGuiClass (   $targetGuiClass)

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

References $targetGuiClass.

Referenced by setTargetGui().

{
$this->targetGuiClass = $targetGuiClass;
}

+ Here is the caller graph for this function:

assQuestionGUI::setTaxonomyIds (   $taxonomyIds)

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

References $taxonomyIds.

{
$this->taxonomyIds = $taxonomyIds;
}
assQuestionGUI::showHints ( )

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

References $ilCtrl, and ilAssQuestionHintsGUI\CMD_SHOW_LIST.

{
global $ilCtrl;
$ilCtrl->redirectByClass('ilAssQuestionHintsGUI', ilAssQuestionHintsGUI::CMD_SHOW_LIST);
}
assQuestionGUI::showSuggestedSolution ( )

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

References suggestedsolution().

{
}

+ Here is the call graph for this function:

assQuestionGUI::suggestedsolution ( )

Allows to add suggested solutions for questions.

public

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

References $_GET, $_POST, $file, $ilUser, $options, $res, assQuestion\_getInternalLinkHref(), assQuestion\_isWriteable(), ilRadioGroupInputGUI\addOption(), getSolutionOutput(), ilUtil\makeDirParents(), ilUtil\moveUploadedFile(), originalSyncForm(), ilUtil\prepareFormOutput(), ilUtil\renameExecutables(), ilUtil\sendInfo(), ilUtil\sendSuccess(), ilCustomInputGUI\setHtml(), and ilTextAreaInputGUI\setValue().

Referenced by saveSuggestedSolution(), and showSuggestedSolution().

{
global $ilUser;
global $ilAccess;
$save = (is_array($_POST["cmd"]) && array_key_exists("suggestedsolution", $_POST["cmd"])) ? TRUE : FALSE;
if ($save && $_POST["deleteSuggestedSolution"] == 1)
{
$this->object->deleteSuggestedSolutions();
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "suggestedsolution");
}
$output = "";
$solution_array = $this->object->getSuggestedSolution(0);
$options = array(
"lm" => $this->lng->txt("obj_lm"),
"st" => $this->lng->txt("obj_st"),
"pg" => $this->lng->txt("obj_pg"),
"git" => $this->lng->txt("glossary_term"),
"file" => $this->lng->txt("fileDownload"),
"text" => $this->lng->txt("solutionText")
);
if ((strcmp($_POST["solutiontype"], "file") == 0) && (strcmp($solution_array["type"], "file") != 0))
{
$solution_array = array(
"type" => "file"
);
}
elseif ((strcmp($_POST["solutiontype"], "text") == 0) && (strcmp($solution_array["type"], "text") != 0))
{
$solution_array = array(
"type" => "text",
"value" => $this->getSolutionOutput(0, NULL, FALSE, FALSE, TRUE, FALSE, TRUE)
);
}
if ($save && strlen($_POST["filename"]))
{
$solution_array["value"]["filename"] = $_POST["filename"];
}
if ($save && strlen($_POST["solutiontext"]))
{
$solution_array["value"] = $_POST["solutiontext"];
}
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
if (count($solution_array))
{
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTitle($this->lng->txt("solution_hint"));
$form->setMultipart(TRUE);
$form->setTableWidth("100%");
$form->setId("suggestedsolutiondisplay");
// suggested solution output
include_once "./Modules/TestQuestionPool/classes/class.ilSolutionTitleInputGUI.php";
$title = new ilSolutionTitleInputGUI($this->lng->txt("showSuggestedSolution"), "solutiontype");
$template = new ilTemplate("tpl.il_as_qpl_suggested_solution_input_presentation.html", TRUE, TRUE, "Modules/TestQuestionPool");
if (strlen($solution_array["internal_link"]))
{
$href = assQuestion::_getInternalLinkHref($solution_array["internal_link"]);
$template->setCurrentBlock("preview");
$template->setVariable("TEXT_SOLUTION", $this->lng->txt("suggested_solution"));
$template->setVariable("VALUE_SOLUTION", " <a href=\"$href\" target=\"content\">" . $this->lng->txt("view"). "</a> ");
$template->parseCurrentBlock();
}
elseif ((strcmp($solution_array["type"], "file") == 0) && (is_array($solution_array["value"])))
{
$href = $this->object->getSuggestedSolutionPathWeb() . $solution_array["value"]["name"];
$template->setCurrentBlock("preview");
$template->setVariable("TEXT_SOLUTION", $this->lng->txt("suggested_solution"));
$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> ");
$template->parseCurrentBlock();
}
$template->setVariable("TEXT_TYPE", $this->lng->txt("type"));
$template->setVariable("VALUE_TYPE", $options[$solution_array["type"]]);
$title->setHtml($template->get());
$deletesolution = new ilCheckboxInputGUI("", "deleteSuggestedSolution");
$deletesolution->setOptionTitle($this->lng->txt("deleteSuggestedSolution"));
$title->addSubItem($deletesolution);
$form->addItem($title);
if (strcmp($solution_array["type"], "file") == 0)
{
// file
$file = new ilFileInputGUI($this->lng->txt("fileDownload"), "file");
$file->setRequired(TRUE);
$file->enableFileNameSelection("filename");
//$file->setSuffixes(array("doc","xls","png","jpg","gif","pdf"));
if( $_FILES["file"]["tmp_name"] && $file->checkInput() )
{
if (!file_exists($this->object->getSuggestedSolutionPath())) ilUtil::makeDirParents($this->object->getSuggestedSolutionPath());
$res = ilUtil::moveUploadedFile($_FILES["file"]["tmp_name"], $_FILES["file"]["name"], $this->object->getSuggestedSolutionPath() . $_FILES["file"]["name"]);
if ($res)
{
ilUtil::renameExecutables($this->object->getSuggestedSolutionPath());
// remove an old file download
if (is_array($solution_array["value"])) @unlink($this->object->getSuggestedSolutionPath() . $solution_array["value"]["name"]);
$file->setValue($_FILES["file"]["name"]);
$this->object->saveSuggestedSolution("file", "", 0, array("name" => $_FILES["file"]["name"], "type" => $_FILES["file"]["type"], "size" => $_FILES["file"]["size"], "filename" => $_POST["filename"]));
$originalexists = $this->object->_questionExistsInPool($this->object->original_id);
if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int)$_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId()))
{
return $this->originalSyncForm("suggestedsolution");
}
else
{
ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), TRUE);
$this->ctrl->redirect($this, "suggestedsolution");
}
}
else
{
// BH: $res as info string? wtf? it holds a bool or something else!!?
}
}
else
{
if (is_array($solution_array["value"]))
{
$file->setValue($solution_array["value"]["name"]);
$file->setFilename((strlen($solution_array["value"]["filename"])) ? $solution_array["value"]["filename"] : $solution_array["value"]["name"]);
}
}
$form->addItem($file);
$hidden = new ilHiddenInputGUI("solutiontype");
$hidden->setValue("file");
$form->addItem($hidden);
}
else if (strcmp($solution_array["type"], "text") == 0)
{
$question = new ilTextAreaInputGUI($this->lng->txt("solutionText"), "solutiontext");
$question->setValue($this->object->prepareTextareaOutput($solution_array["value"]));
$question->setRequired(TRUE);
$question->setRows(10);
$question->setCols(80);
$question->setUseRte(TRUE);
$question->addPlugin("latex");
$question->addButton("latex");
$question->setRTESupport($this->object->getId(), "qpl", "assessment");
$hidden = new ilHiddenInputGUI("solutiontype");
$hidden->setValue("text");
$form->addItem($hidden);
$form->addItem($question);
}
if ($ilAccess->checkAccess("write", "", $_GET['ref_id']))
{
$form->addCommandButton('showSuggestedSolution', $this->lng->txt('cancel'));
$form->addCommandButton('suggestedsolution', $this->lng->txt('save'));
}
if ($save)
{
if ($form->checkInput())
{
switch ($solution_array["type"])
{
case "file":
$this->object->saveSuggestedSolution("file", "", 0, array(
"name" => $solution_array["value"]["name"],
"type" => $solution_array["value"]["type"],
"size" => $solution_array["value"]["size"],
"filename" => $_POST["filename"]
));
break;
case "text":
$this->object->saveSuggestedSolution("text", "", 0, $solution_array["value"]);
break;
}
$originalexists = $this->object->_questionExistsInPool($this->object->original_id);
if (($_GET["calling_test"] || (isset($_GET['calling_consumer']) && (int)$_GET['calling_consumer'])) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId()))
{
return $this->originalSyncForm("suggestedsolution");
}
else
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$this->ctrl->redirect($this, "suggestedsolution");
}
}
}
$output = $form->getHTML();
}
$savechange = (strcmp($this->ctrl->getCmd(), "saveSuggestedSolution") == 0) ? TRUE : FALSE;
$changeoutput = "";
if ($ilAccess->checkAccess("write", "", $_GET['ref_id']))
{
$formchange = new ilPropertyFormGUI();
$formchange->setFormAction($this->ctrl->getFormAction($this));
$formchange->setTitle((count($solution_array)) ? $this->lng->txt("changeSuggestedSolution") : $this->lng->txt("addSuggestedSolution"));
$formchange->setMultipart(FALSE);
$formchange->setTableWidth("100%");
$formchange->setId("suggestedsolution");
$solutiontype = new ilRadioGroupInputGUI($this->lng->txt("suggestedSolutionType"), "solutiontype");
foreach($options as $opt_value => $opt_caption)
{
$solutiontype->addOption(new ilRadioOption($opt_caption, $opt_value));
}
if (count($solution_array))
{
$solutiontype->setValue($solution_array["type"]);
}
$solutiontype->setRequired(TRUE);
$formchange->addItem($solutiontype);
$formchange->addCommandButton("saveSuggestedSolution", $this->lng->txt("select"));
if ($savechange)
{
$formchange->checkInput();
}
$changeoutput = $formchange->getHTML();
}
$this->tpl->setVariable("ADM_CONTENT", $changeoutput . $output);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

assQuestionGUI::sync ( )

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

References $_GET, $_REQUEST, $ref_id, ilLink\_getLink(), ilObjectFactory\getInstanceByRefId(), and ilUtil\redirect().

{
$original_id = $this->object->original_id;
if ($original_id)
{
$this->object->syncWithOriginal();
}
if (strlen($_GET["return_to"]))
{
$this->ctrl->redirect($this, $_GET["return_to"]);
}
if (strlen($_REQUEST["return_to_fb"]))
{
$this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', 'showFeedbackForm');
}
else
{
if(isset($_GET['calling_consumer']) && (int)$_GET['calling_consumer'])
{
$ref_id = (int)$_GET['calling_consumer'];
if($consumer instanceof ilQuestionEditingFormConsumer)
{
ilUtil::redirect($consumer->getQuestionEditingFormBackTarget($_GET['consumer_context']));
}
require_once 'Services/Link/classes/class.ilLink.php';
}
$_GET["ref_id"] = $_GET["calling_test"];
ilUtil::redirect("ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=".$_GET["calling_test"]);
}
}

+ Here is the call graph for this function:

assQuestionGUI::writePostData ( )
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 protected

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

Referenced by assTextSubsetGUI\addanswers(), assOrderingQuestionGUI\addanswers(), assSingleChoiceGUI\addchoice(), assMultipleChoiceGUI\addchoice(), assMatchingQuestionGUI\adddefinitions(), assClozeTestGUI\addgap(), assJavaAppletGUI\addkvp(), assMatchingQuestionGUI\addpairs(), assTextQuestionGUI\addSuggestedSolution(), assMatchingQuestionGUI\addterms(), assErrorTextGUI\analyze(), apply(), assOrderingQuestionGUI\changeToPictures(), assOrderingQuestionGUI\changeToText(), assClozeTestGUI\createGaps(), assImagemapQuestionGUI\deleteImage(), assOrderingQuestionGUI\downanswers(), assFlashQuestionGUI\flashAddParam(), assOrderingQuestionGUI\orderNestedPictures(), assOrderingQuestionGUI\orderNestedTerms(), assFormulaQuestionGUI\parseQuestion(), assTextSubsetGUI\removeanswers(), assOrderingQuestionGUI\removeanswers(), assImagemapQuestionGUI\removeArea(), assSingleChoiceGUI\removechoice(), assMultipleChoiceGUI\removechoice(), assMatchingQuestionGUI\removedefinitions(), assClozeTestGUI\removegap(), assOrderingQuestionGUI\removeimageanswers(), assSingleChoiceGUI\removeimagechoice(), assMultipleChoiceGUI\removeimagechoice(), assMatchingQuestionGUI\removeimagedefinitions(), assMatchingQuestionGUI\removeimageterms(), assJavaAppletGUI\removekvp(), assMatchingQuestionGUI\removepairs(), assMatchingQuestionGUI\removeterms(), save(), saveEdit(), assFormulaQuestionGUI\saveFQ(), saveReturn(), assFormulaQuestionGUI\saveReturnFQ(), assFlashQuestionGUI\suggestRange(), assFormulaQuestionGUI\suggestRange(), assOrderingQuestionGUI\upanswers(), assOrderingQuestionGUI\uploadanswers(), assSingleChoiceGUI\uploadchoice(), assMultipleChoiceGUI\uploadchoice(), assMatchingQuestionGUI\uploaddefinitions(), assKprimChoiceGUI\uploadImage(), and assMatchingQuestionGUI\uploadterms().

{
}

+ Here is the caller graph for this function:

assQuestionGUI::writeQuestionGenericPostData ( )
protected

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

References $_POST, and ilUtil\stripOnlySlashes().

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

{
$this->object->setTitle( $_POST["title"] );
$this->object->setAuthor( $_POST["author"] );
$this->object->setComment( $_POST["comment"] );
if ($this->object->getSelfAssessmentEditingMode())
{
$this->object->setNrOfTries( $_POST['nr_of_tries'] );
}
$this->object->setQuestion( ilUtil::stripOnlySlashes($_POST['question']) ); // ?
$this->object->setEstimatedWorkingTime(
$_POST["Estimated"]["hh"],
$_POST["Estimated"]["mm"],
$_POST["Estimated"]["ss"]
);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

assQuestionGUI::$error

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

assQuestionGUI::$errormessage

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

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

assQuestionGUI::$lng
assQuestionGUI::$object

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

Referenced by callNewIdListeners().

assQuestionGUI::$previewSession
private

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

Referenced by getPreviewSession(), and setPreviewSession().

assQuestionGUI::$question_count

question count in test

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

Referenced by getQuestionCount().

assQuestionGUI::$questionActionCmd = 'handleQuestionAction'
private

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

Referenced by getQuestionActionCmd(), and setQuestionActionCmd().

assQuestionGUI::$questionHeaderBlockBuilder
private

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

Referenced by setQuestionHeaderBlockBuilder().

assQuestionGUI::$sequence_no

sequence number in test

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

Referenced by getSequenceNumber().

assQuestionGUI::$targetGuiClass = null
private

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

Referenced by getTargetGuiClass(), and setTargetGuiClass().

assQuestionGUI::$taxonomyIds = array()
private

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

Referenced by getTaxonomyIds(), and setTaxonomyIds().

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

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

Referenced by assFileUploadGUI\getFormEncodingType().

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

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

Referenced by getFormEncodingType().

const assQuestionGUI::FORM_MODE_ADJUST = 'adjust'

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

const assQuestionGUI::FORM_MODE_EDIT = 'edit'

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

const assQuestionGUI::SESSION_PREVIEW_DATA_BASE_INDEX = 'ilAssQuestionPreviewAnswers'

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


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