<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>RE: [Xerte] Passing SESSION variable</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Just poked around on my system where I have an old copy of
moodle installed. I&#8217;m using Xerte stand-alone, not XOT, and we aren&#8217;t
using moodle. Anyway, I found a folder off my root named moodledata, and in
there is a folder named sessions where moodle seems to be storing it&#8217;s
session cookies. Could the problem be that moodle uses its own folder for
sessions, rather than the folder specified in php.ini? <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Patrick
Lockley<br>
<b>Sent:</b> Thursday, December 17, 2009 2:22 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Passing SESSION variable<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div id=idOWAReplyText50369>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>edit.php has a session start line in, believe me, i know, it couldn't
work without one.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>When
i tried to integrate with moodle it worked up until edit, and i could never get
edit to to work.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>You
can try adding session_start(); print_r($_SESSION); at the top of the code, but
when i did that i still got nothing.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I
would hunt for a session_start function call in the moodle code.</span><o:p></o:p></p>

</div>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> 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</span><o:p></o:p></p>

</div>

<div>

<p><span style='font-size:10.0pt'>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 &#8211; 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!&nbsp; 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>
&gt; -----Original Message-----<br>
&gt; From: xerte-bounces@lists.nottingham.ac.uk [<a href="mailto:xerte-">mailto:xerte-</a><br>
&gt; bounces@lists.nottingham.ac.uk] On Behalf Of Ken Scott<br>
&gt; Sent: Thursday, December 17, 2009 6:35 AM<br>
&gt; To: Xerte discussion list<br>
&gt; Subject: RE: [Xerte] Passing SESSION variable<br>
&gt;<br>
&gt; Thanks, no difference<br>
&gt;<br>
&gt; Ken Scott<br>
&gt; e-learning advisor<br>
&gt; JISC RSC YH<br>
&gt; 07966 754040<br>
&gt;<br>
&gt; RSCs - Stimulating and Supporting Innovation in Learning<br>
&gt;<br>
&gt; Know someone making an impact on learning through technology?<br>
&gt; Nominate a colleague for an Evolution Award!&nbsp; Deadline: 15 Jan 2010.<br>
&gt;<br>
&gt; Visit www.rsc-yh.ac.uk/evolution for details<br>
&gt;<br>
&gt;<br>
&gt; ________________________________________<br>
&gt; From: xerte-bounces@lists.nottingham.ac.uk [xerte-<br>
&gt; bounces@lists.nottingham.ac.uk] On Behalf Of Dave Burnett<br>
&gt; [d_b_burnett@hotmail.com]<br>
&gt; Sent: 17 December 2009 14:10<br>
&gt; To: Xerte list<br>
&gt; Subject: RE: [Xerte] Passing SESSION variable<br>
&gt;<br>
&gt; Try&nbsp; explicitly allowing cookies from the domain you are serving
from.<br>
&gt;<br>
&gt; &gt; From: k.scott@leeds.ac.uk<br>
&gt; &gt; To: xerte@lists.nottingham.ac.uk<br>
&gt; &gt; Date: Thu, 17 Dec 2009 14:02:08 +0000<br>
&gt; &gt; Subject: [Xerte] Passing SESSION variable<br>
&gt; &gt;<br>
&gt; &gt; Wonder if anyone can help?<br>
&gt; &gt;<br>
&gt; &gt; I a using the moodle integration patch, and logins in fine. However<br>
&gt; when I try to edit or preview a project I get a blank page. I have<br>
&gt; traced execution and edit.php doesn't seem to have any of the session<br>
&gt; variables available to it - it therefore tries to select from the<br>
table<br>
&gt; with a userid of null.<br>
&gt; &gt;<br>
&gt; &gt; How should the session variables be passed? Not a PHP expert and it<br>
&gt; is not obvious to me!<br>
&gt; &gt;<br>
&gt; &gt; Many thanks<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Ken Scott<br>
&gt; &gt; e-learning advisor<br>
&gt; &gt; JISC RSC YH<br>
&gt; &gt; 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></span><o:p></o:p></p>

</div>

</div>

</div>

</body>

</html>