Itamar Tzadok
Posts made by Itamar Tzadok
First you zip the files you want to upload, upload and unzip. You should have in the database a text field for the file name, say, fileName. Now you prepare a csv file with the list of the file names of the files you uploaded. For example:
fileName
file1.doc
file2.doc
file3.xls
You import the csv file into the database. Then you add to the single or list view template or both, an a tag with the file path and the file name.
For example, suppose your files location in your Moodle files is:
http://your.moodle.org/moodle/file.php/3/docs/
You can add to the template the following html:
<a href="http://your.moodle.org/moodle/file.php/3/docs/||fileName||">||fileName||</a>
(|| stands for square brackets) and the link to the file should be displayed.
You can also associate the link with a doc type image. So you add to the database another field (text or menu) for the file type. You add the relevant info to the csv:
fileName,fileType
file1.doc,doc
file2.doc,doc
file3.xls,xls
Then you lookup the url of your moodle doctype pix and add to the html an img tag such as
<img href="http://your.moodle.org/moodle/pix/f/||fileType||.gif" />
and if you used the same names for the file types as used by moodle it should show the proper file type image (e.g.
for pdf)
Hope this helps
Hope this helps.
Other things you can do with a database if you only find a good enough reason to do them:
- A progress report (preset should also be posted soon ... I hope)