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

Grading question from question bank truncate decimal when using comma

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.4.3, 2.9.1, 3.1, 3.8
    • Fix Version/s: None
    • Component/s: Questions, Quiz
    • Testing Instructions:
      Hide

      Setup

      1. Create a course
      2. Set its language to Portuguese (or another that uses comma as decimal separator)
      3. Create a quiz

      Testing scenario 1

      1. Add a question
      2. Set "default mark" as 1,2 or any other number with a comma
      3. Set one response with 100% of points
      4. Click "save and continue editing"
      5. Check that the default mark was correctly saved, properly formatted and is displayed as 1,2

      Testing scenario 2

      1. Go back to the list of questions
      2. Locate the "max mark" column on right side
      3. Click on the edit icon, set the value as 1,2 or any other number with a comma for any question
      4. Check that the "max mark" was correctly saved, properly formatted and is displayed as 1,2
      Show
      Setup Create a course Set its language to Portuguese (or another that uses comma as decimal separator) Create a quiz Testing scenario 1 Add a question Set "default mark" as 1,2 or any other number with a comma Set one response with 100% of points Click "save and continue editing" Check that the default mark was correctly saved, properly formatted and is displayed as 1,2 Testing scenario 2 Go back to the list of questions Locate the "max mark" column on right side Click on the edit icon, set the value as 1,2 or any other number with a comma for any question Check that the "max mark" was correctly saved, properly formatted and is displayed as 1,2
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_29_STABLE, MOODLE_31_STABLE, MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-39195-master

      Description

      Hi,

      This is related to MDL-31594.

      Prerequisite:

      • have a course with a least one question in the question bank
      1. Go into Course settings > Question bank > Questions
      2. Edit a question
      3. Enter 0,8 (with a comma) as the default mark
      4. Save the question

      Expected result:
      Mark set to 0.8 as in other activities in Moodle, the comma is replace by a point.

      Actual result:
      Mark is set to 0 (zero).

        Attachments

        1. patch0.txt
          1 kB
          Puneet Kaur
        2. patch1.txt
          1 kB
          Puneet Kaur

          Issue Links

            Activity

              People

              Assignee:
              danielneis Daniel Neis Araujo
              Reporter:
              jackdaniels JD
              Peer reviewer:
              Tim Hunt Tim Hunt
              Participants:
              Component watchers:
              Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              12 Vote for this issue
              Watchers:
              23 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 minutes
                  5m