Posts made by Itamar Tzadok

Well, if you have different images for thumbnails you can simplify things by giving them the same name of the image with a tn prefix (e.g. image001.jpg -> tn_image001.jpg) then in the list view you set the img src to

<img src="http://your.moodle.org/moodle/file.php/3/images/tn_||imageName||" />

If you use the same images you can play with the image width and height properties to reduce the displayed image size (although if the image size is big the page may be quite heavy).

Hope this helps.

smile

Moodle in English -> General help -> Quiz types -> Re: Quiz types

by Itamar Tzadok -
It is usually suggested to create one question, export it, open and view the xml file, add your entries and import. The following is an example of how to create it in Excel:

="<question type='cloze'><name><text><![CDATA["&B2&"]]></text></name><questiontext><text><![CDATA["&Y2&"]]></text></questiontext><generalfeedback><text><![CDATA[]]></text></generalfeedback><image></image><penalty>0</penalty></question>"

In this example B2 is the cell with the question name, Y2 is the cell with the question text, and in this case no general feedback is provided. You copy the content of this field and paste it into a txt file. You add to the top of the txt file the following line:

<?xml version='1.0' encoding='UTF-8'?><quiz>

Then if your font style in the excel was not set to unicode you'd better search and replace all special quote characters and other such obstacles. Then the file should be ready for import and so import it and with a bit of luck it will work. If it doesn't, look for more of those special characters and after a few trials it should start importing smoothly.

Hope this helps.

smile

Yes and sorry. smile This is not a hack but rather an alternative way to think about the list view of the database. Suppose that your database displays a list of person-hobby pairs such that the person is the one entering the info. So your database would have a hobby field and the name of the person will be displayed by means of the ##user## field. Now, typically the list view template would be set as a table and look like this (simplified):

header

<table border="1" cellpadding="5">
<tbody>
<tr>
<th>Name</th>
<th>Hobby</th>
</tr>

body

<tr>
<td>##user##</td>
<td>||hobby||</td>
</tr>

footer

</tbody>
</table>

(|| stands for square brackets)This table with two entries should display the following:

Name Hobby
John Doe Snowboarding
Jane Doe Hang-gliding


You can add the following commented out lines (bold only for emphasis):

header

<table border="1" cellpadding="5">
<tbody>
<tr>
<th>Name</th>
<th>Hobby</th>
</tr>
<!--
Name,Hobby<br />
-->

body

<tr>
<td>##user##</td>
<td>||hobby||</td>
</tr>
<!--
##user##,||hobby||<br />
-->

footer

</tbody>
</table>

So far there is no change to the display. However, if you switch the comment tags position to comment out the table:

header

<!--
<table border="1" cellpadding="5">
<tbody>
<tr>
<th>Name</th>
<th>Hobby</th>
</tr>
-->
Name,Hobby<br />

body

<!--
<tr>
<td>##user##</td>
<td>||hobby||</td>
</tr>
-->
##user##,||hobby||<br />

footer

<!--
</tbody>
</table>
-->

The display will change to:

Name,Hobby
John Doe,Snowboarding
Jane Doe,Hang-gliding

which you can copy and paste into a text file, change the .txt extension to .csv and open with Excel.

Hope this helps.

smile