<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Like anything from the App Store.<div><br></div><div><br><div><div>Date: Wed, 5 Dec 2012 13:04:50 +0000<br>From: patrick.lockley@googlemail.com<br>To: xerte-dev@lists.nottingham.ac.uk<br>Subject: [Xerte-dev] Re: moodle fix<br><br>but the PHP works outside of moodle 1.9 fine<br><br>the problem is once with a database and once with a path<br><br>Also - we are setting a precedent. We have a working code base, but when added into another product, it stops.<br>
<div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">On Wed, Dec 5, 2012 at 12:47 PM, Dave Burnett <span dir="ltr"><<a href="mailto:d_b_burnett@hotmail.com">d_b_burnett@hotmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">
The pathing on Moodle 2.0 is a wild and crazy thing.<div>Maybe 1.9 was a bit of a test bed for some of what became 2.0?</div><div>Wild guessing.</div><div> <br><br><div><div></div><hr>Date: Wed, 5 Dec 2012 12:32:09 +0000<br>
From: <a href="mailto:patrick.lockley@googlemail.com">patrick.lockley@googlemail.com</a><br>To: <a href="mailto:xerte-dev@lists.nottingham.ac.uk">xerte-dev@lists.nottingham.ac.uk</a><div><div class="h5">
<br>Subject: [Xerte-dev] Re: moodle fix<br><br>it's not really about introducing errors or changes, but why moodle 1.9 requires the code to be different? That seems a bit worrying.<br><div><br><br><div>On Wed, Dec 5, 2012 at 12:27 PM, Ron Mitchell <span dir="ltr"><<a href="mailto:ronm@mitchellmedia.co.uk">ronm@mitchellmedia.co.uk</a>></span> wrote:<br>
<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB"><div><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I've been testing without a moodle integration path as well as with.<u></u><u></u></span><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">This particular window_reference error happens with and without a moodle integration path. <u></u><u></u></span><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I'm testing via xampp but you can see it on the techdis install although that obviously is using moodle authentication.<u></u><u></u></span><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I haven't found any other errors when testing without integration path so I'm not sure your changed files have introduced any problems unless this js error is a result of those changes.<u></u><u></u></span><BR>
<a name="13b6b282d716282c_13b6b06cb7967510__MailEndCompose" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a><BR><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> <a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Pat Lockley<br>
<b>Sent:</b> 05 December 2012 12:14</span><BR><div><div><br><b>To:</b> For Xerte technical developers<br><b>Subject:</b> [Xerte-dev] Re: moodle fix<u></u><u></u></div></div><br></div><div><div>
<u></u> <u></u><BR>Yeah, my bad - not sure why that would happen. Nothing I've changed javascript side.<br><br>I wouldn't commit those changes as they just don't make sense to me. I don't get why moodle inclusion would cause those problems and I am not sure what they do outside of moodle.<u></u><u></u><BR>
<div><p style="margin-bottom:12.0pt"><u></u> <u></u></p><div>On Wed, Dec 5, 2012 at 12:13 PM, Ron Mitchell <<a href="mailto:ronm@mitchellmedia.co.uk">ronm@mitchellmedia.co.uk</a>> wrote:<u></u><u></u><BR>
<div><div><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I thought that window_reference is undefined is a js error?</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">BTW</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Are you going to commit those changed php files or do you want me to on your behalf?</span><u></u><u></u><BR>
<a name="13b6b282d716282c_13b6b06cb7967510_13b6af9d4bba2212__MailEndCompose" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></a><u></u><u></u><BR><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> <a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Pat Lockley<br>
<b>Sent:</b> 05 December 2012 12:02</span><u></u><u></u><BR><div><div><br><b>To:</b> For Xerte technical developers<br><b>Subject:</b> [Xerte-dev] Re: moodle fix<u></u><u></u><BR></div></div></div><div>
<div> <u></u><u></u><BR>Not sure then, I assumed it was that (as this was more of a patch than a fix)<br><br>Do you get a JS error?<u></u><u></u><BR><div><p style="margin-bottom:12.0pt">
<u></u><u></u></p><div>On Wed, Dec 5, 2012 at 11:52 AM, Ron Mitchell <<a href="mailto:ronm@mitchellmedia.co.uk">ronm@mitchellmedia.co.uk</a>> wrote:<u></u><u></u><BR><div><div>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Just print_r($_SESSION) or could there be a similar print_r(something) causing the same problem?</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Have searched for print_r($_SESSION) in the install I'm using for testing and not found.</span><u></u><u></u><BR>
<a name="13b6b282d716282c_13b6b06cb7967510_13b6af9d4bba2212_13b6ae6d74bfda0a__MailE" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></a><u></u><u></u><BR><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> <a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Pat Lockley<br>
<b>Sent:</b> 05 December 2012 11:42</span><u></u><u></u><BR><div><div><br><b>To:</b> For Xerte technical developers<br><b>Subject:</b> [Xerte-dev] Re: moodle fix<u></u><u></u><BR></div></div></div><div>
<div> <u></u><u></u><BR>I think it's because of the print_r($_SESSION) somewhere - remove that and it'll be fine<u></u><u></u><BR><div><p style="margin-bottom:12.0pt">
<u></u><u></u></p><div>On Wed, Dec 5, 2012 at 11:36 AM, Ron Mitchell <<a href="mailto:ronm@mitchellmedia.co.uk">ronm@mitchellmedia.co.uk</a>> wrote:<u></u><u></u><BR><div><div>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Pat</span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">thanks for the update.</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I've been testing on both the techdis server and locally via xampp. Obviously I won't have tested every single permutation yet but from tests so far all seems fine apart from this issue of not being able to create a new project after creating one already until refresh. However this happens without a moodle integration path added too.</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Here's the steps to reproduce with current svn code plus your changed files.</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Click create to create a new project based on Xerte Online Toolkits template</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Close the editor and try to create another project - nothing happens upon clicking create</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Refresh the browser and click create works but the cycle repeats e.g. can't create a second project</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Using debugger in IE9 I get the following error when closing the editor window:</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">SCRIPT5009: 'window_reference' is undefined </span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">edit.php?template_id=17, line 32 character 1</span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Not really sure where to look for the cause/solution to this one but is there perhaps an include/require missing somewhere?</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Cheers</span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Ron</span><u></u><u></u><BR><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u><BR><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> <a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Pat Lockley<br>
<b>Sent:</b> 05 December 2012 09:38</span><u></u><u></u><BR><div><br><b>To:</b> For Xerte technical developers<u></u><u></u><BR></div><b>Subject:</b> [Xerte-dev] Re: moodle fix<u></u><u></u><BR>
</div><div><div> <u></u><u></u><BR>the problem in new template was that for some reason moodle is leaving or creating another database link so when toolkits sends the request to the database it fails as the code is now pointing at the wrong database.<br>
<br>Added in another database_connect call to fix this<br><br>the problem in new folder creation was two require_once("config.php") being used. Removed one and it works.<br><br>Why these would only affect moodle 1.9? No idea.<u></u><u></u><BR>
<div><p style="margin-bottom:12.0pt"> <u></u><u></u></p><div>On Wed, Dec 5, 2012 at 7:49 AM, Ron Mitchell <<a href="mailto:ronm@mitchellmedia.co.uk">ronm@mitchellmedia.co.uk</a>> wrote:<u></u><u></u><BR>
<div><div><span style="color:#1f497d">Hi Pat</span><u></u><u></u><BR><span style="color:#1f497d">thanks - from tests so far those files have certainly improved things!</span><u></u><u></u><BR>
<span style="color:#1f497d"> </span><u></u><u></u><BR><span style="color:#1f497d">What did you find/change? What was the main cause of the problem?</span><u></u><u></u><BR>
<span style="color:#1f497d"> </span><u></u><u></u><BR><span style="color:#1f497d">I've tested creating new projects and folders, moving and deleting projects all of which were a problem previously so looking hopeful.</span><u></u><u></u><BR>
<span style="color:#1f497d"> </span><u></u><u></u><BR><span style="color:#1f497d">One problem/difference at the moment which I don't think was there before is that with a moodle 1.9 integration path I can now create a new project without the workspace refreshing and it appears etc but if I then try to create a second project clicking create to create another Xerte Online Toolkit project doesn't do anything. I have to refresh the browser before I can create another project. Clicking to create an RSS project does work without refresh and with moodle 2 configured I can create a second and third template etc without problem.</span><u></u><u></u><BR>
<span style="color:#1f497d"> </span><u></u><u></u><BR><span style="color:#1f497d">I've only tested this locally so far will test on the techdis server next...</span><u></u><u></u><BR>
<span style="color:#1f497d"> </span><u></u><u></u><BR><span style="color:#1f497d">Cheers</span><u></u><u></u><BR><span style="color:#1f497d">Ron</span><u></u><u></u><BR>
<a name="13b6b282d716282c_13b6b06cb7967510_13b6af9d4bba2212_13b6ae6d74bfda0a_13b6ad" target="_blank"><span style="color:#1f497d"> </span></a><u></u><u></u><BR><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="EN-US"> <a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a> [mailto:<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Pat Lockley<br>
<b>Sent:</b> 05 December 2012 00:29<br><b>To:</b> For Xerte technical developers<br><b>Subject:</b> [Xerte-dev] moodle fix</span><u></u><u></u><BR></div> <u></u><u></u><BR>try swapping these files <u></u><u></u><BR>
</div><p style="margin-bottom:12.0pt"> <u></u><u></u></p></div><p style="margin-bottom:12.0pt"><br>_______________________________________________<br>Xerte-dev mailing list<br><a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><u></u><u></u></p></div> <u></u><u></u><BR></div></div></div>
</div><p style="margin-bottom:12.0pt"> <u></u><u></u></p></div><p style="margin-bottom:12.0pt"><br>_______________________________________________<br>Xerte-dev mailing list<br><a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><u></u><u></u></p></div> <u></u><u></u><BR></div></div></div>
</div><p style="margin-bottom:12.0pt"><u></u> <u></u></p></div><p style="margin-bottom:12.0pt"><br>_______________________________________________<br>Xerte-dev mailing list<br><a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><u></u><u></u></p></div> <u></u><u></u><BR></div></div></div>
</div><p style="margin-bottom:12.0pt"><br><br><u></u><u></u></p></div><p style="margin-bottom:12.0pt"><br>_______________________________________________<br>Xerte-dev mailing list<br><a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><u></u><u></u></p></div><u></u> <u></u><BR></div></div></div>
</div>
<br><br>
<br></div><br>_______________________________________________<br>
Xerte-dev mailing list<br>
<a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________
Xerte-dev mailing list
<a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a></div></div></div></div> </div>
<br><br>
<br></div>
<br>_______________________________________________<br>
Xerte-dev mailing list<br>
<a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________
Xerte-dev mailing list
Xerte-dev@lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</div></div></div> </div></body>
</html>