Skip to content

Commit

Permalink
exercise: fixed 37890: Clicking on emailed permalinks to Exercises le…
Browse files Browse the repository at this point in the history
…ads to an error
  • Loading branch information
alex40724 committed Sep 28, 2023
1 parent a06a957 commit 89d5577
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Modules/Exercise/Submission/class.ilExSubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions Modules/Exercise/classes/class.ilExerciseManagementGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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") . "<a href='$url'> " . $lng->txt('exc_download_files') . "</a><script>window.location.href ='" . $js_url . "';</script>");
$this->membersObject();
}
Expand Down
4 changes: 2 additions & 2 deletions Modules/Exercise/classes/class.ilObjExerciseGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 89d5577

Please sign in to comment.