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

Inconsistent management of decimal grades in mod Assign

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Assignment
    • Labels:
      None
    • Testing Instructions:
      Hide
      1. Add the "Espanol international" language pack to Moodle (Site administration -> Language -> Language packs)
      2. Enable the "Display language menu" setting (Site administration -> Language -> Language settings)
      3. Create an instance of mod_assign in a course with at least one student in it
      4. Go to the site home page and change the language to "Espanol international"
      5. Go to the new assignment and click "Ver/Calificar todas las entregas" (View/grade all submissions)
      6. From the grading screen, grade one of the students and give them a decimal grade (e.g. 12.4)
      7. From the grading screen the new grade should display as "12,4"
      8. Edit the grade and it should be editable as "12,4"
      9. Save the grade and it should display as "12,4" and not be rounded to 12.
      Show
      Add the "Espanol international" language pack to Moodle (Site administration -> Language -> Language packs) Enable the "Display language menu" setting (Site administration -> Language -> Language settings) Create an instance of mod_assign in a course with at least one student in it Go to the site home page and change the language to "Espanol international" Go to the new assignment and click "Ver/Calificar todas las entregas" (View/grade all submissions) From the grading screen, grade one of the students and give them a decimal grade (e.g. 12.4) From the grading screen the new grade should display as "12,4" Edit the grade and it should be editable as "12,4" Save the grade and it should display as "12,4" and not be rounded to 12.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:

      Description

      New mod Assign can store grades internally as decimal numbers (10.5).

      In non-english locales (European, South America, South Africa) the decimal separator is a comma. Moodle correctly translates the grades form stored format (for instance 8.50) to display format (8,50) in the grading forms, and that becomes a problem.

      One stored, a number like 8.50 is presented in the grading form like 8,5 and that value does NOT validate by is_numeric in gradeform.php validation. Cannot be saved.

      So, even if teacher are instructed to use a "." as decimal separator, every time you review an assessment you need to manually change ',' for '.', even in previously well stored grades. A major inconvenience.

      This problem is solved by gradebook scripts. There, when entering an offset or multiplier for a gradeitem in a form you can user either "5.0" or "5,0" in both formats the number is correctly recognized and stored in decimal fields in database.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Jun/12