Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-46999

Questionnaire title should default to empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 2.6.4
    • Survey
    • None
    • MOODLE_26_STABLE

      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.

            danmarsden Dan Marsden
            inceebee Nate Baxley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.