Posts made by Joseph Rézeau

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Eva,

I am glad that you solved your problem. Please note that when my (language didactics) students author Hot Potatoes exercices I advise them to never ever use "strange" characters in the names of their HP exercises and picture or audio files.

Characters allowed: a-z, A-Z, 0-1, -, _ (i.e. hyphen and underscore)

Forbidden: é, à, ç, ù, etc. and, of course, all punctuation characters and blank space.

Fortunately (or unfortunately), Windows is all too permissive and most Windows users have taken the habit to use the whole range of their keyboard characters, including blank spaces to name their files. But when these files are zipped, uploaded to non-Windows (Unix, Linux, etc.) servers and unzipped there (as is often the case with Moodle installations), problems occur with files named using the "forbidden characters".

Hope that helps,

Joseph

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hello José,

1- In my previous message, the hack should really be (just comment out that line):

In file questionnaire/locallib.php, version $Id: locallib.php,v 1.49.2.66 2009/12/26 10:29:30 joseph_rezeau Exp $

line 1371

change

if (is_numeric($q4)) {
$q4++;
}

to

if (is_numeric($q4)) {
//$q4++;
}

2- Further hacks needed to display correctly in View all responses (your Fig.2)

In file questionnaire/questiontypes/questiontypes.class.php

$Id: questiontypes.class.php,v 1.31.2.44 2009/12/26 10:29:29 joseph_rezeau Exp $

line 542 change

$sql = 'SELECT C.content, AVG(A.rank+1) AS average '.

to

$sql = 'SELECT C.content, AVG(A.rank) AS average '.

lines 1920-1924 change

if (($j = $avg * $width) > 0) {
$interval = 50 / $length;
$out .= sprintf('<img alt="" src="'.$image_url.$currhbar.
'rhbar.gif" height="0" width="%d%%" style="visibility:hidden" />', $j - $interval - 0.3);
}

to

if (($j = $avg * $width) >= 0) {
$interval = 50 / $
$out .= sprintf('<img alt="" src="'.$image_url.$currhbar.
'rhbar.gif" height="0" width="%d%%" style="visibility:hidden" />', $j + $interval - 0.3);
}

Example

question's possible answers:

objetivos=1. Existe correspondencia entre objetivos y contenidos de la accion formativa
documentacion=2. La documentacion y materiales ... son comprensibles y adecuados.
medios=3. Los medios y soportes digitales son adecuados.
1=0
2=1
3=2
4=3
5=4
6=5
7=6
8=7
9=8
10=9
11=10

See attached Result display (for one response only) and export to Excel

Please test my hacks carefully on a test installation before going live! I will try to find a better solution and commit it as an option for 0 -> n / 1 -> n ratings in the Rate question Edit screen.

Joseph

Attachment image00.jpg
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Sorry, José, but the download.php file you attached belongs to the survey module, not the questionnaire module.

If it's OK for you to hack your Questionnaire files, here is how you can get the ratings to start at zero. In file questionnaire/locallib.php, version $Id: locallib.php,v 1.49.2.66 2009/12/26 10:29:30 joseph_rezeau Exp $

line 1371

change

if (is_numeric($q4)) {
$q4++;
}

to

if (is_numeric($q4)) {
$q4;
}

Joseph
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

When you created that question, you asked it to be a Required (obligatory) question. The red asterisk to the left of the question number (1) shows that it is a required question. Your screenshot shows question #1 "empty" of any answers, of course if you try to submit it without answering it you will get the warning message.

Are you getting the error message if you actually check one choice for each item?

Joseph

Average of ratings: Useful (1)