ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMDCopyrightSelectionGUI Class Reference
+ Collaboration diagram for ilMDCopyrightSelectionGUI:

Public Member Functions

 __construct ($a_mode, $a_rbac_id, $a_obj_id)
 Constructor.
 fillTemplate ()
 parse

Data Fields

const MODE_QUICKEDIT = 1
const MODE_EDIT = 2

Protected Attributes

 $tpl
 $lng
 $settings

Private Attributes

 $mode
 $rbac_id
 $obj_id

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Constructor & Destructor Documentation

ilMDCopyrightSelectionGUI::__construct (   $a_mode,
  $a_rbac_id,
  $a_obj_id 
)

Constructor.

public

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

References $lng, $tpl, and ilMDSettings\_getInstance().

{
global $lng,$tpl;
$this->tpl = $tpl;
$this->lng = $lng;
$this->mode = $a_mode;
$this->rbac_id = $a_rbac_id;
$this->obj_id = $a_obj_id;
$this->settings = ilMDSettings::_getInstance();
}

+ Here is the call graph for this function:

Member Function Documentation

ilMDCopyrightSelectionGUI::fillTemplate ( )

parse

public

Definition at line 74 of file class.ilMDCopyrightSelectionGUI.php.

References $desc, ilMDCopyrightSelectionEntry\_extractEntryId(), ilMDCopyrightSelectionEntry\_getEntries(), ilMDRights\_lookupDescription(), and ilUtil\prepareFormOutput().

Referenced by ilMDEditorGUI\listQuickEdit(), and ilMDEditorGUI\listQuickEdit_scorm().

{
include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
$desc = ilMDRights::_lookupDescription($this->rbac_id,$this->obj_id);
if(!$this->settings->isCopyrightSelectionActive() or
{
$this->tpl->setVariable("TXT_COPYRIGHT",$this->lng->txt('meta_copyright'));
$this->tpl->setVariable('COPYRIGHT_VAL',
return true;
}
include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
$found = false;
foreach($entries as $entry)
{
$this->tpl->setCurrentBlock('copyright_selection');
if($entry->getEntryId() == $default_id)
{
$found = true;
$this->tpl->setVariable('COPYRIGHT_CHECKED','checked="checked"');
}
$this->tpl->setVariable('COPYRIGHT_ID',$entry->getEntryId());
$this->tpl->setVariable('COPYRIGHT_TITLE',$entry->getTitle());
$this->tpl->setVariable('COPYRIGHT_DESCRIPTION',$entry->getDescription());
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock('copyright_selection');
if(!$found)
{
$this->tpl->setVariable('COPYRIGHT_CHECKED','checked="checked"');
}
$this->tpl->setVariable('COPYRIGHT_ID',0);
$this->tpl->setVariable('COPYRIGHT_TITLE',$this->lng->txt('meta_cp_own'));
$this->tpl->setVariable("TXT_COPYRIGHT",$this->lng->txt('meta_copyright'));
if(!$found)
{
$this->tpl->setVariable('COPYRIGHT_VAL',$desc);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilMDCopyrightSelectionGUI::$lng
protected

Definition at line 42 of file class.ilMDCopyrightSelectionGUI.php.

Referenced by __construct().

ilMDCopyrightSelectionGUI::$mode
private

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

ilMDCopyrightSelectionGUI::$obj_id
private

Definition at line 47 of file class.ilMDCopyrightSelectionGUI.php.

ilMDCopyrightSelectionGUI::$rbac_id
private

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

ilMDCopyrightSelectionGUI::$settings
protected

Definition at line 43 of file class.ilMDCopyrightSelectionGUI.php.

ilMDCopyrightSelectionGUI::$tpl
protected

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

Referenced by __construct().

const ilMDCopyrightSelectionGUI::MODE_EDIT = 2

Definition at line 39 of file class.ilMDCopyrightSelectionGUI.php.

const ilMDCopyrightSelectionGUI::MODE_QUICKEDIT = 1

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