4include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateAction.php';
22 parent::__construct($a_action_id);
40 $this->role_template_id = $a_role_template_id;
59 $rbacreview =
$DIC[
'rbacreview'];
60 $rbacadmin =
$DIC[
'rbacadmin'];
68 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
73 $rbacadmin->assignRoleToFolder($role->getId(),
$source->getRefId(),
"y");
80 'Copy role template permissions ' .
82 'parent: ' . ROLE_FOLDER_ID .
' ' .
83 'role_id: ' . $role->getId() .
' ' .
84 'role_parent: ' .
$source->getRefId()
88 $rbacadmin->copyRoleTemplatePermissions(
97 $ops = $rbacreview->getOperationsOfRole($role->getId(),
$source->getType(),
$source->getRefId());
98 $rbacadmin->grantPermission($role->getId(), $ops,
$source->getRefId());
124 $query =
'INSERT INTO didactic_tpl_alr (action_id,role_template_id) ' .
139 public function delete()
147 $query =
'DELETE FROM didactic_tpl_alr ' .
172 include_once
'./Services/AccessControl/classes/class.ilRoleXmlExport.php';
177 $writer->
appendXML($exp->xmlDumpMem(
false));
195 $query =
'SELECT * FROM didactic_tpl_alr ' .
An exception for terminatinating execution or to throw for unit testing.
Abstract class for template actions.
getActionId()
Get action id.
initSourceObject()
Init the source object.
getRefId()
Get ref id of target object.
represents a creation of local roles action
getRoleTemplateId()
get role template id
setRoleTemplateId($a_role_template_id)
Set role template id.
__construct($a_action_id=0)
Constructor.
read()
Read db entry @global ilDB $ilDB.
getType()
Get action type.
toXml(ilXmlWriter $writer)
Write xml of template action.
static getLogger($a_component_id)
Get component logger.
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
static _lookupType($a_id, $a_reference=false)
lookup object type
Xml export of roles and role templates.
xmlEndTag($tag)
Writes an endtag.
appendXML($a_str)
append xml string to document
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
foreach($_POST as $key=> $value) $res