Rate (0 ... 10) Question - Change PHP/Database Tables?

Rate (0 ... 10) Question - Change PHP/Database Tables?

by Yan Pulavskiy -
Number of replies: 0

Hi Joseph,

I found one more problem related with my type of questions (similar to question discussed in my previous thread here: https://moodle.org/mod/forum/discuss.php?d=227838).

I use yours question type Rate (1... 5) as question Rate (1 ... 11). However, my actual data range from 0 to 10.

 1. How I can modify code that generated TXT file shows actual answers from 0 to 10? Important: The database table questionnaire_response_rank has correct data (by default - I did not change it)

2. How I can modify code that it correct calcute AVG in these Rate questions?

I think that it could be done be modification file: mod/questionnaire/questiontypes/questiontypes.class.php in lines 554, and 570 by removing "+1". Is it correct?

Thank you very much,

Yan

Attachment survey.JPG
Attachment survey1.JPG
Average of ratings: -