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

Public Member Functions

 __construct (ilLanguage $lng, ilObjTest $testOBJ)
 setOldQuestionSetType ($oldQuestionSetType)
 getOldQuestionSetType ()
 setNewQuestionSetType ($newQuestionSetType)
 getNewQuestionSetType ()
 setQuestionLossInfoEnabled ($questionLossInfoEnabled)
 isQuestionLossInfoEnabled ()
 build ()
 populateParametersFromPost ()
 populateParametersFromPropertyForm (ilPropertyFormGUI $form, $timezone)
- Public Member Functions inherited from ilConfirmationGUI
 __construct ()
 Constructor.
 setFormAction ($a_form_action)
 getFormAction ()
 setHeaderText ($a_headertext)
 Set Set header text.
 getHeaderText ()
 Get Set header text.
 addButton ($a_txt, $a_cmd)
 Set cancel button command and text.
 setCancel ($a_txt, $a_cmd)
 Set cancel button command and text.
 setConfirm ($a_txt, $a_cmd)
 Set confirmation button command and text.
 addItem ($a_post_var, $a_id, $a_text, $a_img="", $a_alt="")
 Add row item.
 addHiddenItem ($a_post_var, $a_value)
 Add hidden item.
 getHTML ()
 Get confirmation screen HTML.
 setFormName ($a_name)
 Set form name.

Protected Attributes

 $lng
 $testOBJ

Private Member Functions

 buildHeaderText ()

Private Attributes

 $oldQuestionSetType
 $newQuestionSetType
 $questionLossInfoEnabled

Detailed Description

Constructor & Destructor Documentation

ilTestSettingsChangeConfirmationGUI::__construct ( ilLanguage  $lng,
ilObjTest  $testOBJ 
)
Parameters
ilLanguage$lng
ilObjTest$testOBJ

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

References $lng, $testOBJ, and ilConfirmationGUI\__construct().

{
$this->lng = $lng;
$this->testOBJ = $testOBJ;
}

+ Here is the call graph for this function:

Member Function Documentation

ilTestSettingsChangeConfirmationGUI::build ( )

Definition at line 117 of file class.ilTestSettingsChangeConfirmationGUI.php.

References buildHeaderText(), and ilConfirmationGUI\setHeaderText().

{
$this->setHeaderText( $this->buildHeaderText() );
}

+ Here is the call graph for this function:

ilTestSettingsChangeConfirmationGUI::buildHeaderText ( )
private

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

References getNewQuestionSetType(), getOldQuestionSetType(), and isQuestionLossInfoEnabled().

Referenced by build().

