[Xerte] Access > Other
RonM
ronm at mitchellmedia.co.uk
Wed Feb 17 00:09:05 GMT 2010
Hi Pat
Been persevering with this because I need to get it working. I downloaded the latest 1.5 zip from your website, dropped it over a localhost install, set access properties of an LO to other and added a url and get the same error I was getting on my live site e.g.
Fatal error: Call to undefined function dont_show_template() in C:\xampp\htdocs\xertetoolkits15\play.php on line 334
So then I tried the techdis sandpit with a simple test LO called access test <http://xerte5.techdis.palepurple.co.uk/play_1671> http://xerte5.techdis.palepurple.co.uk/play_1671
Fatal error: Call to undefined function dont_show_template() in /var/www/vhosts/xerte5.techdis.palepurple.co.uk/htdocs/play.php on line 336
So just to check what goes in the ‘Other’ text box? Is it a url like <http://nottingham.ac.uk> http://nottingham.ac.uk ? Not surrounded by quotes?
I have a pre 1.5 installation working as it should with this so not sure what the difference is or if it’s a bug that’s crept in since 1.5.
Perhaps a question for others on the list – if you have a 1.5 install and set the access properties of an LO to other and then add a url does it work when you follow the link to that LO or do you get an error like the ones above?
Thanks
Ron
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Patrick Lockley
Sent: 16 February 2010 14:46
To: Xerte discussion list
Subject: RE: [Xerte] Access > Other
Yes, sorry, but the include for module_functions in inside play.php
The template framework is part of the results returned by the query on line 206.
I would suggest after this line
}else if(substr($row_play['access_to_whom'],0,5)=="Other"){ (line 304)
You add
Echo “<pre>”;
print_r($row_play);
echo “</pre>”;
and see what happens
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of RonM
Sent: 16 February 2010 12:10
To: 'Xerte discussion list'
Subject: RE: [Xerte] Access > Other
Isn’t it in modules/xerte/module_functions.php?
Where do I look for why it’s not bringing back the template framework?
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Patrick Lockley
Sent: 16 February 2010 11:32
To: Xerte discussion list
Subject: RE: [Xerte] Access > Other
The don’t show function is in
Modules/Xerte/play.php
I’d guess your problem is the query isn’t bringing back the template framework
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of RonM
Sent: 16 February 2010 11:27
To: 'Xerte discussion list'
Subject: RE: [Xerte] Access > Other
J sorry Pat the **deleted path**/ was just me saying that I’d removed the rest of the path from what I pasted into email!
I tested this on an older installation and it works fine so I’m not sure what’s wrong with this. It doesn’t appear to be finding the don’t_show function. This is on an installation using my moodle patch but then so is the other older installation which works.
If you’ve got any suggestions let me know and if I resolve it at some point I’ll post the solution back to the list.
Cheers
Ron
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Patrick Lockley
Sent: 16 February 2010 10:17
To: Xerte discussion list
Subject: RE: [Xerte] Access > Other
Sadly Ron, it works fine here, and the legacy thing isn’t there.
There is no string “deleted” in my play.php
Lines 304-341 are
else if(substr($row_play['access_to_whom'],0,5)=="Other"){
/*
* The Other attribute has been set - so break the string down to obtain the host
*/
$test_string=substr($row_play['access_to_whom'],6,strlen($row_play['access_to_whom']));
/*
* Can only check against this variable, if I can't find it (say pop ups) no choice but to fail
*/
if(strlen($_SERVER['HTTP_REFERER'])!=0){
if(strpos($_SERVER['HTTP_REFERER'],$test_string)==0){
mysql_query("UPDATE " . $xerte_toolkits_site->database_table_prefix . "templatedetails SET number_of_uses=number_of_uses+1 WHERE template_id=" . $safe_template_id);
require $xerte_toolkits_site->root_file_path . "modules/" . $row_play['template_framework'] . "/play.php";
show_template($row_play);
}else{
require $xerte_toolkits_site->root_file_path . "modules/" . $row_play['template_framework'] . "/play.php";
dont_show_template();
}
}else{
dont_show_template();
}
}
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of RonM
Sent: 15 February 2010 20:15
To: Xerte discussion list
Subject: Re: [Xerte] Access > Other
Could be because my subsequent test on an older installation worked fine. This one which didn't work is latest 1.5
Sent from my iPhone
On 15 Feb 2010, at 19:52, Patrick Lockley <Patrick.Lockley at nottingham.ac.uk> wrote:
might be a bit of a legacy thing i left over, let me have a look tomorrow
But your intepretation of how it works is correct
_____
From: xerte-bounces at lists.nottingham.ac.uk on behalf of RonM
Sent: Mon 15/02/2010 18:16
To: 'Xerte discussion list'
Subject: [Xerte] Access > Other
Hi Pat
Have a new XOT installation in use today and someone asked me about the option to prevent public access via the ‘Other’ option. Am I right in thinking that should work as follows: add a site URL in the textbox e.g. http://nottingham.ac.uk and then all LO links followed from anywhere on that site will work but accessed from anywhere else and presumably some kind of restricted access message?
On this new installation I’m getting the following error:
Fatal error: Call to undefined function dont_show_template() in **deleted path**/xertetoolkits/play.php on line 334
Any ideas?
About to check on another installation to see if I get a similar error.
Cheers
Ron
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100217/c301ff25/attachment.html
More information about the Xerte
mailing list