24 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
67 $this->lng->loadLanguageModule(
'crs');
70 $this->container = $a_parent_obj;
73 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
78 parent::__construct($a_parent_obj,
'editMembers');
80 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
82 $this->
addColumn($this->lng->txt(
'name'),
'name',
'20%');
83 $this->
addColumn($this->lng->txt(
'login'),
'login',
'25%');
85 if ($this->privacy->enabledCourseAccessTimes()) {
86 $this->
addColumn($this->lng->txt(
'last_access'),
'access_time');
88 $this->
addColumn($this->lng->txt(
'crs_passed'),
'passed');
89 $this->
addColumn($this->lng->txt(
'crs_blocked'),
'blocked');
91 $this->
addColumn($this->lng->txt(
'crs_mem_contact'),
'contact');
93 $this->
addColumn($this->lng->txt(
'crs_notification'),
'notification');
94 $this->
addColumn($this->lng->txt(
'objs_role'),
'roles');
99 $this->
setRowTemplate(
"tpl.edit_participants_row.html",
"Modules/Course");
108 $this->localCourseRoles = array();
109 foreach ($this->rep_object->getLocalCourseRoles(
false) as
$title => $role_id) {
124 $rbacsystem = $DIC[
'rbacsystem'];
125 $ilAccess = $DIC[
'ilAccess'];
127 $hasEditPermissionAccess =
129 $ilAccess->checkAccess(
'edit_permission',
'', $this->rep_object->getRefId())
or 130 $this->participants->isAdmin(
$ilUser->getId())
133 $this->tpl->setVariable(
'VAL_ID', $a_set[
'usr_id']);
134 $this->tpl->setVariable(
'VAL_NAME', $a_set[
'lastname'] .
', ' . $a_set[
'firstname']);
136 $this->tpl->setVariable(
'VAL_LOGIN', $a_set[
'login']);
138 if ($this->privacy->enabledCourseAccessTimes()) {
139 $this->tpl->setVariable(
'VAL_ACCESS', $a_set[
'access_time']);
142 $this->tpl->setVariable(
'VAL_CONTACT_CHECKED', $a_set[
'contact'] ?
'checked="checked"' :
'');
145 $this->tpl->setVariable(
'VAL_NOTIFICATION_CHECKED', $a_set[
'notification'] ?
'checked="checked"' :
'');
146 $this->tpl->setVariable(
'VAL_PASSED_CHECKED', $a_set[
'passed'] ?
'checked="checked"' :
'');
147 $this->tpl->setVariable(
'VAL_BLOCKED_CHECKED', $a_set[
'blocked'] ?
'checked="checked"' :
'');
149 $this->tpl->setVariable(
'NUM_ROLES', count($this->participants->getRoles()));
151 $assigned = $this->participants->getAssignedRoles($a_set[
'usr_id']);
152 foreach ($this->localCourseRoles as $localizedTitle => $roleData) {
153 if ($hasEditPermissionAccess || substr($roleData[
'title'], 0, 12) !=
'il_crs_admin') {
154 $this->tpl->setCurrentBlock(
'roles');
155 $this->tpl->setVariable(
'ROLE_ID', $roleData[
'role_id']);
156 $this->tpl->setVariable(
'ROLE_NAME', $localizedTitle);
158 if (in_array($roleData[
'role_id'], $assigned)) {
159 $this->tpl->setVariable(
'ROLE_CHECKED',
'selected="selected"');
161 $this->tpl->parseCurrentBlock();
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
__construct($a_parent_obj, $rep_object)
Constructor.
enable($a_module_name)
enables particular modules of table
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _getTranslation($a_role_title)
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
setFormName($a_formname="")
Set Form name.
$localCourseRoles
Holds the local roles of the course object.
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 _getInstance()
Get instance of ilPrivacySettings.