Skip to content

Commit

Permalink
42618: Bei der Aktivierung von zusätzlichen Spalten (Personenbezogene…
Browse files Browse the repository at this point in the history
…n Daten) erfolgt eine ODF Fehlermeldung.
  • Loading branch information
alex40724 committed Nov 9, 2024
1 parent 8bd13da commit 63e54fc
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public function __construct(
$this->addColumn("", "", 1);
$this->addColumn($this->lng->txt("title"), "title");

$this->lng->loadLanguageModule("crs");

$selected = $this->getSelectedColumns();
$cols = $this->getSelectableColumns();

Expand Down Expand Up @@ -559,10 +561,11 @@ public function getItems(array $filter): void
$user_ids = array_diff($user_ids, ilMemberAgreement::lookupAcceptedAgreements($parent_obj_id));
}
$odf_data = ilCourseUserData::_getValuesByObjId($parent_obj_id);

$usr_data = [];
foreach ($odf_data as $usr_id => $fields) {
if (in_array($usr_id, $user_ids, true)) {
// this currently does not with strict mode, since
// $user_ids holds strings
if (in_array($usr_id, $user_ids)) {
foreach ($fields as $field_id => $value) {
if (in_array($field_id, $odf_ids, true)) {
$usr_data[$usr_id]['odf_' . $field_id] = $value;
Expand Down Expand Up @@ -701,7 +704,7 @@ protected function fillRow(array $a_set): void
foreach ($this->getSelectedColumns() as $col) {
if (isset($user_cols[$col])) {
$this->tpl->setCurrentBlock("user_col");
$this->tpl->setVariable("VALUE_USER_COL", $a_set[$col] . " ");
$this->tpl->setVariable("VALUE_USER_COL", ($a_set[$col] ?? "") . " ");
$this->tpl->parseCurrentBlock();
}
}
Expand Down

0 comments on commit 63e54fc

Please sign in to comment.