Interventi di Joseph Rézeau

Immagine Core developers Immagine Plugin developers Immagine Testers Immagine Translators

To adjust the date format for all of your questionnaires you can hack file mod/questionnaire/locallib.php line 25, change:

define('QUESTIONNAIREDATEFORMAT', '%d/%m/%Y'); 

to

define('QUESTIONNAIREDATEFORMAT', '%m/%d/%Y'); 

To check that it works, create a question of Date type in your questionnaire, go to "take the questionnaire" and next to the input field you will see, instead of the default example:(e.g. 21/4/2002) -> (e.g. 4/21/2002).

In my (forthcoming) proposal for a new version of Questionnaire, I have made this date formatting dependent on language files, so you will have e.g. 23/4/2007 in the English lang file, 23-4-2007 in the French file, 4/23/2007 in the US_English file, etc.

Please note that at the moment there is not a very robust format checking for the Date question type in Questionnaire. If a respondent enters a response which does not correspond to the expected format, it will simply be ignored, the respondent will not receive a "wrong format" error message.

Joseph

Immagine Core developers Immagine Plugin developers Immagine Testers Immagine Translators
Hi Margarida,
It would be easier to help you if you re-posted this to the Themes forum, told us which Moodle version and which theme you are using. Finally, if you gave the URL address of your Moodle site it would help a lot.
Joseph
Immagine Développeurs Immagine Développeurs de plugins Immagine Testeurs Immagine Traducteurs
S'il n'y a pas de réponse, c'est sans doute qu'il n'y a pas de solution. Je ne vois pas bien comment sur un poste non connecté à Internet on pourrait consulter des ressources "qui sont stockés en dehors de moodle (sur des serveurs externes)."thoughtful
Joseph
Immagine Core developers Immagine Plugin developers Immagine Testers Immagine Translators
There's nothing like asking a question to find the answer by yourself.wink I've just found out that I get the desired result by using function userdate($date, $format='', $timezone=99, $fixday = true).
But maybe there are alternative solutions?
Joseph