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;
63 $rolf_id = $rbacreview->getRoleFolderIdOfObject($source->getRefId());
66 $source->createRoleFolder();
68 $rolf_id = $rbacreview->getRoleFolderIdOfObject($source->getRefId());
70 $GLOBALS[
'ilLog']->write(__METHOD__.
': Current role folder id is: '.$rolf_id);
74 $role = $rolf->createRole(
82 $rbacadmin->copyRoleTemplatePermissions(
91 $ops = $rbacreview->getOperationsOfRole($role->getId(),$source->getType(),$rolf->getRefId());
92 $rbacadmin->grantPermission($role->getId(),$ops,$source->getRefId());
116 $query =
'INSERT INTO didactic_tpl_alr (action_id,role_template_id) '.
131 public function delete()
137 $query =
'DELETE FROM didactic_tpl_alr '.
138 'WHERE action_id = '.$ilDB->quote($this->
getActionId(),
'integer');
139 $ilDB->manipulate(
$query);
163 include_once
'./Services/AccessControl/classes/class.ilRoleXmlExport.php';
168 $writer->
appendXML($exp->xmlDumpMem(FALSE));
184 $query =
'SELECT * FROM didactic_tpl_alr '.
185 'WHERE action_id = '.$ilDB->quote($this->
getActionId(),
'integer');
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
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.
const DB_FETCHMODE_OBJECT
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.
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
getType()
Get action type.
getActionId()
Get action id.