36 $this->main_tpl = $DIC->ui()->mainTemplate();
38 $this->
ctrl = $DIC->ctrl();
39 $this->
lng = $DIC->language();
40 $ilCtrl = $DIC->ctrl();
41 $lng = $DIC->language();
43 $this->exc_id = $a_exc_id;
44 $this->
setId(
"exccritcat" . $this->exc_id);
53 $this->
addColumn($this->
lng->txt(
"position"),
"pos",
"10%");
63 $this->
setRowTemplate(
"tpl.exc_crit_cat_row.html",
"components/ILIAS/Exercise");
82 $protected = $assigned = array();
84 if ($ass->getPeerReviewCriteriaCatalogue()) {
85 $assigned[$ass->getPeerReviewCriteriaCatalogue()][$ass->getId()] = $ass->getTitle();
88 if ($peer_review->hasPeerReviewGroups()) {
89 $protected[$ass->getPeerReviewCriteriaCatalogue()][] = $ass->getId();
94 if ($protected !== []) {
95 $this->main_tpl->setOnScreenMessage(
'info',
$lng->
txt(
"exc_crit_cat_protected_assignment_info"));
104 $crits[] = array($crit->getTranslatedType(), $crit->getTitle());
108 "id" => $item->getId()
110 ,
"title" => $item->getTitle()
111 ,
"criterias" => $crits
112 ,
"protected" => array_key_exists($item->getId(), $protected)
113 ? $protected[$item->getId()]
115 ,
"assigned" => array_key_exists($item->getId(), $assigned)
116 ? $assigned[$item->getId()]
123 return (
bool) count(
$data);
128 return $a_field ===
"pos";
131 protected function fillRow(array $a_set): void
136 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
137 $this->tpl->setVariable(
"POS", $a_set[
"pos"]);
138 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
143 if (count($a_set[
"criterias"]) !== 0) {
144 $this->tpl->setCurrentBlock(
"crit_bl");
145 foreach ($a_set[
"criterias"] as $crit) {
146 $this->tpl->setVariable(
"CRIT_TYPE", $crit[0]);
147 $this->tpl->setVariable(
"CRIT_TITLE", $crit[1]);
148 $this->tpl->parseCurrentBlock();
152 $this->tpl->setCurrentBlock(
"action_bl");
153 $this->tpl->setVariable(
"ACTION_URL",
$url);
154 $this->tpl->setVariable(
"ACTION_TXT",
$lng->
txt(
"edit"));
155 $this->tpl->parseCurrentBlock();
157 if (is_array($a_set[
"assigned"])) {
158 foreach ($a_set[
"assigned"] as
$ass_id => $ass_title) {
159 if (is_array($a_set[
"protected"]) &&
160 in_array(
$ass_id, $a_set[
"protected"])) {
161 $this->tpl->setCurrentBlock(
"ass_protected_bl");
162 $this->tpl->setVariable(
"ASS_PROTECTED",
$lng->
txt(
"exc_crit_cat_protected_assignment"));
163 $this->tpl->parseCurrentBlock();
166 $this->tpl->setCurrentBlock(
"ass_bl");
167 $this->tpl->setVariable(
"ASS_TITLE", $ass_title);
168 $this->tpl->parseCurrentBlock();
173 if (!is_array($a_set[
"protected"])) {
174 $url = $ilCtrl->getLinkTargetByClass(
"ilExcCriteriaGUI",
"");
176 $this->tpl->setCurrentBlock(
"action_bl");
177 $this->tpl->setVariable(
"ACTION_URL",
$url);
178 $this->tpl->setVariable(
"ACTION_TXT",
$lng->
txt(
"exc_edit_criterias"));
179 $this->tpl->parseCurrentBlock();
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
static getInstancesByParentId(int $a_parent_id)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
__construct(object $a_parent_obj, string $a_parent_cmd, int $a_exc_id)
static getInstancesByParentId(int $a_parent_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDefaultOrderDirection(string $a_defaultorderdirection)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
static getInstancesByExercise(int $a_exc_id)
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
ilGlobalTemplateInterface $main_tpl
numericOrdering(string $a_field)
addMultiCommand(string $a_cmd, string $a_text)