[Xerte] Access > Other

Patrick Lockley Patrick.Lockley at nottingham.ac.uk
Tue Feb 16 11:32:09 GMT 2010


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/20100216/497c9880/attachment.html


More information about the Xerte mailing list