diff --git a/bookquiz/questions.php b/bookquiz/questions.php index 0854cb4..5db1029 100644 --- a/bookquiz/questions.php +++ b/bookquiz/questions.php @@ -23,7 +23,6 @@ defined('MOODLE_INTERNAL') || die(); -require_once("../../../config.php"); require_once( "../headergame.php"); require_once("../locallib.php"); diff --git a/db/createsnakes.php b/db/createsnakes.php index d3b6346..1e84cce 100644 --- a/db/createsnakes.php +++ b/db/createsnakes.php @@ -15,7 +15,7 @@ // along with Moodle. If not, see . require( "../../../config.php"); - +require_login(); execute_sql("truncate TABLE {game_snakes_database}"); require( "importsnakes.php"); diff --git a/export.php b/export.php index 47d630c..5a2d367 100644 --- a/export.php +++ b/export.php @@ -21,7 +21,8 @@ * @package game **/ -require( '../../config.php'); +defined('MOODLE_INTERNAL') || die(); + ob_start(); require_once( $CFG->dirroot.'/lib/formslib.php'); diff --git a/preview.php b/preview.php index 6acaf2d..33c16e2 100644 --- a/preview.php +++ b/preview.php @@ -22,6 +22,9 @@ **/ require_once("../../config.php"); + +require_login(); + require_once("lib.php"); require_once("locallib.php"); diff --git a/report/default.php b/report/default.php index a40d026..1d736ee 100644 --- a/report/default.php +++ b/report/default.php @@ -29,6 +29,8 @@ // Included by ../report.php. +defined('MOODLE_INTERNAL') || die(); + class game_default_report { public function display($cm, $course, $game) { diff --git a/showanswers.php b/showanswers.php index 41c3e8c..e499196 100644 --- a/showanswers.php +++ b/showanswers.php @@ -24,6 +24,8 @@ require_once("../../config.php"); require_once( "headergame.php"); +require_login(); + if (!has_capability('mod/game:viewreports', $context)) { print_error( get_string( 'only_teachers', 'game')); } diff --git a/showattempts.php b/showattempts.php index ab7e2bd..49bf18c 100644 --- a/showattempts.php +++ b/showattempts.php @@ -22,6 +22,9 @@ **/ require_once("../../config.php"); + +require_login(); + require_once( "headergame.php"); if (!has_capability('mod/game:viewreports', $context)) { diff --git a/snakes/play.php b/snakes/play.php index d1de4dc..8daaf7e 100644 --- a/snakes/play.php +++ b/snakes/play.php @@ -106,16 +106,17 @@ function game_snakes_play( $id, $game, $attempt, $snakes, $context) { - + ?> + - - - + + bottomtext != '') { echo '
'.$game->bottomtext; } @@ -138,8 +139,8 @@ height="height; ?>"/>
- <?php print_string('snakes_dice', 'game', $snakes->dice) ?> -
+ <?php print_string('snakes_dice', 'game', $snakes->dice) ?> + . require( "../../../config.php"); +require_login(); export(); diff --git a/translate.php b/translate.php index 9eae5bc..12ef31b 100644 --- a/translate.php +++ b/translate.php @@ -21,6 +21,9 @@ * @package game **/ require( "../../config.php"); + +require_login(); + require( 'locallib.php'); ?>