2006-01-27 12:35:36
adding a page to the pages variable
If you are asking for help, provide lots of detail so problems can be reproduced.
Things to describe:
operating system - Windows XP
version of ATutor - 1.5.2
versions of php - 4.3.8
version of mysq l - 4.1.8
webserver & version - Linux Fedora Core 2
copies of error messages - none
changes to default settings - none
web browser being used - Internet Explorer 6
and anything else relevant -
I am trying to add a new page under the tools/tests directory. Here is the only code I have on the page so far..
---------------------------------------------------------------------
$page = 'correlate';
define('AT_INCLUDE_PATH', '../../include/');
require(AT_INCLUDE_PATH.'vitals.inc.php');
authenticate(AT_PRIV_TESTS);
require(AT_INCLUDE_PATH.'header.inc.php');
---------------------------------------------------------------------
I'm using Zend Development Environment as my php editor. When I run the debugger from Internet Explorer and I step into the header.inc.php file.....I get down to line 78...which consists of this code....
----------------------------------------------------------------------------
if (!isset($_pages[$current_page])) {
global $msg;
debug($_pages[$current_page]);
exit;
$msg->addError('PAGE_NOT_FOUND'); // probably the wrong error
header('location: '.$_base_href.'index.php');
exit;
}
----------------------------------------------------------------------------
...and the debugger is showing that the file I created is not in the $_pages array......I was curious how do I get my page inserted into this variable so it can be recognized in the ATutor system? Right now it just shows a blank screen because the page doesn't even exist for the debug() function to output any page name to the screen before it exits the file. Thank you so much for all your responses and hard work you all do for this great project!!