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

Workshop: cannot save edited settings when using comma as a decimal separator

XMLWordPrintable

    • MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-51806_master
    • Hide

      Note on Moodle 3.2 [2016-05-25]:
      Currently, language packs can't be retrieved automatically from within Moodle. You'll get back an error. To test this in master, follow the instructions on the page, i.e. "Please download the appropriate ZIP file(s) from download.moodle.org/langpack, copy them to your /home/jake/moodledata/master/moodledata/lang/ directory and unzip them manually."

      Prerequisites:
      You must have one existing course.

      Testing Steps:

      As a site admin:
      Install the 'Català ‎(ca)‎' language pack (Site admin > language > Language packs). You should now see the language in the language drop down in the top left of the site. Leave this set to English for now.

      Activity Creation:

      1. Navigate to the course view page (Nav block > Courses > YOUR_COURSE_NAME).
      2. Turn editing on
      3. Click 'Add an activity or resource', select 'Workshop' and click 'Add'. You should be taken to the 'Adding a new Workshop' page.
      4. Change language (via the drop down in the top left of the site) to 'Català ‎(ca)'. The page should reload in Català.
      5. Enter a workshop name.
        Now, in the "Paràmetres de qualificació" section of the form:
      6. Ensure te field "Qualificació de la tramesa is set to 80.
      7. For the field "Qualificació de la tramesa per aprovar", enter 99,99 (note the comma delimiter).
      8. Ensure the field "Qualificació de la tasca d'avaluació" is set to 20.
      9. For the field "Qualificació de la tasca d'avaluació per aprovar", enter 33,33 (note the comma delimiter).
      10. Save the form (left button, "Desa els canvis i torna al curs")
      11. Confirm that:
        You see 2 validation warnings in the form - one with "màxima possible 80" and one with "màxima possible 20".
      12. Set both numeric fields to values less than 80 and 20 respectively, eg. 66,66 and 11,11
      13. Save the form again.
      14. Confirm that:
        The workshop activity has been created and that the values entered in the form are present.

      Activity Modification:

      1. Navigate back to the course view page (Nav block > Courses > YOUR_COURSE_NAME).
      2. Edit the settings of your workshop activity.
      3. Change language (via the drop down in the top left of the site) to 'Català ‎(ca)'. The page should reload in Català.
      4. In the "Paràmetres de qualificació" section of the form:
      5. Ensure te field "Qualificació de la tramesa is set to 80.
      6. For the field "Qualificació de la tramesa per aprovar", enter 99,99 (note the comma delimiter).
      7. Ensure the field "Qualificació de la tasca d'avaluació" is set to 20.
      8. For the field "Qualificació de la tasca d'avaluació per aprovar", enter 33,33 (note the comma delimiter).
      9. Save the form (left button, "Desa els canvis i torna al curs")
      10. Confirm that:
      11. You see 2 validation warnings in the form - one with "màxima possible 80" and one with "màxima possible 20".
      12. Set both numeric fields to values less than 80 and 20 respectively, and ensure these are different values to those you used when creating the workshop. eg. 66,66 and 11,11.
      13. Save the form again.
      14. Confirm that:
      15. The workshop activity has been updated and that the values entered in the form are present.

      Confirm English language behaviour:

      1. Create and modify a workshop activity using the English language pack.
      2. Confirm that:
        The 'Submission grade to pass' and 'Assessment grade to pass' fields only accept english decimal values (i.e using dot (.) delimiting) and that the validation rules described above are working as expected.
      Show
      Note on Moodle 3.2 [2016-05-25] : Currently, language packs can't be retrieved automatically from within Moodle. You'll get back an error. To test this in master, follow the instructions on the page, i.e. "Please download the appropriate ZIP file(s) from download.moodle.org/langpack, copy them to your /home/jake/moodledata/master/moodledata/lang/ directory and unzip them manually." Prerequisites: You must have one existing course. Testing Steps: As a site admin: Install the 'Català ‎(ca)‎' language pack (Site admin > language > Language packs). You should now see the language in the language drop down in the top left of the site. Leave this set to English for now. Activity Creation: Navigate to the course view page (Nav block > Courses > YOUR_COURSE_NAME). Turn editing on Click 'Add an activity or resource', select 'Workshop' and click 'Add'. You should be taken to the 'Adding a new Workshop' page. Change language (via the drop down in the top left of the site) to 'Català ‎(ca)'. The page should reload in Català. Enter a workshop name. Now, in the "Paràmetres de qualificació" section of the form: Ensure te field "Qualificació de la tramesa is set to 80. For the field "Qualificació de la tramesa per aprovar", enter 99,99 (note the comma delimiter). Ensure the field "Qualificació de la tasca d'avaluació" is set to 20. For the field "Qualificació de la tasca d'avaluació per aprovar", enter 33,33 (note the comma delimiter). Save the form (left button, "Desa els canvis i torna al curs") Confirm that: You see 2 validation warnings in the form - one with "màxima possible 80" and one with "màxima possible 20". Set both numeric fields to values less than 80 and 20 respectively, eg. 66,66 and 11,11 Save the form again. Confirm that: The workshop activity has been created and that the values entered in the form are present. Activity Modification: Navigate back to the course view page (Nav block > Courses > YOUR_COURSE_NAME). Edit the settings of your workshop activity. Change language (via the drop down in the top left of the site) to 'Català ‎(ca)'. The page should reload in Català. In the "Paràmetres de qualificació" section of the form: Ensure te field "Qualificació de la tramesa is set to 80. For the field "Qualificació de la tramesa per aprovar", enter 99,99 (note the comma delimiter). Ensure the field "Qualificació de la tasca d'avaluació" is set to 20. For the field "Qualificació de la tasca d'avaluació per aprovar", enter 33,33 (note the comma delimiter). Save the form (left button, "Desa els canvis i torna al curs") Confirm that: You see 2 validation warnings in the form - one with "màxima possible 80" and one with "màxima possible 20". Set both numeric fields to values less than 80 and 20 respectively, and ensure these are different values to those you used when creating the workshop . eg. 66,66 and 11,11. Save the form again. Confirm that: The workshop activity has been updated and that the values entered in the form are present. Confirm English language behaviour: Create and modify a workshop activity using the English language pack. Confirm that: The 'Submission grade to pass' and 'Assessment grade to pass' fields only accept english decimal values (i.e using dot (.) delimiting) and that the validation rules described above are working as expected.
    • 3.2 Sprint 1

      New changes to workshop activity in recent Moodle versions introduced a locale-related bug in the settings form.
      To reproduce:

      1. Change Moodle user interface language to one using comma as a decimal separator (like catalan, in my case)
      2. Set up a new workshop
      3. Edit workshop settings. Moodle automatically fills the "Submission grade to pass" and "Assessment grade to pass" fields with the values stored in the database, using 2 decimal places
      4. Try to save the settings. Save fails with Moodle complaining about requiring a number on the two aforementioned fields.
      • Works correctly when using english GUI. Apparently numbers are set up on the form using correct locale settings, but they are not parsed correctly when saving the form.
      • This is a very annoying bug because every time you edit settings again, numeric fields are filled using locale settings, so if your locale uses a comma as a decimal separator, you will not be able to save the form until you change manually the commas to points.

            jaked Jake Dallimore
            orestes Orestes Mas
            Frédéric Massart Frédéric Massart
            David Monllaó David Monllaó
            Rajesh Taneja Rajesh Taneja
            Votes:
            11 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.