5 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
48 $this->ctrl = $DIC->ctrl();
49 $this->lng = $DIC->language();
50 $this->tpl = $DIC[
"tpl"];
51 $this->
ui = $DIC->ui();
53 $this->
setId(
"cont_skll_mem_" . $a_cont_skills->
getId());
57 $this->container_skills = $a_cont_skills;
61 $this->
setTitle($this->lng->txt(
"cont_cont_skills"));
64 $this->
addColumn($this->lng->txt(
"name"),
"name");
65 $this->
addColumn($this->lng->txt(
"login"),
"login");
66 $this->
addColumn($this->lng->txt(
"cont_mem_skills"),
"");
67 $this->
addColumn($this->lng->txt(
"cont_published"),
"");
68 $this->
addColumn($this->lng->txt(
"actions"));
74 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
75 $this->
setRowTemplate(
"tpl.cont_member_skill_row.html",
"Services/Container/Skills");
78 $this->
addMultiCommand(
"publishAssignments", $this->lng->txt(
"cont_publish_assignment"));
80 $this->
addMultiCommand(
"deassignCompetencesConfirm", $this->lng->txt(
"cont_deassign_competence"));
91 include_once(
"./Modules/Course/classes/class.ilCourseParticipants.php");
95 foreach ($p->getMembers() as $m) {
99 "name" =>
$name[
"lastname"] .
", " .
$name[
"firstname"],
100 "login" => $name[
"login"],
119 include_once(
"./Services/Container/Skills/classes/class.ilContainerMemberSkills.php");
121 foreach ($mskills->getOrderedSkillLevels() as $sk) {
122 $tpl->setCurrentBlock(
"level");
125 $tpl->setVariable(
"PATH", $this->
getParentObject()->getPathString($sk[
"skill_id"], $sk[
"tref_id"]));
126 $tpl->parseCurrentBlock();
130 if ($mskills->getPublished()) {
131 $tpl->setVariable(
"PUBLISHED",
$lng->txt(
"yes"));
133 $tpl->setVariable(
"PUBLISHED",
$lng->txt(
"no"));
137 $tpl->setVariable(
"NAME", $a_set[
"name"]);
138 $tpl->setVariable(
"ID", $a_set[
"id"]);
139 $tpl->setVariable(
"LOGIN", $a_set[
"login"]);
141 $ctrl->setParameter($this->parent_obj,
"usr_id", $a_set[
"id"]);
144 $b =
$ui->factory()->button();
146 $items[] =
$b->shy(
$lng->txt(
"cont_assign_competence"),
$ctrl->getLinkTarget($this->parent_obj,
"assignCompetences"));
148 if (!$mskills->getPublished()) {
149 $items[] =
$b->shy(
$lng->txt(
"cont_publish_assignment"),
$ctrl->getLinkTarget($this->parent_obj,
"publishAssignments"));
151 $items[] =
$b->shy(
$lng->txt(
"cont_deassign_competence"),
$ctrl->getLinkTarget($this->parent_obj,
"deassignCompetencesConfirm"));
152 $dd =
$ui->factory()->dropdown()->standard($items);
154 $tpl->setVariable(
"ACTIONS",
$ui->renderer()->render($dd));
static _lookupName($a_user_id)
lookup user name
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static lookupLevelTitle(int $a_id)
TableGUI class for container members / skill assignments.
getParentObject()
Get parent object.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
__construct($a_parent_obj, $a_parent_cmd, ilContainerSkills $a_cont_skills)
Constructor.
fillRow($a_set)
Fill table row.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
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.
static getInstanceByObjId($a_obj_id)
Get instance by obj type.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.