Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.7, 2.0
    • Fix Version/s: None
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      15371

      Activity

      Hide
      Roger Moore added a comment -

      Problem needs fixing urgently: an instructor who adds spaces accidentally at the end of the unit field produces an error that is exceedingly hard to catch. This can negatively impact on the perception of Moodle since it makes it appear that Moodle is simply getting things wrong and does not work at simple tasks. This also affects 2.0 even with the separate unit entry field.

      For example if metres is accidentally entered as "m " in the question editor then all students entering a response of "<correct value>m" will get it graded as wrong, even if they add the space since the space is stripped from the students response.

      SUGGESTED FIX:
      Strip trailing spaces from the instructor entered units in the form. Not sure about MOODLE 2.0 (where the problem still exists) but a call to 'trim()' in the form parsing code in question/type/<typename>/questiontype.php should be a quick fix for the very hard to catch trailing space issue.

      Show
      Roger Moore added a comment - Problem needs fixing urgently: an instructor who adds spaces accidentally at the end of the unit field produces an error that is exceedingly hard to catch. This can negatively impact on the perception of Moodle since it makes it appear that Moodle is simply getting things wrong and does not work at simple tasks. This also affects 2.0 even with the separate unit entry field. For example if metres is accidentally entered as "m " in the question editor then all students entering a response of "<correct value>m" will get it graded as wrong, even if they add the space since the space is stripped from the students response. SUGGESTED FIX: Strip trailing spaces from the instructor entered units in the form. Not sure about MOODLE 2.0 (where the problem still exists) but a call to 'trim()' in the form parsing code in question/type/<typename>/questiontype.php should be a quick fix for the very hard to catch trailing space issue.
      Hide
      Patrick Thibaudeau added a comment -

      I fixed this issue for Moodle 2.x

      Here is the change I made:

      In moodle root/question/type/numerical/questiontype.php line 334

      original : $units[$i]>unit = $question>unit[$i];

      fix : $units[$i]>unit = trim($question>unit[$i]);

      Could you please add this fix to the Moodle core.

      Thank you

      Show
      Patrick Thibaudeau added a comment - I fixed this issue for Moodle 2.x Here is the change I made: In moodle root/question/type/numerical/questiontype.php line 334 original : $units [$i] >unit = $question >unit [$i] ; fix : $units [$i] >unit = trim($question >unit [$i] ); Could you please add this fix to the Moodle core. Thank you
      Hide
      Pierre Pichet added a comment -

      Thanks for reminding me this problem that I effectively forgot in building 2,0 code.

      Show
      Pierre Pichet added a comment - Thanks for reminding me this problem that I effectively forgot in building 2,0 code.
      Hide
      Michael de Raadt added a comment -

      Thanks for reporting this issue.

      We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported.

      If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

      Michael d.

      TW9vZGxlDQo=

      Show
      Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d. TW9vZGxlDQo=
      Hide
      Pierre Pichet added a comment -

      The problem remains on actual 2,6 so maintain active

      Show
      Pierre Pichet added a comment - The problem remains on actual 2,6 so maintain active

        People

        • Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

          Dates

          • Created:
            Updated: