Skip to content

Commit

Permalink
Merge pull request #4703 from okaufman/ilias7-fix22130
Browse files Browse the repository at this point in the history
T&A fix 22130
  • Loading branch information
mbecker-databay authored Jul 5, 2022
2 parents b01af5c + 8fb0f0a commit ee1d330
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Modules/Test/classes/class.ilTestExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public function exportToExcel($deliver = true, $filterby = "", $filtertext = "",
$userfields = ilObjUser::_lookupFields($userdata->getUserId());
foreach ($additionalFields as $fieldname) {
if (strcmp($fieldname, 'gender') == 0) {
$worksheet->setCell($row, $col++, $this->lng->txt('gender_' . $userfields[$fieldname]));
$worksheet->setCell($row, $col++, strlen($userfields[$fieldname]) ? $this->lng->txt('gender_' . $userfields[$fieldname]) : '');
} elseif (strcmp($fieldname, "exam_id") == 0) {
$worksheet->setCell($row, $col++, $userdata->getExamIdFromScoredPass());
} else {
Expand Down Expand Up @@ -863,7 +863,7 @@ public function exportToCSV($deliver = true, $filterby = "", $filtertext = "", $
$userfields = ilObjUser::_lookupFields($userdata->getUserID());
foreach ($additionalFields as $fieldname) {
if (strcmp($fieldname, "gender") == 0) {
array_push($datarow2, $this->lng->txt("gender_" . $userfields[$fieldname]));
array_push($datarow2, strlen($userfields[$fieldname]) ? $this->lng->txt('gender_' . $userfields[$fieldname]) : '');
} elseif (strcmp($fieldname, "exam_id") == 0) {
array_push($datarow2, $userdata->getExamIdFromScoredPass());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ protected function fillRow($data)
if (!$this->anonymity) {
if (strcmp($c, 'gender') == 0) {
$this->tpl->setCurrentBlock('gender');
$this->tpl->setVariable("GENDER", $this->lng->txt('gender_' . $data['gender']));
$this->tpl->setVariable("GENDER", strlen($data['gender']) ? $this->lng->txt('gender_' . $data['gender']) : ' ');
$this->tpl->parseCurrentBlock();
}
if (strcmp($c, 'email') == 0) {
Expand Down

0 comments on commit ee1d330

Please sign in to comment.