Browse Source

Adding api_not_allowed

Julio Montoya 11 years ago
parent
commit
f8b6a06db4
2 changed files with 5 additions and 1 deletions
  1. 2 0
      main/work/download.php
  2. 3 1
      main/work/view.php

+ 2 - 0
main/work/download.php

@@ -93,5 +93,7 @@ if (!empty($course_info['real_id'])) {
             api_not_allowed();
         }
     }
+} else {
+    api_not_allowed();
 }
 exit;

+ 3 - 1
main/work/view.php

@@ -41,6 +41,8 @@ if (user_is_author($id) || $course_info['show_score'] == 0 && $work['active'] ==
         $tpl->assign('content', $content);
         $tpl->display_one_col_template();
     } else {
-        api_not_allowed();
+        api_not_allowed(true);
     }
+} else {
+    api_not_allowed(true);
 }