Formulas question type : Decimal separator

Ri: Formulas question type : Decimal separator

by Antonio Maddalosso -
Number of replies: 0

despite being very satisfied with the plugin itself, but taken by despair at the students' grievances for the use of comma and dot if I came up with this solution:

- start mysql shell
- search for a question string:
      SELECT id FROM `question` WHERE `questiontext` like '%.......%';
- annotate the id, ev. show data:
    select name,value from question_attempt_step_data where attemptstepid in 
       (select id from question_attempt_steps where questionattemptid in 
          (SELECT id FROM `question_attempts` WHERE questionid=         <idDomanda>     )
       ) and name like "_\__";
- replace comma with dot:
    UPDATE question_attempt_step_data
	   SET value = REPLACE(value, ',', '.')
	   WHERE attemptstepid in 
		(select id from question_attempt_steps where questionattemptid in 
           (SELECT id FROM `question_attempts` WHERE questionid=        <idDomanda>     )
       ) and name like "_\__";
- reassess the quiz
I saved myself from a tedious job of revisiting questions!



Average of ratings: Useful (1)