Question in moodle code

Question in moodle code

by Farida Mohamed Sabry -
Number of replies: 1
We are a group of four undergraduates working in our graduation project to add a live session module to moodle, hopefully we can succeed in that smile.

I am facing an error, and I want to know about this function in pagelib.php:
 
/ * Factory function page_create_object(). Called with a numeric ID for a page, it autodetects the page type, constructs the correct object and returns it.
 */
function page_create_instance($instance) {
    page_id_and_class($id, $class);
    return page_create_object($id, $instance);
}

How it autodetects the page type?

Thanks in advance,
Farida M.Sabry
Average of ratings: -
In reply to Farida Mohamed Sabry

Re: Question in moodle code

by Wen Hao Chuang -
Hi Farida, welcome to the Moodle community!
I think you might find this Web link useful (to help you know how page_id_and_class() and page_create_object() works)

http://moodle.org/xref/nav.html?_functions/index.html

By the way, glad to know that someone else is also working on developing a live session module for moodle. Have you took a look at lace (http://socket7.net/lace/)? This is a AJAX-based chat program (GPL) that is very light-weighted and is using the XMLHttpRequest, which has very good response time. I have successfully replace the Moodle chat engine with this one, but currently working on passing the course id and group id info into the new lace engine.. Are you interested in working on this issue together?