<HTML dir=ltr><HEAD><TITLE>RE: [Xerte] Passing SESSION variable</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6001.18349" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText50369 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>edit.php has a session start line in, believe me, i know, it couldn't work without one.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>When i tried to integrate with moodle it worked up until edit, and i could never get edit to to work.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>You can try adding session_start(); print_r($_SESSION); at the top of the code, but when i did that i still got nothing.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>I don't know enough about moodle, but i assumed when moodle runs session_start, is passes through some parameters to set itself up, or the way moodle passes session ids is different to toolkits.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>I would hunt for a session_start function call in the moodle code.</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Ken Scott<BR><B>Sent:</B> Thu 17/12/2009 16:13<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Passing SESSION variable<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Many thanks Paul - I will try that.<BR><BR>Ken Scott<BR>e-learning advisor<BR>JISC RSC YH<BR>07966 754040<BR><BR>RSCs – Stimulating and Supporting Innovation in Learning<BR><BR>Know someone making an impact on learning through technology?<BR>Nominate a colleague for an Evolution Award! Deadline: 15 Jan 2010.<BR><BR>Visit www.rsc-yh.ac.uk/evolution for details<BR><BR><BR>________________________________________<BR>From: xerte-bounces@lists.nottingham.ac.uk [xerte-bounces@lists.nottingham.ac.uk] On Behalf Of Paul Swanson [Paul.Swanson@harlandfs.com]<BR>Sent: 17 December 2009 15:49<BR>To: Xerte discussion list<BR>Subject: RE: [Xerte] Passing SESSION variable<BR><BR>For any PHP script to have access to session variables, you must first<BR>invoke the session handler. Open the php script in question and look for<BR>session_start(); If it is not there, add it near the top of the script,<BR>before any attempt to read or set session variables. Once you have that,<BR>you can see what session variables are available by using<BR>print_r($_SESSION);<BR><BR>As Dave mentioned, you must accept cookies for session variables to<BR>work.<BR><BR>It sounds like your PHP is set up to not show errors. In those<BR>situations a fatal error will result in a blank page. During<BR>development, it's really nice to know what errors may be happening, so<BR>you may want to override the php.ini settings while you are<BR>troubleshooting. You can do this on a script-by-script basis with the<BR>following:<BR><BR>ini_set('display_errors', 1);<BR>error_reporting(E_ALL);<BR><BR>You will want to comment those lines out once you've got it working.<BR><BR>Hope that helps.<BR><BR>Paul<BR><BR><BR>> -----Original Message-----<BR>> From: xerte-bounces@lists.nottingham.ac.uk [<A href="mailto:xerte-">mailto:xerte-</A><BR>> bounces@lists.nottingham.ac.uk] On Behalf Of Ken Scott<BR>> Sent: Thursday, December 17, 2009 6:35 AM<BR>> To: Xerte discussion list<BR>> Subject: RE: [Xerte] Passing SESSION variable<BR>><BR>> Thanks, no difference<BR>><BR>> Ken Scott<BR>> e-learning advisor<BR>> JISC RSC YH<BR>> 07966 754040<BR>><BR>> RSCs - Stimulating and Supporting Innovation in Learning<BR>><BR>> Know someone making an impact on learning through technology?<BR>> Nominate a colleague for an Evolution Award! Deadline: 15 Jan 2010.<BR>><BR>> Visit www.rsc-yh.ac.uk/evolution for details<BR>><BR>><BR>> ________________________________________<BR>> From: xerte-bounces@lists.nottingham.ac.uk [xerte-<BR>> bounces@lists.nottingham.ac.uk] On Behalf Of Dave Burnett<BR>> [d_b_burnett@hotmail.com]<BR>> Sent: 17 December 2009 14:10<BR>> To: Xerte list<BR>> Subject: RE: [Xerte] Passing SESSION variable<BR>><BR>> Try explicitly allowing cookies from the domain you are serving from.<BR>><BR>> > From: k.scott@leeds.ac.uk<BR>> > To: xerte@lists.nottingham.ac.uk<BR>> > Date: Thu, 17 Dec 2009 14:02:08 +0000<BR>> > Subject: [Xerte] Passing SESSION variable<BR>> ><BR>> > Wonder if anyone can help?<BR>> ><BR>> > I a using the moodle integration patch, and logins in fine. However<BR>> when I try to edit or preview a project I get a blank page. I have<BR>> traced execution and edit.php doesn't seem to have any of the session<BR>> variables available to it - it therefore tries to select from the<BR>table<BR>> with a userid of null.<BR>> ><BR>> > How should the session variables be passed? Not a PHP expert and it<BR>> is not obvious to me!<BR>> ><BR>> > Many thanks<BR>> ><BR>> ><BR>> > Ken Scott<BR>> > e-learning advisor<BR>> > JISC RSC YH<BR>> > 07966 754040<BR><BR>_______________________________________________<BR>Xerte mailing list<BR>Xerte@lists.nottingham.ac.uk<BR><A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR>_______________________________________________<BR>Xerte mailing list<BR>Xerte@lists.nottingham.ac.uk<BR><A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR></FONT></P></DIV></BODY></HTML>