sessions in a moodle block

sessions in a moodle block

by Mia Moa -
Number of replies: 5

could any one explain how does the session in moodle work? i'm looking at the db and i am seeing that userid is used to identify the user sessions .and since i want to use moodle's existing login authentiation  then on every page i'll put this

<?php
session_start();
?>

 o do i have to put something else ..

Average of ratings: -
In reply to Mia Moa

Re: sessions in a moodle block

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Moodle handles the session for you. You definitely should not call session_start in your code.

You have not really explained what you are trying to achieve, so it is hard to say more.

In reply to Tim Hunt

Re: sessions in a moodle block

by Mia Moa -

thanks for the response. what i did was i created a block to allow the students to create a timetable and then they can request that lecturers be permitted to view it. everything is working however when i log into to moodle as different students  and enter into the block, there is no unique view. each student can see the same timetable. so i am unsure how this happens. Thanks.

In reply to Mia Moa

Re: sessions in a moodle block

by Mia Moa -

also if i can be reffered to some sort of document with would be helpful.