Community Forums

Development Forum

Unable to create new pages


You must be signed-in to post.

AuthorSubject
 
Page: 1
ankitdottgoyal
Subject: Unable to create new pagesQuote this post in your reply
Hi All,

I am facing a strange problem as when I am trying to add a new page to atutor (my_course.php in users directory and my_course.tmpl.php in theme users directory) when ever the page is calling header.inc.php it is directly getting redirected to the users/index.php page.

I am attaching both the pages as attachment..

I am unable to add my own pages in atutor (tough I have tried renaming the existing working page, after getting renamed those pages stop working)

Can you please help.

If you are asking for help, provide lots of detail so problems can be reproduced.

Things to describe:
Operating system ATutor is installed on -
ATutor version -
Patch #s applied -
ATutor theme name - default
PHP version -
MySQL version -
Webserver & version -
Copies of error messages -
Changes to default settings -
Web browser being used -
...and anything else relevant -
Posted: 2012-07-08 01:27:29
ankitdottgoyal
ATutor.zip

Attachment: ATutor.zip
Subject: Re: Unable to create new pagesQuote this post in your reply
Please find the attached files

If you are asking for help, provide lots of detail so problems can be reproduced.

Things to describe:
Operating system ATutor is installed on -
ATutor version -
Patch #s applied -
ATutor theme name -
PHP version -
MySQL version -
Webserver & version -
Copies of error messages -
Changes to default settings -
Web browser being used -
...and anything else relevant -
Posted: 2012-07-08 01:28:05
greg

Avatar for greg
Subject: Re: Unable to create new pagesQuote this post in your reply
New pages are typically added to ATutor as part of a module, then defined in the $_pages (i.e. $this->_pages) array in the module.php file for that module. You can refer to the module developer documentation in the handbook, or look at the hello_world module for examples.

If you are adding a page to the core code, as opposed to a module, the page would be added to the $_pages array in include/lib/menu_page.php. We'd recommend using the module method above, which will allow you to easily move you pages to a new version of ATutor when you upgrade.
Posted: 2012-07-08 08:23:04
ankitdottgoyal
Subject: Re: Unable to create new pagesQuote this post in your reply
Hi Greg,

Thanks for the help.
Its working fine now...

Ya I am going with the module method now, it will be better I guess...
Posted: 2012-07-08 08:45:16
moghbel
Subject: Re: Unable to create new pagesQuote this post in your reply
How can i add my new page to the $_pages array in include/lib/menu_page.php?

Thanks
Posted: 2013-01-11 22:04:06
greg

Avatar for greg
Subject: Re: Unable to create new pagesQuote this post in your reply
Typically you would find the section of the $_pages listed there where you want the page to appear (e.g. global, mystart, admin), copy the titlevar and parent ines from another page, then replace the values with the path and value to that of you module.

Again, the best solution is to do this type of thing in a module.php file. Use the hello world module as a template. Disable everything you don't need by commenting out lines, then add your page to the $this->_pages array in that file.
Posted: 2013-01-12 09:38:34
Cowan12
Subject: Re: Unable to create new pagesQuote this post in your reply
If you are asking for help, provide lots of detail so problems can be reproduced.

Things to describe:
Operating system ATutor is installed on -
ATutor version -
Patch #s applied -
ATutor theme name -
PHP version -
MySQL version -
Webserver & version -
Copies of error messages -
Changes to default settings -
Web browser being used -
...and anything else relevant -
Posted: 2013-03-26 01:56:57
 
Page: 1

You must be signed-in to post.

Related Articles