24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
48 public function __construct($a_parent_obj,$a_type =
'admin',$show_content =
true,$a_show_learning_progress =
false,$a_show_timings =
false, $a_show_edit_link=
true)
52 $this->show_learning_progress = $a_show_learning_progress;
53 $this->show_timings = $a_show_timings;
54 $this->show_edit_link = $a_show_edit_link;
57 $this->lng->loadLanguageModule(
'crs');
58 $this->lng->loadLanguageModule(
'trac');
61 $this->type = $a_type;
63 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
71 $this->
addColumn($this->lng->txt(
'name'),
'lastname',
'20%');
72 $this->
addColumn($this->lng->txt(
'login'),
'login',
'10%');
74 if($this->show_learning_progress)
76 $this->
addColumn($this->lng->txt(
'learning_progress'),
'progress');
79 if($this->privacy->enabledCourseAccessTimes())
81 $this->
addColumn($this->lng->txt(
'last_access'),
'access_time',
'16em');
83 $this->
addColumn($this->lng->txt(
'crs_member_passed'),
'passed');
84 if($this->type ==
'admin')
88 $this->
addColumn($this->lng->txt(
'crs_notification'),
'notification');
91 elseif($this->type ==
'tutor')
95 $this->
addColumn($this->lng->txt(
'crs_notification'),
'notification');
102 $this->
addColumn($this->lng->txt(
'crs_blocked'),
'blocked');
105 $this->
addColumn($this->lng->txt(
''),
'optional');
107 $this->
setRowTemplate(
"tpl.show_participants_row.html",
"Modules/Course");
115 $this->
enable(
'select_all');
136 global $ilUser,$ilAccess;
138 $this->tpl->setVariable(
'VAL_ID',$a_set[
'usr_id']);
139 $this->tpl->setVariable(
'VAL_NAME',$a_set[
'lastname'].
', '.$a_set[
'firstname']);
141 if(!$ilAccess->checkAccessOfUser($a_set[
'usr_id'],
'read',
'',$this->getParentObject()->object->getRefId()) and
142 is_array($info = $ilAccess->getInfo()))
144 $this->tpl->setVariable(
'PARENT_ACCESS',$info[0][
'text']);
148 if($this->privacy->enabledCourseAccessTimes())
150 $this->tpl->setVariable(
'VAL_ACCESS',$a_set[
'access_time']);
152 if($this->show_learning_progress)
154 $this->tpl->setCurrentBlock(
'lp');
155 switch($a_set[
'progress'])
158 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
163 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
168 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
173 $this->tpl->setVariable(
'LP_STATUS_ALT',$this->lng->txt($a_set[
'progress']));
178 $this->tpl->parseCurrentBlock();
181 if($this->type ==
'admin')
183 $this->tpl->setVariable(
'VAL_POSTNAME',
'admins');
184 $this->tpl->setVariable(
'VAL_NOTIFICATION_ID',$a_set[
'usr_id']);
185 $this->tpl->setVariable(
'VAL_NOTIFICATION_CHECKED',($a_set[
'notification'] ?
'checked="checked"' :
''));
187 elseif($this->type ==
'tutor')
189 $this->tpl->setVariable(
'VAL_POSTNAME',
'tutors');
190 $this->tpl->setVariable(
'VAL_NOTIFICATION_ID',$a_set[
'usr_id']);
191 $this->tpl->setVariable(
'VAL_NOTIFICATION_CHECKED',($a_set[
'notification'] ?
'checked="checked"' :
''));
195 $this->tpl->setCurrentBlock(
'blocked');
196 $this->tpl->setVariable(
'VAL_BLOCKED_ID',$a_set[
'usr_id']);
197 $this->tpl->setVariable(
'VAL_BLOCKED_CHECKED',($a_set[
'blocked'] ?
'checked="checked"' :
''));
198 $this->tpl->parseCurrentBlock();
200 $this->tpl->setVariable(
'VAL_POSTNAME',
'members');
203 $this->tpl->setVariable(
'VAL_PASSED_ID',$a_set[
'usr_id']);
204 $this->tpl->setVariable(
'VAL_PASSED_CHECKED',($a_set[
'passed'] ?
'checked="checked"' :
''));
207 $this->ctrl->setParameter($this->parent_obj,
'member_id',$a_set[
'usr_id']);
208 if ($this->show_edit_link)
210 $this->tpl->setCurrentBlock(
'link');
211 $this->tpl->setVariable(
'LINK_NAME',$this->ctrl->getLinkTarget($this->parent_obj,
'editMember'));
212 $this->tpl->setVariable(
'LINK_TXT',$this->lng->txt(
'edit'));
213 $this->tpl->parseCurrentBlock();
215 $this->ctrl->clearParameters($this->parent_obj);
218 if($this->show_timings)
220 $this->ctrl->setParameterByClass(
'ilcoursecontentgui',
'member_id',$a_set[
'usr_id']);
221 $this->tpl->setCurrentBlock(
'link');
222 $this->tpl->setVariable(
'LINK_NAME',$this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'showUserTimings'));
223 $this->tpl->setVariable(
'LINK_TXT',$this->lng->txt(
'timings_timings'));
224 $this->tpl->parseCurrentBlock();
228 $this->tpl->setVariable(
'VAL_LOGIN',$a_set[
'login']);