61                $this->enabled = $a_status;
 
   79                $this->title = $a_title;
 
  104                return $tit ? $tit : $this->
getTitle();
 
  138                $this->description = $a_description;
 
  147                $this->info = $a_info;
 
  183                $this->assignments = (array) $a_ass;
 
  201                $this->assignments[] = $a_obj_type;
 
  263                $lang = $trans->getLanguages();
 
  265                foreach(
$lang as $k => $v)
 
  267                        if($v[
'lang_default'])
 
  279                        $lang[0][
'lang_code'] = $trans->getDefaultLanguage();
 
  297                        $a_lng = 
$ilUser->getCurrentLanguage();
 
  300                if(isset(
$lang[$a_lng][$a_value]))
 
  302                        return $lang[$a_lng][$a_value] ;
 
  312        public function delete()
 
  322                $query = 
'DELETE FROM didactic_tpl_settings '.
 
  323                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  324                $ilDB->manipulate(
$query);
 
  327                $query = 
'DELETE FROM didactic_tpl_sa '.
 
  328                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  329                $ilDB->manipulate(
$query);
 
  331                include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateActionFactory.php';
 
  337                include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
 
  352                $this->
setId($ilDB->nextId(
'didactic_tpl_settings'));
 
  354                $query = 
'INSERT INTO didactic_tpl_settings (id,enabled,title,description,info,type,auto_generated,exclusive_tpl) '.
 
  357                        $ilDB->quote($this->
isEnabled(),
'integer').
', '.
 
  358                        $ilDB->quote($this->
getTitle(),
'text').
', '.
 
  360                        $ilDB->quote($this->
getInfo(),
'text').
', '.
 
  361                        $ilDB->quote($this->
getType(),
'integer').
', '.
 
  366                $ilDB->manipulate(
$query);
 
  405                $query = 
'INSERT INTO didactic_tpl_sa (id,obj_type) '.
 
  407                        $ilDB->quote($this->
getId(),
'integer').
', '.
 
  408                        $ilDB->quote($a_obj_type,
'text').
 
  429                        $ilDB->quote($node,
'integer').
 
  433                $query = 
'INSERT INTO didactic_tpl_en (id,node) '.
 
  434                        'VALUES ' . implode(
', ' , $values);
 
  443                $query = 
'DELETE FROM didactic_tpl_en '.
 
  444                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  445                $ilDB->manipulate(
$query);
 
  452                $effective_nodes = array();
 
  454                $query = 
'SELECT * FROM didactic_tpl_en '.
 
  455                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  459                        $effective_nodes[] = 
$row->node;
 
  479                $query = 
'DELETE FROM didactic_tpl_sa '.
 
  480                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  481                $ilDB->manipulate(
$query);
 
  494                $query = 
'UPDATE didactic_tpl_settings '.
 
  496                        'enabled = '.$ilDB->quote($this->
isEnabled(),
'integer').
', '.
 
  497                        'title = '.$ilDB->quote($this->
getTitle(),
'text').
', '.
 
  498                        'description = '.$ilDB->quote($this->
getDescription(),
'text').
', '.
 
  499                        'info = '.$ilDB->quote($this->
getInfo(),
'text').
', '.
 
  500                        'type = '.$ilDB->quote($this->
getType(),
'integer').
', '.
 
  501                        'exclusive_tpl = '.$ilDB->quote((
int)$this->
isExclusive(),
'integer').
' '.
 
  502                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  503                $ilDB->manipulate(
$query);
 
  529                $query = 
'SELECT * FROM didactic_tpl_settings dtpl '.
 
  530                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  546                $query = 
'SELECT * FROM didactic_tpl_sa '.
 
  547                        'WHERE id = '.$ilDB->quote($this->
getId(),
'integer');
 
  585                        $info_lines = (array) explode(
"\n",$this->
getInfo());
 
  586                        foreach($info_lines as 
$info)
 
  588                                $trimmed_info = trim(
$info);
 
  589                                if(strlen($trimmed_info))
 
  591                                        $writer->
xmlElement(
'p', array(), $trimmed_info);
 
  619                        $writer->
xmlElement(
'assignment', array(), $assignment);
 
  625                include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateActionFactory.php';
 
  628                        $action->toXml($writer);
 
  642                include_once 
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateCopier.php';
 
  653                include_once(
"./Services/Multilingualism/classes/class.ilMultilingualism.php");
 
  672                        if($tree->isGrandChild($node, $a_node_id))
 
An exception for terminatinating execution or to throw for unit testing.
static getActionsByTemplateId($a_tpl_id)
Get actions of one template.
static appendCopyInfo($a_orig_title)
static deleteByTemplateId($a_tpl_id)
Delete by template id @global ilDB $ilDB.
saveAssignment($a_obj_type)
Add one object assignment @global ilDB $ilDB.
setEffectiveFrom($effective_from)
setTitle($a_title)
Set title.
getPresentationTitle($a_lng="")
enable($a_status)
Set enabled status.
getPresentation($a_value, $a_lng)
setDescription($a_description)
Set description.
addAssignment($a_obj_type)
Add one assignment obj type.
setAutoGenerated($auto_generated)
DO NOT CHANGE THIS VALUE.
__construct($a_id=0)
Constructor.
getDescription()
Get description.
saveAssignments()
Save assignments in DB.
getTranslations()
get all translations from this object
getAssignments()
Get object assignemnts.
setAssignments(Array $a_ass)
Set assignments.
getInfo()
Get installation info text.
isEnabled()
Check if template is enabled.
read()
read settings from db
setType($a_type)
Set type.
deleteAssignments()
Delete assignments @global ilDB $ilDB.
getPresentationDescription($a_lng="")
toXml(ilXmlWriter $writer)
Export.
__clone()
Implemented clone method.
update()
Update settings @global ilDB $ilDB.
setInfo($a_info)
Set installation info text.
static getInstance($a_obj_id, $a_type)
Get instance.
xmlEndTag($tag)
Writes an endtag.
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
xmlElement($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
Writes a basic element (no children, just textual content)
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang