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