ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAssQuestionFeedbackPageObjectCommandForwarder Class Reference
+ Inheritance diagram for ilAssQuestionFeedbackPageObjectCommandForwarder:
+ Collaboration diagram for ilAssQuestionFeedbackPageObjectCommandForwarder:

Public Member Functions

 __construct (assQuestion $questionOBJ, ilCtrl $ctrl, ilTabsGUI $tabs, ilLanguage $lng)
 Constructor.
 forward ()
 forward method
 ensurePageObjectExists ($pageObjectType, $pageObjectId)
 ensures an existing page object with giben type/id
 getPageObjectGUI ($pageObjectType, $pageObjectId)
 instantiates, initialises and returns a page object gui class

Additional Inherited Members

- Protected Attributes inherited from ilAssQuestionAbstractPageObjectCommandForwarder
 $questionOBJ = null
 $ctrl = null
 $tabs = null
 $lng = null

Detailed Description

Constructor & Destructor Documentation

ilAssQuestionFeedbackPageObjectCommandForwarder::__construct ( assQuestion  $questionOBJ,
ilCtrl  $ctrl,
ilTabsGUI  $tabs,
ilLanguage  $lng 
)

Constructor.

public

Parameters
assQuestion$questionOBJ
ilCtrl$ctrl
ilTabsGUI$tabs
ilLanguage$lng

Reimplemented from ilAssQuestionAbstractPageObjectCommandForwarder.

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

References $_GET, ilAssQuestionFeedbackEditingGUI\CMD_SHOW, ilAssQuestionFeedback\isValidFeedbackPageObjectType(), and ilUtil\sendFailure().

{
parent::__construct($questionOBJ, $ctrl, $tabs, $lng);
if( !isset($_GET['feedback_id']) || !(int)$_GET['feedback_id'] )
{
ilUtil::sendFailure('invalid feedback id given: '.(int)$_GET['feedback_id'], true);
$this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
}
if( !isset($_GET['feedback_type']) || !ilAssQuestionFeedback::isValidFeedbackPageObjectType($_GET['feedback_type']) )
{
ilUtil::sendFailure('invalid feedback type given: '.$_GET['feedback_type'], true);
$this->ctrl->redirectByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW);
}
}

+ Here is the call graph for this function:

Member Function Documentation

ilAssQuestionFeedbackPageObjectCommandForwarder::ensurePageObjectExists (   $pageObjectType,
  $pageObjectId 
)

ensures an existing page object with giben type/id

protected

Reimplemented from ilAssQuestionAbstractPageObjectCommandForwarder.

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

References ilPageObject\_exists(), ilAssQuestionFeedback\PAGE_OBJECT_TYPE_GENERIC_FEEDBACK, and ilAssQuestionFeedback\PAGE_OBJECT_TYPE_SPECIFIC_FEEDBACK.

{
include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php");
{
include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPage.php");
if( !ilAssGenFeedbackPage::_exists($pageObjectType, $pageObjectId) )
{
$pageObject = new ilAssGenFeedbackPage();
$pageObject->setParentId($this->questionOBJ->getId());
$pageObject->setId($pageObjectId);
$pageObject->createFromXML();
}
}
{
include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPage.php");
if( !ilAssSpecFeedbackPage::_exists($pageObjectType, $pageObjectId) )
{
$pageObject = new ilAssSpecFeedbackPage();
$pageObject->setParentId($this->questionOBJ->getId());
$pageObject->setId($pageObjectId);
$pageObject->createFromXML();
}
}
}

+ Here is the call graph for this function:

ilAssQuestionFeedbackPageObjectCommandForwarder::forward ( )

forward method

Reimplemented from ilAssQuestionAbstractPageObjectCommandForwarder.

Definition at line 45 of file class.ilAssQuestionFeedbackPageObjectCommandForwarder.php.

References $_GET, ilAssQuestionFeedbackEditingGUI\CMD_SHOW, and getPageObjectGUI().

{
//$this->ensurePageObjectExists($_GET['feedback_type'], $_GET['feedback_id']);
$pageObjectGUI = $this->getPageObjectGUI($_GET['feedback_type'], $_GET['feedback_id']);
$pageObjectGUI->setEnabledTabs(true);
$this->tabs->setBackTarget(
$this->lng->txt('tst_question_feedback_back_to_feedback_form'),
$this->ctrl->getLinkTargetByClass('ilAssQuestionFeedbackEditingGUI', ilAssQuestionFeedbackEditingGUI::CMD_SHOW)
);
$this->ctrl->setParameter($pageObjectGUI, 'feedback_id', $_GET['feedback_id']);
$this->ctrl->setParameter($pageObjectGUI, 'feedback_type', $_GET['feedback_type']);
$this->ctrl->forwardCommand($pageObjectGUI);
}

+ Here is the call graph for this function:

ilAssQuestionFeedbackPageObjectCommandForwarder::getPageObjectGUI (   $pageObjectType,
  $pageObjectId 
)

instantiates, initialises and returns a page object gui class

protected

Returns
ilAssGenFeedbackPageGUI|ilAssSpecFeedbackPageGUI

Reimplemented from ilAssQuestionAbstractPageObjectCommandForwarder.

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

References ilAssQuestionFeedback\PAGE_OBJECT_TYPE_GENERIC_FEEDBACK, and ilAssQuestionFeedback\PAGE_OBJECT_TYPE_SPECIFIC_FEEDBACK.

Referenced by forward().

{
include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php");
{
include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPageGUI.php");
$pageObjectGUI = new ilAssGenFeedbackPageGUI($pageObjectId);
return $pageObjectGUI;
}
{
include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPageGUI.php");
$pageObjectGUI = new ilAssSpecFeedbackPageGUI($pageObjectId);
return $pageObjectGUI;
}
}

+ Here is the caller graph for this function:


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