38 $this->tree = $DIC->repositoryTree();
40 $this->
setId(
'crsr_mem_confirmation');
59 $this->
setRowTemplate(
'tpl.crsr_mem_deletion_confirmation_row.html',
'Modules/CourseReference');
60 $this->
addCommandButton(
'deleteParticipantsWithLinkedCourses', $this->lng->txt(
'confirm'));
62 $this->
setFormAction($this->ctrl->getFormAction($this->getParentObject()));
68 $this->
addColumn($this->lng->txt(
'type'),
'type',
'50px');
69 $this->
addColumn($this->lng->txt(
'title'),
'title');
78 foreach ($this->participants as $part_id) {
81 $row[
'id'] = $part_id;
85 $row[
'title'] = (
$name[
'lastname'] .
', ' .
$name[
'firstname'] .
' [' .
$name[
'login'] .
']');
97 $this->tpl->setVariable(
'HIDDEN_NAME', $row[
'id']);
99 $this->tpl->setVariable(
'ALT_USR', $this->lng->txt(
'obj_usr'));
100 $this->tpl->setVariable(
'VAL_LOGIN', $row[
'title']);
103 foreach ($linked_course_assignments as $course_ref_id) {
105 $path->enableHideLeaf(
false);
106 $path->enableTextOnly(
false);
107 $this->tpl->setCurrentBlock(
'reference_path');
108 $this->tpl->setVariable(
'CHECK_USER_NAME',
'refs[' . $row[
'id'] .
'][' . $course_ref_id .
']');
109 $this->tpl->setVariable(
'CHECK_USER_VAL', 1);
110 $this->tpl->setVariable(
'REF_PATH', $path->getPath(
ROOT_FOLDER_ID, $course_ref_id));
111 $this->tpl->parseCurrentBlock();
115 if (count($linked_course_assignments)) {
116 $this->tpl->setCurrentBlock(
'reference_select');
117 $this->tpl->setVariable(
'RUID', $row[
'id']);
118 $this->tpl->setVariable(
'RFORM_ID', $this->formname);
119 $this->tpl->setVariable(
'SEL_ALL', $this->lng->txt(
'select_all'));
120 $this->tpl->parseCurrentBlock();
129 $childs = $this->tree->getChildsByType($this->member_obj->getRefId(),
'crsr');
130 $assigned_references = [];
131 foreach ($childs as $tree_node) {
133 if (!$path_info->hasParentCourse()) {
136 if (!$path_info->isMemberUpdateEnabled()) {
139 if (!$path_info->checkManagmentAccess()) {
142 $course_ref_id = $path_info->getTargetId();
144 if ($part->isMember($part_id)) {
145 $assigned_references[] = $course_ref_id;
148 return $assigned_references;
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static _lookupName($a_user_id)
lookup user name
Creates a path for a start and endnode.
setParticipants(array $participants)
__construct($gui, $member_obj, string $cmd)
ilCourseReferenceDeleteConfirmationTableGUI constructor.
static getInstance($a_ref_id)
Get instance by ref_id.
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.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Class ilCourseReferencePathInfo.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
readLinkedCourseAssignments($part_id)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
parse()
Parse table content.
__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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
static getInstanceByRefId(int $ref_id, int $target_ref_id=0)