moodleou / moodle-qtype_oumultiresponse

A multiple-choice, multiple response question type for Moodle, with particular scoring rules.
12 stars 20 forks source link

Issues highlighted by admin/cli/check_database_schema.php #11

Open abias opened 3 years ago

abias commented 3 years ago

Every now and then, we are running the admin/cli/check_database_schema.php script in our Moodle installation.

This time, this issue was highlighted:

-------------------------------------------------------------------------------
question_oumultiresponse
 * column 'showstandardinstruction' has default '1', expected '0' (I)
-------------------------------------------------------------------------------

Upon investigation, I saw that there is a discrepancy between https://github.com/moodleou/moodle-qtype_oumultiresponse/blob/main/db/install.xml#L20 and https://github.com/moodleou/moodle-qtype_oumultiresponse/blob/main/db/upgrade.php#L77. The first defines a default of 0, the second (which became effective in our Moodle instance as we are using this plugin for a long time now) defines a default of 1.

May I ask you to add another step to db/upgrade.php which fixes the default for upgraded installations?

Thanks in advance, Alex

timhunt commented 3 years ago

Thank you for catching this. Yes, we should fix this.