ATutor

Learning Management Tools







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


Create a new page in helloworld module


  • 2011-09-22 11:37:12

    Create a new page in helloworld module

    i want to create a new page in hello world module,


    i made the page and follow the instruction in documents but i can't access header and footer sec. my code of new page is ..


    <?php
    if ($_SESSION['valid_user']) {
    $_user_location = 'users';
    define('AT_INCLUDE_PATH', '../../include/');
    //require (AT_INCLUDE_PATH.'vitals.inc.php');

    require (AT_INCLUDE_PATH.'header.inc.php');
    }

    ?>






    <iframe width="800" height="800" src="http://127.0.0.2/library/open/demo/" id="frm"></iframe>





    <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>

  • 2011-09-22 12:04:21

    Re: Create a new page in hello_world module

    You probably need to add the new page to the $_pages array. Look in the module.php file for an example, and add you new page into that file.

  • 2011-09-22 14:26:05

    Re: Create a new page in hello_world module

    i added a new page in my module.php like...

    * student page.
    */
    $this->_pages['mods/hello_world/index.php']['title_var'] = 'hello_world';
    $this->_pages['mods/hello_world/index.php']['img'] = 'mods/hello_world/hello_world.jpg';
    $_module_pages['mods/hello_world/index.php']['children'] = array('mods/hello_world/amf.php');



    as amf.php

    is there any problem....

  • 2011-09-22 15:29:28

    Re: Create a new page in hello_world module

    something like:

    $this->_pages['mods/_standard/hello_world/amf.php']['title_var'] = 'amf_text_etc';
    $this->_pages['mods/_standard/hello_world/amf.php']['parent'] = 'tools/index.php';

    You can look through other modules' module.php files to see how they were created.