Permalink
Browse files

require_once $CFG->dirroot."mod/hotpot/lib.php"; // get the "hotpot_i…

…s_visible" function
  • Loading branch information...
1 parent 892174b commit cbebda6a363d4a5f4d4292894eeb57f67f416dda gbateson committed Mar 15, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/hotpot/grade.php
View
@@ -1,6 +1,6 @@
<?php // $Id$
- require_once("../../config.php");
+ require_once('../../config.php');
$id = required_param('id', PARAM_INT); // Course module ID
@@ -18,6 +18,10 @@
require_login($course->id, false);
+ // mod/hotpot/lib.php is required for the "hotpot_is_visible" function
+ // the "require_once" should come after "require_login", to ensure language strings are correct
+ require_once($CFG->dirroot.'/mod/hotpot/lib.php');
+
// check user can access this hotpot activity
if (!hotpot_is_visible($cm)) {
error(get_string("activityiscurrentlyhidden"));

0 comments on commit cbebda6

Please sign in to comment.