19declare(strict_types=1);
41 $this->role_template_id = $a_role_template_id;
57 $this->admin->assignRoleToFolder($role->getId(), $source->getRefId(),
"y");
69 'Copy role template permissions ' .
72 'role_id: ' . $role->getId() .
' ' .
73 'role_parent: ' . $source->getRefId()
76 $this->admin->copyRoleTemplatePermissions(
84 $ops = $this->review->getOperationsOfRole($role->getId(), $source->getType(), $source->getRefId());
85 $this->admin->grantPermission($role->getId(), $ops, $source->getRefId());
100 if (!parent::save()) {
104 $query =
'INSERT INTO didactic_tpl_alr (action_id,role_template_id) ' .
106 $this->db->quote($this->
getActionId(),
'integer') .
', ' .
109 $res = $this->db->manipulate($query);
114 public function delete():
void
118 $query =
'DELETE FROM didactic_tpl_alr ' .
119 'WHERE action_id = ' . $this->db->quote($this->
getActionId(),
'integer');
120 $this->db->manipulate($query);
140 $writer->
appendXML($exp->xmlDumpMem(
false));
148 $query =
'SELECT * FROM didactic_tpl_alr ' .
149 'WHERE action_id = ' . $this->db->quote($this->
getActionId(),
'integer');
150 $res = $this->db->query($query);
Abstract class for template actions.
represents a creation of local roles action
setRoleTemplateId(int $a_role_template_id)
save()
Write action to db Overwrite for filling additional db fields.
getType()
Get type of template.
toXml(ilXmlWriter $writer)
__construct(int $a_action_id=0)
revert()
Implement everthing that is necessary to revert a didactic template return bool.
static _lookupType(int $id, bool $reference=false)
static _lookupTitle(int $obj_id)
static _lookupDescription(int $obj_id)
Xml export of roles and role templates.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlEndTag(string $tag)
Writes an endtag.
appendXML(string $a_str)
append xml string to document
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc