[Xerte-dev] drive problems with XOT on USB's

Cowell, Elizabeth E.Cowell at wlv.ac.uk
Thu Dec 13 16:42:25 GMT 2012


Hello,

Not sure where to post this so sorry if the wrong place. 

I've been running XOT on a USB and found that when you move your USB from pc to pc, it runs into problems if the drive letter changes. Basically your templates don't show because the scripts (eg edit.php) fail on a require command that looks for scripts on the wrong drive. 

It seems this is because it uses the root_file_path field from the sitedetails table in the database and I am guessing that this is only set when the initial setup is done.

To make it fool-proof,  I've altered the config.php file to just set the xerte_toolkits_site variable as follows:

$xerte_toolkits_site->root_file_path=dirname(__FILE__) . "/";

I put this statement  after it picks up the field from sitedetails in the statement

foreach($row as $key => $value) {
        $xerte_toolkits_site->$key = $value;
    }

It seems to work but I'm not familiar with the XOT code. Do you think it's a good idea to run with this until there's a proper fix?.  (Its just I use XOT on my USB and kept thinking I'd lost everything when all that was happening was that it was being picked up as a different drive letter on my PC vs laptop).

Also, as USB's are pretty fragile, would you suggest a backup strategy for users of having a .bat file to just back up their USER_FILES to a hard drive, on the basis that if XOT gets corrupted I can re-install, re-add their folders, recreate dummy templates and then copy their original LO's back over these for them (with the right template numbers in the file names).

Or would you suggest also backing up other areas (the database, other XOT files? ) - I am not sure where all any  user specific config is held, is it just in the toolkits_data database or in files outside of the database?

Many thanks if you can help  with any suggestions on getting around this, 

regards

Liz Cowell

















-- 
Scanned by iCritical.



More information about the Xerte-dev mailing list