Permalink
Browse files

MDL-15413 Added some code to prevent this script being run on it's own

  • Loading branch information...
1 parent 5104726 commit 6e6f33e6f25bf9dae0ae8834322fe9bb437e1eb2 moodler committed Jun 27, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 course/report/stats/report.php
@@ -1,5 +1,9 @@
<?php
+ if (!defined('MOODLE_INTERNAL')) {
+ die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
+ }
+
$courses = get_courses('all','c.shortname','c.id,c.shortname,c.fullname');
$courseoptions = array();
@@ -139,4 +143,4 @@
print_table($table);
}
-?>
+?>

0 comments on commit 6e6f33e

Please sign in to comment.