From 89d557791c9057e83df8da6fc65ca4502819618d Mon Sep 17 00:00:00 2001 From: Alexander Killing Date: Thu, 28 Sep 2023 12:14:44 +0200 Subject: [PATCH] exercise: fixed 37890: Clicking on emailed permalinks to Exercises leads to an error --- Modules/Exercise/Submission/class.ilExSubmission.php | 2 +- Modules/Exercise/classes/class.ilExerciseManagementGUI.php | 4 ++-- Modules/Exercise/classes/class.ilObjExerciseGUI.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/Exercise/Submission/class.ilExSubmission.php b/Modules/Exercise/Submission/class.ilExSubmission.php index 1b9b89baa981..33d600b3431a 100644 --- a/Modules/Exercise/Submission/class.ilExSubmission.php +++ b/Modules/Exercise/Submission/class.ilExSubmission.php @@ -813,7 +813,7 @@ protected function getLastDownloadTime( " ORDER BY download_time DESC"; $lu_set = $ilDB->query($q); $lu_rec = $ilDB->fetchAssoc($lu_set); - return $lu_rec["download_time"]; + return $lu_rec["download_time"] ?? ""; } public function downloadFiles( diff --git a/Modules/Exercise/classes/class.ilExerciseManagementGUI.php b/Modules/Exercise/classes/class.ilExerciseManagementGUI.php index 1aec8a8b3de1..ec276ee213b2 100644 --- a/Modules/Exercise/classes/class.ilExerciseManagementGUI.php +++ b/Modules/Exercise/classes/class.ilExerciseManagementGUI.php @@ -342,8 +342,8 @@ public function waitingDownloadObject(): void $ilCtrl = $this->ctrl; $ilCtrl->setParameterByClass("ilExSubmissionFileGUI", "member_id", $this->requested_member_id); - $url = $ilCtrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"), "downloadNewReturned"); - $js_url = $ilCtrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"), "downloadNewReturned", "", "", false); + $url = $ilCtrl->getLinkTargetByClass(array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"), "downloadNewReturned"); + $js_url = $ilCtrl->getLinkTargetByClass(array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"), "downloadNewReturned", "", "", false); $this->tpl->setOnScreenMessage('info', $lng->txt("exc_wait_for_files") . " " . $lng->txt('exc_download_files') . ""); $this->membersObject(); } diff --git a/Modules/Exercise/classes/class.ilObjExerciseGUI.php b/Modules/Exercise/classes/class.ilObjExerciseGUI.php index ae54c707df66..f233eb0d10e1 100755 --- a/Modules/Exercise/classes/class.ilObjExerciseGUI.php +++ b/Modules/Exercise/classes/class.ilObjExerciseGUI.php @@ -879,7 +879,7 @@ public static function _goto( switch ($action) { case "grades": $ilCtrl->redirectByClass( - array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), + array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "members" ); break; @@ -892,7 +892,7 @@ public static function _goto( case "setdownload": $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member); $ilCtrl->redirectByClass( - array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), + array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "waitingDownload" ); break;