I'm debugging a script inside a scorm object. it's a pain because if I find a glitch or want to try something out, I have to upload my package again. This adds about 5 minutes to every thing I try, and leaves me a whole mess of packages. I'd like to try to just edit the referenced file on disk (on my local system) so that I can then work out the problem, fix it in my source system, the publish the source back to production again. Here's how I find files in the moodle cache:
- in mysql, search mdl_files.filename for my file (e.g. foo.js).
- copy the contenthash - something like 7d9ac86b49cf9236b3e659f19b2c1b3f30623575
- go to the file system and search moodledata for that filename
- one instance will come up
If I edit the file, changes aren't reflected in Moodle on refreshing the scorm page or reloading the moodle page that hosts the package. Purge cache doesn't change it. I'm guessing the file was originally served with a long-future file expiry.
If I open the developer tools in the browser (latest chrome, macos 10.8.4) I can see that the request for this particular file is pulling from browser cache.
- Status Code: 200 OK (from cache)
So is there a code mod I can do to pluginfile.php or lib/filelib.php for the purposes of my debugging? I don't particularly care if every file ever served by my local box is never cached in browser. In fact, that's preferred - since when I'm debugging from my iPad via Charles (proxy) it will be informed to pull the latest version (since iPad caches what it can and doesn't really have an easy way to turn that behaviour off [consistently] - except for the http headers).