ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


adding a page to the pages variable


  • 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!!

  • 2006-01-27 12:39:49

    Re: adding a page to the $_pages variable

    Below is the corrected version of the above
    Things to describe:
    operating system - Fedora Core 2
    version of ATutor -
    versions of php -
    version of mysq l -
    webserver & version - Apache 2.0.49-4
    copies of error messages -
    changes to default settings -
    web browser being used -
    and anything else relevant -

    Sorry for the misinformation in the first posting

  • 2006-01-27 12:48:35

    See a module.php file

    Have a look at any of the module.php files, under the mods/ directory, for examples of adding new $_pages.

    Tests module.php file
    http://atutorsvn.atrc.utoronto.ca/repos/atutor/trunk/docs/mods/_standard/tests/module.php