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

Public Member Functions

 __construct (ilCtrl $ctrl, ilTemplate $tpl, ilLanguage $lng)
 build ()
 setPdfExportLinkTarget ($pdfExportLinkTarget)
 getPdfExportLinkTarget ()
 setCertificateLinkTarget ($certificateLinkTarget)
 getCertificateLinkTarget ()
 setShowBestSolutionsLinkTarget ($showBestSolutionsLinkTarget)
 getShowBestSolutionsLinkTarget ()
 setHideBestSolutionsLinkTarget ($hideBestSolutionsLinkTarget)
 getHideBestSolutionsLinkTarget ()
 setParticipantSelectorOptions ($participantSelectorOptions)
 getParticipantSelectorOptions ()
 getParticipantSelectorOptionsWithHintOption ()
- Public Member Functions inherited from ilToolbarGUI
 __construct ()
 setFormAction ($a_val, $a_multipart=false, $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags.
 getFormAction ()
 Get form action.
 setLeadingImage ($a_img, $a_alt)
 Set leading image.
 setHidden ($a_val)
 Set hidden.
 getHidden ()
 Get hidden.
 setId ($a_val)
 Set id.
 getId ()
 Get id.
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission.
 getPreventDoubleSubmission ()
 Get prevent double submission.
 addButton ($a_txt, $a_cmd, $a_target="", $a_acc_key="", $a_additional_attrs= '', $a_id="", $a_class= 'submit')
 Add button to toolbar.
 addFormButton ($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
 Add form button to toolbar.
 addInputItem (ilToolbarItem $a_item, $a_output_label=false)
 Add input item.
 addButtonInstance (ilButton $a_button)
 Add button instance.
 addDropDown ($a_txt, $a_dd_html)
 Add input item.
 addSeparator ()
 Add separator.
 addText ($a_text)
 Add text.
 addSpacer ($a_width=null)
 Add spacer.
 addLink ($a_caption, $a_url, $a_disabled=false)
 Add link.
 setOpenFormTag ($a_val)
 Set open form tag.
 getOpenFormTag ()
 Get open form tag.
 setCloseFormTag ($a_val)
 Set close form tag.
 getCloseFormTag ()
 Get close form tag.
 setFormName ($a_val)
 Set form name.
 getFormName ()
 Get form name.
 getHTML ()
 Get toolbar html.

Data Fields

 $ctrl = null
 $tpl = null
 $lng = null
- Data Fields inherited from ilToolbarGUI
 $items = array()
 $open_form_tag = true
 $close_form_tag = true
 $form_target = ""
 $form_name = ""

Private Member Functions

 getPdfExportLabel ()

Private Attributes

 $pdfExportLinkTarget = null
 $certificateLinkTarget = null
 $showBestSolutionsLinkTarget = null
 $hideBestSolutionsLinkTarget = null
 $participantSelectorOptions = array()

Additional Inherited Members

- Protected Attributes inherited from ilToolbarGUI
 $prevent_double_submission = false

Detailed Description

Definition at line 12 of file class.ilTestResultsToolbarGUI.php.

Constructor & Destructor Documentation

ilTestResultsToolbarGUI::__construct ( ilCtrl  $ctrl,
ilTemplate  $tpl,
ilLanguage  $lng 
)

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

References $ctrl, $lng, $tpl, and ilToolbarGUI\__construct().

{
$this->ctrl = $ctrl;
$this->tpl = $tpl;
$this->lng = $lng;
}

+ Here is the call graph for this function:

Member Function Documentation

ilTestResultsToolbarGUI::build ( )

Definition at line 63 of file class.ilTestResultsToolbarGUI.php.

References ilToolbarGUI\addButton(), ilToolbarGUI\addButtonInstance(), ilToolbarGUI\addInputItem(), ilToolbarGUI\addSeparator(), getCertificateLinkTarget(), getHideBestSolutionsLinkTarget(), ilLinkButton\getInstance(), getParticipantSelectorOptions(), getParticipantSelectorOptionsWithHintOption(), getPdfExportLabel(), getPdfExportLinkTarget(), getShowBestSolutionsLinkTarget(), and ilToolbarGUI\setId().

{
$this->setId('tst_results_toolbar');
$this->addButton($this->lng->txt('print'), 'javascript:window.print();');
if( strlen($this->getPdfExportLinkTarget()) )
{
require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
$link = ilLinkButton::getInstance(); // always returns a new instance
$link->setUrl($this->getPdfExportLinkTarget());
$link->setCaption($this->getPdfExportLabel(), false);
$link->setOmitPreventDoubleSubmission(true);
$this->addButtonInstance($link);
}
if( strlen($this->getCertificateLinkTarget()) )
{
$this->addButton( $this->lng->txt('certificate'), $this->getCertificateLinkTarget() );
}
if( strlen($this->getShowBestSolutionsLinkTarget()) )
{
$this->addSeparator();
$this->addButton( $this->lng->txt('tst_btn_show_best_solutions'), $this->getShowBestSolutionsLinkTarget() );
}
elseif( strlen($this->getHideBestSolutionsLinkTarget()) )
{
$this->addSeparator();
$this->addButton( $this->lng->txt('tst_btn_hide_best_solutions'), $this->getHideBestSolutionsLinkTarget() );
}
if( count($this->getParticipantSelectorOptions()) )
{
$this->addSeparator();
require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
$sel = new ilSelectInputGUI('', 'active_id');
$sel->setOptions($this->getParticipantSelectorOptionsWithHintOption());
$this->addInputItem($sel);
require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
$link = ilLinkButton::getInstance(); // always returns a new instance
$link->setUrl('#');
$link->setId('ilTestResultParticipantJumper');
$link->setCaption($this->lng->txt('tst_res_jump_to_participant_btn'), false);
$this->addButtonInstance($link);
$this->tpl->addJavaScript('Modules/Test/js/ilTestResultParticipantSelector.js');
}
}

+ Here is the call graph for this function:

ilTestResultsToolbarGUI::getCertificateLinkTarget ( )

Definition at line 135 of file class.ilTestResultsToolbarGUI.php.

References $certificateLinkTarget.

Referenced by build().

+ Here is the caller graph for this function:

ilTestResultsToolbarGUI::getHideBestSolutionsLinkTarget ( )

Definition at line 155 of file class.ilTestResultsToolbarGUI.php.

References $hideBestSolutionsLinkTarget.

Referenced by build().

+ Here is the caller graph for this function:

ilTestResultsToolbarGUI::getParticipantSelectorOptions ( )

Definition at line 165 of file class.ilTestResultsToolbarGUI.php.

References $participantSelectorOptions.

Referenced by build(), and getParticipantSelectorOptionsWithHintOption().

+ Here is the caller graph for this function:

ilTestResultsToolbarGUI::getParticipantSelectorOptionsWithHintOption ( )

Definition at line 170 of file class.ilTestResultsToolbarGUI.php.

References $options, and getParticipantSelectorOptions().

Referenced by build().

{
$options = array($this->lng->txt('tst_res_jump_to_participant_hint_opt'));
if( function_exists('array_replace') )
{
return array_replace($options, $this->getParticipantSelectorOptions());
}
foreach($this->getParticipantSelectorOptions() as $key => $val)
{
$options[$key] = $val;
}
return $options;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTestResultsToolbarGUI::getPdfExportLabel ( )
private

Definition at line 115 of file class.ilTestResultsToolbarGUI.php.

Referenced by build().

{
return $this->lng->txt('pdf_export');
}

+ Here is the caller graph for this function:

ilTestResultsToolbarGUI::getPdfExportLinkTarget ( )

Definition at line 125 of file class.ilTestResultsToolbarGUI.php.

References $pdfExportLinkTarget.

Referenced by build().

+ Here is the caller graph for this function:

ilTestResultsToolbarGUI::getShowBestSolutionsLinkTarget ( )

Definition at line 145 of file class.ilTestResultsToolbarGUI.php.

References $showBestSolutionsLinkTarget.

Referenced by build().

+ Here is the caller graph for this function:

ilTestResultsToolbarGUI::setCertificateLinkTarget (   $certificateLinkTarget)

Definition at line 130 of file class.ilTestResultsToolbarGUI.php.

References $certificateLinkTarget.

{
$this->certificateLinkTarget = $certificateLinkTarget;
}
ilTestResultsToolbarGUI::setHideBestSolutionsLinkTarget (   $hideBestSolutionsLinkTarget)

Definition at line 150 of file class.ilTestResultsToolbarGUI.php.

References $hideBestSolutionsLinkTarget.

{
$this->hideBestSolutionsLinkTarget = $hideBestSolutionsLinkTarget;
}
ilTestResultsToolbarGUI::setParticipantSelectorOptions (   $participantSelectorOptions)

Definition at line 160 of file class.ilTestResultsToolbarGUI.php.

References $participantSelectorOptions.

{
$this->participantSelectorOptions = $participantSelectorOptions;
}
ilTestResultsToolbarGUI::setPdfExportLinkTarget (   $pdfExportLinkTarget)

Definition at line 120 of file class.ilTestResultsToolbarGUI.php.

References $pdfExportLinkTarget.

{
$this->pdfExportLinkTarget = $pdfExportLinkTarget;
}
ilTestResultsToolbarGUI::setShowBestSolutionsLinkTarget (   $showBestSolutionsLinkTarget)

Definition at line 140 of file class.ilTestResultsToolbarGUI.php.

References $showBestSolutionsLinkTarget.

{
$this->showBestSolutionsLinkTarget = $showBestSolutionsLinkTarget;
}

Field Documentation

ilTestResultsToolbarGUI::$certificateLinkTarget = null
private
ilTestResultsToolbarGUI::$ctrl = null

Definition at line 17 of file class.ilTestResultsToolbarGUI.php.

Referenced by __construct().

ilTestResultsToolbarGUI::$hideBestSolutionsLinkTarget = null
private
ilTestResultsToolbarGUI::$lng = null

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

Referenced by __construct().

ilTestResultsToolbarGUI::$participantSelectorOptions = array()
private
ilTestResultsToolbarGUI::$pdfExportLinkTarget = null
private
ilTestResultsToolbarGUI::$showBestSolutionsLinkTarget = null
private
ilTestResultsToolbarGUI::$tpl = null

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

Referenced by __construct().


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