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

Allow non-alpha characters in the label in feedback

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1, 2.6.1, Future Dev
    • 3.1
    • Feedback
    • MOODLE_21_STABLE, MOODLE_26_STABLE
    • MOODLE_31_STABLE
    • wip-MDL-29303-master2
    • Hide

      Change PARAM_ALPHANUM into PARAM_TEXT

      Show
      Change PARAM_ALPHANUM into PARAM_TEXT
    • Hide
      1. Enable feedback module
      2. Enable multilang filter for contents and headers
      3. Create feedback and add one of EACH question types, some of them with labels and some without, make some questions depend on others (there must be a page break between dependent questions)
      4. While doing that make sure that
        • you can set label using non alpha-numeric characters
        • html tags are removed
        • multilang filters apply when label is displayed
        • when choosing dependent items you only see items that have labels
        • captcha, label or pagebreaks do not have labels
      5. Preview the feedback - labels should not be displayed
      6. Answer the questions in the feedback - labels should not be displayed
      7. View analysis - labels should be displayed only when they are present and with filters applied
      8. View individual responses - labels should be displayed only when they are present and with filters applied
      9. Export feedback and then import it in another one - all labels should be preserved
      Show
      Enable feedback module Enable multilang filter for contents and headers Create feedback and add one of EACH question types, some of them with labels and some without, make some questions depend on others (there must be a page break between dependent questions) While doing that make sure that you can set label using non alpha-numeric characters html tags are removed multilang filters apply when label is displayed when choosing dependent items you only see items that have labels captcha, label or pagebreaks do not have labels Preview the feedback - labels should not be displayed Answer the questions in the feedback - labels should not be displayed View analysis - labels should be displayed only when they are present and with filters applied View individual responses - labels should be displayed only when they are present and with filters applied Export feedback and then import it in another one - all labels should be preserved

    Description

      In mod/feedback/item/feedback_item_form_class.php, there is one line of code:

      62         $mform->setType('label', PARAM_ALPHANUM);

      I think it should be PARAM_TEXT since PARAM_ALPHANUM will filter out all non-alpha chars, such as Chinese and Japanese.

      PS. Since label is very important to be a reference and is shown everywhere, why not set is as required field? There is always empty "()" shown before question name when the label is not set. I think it is ugly.

      Reproduction steps:

      1. Create a feedback activity
      2. Edit questions
      3. Add one question of any type
      4. Fill the form and ensure input "测试" into label
      5. Submit the form
      6. Edit the question and the label is empty

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              sunner Sunner Sun
              Simey Lameze Simey Lameze
              David Monllaó David Monllaó
              cameron1729 cameron1729
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                23/May/16