5 include_once
"./Services/Xml/classes/class.ilXmlWriter.php";
41 parent::__construct();
44 $this->user_id =
$ilUser->getId();
55 $this->role_type =
$type;
63 $rbacreview = $DIC[
'rbacreview'];
64 if (!is_array($this->roles)) {
70 include_once
'./Services/AccessControl/classes/class.ilObjRole.php';
71 include_once
'./webservice/soap/classes/class.ilObjectXMLWriter.php';
73 foreach ($this->roles as $role) {
75 if (!empty($this->role_type) && strcasecmp($this->role_type, $role[
"role_type"]) != 0) {
78 if ($rbacreview->isRoleDeleted($role[
"obj_id"])) {
82 $attrs = array(
'role_type' => ucwords($role[
"role_type"]),
83 'id' =>
"il_" . IL_INST_ID .
"_role_" . $role[
"obj_id"]);
89 $this->
xmlElement(
'Title', null, $role[
"title"]);
90 $this->
xmlElement(
'Description', null, $role[
"description"]);
94 $ownerObj = IlObjectFactory::getInstanceByRefId($ref_id,
false);
96 if (is_object($ownerObj)) {
97 $attrs = array(
"obj_id" =>
98 "il_" . IL_INST_ID .
"_" . $ownerObj->getType() .
"_" . $ownerObj->getId(),
"ref_id" => $ownerObj->getRefId(),
"type" => $ownerObj->getType());
100 $this->
xmlElement(
'Title', null, $ownerObj->getTitle());
101 $this->
xmlElement(
'Description', null, $ownerObj->getDescription());
103 $this->
xmlEndTag(
'AssignedObject', $attrs);
123 $this->
xmlSetDtdDef(
"<!DOCTYPE Roles PUBLIC \"-//ILIAS//DTD ILIAS Roles//EN\" \"" . ILIAS_HTTP_PATH .
"/xml/ilias_role_object_3_10.dtd\">");
124 $this->
xmlSetGenCmt(
"Roles information of ilias system");
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
xmlSetGenCmt($genCmt)
Sets generated comment.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
xmlDumpMem($format=true)
Returns xml document from memory.
xmlEndTag($tag)
Writes an endtag.
static __extractRefId($role_title)
extract ref id from role title, e.g.
static appendPathToObject($writer, $refid)
redirection script todo: (a better solution should control the processing via a xml file) ...
xmlHeader()
Writes xml header public.
static _getTranslation($a_role_title)
xmlElement($tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)