4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
33 parent::__construct($a_parent_obj, $a_parent_cmd);
35 $this->
setId(
"licovw");
36 $this->
setTitle($this->lng->txt(
"licenses"));
38 $this->
addColumn($this->lng->txt(
"title"),
"title");
39 $this->
addColumn($this->lng->txt(
"comment"));
40 $this->
addColumn($this->lng->txt(
"existing_licenses"),
"existing");
41 $this->
addColumn($this->lng->txt(
"used_licenses"),
"used");
42 $this->
addColumn($this->lng->txt(
"remaining_licenses"),
"remaining");
43 $this->
addColumn($this->lng->txt(
"potential_accesses"),
"potential");
48 $this->
setRowTemplate(
"tpl.lic_show_licenses.html",
"Services/License");
50 $this->
getItems($a_mode, $a_parent_gui);
67 foreach ($objects as $item) {
68 $license =
new ilLicense($item[
"obj_id"]);
70 $remaining_licenses = ($license->getLicenses() ==
"0") ? $this->lng->txt(
"arbitrary") : $license->getRemainingLicenses();
73 "title" => $item[
"title"],
74 "comment" => nl2br(trim($license->getRemarks())),
75 "existing" => $license->getLicenses(),
76 "used" => $license->getAccesses(),
77 "remaining" => $remaining_licenses,
78 "potential" => $license->getPotentialAccesses(),
92 $this->tpl->setVariable(
"TITLE", $a_set[
"listGUI"]);
93 $this->tpl->setVariable(
"REMARKS", $a_set[
"comment"]);
94 $this->tpl->setVariable(
"LICENSES", $a_set[
"existing"]);
95 $this->tpl->setVariable(
"USED_LICENSES", $a_set[
"used"]);
96 $this->tpl->setVariable(
"REMAINING_LICENSES", $a_set[
"remaining"]);
97 $this->tpl->setVariable(
"POTENTIAL_ACCESSES", $a_set[
"potential"]);
108 $item_list_gui->enableCommands(
true);
109 $item_list_gui->enableDelete(
false);
110 $item_list_gui->enableCut(
false);
111 $item_list_gui->enableCopy(
false);
112 $item_list_gui->enableLink(
false);
113 $item_list_gui->enableProperties(
false);
114 $item_list_gui->enableDescription(
false);
115 $item_list_gui->enablePreconditions(
false);
116 $item_list_gui->enableSubscribe(
false);
117 $item_list_gui->enableInfoScreen(
false);
119 return $item_list_gui->getListItemHTML($item[
"ref_id"], $item[
"obj_id"], $item[
"title"], $item[
"description"]);
129 global $objDefinition;
131 if (!is_object($this->item_list_guis[
$a_type])) {
132 $class = $objDefinition->getClassName($a_type);
133 $location = $objDefinition->getLocation($a_type);
134 $full_class =
"ilObj" . $class .
"ListGUI";
135 include_once(
$location .
"/class." . $full_class .
".php");
136 $item_list_gui =
new $full_class();
137 $this->item_list_guis[
$a_type] = $item_list_gui;
139 $item_list_gui = $this->item_list_guis[
$a_type];
142 return $item_list_gui;
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
const LIC_MODE_ADMINISTRATION
getItemHTML($item=array())
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilObjectGUI Basic methods of all Output classes.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
__construct($a_parent_obj, $a_parent_cmd, $a_mode, ilObjectGUI $a_parent_gui)
ilLicenseOverviewTableGUI constructor.
static _getLicensedObjects()
Get a list of all objects with activated licensing.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
getItems($a_mode, ilObjectGUI $a_parent_gui)
static _getLicensedChildObjects($a_ref_id)
Get a list of all sub objects with activated licensing.