Moodle
  1. Moodle
  2. MDL-21813

Moodle should not allow a unit like '1' as it leads to weird behaviour.

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.9.7
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      Linux, Apache PHP wtih Firefox
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      I have a local standard installation with the german language pack. No other themes or packages are installed.

      When I add the simple numerical test "7 * 3 =" and enter the result "21" moodle only accepts "2" as the result. I retried this several times but could not enter "21" into the answer field. "31" results in "3", so it looks like the final "1" is removed. After entering "211" the value "21" is accepted.

      The problem is not visible while the test is edited. It has to be saved and reopened.

      Each editing requires the addition of a "1" at the end of each answer ending with "1". This is very annoying.

        Gliffy Diagrams

          Activity

          Hide
          Tim Hunt added a comment -

          That is totally weird. I have never heard of something like that happening before.

          To help me investigate the problem, please could you export the question in Moodle XML format, and attach it here.

          (Also, can you check that you have not, by accident, defined a unit '1' - that might explain what you are seeing.)

          When I test, I cannot reproduce the problem you report, but if I define '1' as a unit with multiplier 1.0, then I do see the problem you report.

          Show
          Tim Hunt added a comment - That is totally weird. I have never heard of something like that happening before. To help me investigate the problem, please could you export the question in Moodle XML format, and attach it here. (Also, can you check that you have not, by accident, defined a unit '1' - that might explain what you are seeing.) When I test, I cannot reproduce the problem you report, but if I define '1' as a unit with multiplier 1.0, then I do see the problem you report.
          Hide
          Friedhelm Hinrichs added a comment -

          I indeed added '1' to the unit field. So I apologize for the ticket, it may be closed.

          But writing the ticket helped me find my mistake.

          One question remains: does it make sense to allow digits (numbers) as units? I don't see an application for digits as units, but maybe I am wrong.

          Show
          Friedhelm Hinrichs added a comment - I indeed added '1' to the unit field. So I apologize for the ticket, it may be closed. But writing the ticket helped me find my mistake. One question remains: does it make sense to allow digits (numbers) as units? I don't see an application for digits as units, but maybe I am wrong.
          Hide
          Tim Hunt added a comment -

          No, Moodle should not let you create a unit like that. I have changed this issue to a feature-request, rather than closing it.

          Show
          Tim Hunt added a comment - No, Moodle should not let you create a unit like that. I have changed this issue to a feature-request, rather than closing it.
          Hide
          Tim Hunt added a comment -

          This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.

          For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          Tim Hunt added a comment - This issue was assigned to me automatically, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            People

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

              Dates

              • Created:
                Updated: