ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilQuestionEditGUI Class Reference

Class ilObjQuestionPoolGUI. More...

+ Collaboration diagram for ilQuestionEditGUI:

Public Member Functions

 __construct ()
 Constructor.
 setSelfAssessmentEditingMode ($a_selfassessmenteditingmode)
 Set Self-Assessment Editing Mode.
 getSelfAssessmentEditingMode ()
 Get Self-Assessment Editing Mode.
 setDefaultNrOfTries ($a_defaultnroftries)
 Set Default Nr of Tries.
 getDefaultNrOfTries ()
 Get Default Nr of Tries.
 addNewIdListener (&$a_object, $a_method, $a_parameters="")
 Add a listener that is notified with the new question ID, when a new question is saved.
 executeCommand ()
 execute command
 setQuestionId ($a_questionid)
 Set Question Id.
 getQuestionId ()
 Get Question Id.
 setPoolRefId ($a_poolrefid)
 Set Pool Ref ID.
 getPoolRefId ()
 Get Pool Ref ID.
 setPoolObjId ($a_poolobjid)
 Set Pool Obj Id.
 getPoolObjId ()
 Get Pool Obj Id.
 setQuestionType ($a_questiontype)
 Set Question Type.
 getQuestionType ()
 Get Question Type.

Detailed Description

Constructor & Destructor Documentation

ilQuestionEditGUI::__construct ( )

Constructor.

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

References $_GET, $ilCtrl, $lng, setPoolObjId(), setPoolRefId(), setQuestionId(), and setQuestionType().

{
global $ilCtrl, $lng;
if ($_GET["qpool_ref_id"])
{
$this->setPoolRefId($_GET["qpool_ref_id"]);
}
else if ($_GET["qpool_obj_id"])
{
$this->setPoolObjId($_GET["qpool_obj_id"]);
}
$this->setQuestionId($_GET["q_id"]);
$this->setQuestionType($_GET["q_type"]);
$lng->loadLanguageModule("assessment");
$ilCtrl->saveParameter($this, array("qpool_ref_id", "qpool_obj_id", "q_id", "q_type"));
$this->new_id_listeners = array();
$this->new_id_listener_cnt = 0;
}

+ Here is the call graph for this function:

Member Function Documentation

ilQuestionEditGUI::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 89 of file class.ilQuestionEditGUI.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++;
}
ilQuestionEditGUI::executeCommand ( )

execute command

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

References $cmd, $ilCtrl, $lng, $method, $ret, assQuestionGUI\_getQuestionGUI(), getDefaultNrOfTries(), getPoolObjId(), getQuestionId(), getQuestionType(), getSelfAssessmentEditingMode(), and ilUtil\sendInfo().

{
global $ilCtrl,$lng;
$cmd = $ilCtrl->getCmd();
$next_class = $ilCtrl->getNextClass();
//echo "-".$cmd."-".$next_class."-".$_GET["q_id"]."-";
switch($next_class)
{
default:
include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$this->getQuestionId());
$q_gui->setSelfAssessmentEditingMode(
$q_gui->setDefaultNrOfTries(
$q_gui->object->setObjId((int) $this->getPoolObjId());
for ($i=0; $i<$this->new_id_listener_cnt; $i++)
{
$object =& $this->new_id_listeners[$i]["object"];
$method = $this->new_id_listeners[$i]["method"];
$parameters = $this->new_id_listeners[$i]["parameters"];
$q_gui->addNewIdListener($object, $method,
$parameters);
//var_dump($object);
//var_dump($method);
//var_dump($parameters);
}
//$q_gui->setQuestionTabs();
$count = $q_gui->object->isInUse();
if ($count > 0)
{
global $rbacsystem;
if ($rbacsystem->checkAccess("write", $this->pool_ref_id))
{
ilUtil::sendInfo(sprintf($lng->txt("qpl_question_is_in_use"), $count));
}
}
$ilCtrl->setCmdClass(get_class($q_gui));
$ret = $ilCtrl->forwardCommand($q_gui);
break;
}
return $ret;
}

+ Here is the call graph for this function:

ilQuestionEditGUI::getDefaultNrOfTries ( )

Get Default Nr of Tries.

Returns
int Default Nr of Tries

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

Referenced by executeCommand().

{
return $this->defaultnroftries;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::getPoolObjId ( )

Get Pool Obj Id.

Returns
int Pool Obj Id

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

Referenced by executeCommand().

{
return $this->poolobjid;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::getPoolRefId ( )

Get Pool Ref ID.

Returns
int Pool Ref ID

Definition at line 191 of file class.ilQuestionEditGUI.php.

Referenced by setPoolRefId().

{
return $this->poolrefid;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::getQuestionId ( )

Get Question Id.

Returns
int Question Id

Definition at line 168 of file class.ilQuestionEditGUI.php.

Referenced by executeCommand().

{
return $this->questionid;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::getQuestionType ( )

Get Question Type.

Returns
string Question Type

Definition at line 234 of file class.ilQuestionEditGUI.php.

Referenced by executeCommand().

{
return $this->questiontype;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::getSelfAssessmentEditingMode ( )

Get Self-Assessment Editing Mode.

Returns
boolean Self-Assessment Editing Mode

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

Referenced by executeCommand().

{
return $this->selfassessmenteditingmode;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::setDefaultNrOfTries (   $a_defaultnroftries)

Set Default Nr of Tries.

Parameters
int$a_defaultnroftriesDefault Nr. of Tries

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

{
$this->defaultnroftries = $a_defaultnroftries;
}
ilQuestionEditGUI::setPoolObjId (   $a_poolobjid)

Set Pool Obj Id.

Parameters
int$a_poolobjidPool Obj Id

Definition at line 201 of file class.ilQuestionEditGUI.php.

References $_GET.

Referenced by __construct(), and setPoolRefId().

{
//echo "<br>Setting Pool Obj ID:".$a_poolobjid;
$this->poolobjid = $a_poolobjid;
$_GET["qpool_obj_id"] = $this->poolobjid;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::setPoolRefId (   $a_poolrefid)

Set Pool Ref ID.

Parameters
int$a_poolrefidPool Ref ID

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

References $_GET, ilObject\_lookupObjId(), getPoolRefId(), and setPoolObjId().

Referenced by __construct().

{
//echo "<br>Setting Pool Ref ID:".$a_poolrefid;
$this->poolrefid = $a_poolrefid;
$_GET["qpool_ref_id"] = $this->poolrefid;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilQuestionEditGUI::setQuestionId (   $a_questionid)

Set Question Id.

Parameters
int$a_questionidQuestion Id

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

References $_GET.

Referenced by __construct().

{
$this->questionid = $a_questionid;
$_GET["q_id"] = $this->questionid;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::setQuestionType (   $a_questiontype)

Set Question Type.

Parameters
string$a_questiontypeQuestion Type

Definition at line 223 of file class.ilQuestionEditGUI.php.

References $_GET.

Referenced by __construct().

{
$this->questiontype = $a_questiontype;
$_GET["q_type"] = $this->questiontype;
}

+ Here is the caller graph for this function:

ilQuestionEditGUI::setSelfAssessmentEditingMode (   $a_selfassessmenteditingmode)

Set Self-Assessment Editing Mode.

Parameters
boolean$a_selfassessmenteditingmodeSelf-Assessment Editing Mode

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

{
$this->selfassessmenteditingmode = $a_selfassessmenteditingmode;
}

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