{
$headerText = sprintf(
$this->lng->txt('tst_change_quest_set_type_from_old_to_new_with_conflict'),
$this->testOBJ->getQuestionSetTypeTranslation($this->lng, $this->getOldQuestionSetType()),
$this->testOBJ->getQuestionSetTypeTranslation($this->lng, $this->getNewQuestionSetType())
);
{
$headerText .= '<br /><br />'.$this->lng->txt('tst_nonpool_questions_get_lost_warning');
}
return $headerText;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestSettingsChangeConfirmationGUI::getNewQuestionSetType ( )
Returns
string

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

References $newQuestionSetType.

Referenced by buildHeaderText().

+ Here is the caller graph for this function:

ilTestSettingsChangeConfirmationGUI::getOldQuestionSetType ( )
Returns
string

Definition at line 64 of file class.ilTestSettingsChangeConfirmationGUI.php.

References $oldQuestionSetType.

Referenced by buildHeaderText().

+ Here is the caller graph for this function:

ilTestSettingsChangeConfirmationGUI::isQuestionLossInfoEnabled ( )
Returns
boolean

Definition at line 96 of file class.ilTestSettingsChangeConfirmationGUI.php.

References $questionLossInfoEnabled.

Referenced by buildHeaderText().

+ Here is the caller graph for this function:

ilTestSettingsChangeConfirmationGUI::populateParametersFromPost ( )

Definition at line 122 of file class.ilTestSettingsChangeConfirmationGUI.php.

References $_POST, and ilConfirmationGUI\addHiddenItem().

{
foreach ($_POST as $key => $value)
{
if (strcmp($key, "cmd") != 0)
{
if (is_array($value))
{
foreach ($value as $k => $v)
{
$this->addHiddenItem("{$key}[{$k}]", $v);
}
}
else
{
$this->addHiddenItem($key, $value);
}
}
}
}

+ Here is the call graph for this function:

ilTestSettingsChangeConfirmationGUI::populateParametersFromPropertyForm ( ilPropertyFormGUI  $form,
  $timezone 
)
Parameters
ilPropertyForm$form

Definition at line 146 of file class.ilTestSettingsChangeConfirmationGUI.php.

References $d, ilConfirmationGUI\$item, ilConfirmationGUI\addHiddenItem(), ilPropertyFormGUI\getInputItemsRecursive(), IL_CAL_DATETIME, IL_CAL_FKT_DATE, and ilDateTimeInputGUI\MODE_SELECT.

{
foreach ($form->getInputItemsRecursive() as $key => $item)
{
//vd("$key // {$item->getType()} // ".json_encode($_POST[$item->getPostVar()]));
switch( $item->getType() )
{
case 'section_header':
continue;
case 'datetime':
list($date, $time) = explode(' ', $item->getDate()->get(IL_CAL_DATETIME));
{
list($y, $m, $d) = explode('-', $date);
$this->addHiddenItem("{$item->getPostVar()}[date][y]", $y);
$this->addHiddenItem("{$item->getPostVar()}[date][m]", $m);
$this->addHiddenItem("{$item->getPostVar()}[date][d]", $d);
if( $item->getShowTime() )
{
list($h, $m, $s) = explode('-', $time);
$this->addHiddenItem("{$item->getPostVar()}[time][h]", $h);
$this->addHiddenItem("{$item->getPostVar()}[time][m]", $m);
$this->addHiddenItem("{$item->getPostVar()}[time][s]", $s);
}
}
else
{
$this->addHiddenItem("{$item->getPostVar()}[date]", $date);
$this->addHiddenItem("{$item->getPostVar()}[time]", $time);
}
break;
case 'duration':
$this->addHiddenItem("{$item->getPostVar()}[MM]", (int)$item->getMonths());
$this->addHiddenItem("{$item->getPostVar()}[dd]", (int)$item->getDays());
$this->addHiddenItem("{$item->getPostVar()}[hh]", (int)$item->getHours());
$this->addHiddenItem("{$item->getPostVar()}[mm]", (int)$item->getMinutes());
$this->addHiddenItem("{$item->getPostVar()}[ss]", (int)$item->getSeconds());
break;
case 'dateduration':
$this->addHiddenItem(
"{$item->getPostVar()}[start][date][y]",
(int) $item->getStart()->get(IL_CAL_FKT_DATE,'Y',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[start][date][m]",
(int) $item->getStart()->get(IL_CAL_FKT_DATE,'m',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[start][date][d]",
(int) $item->getStart()->get(IL_CAL_FKT_DATE,'d',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[start][time][h]",
(int) $item->getStart()->get(IL_CAL_FKT_DATE,'H',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[start][time][m]",
(int) $item->getStart()->get(IL_CAL_FKT_DATE,'i',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[start][time][s]",
(int) $item->getStart()->get(IL_CAL_FKT_DATE,'s',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[end][date][y]",
(int) $item->getEnd()->get(IL_CAL_FKT_DATE,'Y',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[end][date][m]",
(int) $item->getEnd()->get(IL_CAL_FKT_DATE,'m',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[end][date][d]",
(int) $item->getEnd()->get(IL_CAL_FKT_DATE,'d',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[end][time][h]",
(int) $item->getEnd()->get(IL_CAL_FKT_DATE,'H',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[end][time][m]",
(int) $item->getEnd()->get(IL_CAL_FKT_DATE,'i',$timezone)
);
$this->addHiddenItem(
"{$item->getPostVar()}[end][time][s]",
(int) $item->getEnd()->get(IL_CAL_FKT_DATE,'s',$timezone)
);
break;
case 'checkboxgroup':
if( is_array($item->getValue()) )
{
foreach( $item->getValue() as $option )
{
$this->addHiddenItem("{$item->getPostVar()}[]", $option);
}
}
break;
case 'checkbox':
if( $item->getChecked() )
{
$this->addHiddenItem($item->getPostVar(), 1);
}
break;
default:
$this->addHiddenItem($item->getPostVar(), $item->getValue());
}
}
}

+ Here is the call graph for this function:

ilTestSettingsChangeConfirmationGUI::setNewQuestionSetType (   $newQuestionSetType)
Parameters
string$newQuestionSetType

Definition at line 72 of file class.ilTestSettingsChangeConfirmationGUI.php.

References $newQuestionSetType.

{
$this->newQuestionSetType = $newQuestionSetType;
}
ilTestSettingsChangeConfirmationGUI::setOldQuestionSetType (   $oldQuestionSetType)
Parameters
string$oldQuestionSetType

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

References $oldQuestionSetType.

{
$this->oldQuestionSetType = $oldQuestionSetType;
}
ilTestSettingsChangeConfirmationGUI::setQuestionLossInfoEnabled (   $questionLossInfoEnabled)
Parameters
boolean$questionLossInfoEnabled

Definition at line 88 of file class.ilTestSettingsChangeConfirmationGUI.php.

References $questionLossInfoEnabled.

{
$this->questionLossInfoEnabled = $questionLossInfoEnabled;
}

Field Documentation

ilTestSettingsChangeConfirmationGUI::$lng
protected

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

Referenced by __construct().

ilTestSettingsChangeConfirmationGUI::$newQuestionSetType
private
ilTestSettingsChangeConfirmationGUI::$oldQuestionSetType
private
ilTestSettingsChangeConfirmationGUI::$questionLossInfoEnabled
private
ilTestSettingsChangeConfirmationGUI::$testOBJ
protected

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

Referenced by __construct().


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