4 include_once 
'./Services/Table/classes/class.ilTable2GUI.php';
 
   20         public function  __construct($a_parent_obj, $a_parent_cmd = 
"")
 
   23                 $this->
setId(
'tbl_didactic_tpl_settings');
 
   34                 $lng->loadLanguageModule(
'search');
 
   35                 $this->
addColumn($this->lng->txt(
'search_title_description'),
'title',
'40%');
 
   36                 $this->
addColumn($this->lng->txt(
'didactic_applicable_for'),
'applicable',
'20%');
 
   37                 $this->
addColumn($this->lng->txt(
'active'),
'active',
'20%');
 
   38                 $this->
addColumn($this->lng->txt(
'actions'),
'',
'20%');
 
   40                 $this->
setTitle($this->lng->txt(
'didactic_available_templates'));
 
   42                 $this->
addMultiCommand(
'activateTemplates', $this->lng->txt(
'activate'));
 
   43                 $this->
addMultiCommand(
'deactivateTemplates', $this->lng->txt(
'deactivate'));
 
   48                 $this->
setRowTemplate(
'tpl.didactic_template_overview_row.html',
'Services/DidacticTemplate');
 
   51                 $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
 
   60                 include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateSettings.php';
 
   62                 $tpls->readInactive();
 
   65                 foreach($tpls->getTemplates() as 
$tpl)
 
   69                         $data[$counter][
'title'] = 
$tpl->getTitle();
 
   70                         $data[$counter][
'description'] = 
$tpl->getDescription();
 
   71                         $data[$counter][
'info'] = 
$tpl->getInfo();
 
   72                         $data[$counter][
'enabled'] = (int) 
$tpl->isEnabled();
 
   73                         $data[$counter][
'assignments'] = 
$tpl->getAssignments();
 
   90                 $this->tpl->setVariable(
'VAL_ID',$set[
'id']);
 
   91                 $this->tpl->setVariable(
'VAL_TITLE', $set[
'title']);
 
   92                 $this->tpl->setVariable(
'VAL_DESC', $set[
'description']);
 
   94                 foreach((array) explode(
"\n", $set[
'info']) as $info)
 
   96                         $trimmed_info = trim($info);
 
   99                                 $this->tpl->setCurrentBlock(
'info');
 
  100                                 $this->tpl->setVariable(
'VAL_INFO',$trimmed_info);
 
  101                                 $this->tpl->parseCurrentBlock();
 
  106                 $this->tpl->setVariable(
'VAL_IMAGE',
 
  111                 $this->tpl->setVariable(
'VAL_ENABLED_TXT',
 
  113                         $this->lng->txt(
'active') :
 
  114                         $this->lng->txt(
'inactive')
 
  119                 foreach((array) $set[
'assignments'] as $obj_type)
 
  121                         $atxt .= ($this->lng->txt(
'objs_'.$obj_type).
'<br/>');
 
  123                 $this->tpl->setVariable(
'VAL_APPLICABLE', $atxt);
 
  125                 $ilCtrl->setParameterByClass(
 
  132                 $this->tpl->setCurrentBlock(
'action_link');
 
  133                 $this->tpl->setVariable(
 
  135                         $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'editTemplate')
 
  137                 $this->tpl->setVariable(
'A_TEXT',$this->lng->txt(
'edit'));
 
  138                 $this->tpl->parseCurrentBlock();
 
  141                 $this->tpl->setCurrentBlock(
'action_link');
 
  142                 $this->tpl->setVariable(
 
  144                         $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'copyTemplate')
 
  146                 $this->tpl->setVariable(
'A_TEXT', $this->lng->txt(
'copy'));
 
  147                 $this->tpl->parseCurrentBlock();
 
  150                 $this->tpl->setCurrentBlock(
'action_link');
 
  151                 $this->tpl->setVariable(
 
  153                         $ilCtrl->getLinkTargetByClass(get_class($this->
getParentObject()),
'exportTemplate')
 
  155                 $this->tpl->setVariable(
'A_TEXT', $this->lng->txt(
'didactic_do_export'));
 
  156                 $this->tpl->parseCurrentBlock();