I'm new to moodle, and I'm attempting to logout of moodle and encoutering some problems. Here's a rundown of what I'm doing...
I have the entire moodle application set up in an iFrame. I am trying to get it so that if a user navigates away from the page that contains the iFrame, it logs them out of moodle. In order to do this, it looks like I will need the sesskey value, which I am unable to grab from the iFrame.
So, my question is, how can I get the sesskey from the iFrame, no matter what page the user might be on in the moodle application? Or, where can I find the logout_hook() function (since I believe that is what generates the HTML on the logout page when you do not have a valid sesskey)?