Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not a bug
-
2.6.4
-
None
-
None
-
MOODLE_26_STABLE
Description
I've run into an annoyance with questionnaire that I think can be fixed fairly easily. When duplicating a questionnaire it brings the name and title filled in already with the same value. So to change what the questionnaire is called, you have to change both values, on two different forms.
The title is defaulting to the name, but it seems to actually copy the 'name' value to 'title'. A different approach would be to allow the title to be empty and default it to the name when it's used. For example, in the print_survey_start function there is a line:
echo '<h3 class="surveyTitle">'.s($this->survey->title).'</h3>';
that could be changed to
echo '<h3 class="surveyTitle">'.s((strlen($this->survey->title)>0?$this->survey->title:$this->survey->name).'</h3>';
We would also have to make the title field not a required field. This would solve the problem above such that unless you specified a custom title, you would only have to change the name to get it to display correctly.