[Xerte-dev] Re: SCORM 1.2 export
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Mon Jul 14 22:24:03 BST 2014
Cheers. The rules pretty much have worked, so no need to review their usefulness, but when they do go wrong, it takes a bit of a lightbulb to get from problem to culprit (at least for me).
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk [xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell [ronm at mitchellmedia.co.uk]
Sent: 14 July 2014 19:54
To: 'For Xerte technical developers'
Subject: [Xerte-dev] Re: SCORM 1.2 export
Sorry haven't had much time but just quickly tested Niko's suggested change of order on my install and that does fix the 1.2 export so now all 4 export options work and the order of my .htaccess export lines are similar to this order:
rewriteRule ^export_local_([0-9]+)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&local=true&scorm=false
rewriteRule ^export_local_([0-9]+)?(.*)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&local=true&scorm=false&$2
rewriteRule ^export_full_([0-9]+)$ /toolkits/website_code/php/scorm/export.php?full=true&template_id=$1&scorm=false
rewriteRule ^export_full_([0-9]+)?(.*)$ /toolkits/website_code/php/scorm/export.php?full=true&scorm=false&template_id=$1&$2
rewriteRule ^export_([0-9]+)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&scorm=false
rewriteRule ^export_([0-9]+)?(.*)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&scorm=false&$2
rewriteRule ^scorm2004_([0-9]+)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&scorm=2004
rewriteRule ^scorm2004_([0-9]+)?(.*)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&scorm=2004&$2
rewriteRule ^scorm_rich_([0-9]+)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&data=rich&scorm=true
rewriteRule ^scorm_rich_([0-9]+)?(.*)$ /toolkits/website_code/php/scorm/export.php?data=rich&scorm=true&template_id=$1&$2
rewriteRule ^scorm_([0-9]+)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&scorm=true
rewriteRule ^scorm_([0-9]+)?(.*)$ /toolkits/website_code/php/scorm/export.php?template_id=$1&scorm=true&$2
I can't comment on the htaccess.conf but if it's now the same order as above then seems correct. To be honest I'm not sure how many installs out there even make use of the apache mode setting. You only have to look at the full url's of the examples that get shared.
HTH
Ron
From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 14 July 2014 15:47
To: For Xerte technical developers
Subject: [Xerte-dev] Re: SCORM 1.2 export
I’ve committed a change, but please could someone make sure this is correct / sensible etc,
Thanks,
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 14 July 2014 15:45
To: For Xerte technical developers
Subject: [Xerte-dev] Re: SCORM 1.2 export
Thanks Niko. We’re not sure where this needs to go in setup, so it’s probably a good idea if someone who does can put it straight,
Thanks,
Julian
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Nikodem Miranowicz
Sent: 14 July 2014 15:33
To: For Xerte technical developers
Subject: [Xerte-dev] Re: SCORM 1.2 export
It seems that the order of rewriteRules in htaccess is responsible for this (One can export scorm 2004 but not scorm 1.2).
The order of rules is now:
rewriteRule ^scorm2004_([0-9]+)?(.*)$ */website_code/php/scorm/export.php?template_id=$1&scorm=2004&$2
rewriteRule ^scorm_([0-9]+)?(.*)$ */website_code/php/scorm/export.php?template_id=$1&scorm=true&$2
rewriteRule ^scorm_rich_([0-9]+)?(.*)$ */website_code/php/scorm/export.php?template_id=$1&data=rich&scorm=true&$2
Where greedy “scorm_([0-9]” apparently spoils “scorm_rich_([0-9]”.
My suggestion –
1. (tested): change this order (in \setup\htaccess.conf ) to:
rewriteRule ^scorm2004_([0-9]+)?(.*)$ */website_code/php/scorm/export.php?template_id=$1&scorm=2004&$2
rewriteRule ^scorm_rich_([0-9]+)?(.*)$ */website_code/php/scorm/export.php?template_id=$1&data=rich&scorm=true&$2
rewriteRule ^scorm_([0-9]+)?(.*)$ */website_code/php/scorm/export.php?template_id=$1&scorm=true&$2
2. or (untested): use [L] flag.
The same should be with lines:
rewriteRule ^export_...
rewriteRule ^export_full_...
rewriteRule ^export_local_...
Niko
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 11 July 2014 13:38
To: For Xerte technical developers (xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk>)
Subject: [Xerte-dev] SCORM 1.2 export
SCORM 1.2 export isn’t working here: nothing happens, nothing exports.
Any idea?
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
More information about the Xerte-dev
mailing list