Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Problem background</h2> <p>Since Moodle 2.0, files are no longer stored on server in the conventional <code>/this/is/the/path/to/my.file</code> way. Instead, files are rehashed and stored in Repositories (i.e. spread all over the <code>moodledata</code> folder as a collection of seemingly random data). This increases security and cross-OS compatibility but complicates stuff for people who would like to simply upload a SCORM zip package via FTP. Here's more information on <a href="http://docs.moodle.org/20/en/File_handling" rel="nofollow">file handling in Moodle 2.0</a></p> <h2>Path to the soluton</h2> <p>Let's locate the file you want to update, then update it. </p> <ol> <li>Run phpmyadmin, go to <code>mdl_files</code> table, find your file by name in the <code>filename</code> field (let's say it's <code>portrait.jpg</code>)</li> <li>Look at the <code>contenthash</code> field, it'll look like <code>abcde1234567890</code>. This means your file is stored in <code>moodledata/filedir/ab/cd/</code> folder under the name <code>abcde1234567890</code>.</li> <li>Rename the updated <code>portrait.jpg</code> to <code>abcde1234567890</code>, upload and overwrite.</li> <li>Go back to phpmyadmin and update the <code>filesize</code> field in record for <code>portrait.jpg</code> with the size of the updated file.</li> </ol> <p>Obviously, this process can be automated. You'll have to write a script that allows you to upload a file, then it'll search for that file in mdl_files, save it to the correct folder and update all fields accordingly. </p> <h2>Alternative idea</h2> <p>Enable external package type (and also enable 'Update on every launch'). Go to Site administration / Plugins / Activities / SCORM and check the box down below. Now you'll be able to launch SCORM packages directly from another server, so Moodle won't mess with it. Of course, you can run in other (probably cross-domain related) problems.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload