diff --git a/public/mod/quiz/edit_rest.php b/public/mod/quiz/edit_rest.php index 20cd2c788d7..3798ac179a3 100644 --- a/public/mod/quiz/edit_rest.php +++ b/public/mod/quiz/edit_rest.php @@ -45,7 +45,7 @@ $summary = optional_param('summary', '', PARAM_RAW); $sequence = optional_param('sequence', '', PARAM_SEQUENCE); $visible = optional_param('visible', 0, PARAM_INT); $pageaction = optional_param('action', '', PARAM_ALPHA); // Used to simulate a DELETE command. -$maxmark = optional_param('maxmark', '', PARAM_FLOAT); +$maxmark = optional_param('maxmark', '', PARAM_LOCALISEDFLOAT); $newheading = optional_param('newheading', '', PARAM_TEXT); $shuffle = optional_param('newshuffle', 0, PARAM_INT); $page = optional_param('page', '', PARAM_INT); diff --git a/public/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature b/public/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature index 1291409ebd7..cfad32d7da3 100644 --- a/public/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature +++ b/public/mod/quiz/tests/behat/editing_set_marks_no_attempts.feature @@ -46,6 +46,24 @@ Feature: Edit quiz marks with no attempts And I should see "Total of marks: 10.00" And "li input[name=maxmark]" "css_element" should not exist + @javascript + Scenario: Set the max mark for a question taking locale into account + Given the following "language customisations" exist: + | component | stringid | value | + | core_langconfig | decsep | , | + And I reload the page + When I set the max mark for question "First question" to "7,5" + Then I should see "7,50" + And I should see "3,00" + And I should see "Total of marks: 10,50" + + And I follow "Edit maximum mark" + And I press the escape key + And I should see "7,50" + And I should see "3,00" + And I should see "Total of marks: 10,50" + And "li input[name=maxmark]" "css_element" should not exist + @javascript Scenario: Set the overall Maximum grade. When I set the field "maxgrade" to "10.0"