4 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateAction.php';
23 parent::__construct($a_action_id);
32 return self::TYPE_LOCAL_ROLE;
41 $this->role_template_id = $a_role_template_id;
58 global $rbacreview, $rbacadmin;
66 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
71 $rbacadmin->assignRoleToFolder($role->getId(),$source->getRefId(),
"y");
78 'Copy role template permissions '.
80 'parent: '.ROLE_FOLDER_ID.
' '.
81 'role_id: '.$role->getId().
' '.
82 'role_parent: '.$source->getRefId()
86 $rbacadmin->copyRoleTemplatePermissions(
95 $ops = $rbacreview->getOperationsOfRole($role->getId(),$source->getType(),$source->getRefId());
96 $rbacadmin->grantPermission($role->getId(),$ops,$source->getRefId());
120 $query =
'INSERT INTO didactic_tpl_alr (action_id,role_template_id) '.
135 public function delete()
141 $query =
'DELETE FROM didactic_tpl_alr '.
142 'WHERE action_id = '.$ilDB->quote($this->
getActionId(),
'integer');
143 $ilDB->manipulate(
$query);
166 include_once
'./Services/AccessControl/classes/class.ilRoleXmlExport.php';
171 $writer->
appendXML($exp->xmlDumpMem(FALSE));
187 $query =
'SELECT * FROM didactic_tpl_alr '.
188 'WHERE action_id = '.$ilDB->quote($this->
getActionId(),
'integer');
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
static _lookupTitle($a_id)
lookup object title
getRoleTemplateId()
get role template id
xmlEndTag($tag)
Writes an endtag.
toXml(ilXmlWriter $writer)
Write xml of template action.
static _lookupDescription($a_id)
lookup object description
__construct($a_action_id=0)
Constructor.
read()
Read db entry ilDB $ilDB.
getRefId()
Get ref id of target object.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
initSourceObject()
Init the source object.
setRoleTemplateId($a_role_template_id)
Set role template id.
represents a creation of local roles action
Abstract class for template actions.
Xml export of roles and role templates.
appendXML($a_str)
append xml string to document
static getLogger($a_component_id)
Get component logger.
getType()
Get action type.
getActionId()
Get action id.