--- C:/Users/HCL/Downloads/moodle/question/question.php Thu Apr 18 19:49:40 2013 +++ C:/wamp/www/moodle/question/question.php Fri May 03 19:33:25 2013 @@ -263,6 +263,20 @@ question_move_questions_to_category(array($question->id), $tocatid); } else { + //Before saving the question , we correct the defaultmark if needed + //Apply changes eg 0,8 to 0.8 + str_replace(",",".",$question->defaultmark); + + //Change the question from text to number + + + //check that after replacing , by . the defaultmark must be a valid numeric string + if(!is_numeric($question->defaultmark)) + { + // issue warning and stop + + } + // We are acutally saving the question. if (!empty($question->id)) { question_require_capability_on($question, 'edit'); @@ -273,6 +287,7 @@ } } $question = $qtypeobj->save_question($question, $fromform); if (!empty($CFG->usetags) && isset($fromform->tags)) { // A wizardpage from multipe pages questiontype like calculated may not // allow editing the question tags, hence the isset($fromform->tags) test.