4 require_once
"./Services/License/classes/class.ilLicense.php";
6 define(
"LIC_MODE_ADMINISTRATION",1);
7 define(
"LIC_MODE_REPOSITORY",2);
30 $this->module =
"Services/License";
31 $this->mode = $a_mode;
35 $this->lng->loadLanguageModule(
"license");
36 $this->parent_gui =& $a_parent_gui;
45 global $rbacsystem,
$ilErr;
48 if (!$rbacsystem->checkAccess(
"read",$this->parent_gui->object->getRefId()))
50 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->MESSAGE);
53 $cmd = $this->ctrl->getCmd(
"showLicenses");
65 include_once
'./Services/Table/classes/class.ilTableGUI.php';
76 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.lic_show_licenses.html',$this->module);
78 foreach ($objects as
$data)
80 $license =&
new ilLicense($data[
"obj_id"]);
81 $licenses = strval($license->getLicenses());
82 $remarks = $license->getRemarks();
83 $used_licenses = strval($license->getAccesses());
84 $remaining_licenses = $licenses ==
"0" ? $this->lng->txt(
"arbitrary") : strval($license->getRemainingLicenses());
85 $potential_accesses = strval($license->getPotentialAccesses());
87 $this->tpl->setCurrentBlock(
"table_row");
88 $this->tpl->setVariable(
"TITLE", $this->
getItemHTML($data));
89 $this->tpl->setVariable(
"REMARKS", $remarks);
90 $this->tpl->setVariable(
"LICENSES", $licenses);
91 $this->tpl->setVariable(
"USED_LICENSES", $used_licenses);
92 $this->tpl->setVariable(
"REMAINING_LICENSES", $remaining_licenses);
93 $this->tpl->setVariable(
"POTENTIAL_ACCESSES", $potential_accesses);
94 $this->tpl->parseCurrentBlock();
97 $this->tpl->setVariable(
"TXT_TITLE", $this->lng->txt(
"title"));
98 $this->tpl->setVariable(
"TXT_REMARKS", $this->lng->txt(
"comment"));
99 $this->tpl->setVariable(
"TXT_EXISTING_LICENSES", $this->lng->txt(
"existing_licenses"));
100 $this->tpl->setVariable(
"TXT_USED_LICENSES", $this->lng->txt(
"used_licenses"));
101 $this->tpl->setVariable(
"TXT_REMAINING_LICENSES", $this->lng->txt(
"remaining_licenses"));
102 $this->tpl->setVariable(
"TXT_POTENTIAL_ACCESSES", $this->lng->txt(
"potential_accesses"));
103 $this->tpl->setVariable(
"TXT_USED_LICENSES_EXPLANATION", $this->lng->txt(
"used_licenses_explanation"));
104 $this->tpl->setVariable(
"TXT_REMAINING_LICENSES_EXPLANATION", $this->lng->txt(
"remaining_licenses_explanation"));
105 $this->tpl->setVariable(
"TXT_POTENTIAL_ACCESSES_EXPLANATION", $this->lng->txt(
"potential_accesses_explanation"));
115 $item_list_gui->enableCommands(
true);
116 $item_list_gui->enableDelete(
false);
117 $item_list_gui->enableCut(
false);
118 $item_list_gui->enableCopy(
false);
119 $item_list_gui->enablePayment(
false);
120 $item_list_gui->enableLink(
false);
121 $item_list_gui->enableProperties(
false);
122 $item_list_gui->enableDescription(
false);
123 $item_list_gui->enablePreconditions(
false);
124 $item_list_gui->enableSubscribe(
false);
125 $item_list_gui->enableInfoScreen(
false);
127 return $item_list_gui->getListItemHTML($item[
"ref_id"],
128 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
136 global $objDefinition;
137 if (!is_object($this->item_list_guis[$a_type]))
139 $class = $objDefinition->getClassName($a_type);
140 $location = $objDefinition->getLocation($a_type);
141 $full_class =
"ilObj".$class.
"ListGUI";
142 include_once(
$location.
"/class.".$full_class.
".php");
143 $item_list_gui =
new $full_class();
144 $this->item_list_guis[$a_type] =& $item_list_gui;
148 $item_list_gui =& $this->item_list_guis[$a_type];
150 return $item_list_gui;