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

Questionnaire title should default to empty

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not a bug
    • 2.6.4
    • None
    • Survey
    • 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.

      Attachments

        Activity

          People

            danmarsden Dan Marsden
            inceebee Nate Baxley
            Amaia Anabitarte, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: