Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/UDFCheck/UDFCheckFormGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected function initForm() {



$select_gui = $plugin->getFormPropertyForDefinition($definition);
$select_gui = $plugin->getFormPropertyForDefinition($definition,true,null,true);

$check_radio = new ilRadioGroupInputGUI("", self::F_CHECK_RADIO);

Expand All @@ -160,6 +160,7 @@ protected function initForm() {
if (is_array($name)) {
$name=$name["name"]." ( ".$name["default"]." ) ";
}

$text_gui = new ilTextInputGUI($name, self::F_CHECK_VALUE_MUL . $key);
$check_radio_text->addSubItem($text_gui);
}
Expand Down Expand Up @@ -238,7 +239,7 @@ public function saveObject() {
if (self::isCustomUserFieldsHelperAvailable()) {
$plugin = ilCustomUserFieldsHelper::getInstance()->getPluginForType($definition["field_type"]);
if ($plugin instanceof ilUDFDefinitionPlugin) {
$select_gui = $plugin->getFormPropertyForDefinition($definition);
$select_gui = $plugin->getFormPropertyForDefinition($definition, true, null, true);
$check_values = [];
foreach ($select_gui->getColumnDefinition() as $key => $name) {
$check_values[] = $this->getInput(self::F_CHECK_VALUE_MUL . $key);
Expand Down
21 changes: 13 additions & 8 deletions src/UserSetting/UserSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
use ilGroupParticipants;
use ilObjCourse;
use ilObject2;

//use ilObject;
use ilObjExercise;
use ilObjGroup;
use ilObjOrgUnit;
Expand All @@ -30,6 +32,7 @@
use srag\Plugins\UserDefaults\UDFCheck\UDFCheck;
use srag\Plugins\UserDefaults\Utils\UserDefaultsTrait;
use srag\ActiveRecordConfig\UserDefaults\Config\Config;
use ilRbacReview;

/**
* Class ilUserSetting
Expand Down Expand Up @@ -388,7 +391,6 @@ protected function unsubscribeGroups() {
if (!$this->isUnsubscrfromgrp()) {
return;
}

$groups = $this->getAssignedGroupes();
if (count($groups) === 0) {
return;
Expand All @@ -398,13 +400,16 @@ protected function unsubscribeGroups() {
if ($id === "" || ilObject2::_lookupType($id) !== "grp") {
continue;
}

$part = ilGroupParticipants::_getInstanceByObjId($id);
$usr_id = $this->getUsrObject()->getId();
if (!$part->isMember($usr_id)) {
continue;
}
$added = $part->deleteParticipants(array( $usr_id ));
$usr_id = $this->getUsrObject()->getId();
$reference=array_shift(ilObject2::_getAllReferences($id));
$groupRoles = self::dic()->rbac()->review()->getRolesOfRoleFolder($reference);
foreach ($groupRoles as $grouprole) {
if (ilObject2::_lookupTitle($grouprole) == 'il_grp_member_'.$reference) {
$memberRole = $grouprole;
self::dic()->rbac()->admin()->deassignUser($memberRole,$usr_id);
continue;
}
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions vendor/srag/dic/src/Output/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getHTML($value) : string
foreach ($value as $gui) {
$html .= $this->getHTML($gui);
}
} else {
} else {
switch (true) {
// HTML
case (is_string($value)):
Expand All @@ -67,7 +67,7 @@ public function getHTML($value) : string
$html = $value->render();
break;
case method_exists($value, "getHTML"):
$html = $value->getHTML();
$html = $value->getHTML();
break;

// Template instance
Expand Down