Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3252

Max Length of Question name not set

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.14, 2.0, 2.1, 2.2
    • 1.9.14, 2.0, 2.1, 2.2
    • Module: Questionnaire
    • None
    • Hide

      fix: change

      $mform->addElement('text', 'name', get_string('optionalname', 'questionnaire'), array('size'=>'25'));

      to

      $mform->addElement('text', 'name', get_string('optionalname', 'questionnaire'), array('size'=>'30', 'maxlength'=>'30'));

      Show
      fix: change $mform->addElement('text', 'name', get_string('optionalname', 'questionnaire'), array('size'=>'25')); to $mform->addElement('text', 'name', get_string('optionalname', 'questionnaire'), array('size'=>'30', 'maxlength'=>'30'));
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE

    Description

      questionnaire_question table field name Type is varchar(30) but maxlength of that field is not set in questions_form.php which results in error writing to database if user enters a question name string > 30

      see http://moodle.org/mod/forum/discuss.php?d=188770

      Attachments

        Activity

          People

            rezeau Joseph Rézeau
            rezeau Joseph Rézeau
            Mike Churchward
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              24/Nov/10