Hello,
The naming of questionnaire instances is complicated (for historical reasons of its complicated development). There are in fact 2 "names" for a questionnaire instance: the usual module name, which appears in the list of
activities, as for all other activities and another name, or "title", which you can change in the Advanced settings tab.
Anyway, before Moodle was fully UTF-8, and as far as I can remamber, it was necessary to use an ASCII character string to save the "survey name" in the
database. This is no longer necessary. So, to fix this bug, all we have to do is to remove some string handling in questionnaire/locallib.php. Because it is difficult for me to test this in Hebrew, could you please test it on your local test moodle site and, if you report that it works, then I can fix it for good.
Around line 900, comment out the lines (with /* ... */, as shown below:
// new survey
if(empty($this->survey->id)) {
if (isset($sdata->name)) {
/* $sdata->name = eregi_replace(
"[^A-Z0-9]+", "_", trim($sdata->name) );
$sdata->name = ereg_replace('_$',"",$sdata->name);*/
}
// create a new survey in the database
$fields = array('name','realm','title','subtitle','email','theme','thanks_page','thank_head','thank_body','info');
$record = new Object();
$record->id = 0;
$record->owner = $sdata->owner;
foreach($fields as $f) {
if(isset($sdata->$f)) {
$record->$f = $sdata->$f;
}
}
$this->survey->id = insert_record('questionnaire_survey', $record);
$this->add_survey($this->survey->id);
if(!$this->survey->id) {
$tab = "general";
$errstr = get_string('errnewname', 'questionnaire') .' [ : ]';
return(false);
}
} else {
if (isset($sdata->name)) {
/* $sdata->name = eregi_replace(
"[^A-Z0-9]+", "_", trim($sdata->name) );
$sdata->name = ereg_replace('_$',"",$sdata->name);*/
}
Joseph