瀏覽代碼

Add message when file not found in download_scorm.php

Julio 7 年之前
父節點
當前提交
833cf3b288
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      main/document/download_scorm.php

+ 3 - 2
main/document/download_scorm.php

@@ -58,7 +58,8 @@ if (Security::check_abs_path($sys_course_path.$doc_url, $sys_course_path.'/')) {
     $fixLinks = api_get_configuration_value('lp_replace_http_to_https');
     $result = DocumentManager::file_send_for_download($full_file_name, false, '', $fixLinks);
     if ($result === false) {
-        api_not_allowed(true, '', 404);
+        api_not_allowed(true, get_lang('FileNotFound'), 404);
     }
+} else {
+    api_not_allowed(true, get_lang('FileNotFound'), 404);
 }
-exit;