Skip to content
Open
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
2 changes: 1 addition & 1 deletion classes/GUI/class.ilTestListTableGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
/* Pre-configure table */
$this->setId(
sprintf(
'test_overview_test_list_%d',
'xtov_tst_lst_%d',
$a_parent_obj->getObject()->getId()
)
);
Expand Down
14 changes: 7 additions & 7 deletions classes/GUI/class.ilTestOverviewTableGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,10 @@ private function fetchUserInformation($usr_ids): array
$user = new ilObjUser();

$user->setId((int)$row['usr_id']);
$user->setLogin($row['login']);
$user->setUTitle($row['title']);
$user->setFirstname($row['firstname']);
$user->setLastname($row['lastname']);
$user->setLogin((string) $row['login']);
$user->setUTitle((string) $row['title']);
$user->setFirstname((string) $row['firstname']);
$user->setLastname((string) $row['lastname']);
$user->setFullname();

if (! empty($this->filter['flt_participant_name'])) {
Expand Down Expand Up @@ -747,7 +747,7 @@ public function fillHeader(): void
include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
ilTooltipGUI::addTooltip("thc_" . $this->getId() . "_" . $ccnt, $column["tooltip"]);
}
if ((!$this->enabled["sort"] || $column["sort_field"] == "" || $column["is_checkbox_action_column"]) && !$column['link']) {
if ((!$this->enabled["sort"] || $column["sort_field"] == "" || $column["is_checkbox_action_column"]) && (!isset($column['link']) || !$column['link'])) {
$this->tpl->setCurrentBlock("tbl_header_no_link");
if ($column["width"] != "") {
$this->tpl->setVariable("TBL_COLUMN_WIDTH_NO_LINK", " width=\"" . $column["width"] . "\"");
Expand Down Expand Up @@ -803,7 +803,7 @@ public function fillHeader(): void
if ($column["class"] != "") {
$this->tpl->setVariable("TBL_HEADER_CLASS", " " . $column["class"]);
}
if($column['link']) {
if(isset($column['link']) {
$this->setExternalLink($column['link']);
} else {
$this->setOrderLink($column["sort_field"], $order_dir);
Expand Down Expand Up @@ -844,7 +844,7 @@ protected function buildMemberResultLinkTarget($refId, $activeId): string
global $ilCtrl;

$link = $ilCtrl->getLinkTargetByClass(
array('ilObjTestOverviewGUI', 'ilobjtestgui', 'iltestevaluationgui'),
array('ilobjtestgui', 'iltestevaluationgui'),
'outParticipantsPassDetails'
);

Expand Down
6 changes: 3 additions & 3 deletions classes/class.ilObjTestOverviewGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ public function initSelectTests(): void
public function initCourseTests(): void
{
$pnode = $this->tree->getParentNodeData((int) $this->request->getQueryParams()['ref_id']);
$otype = ilObject::_lookupType($pnode['ref_id'], true); // Parent node is 'crs'
$tsts = $this->tree->getFilteredSubTree($pnode['ref_id'], ['tst']); // and has 'tst's
$otype = ilObject::_lookupType((int) $pnode['ref_id'], true); // Parent node is 'crs'
$tsts = $this->tree->getFilteredSubTree((int) $pnode['ref_id'], ['tst']); // and has 'tst's

$refs = [];
foreach($tsts as $tst) {
Expand All @@ -244,7 +244,7 @@ public function initCourseTests(): void

$num_nodes = 0;
foreach($refs as $ref_id) {
if($this->access->checkAccess('tst_statistics', '', $ref_id) || $this->access->checkAccess('write', '', $ref_id)) {
if($this->access->checkAccess('tst_statistics', '', (int) $ref_id) || $this->access->checkAccess('write', '', (int) $ref_id)) {
$this->object->addTest($ref_id);
++$num_nodes;
}
Expand Down
2 changes: 1 addition & 1 deletion classes/mapper/class.ilDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getValue(string $table, string $field, array $conditions = array
$res = $this->db->query($query);
$row = $this->db->fetchObject($res);

return $row->{strtolower($field)} || $row->{strtoupper($field)} ;
return $row !== null ? $row->{strtolower($field)} || $row->{strtoupper($field)} : null;
}

/**
Expand Down