maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
138 stars 147 forks source link

[BUG]: Typo in question.php #1079

Closed berardin closed 7 months ago

berardin commented 7 months ago

Hi everyone,

we are having an issue with the process of compiling of question.

We got on this code:

https://github.com/maths/moodle-qtype_stack/blame/master/question.php#L1829

and we are wandering if here is a typo on the variable: $cc['contextvariable-qv'] = null;

We show in code that the Key is always contextvariables-qv and if we fix it we don't have any problem anymore.

Can you please confirm that is the Issue here?

Thank you.

sangwinc commented 7 months ago

Thanks for such a helpful bug fix suggestion. Chris

dmitriim commented 4 months ago

We just experienced this bug in a busy production instance. It caused a performance degradation due to massive number of SQLs like UPDATE mdl_qtype_stack_options SET compiledcache = $1 WHERE questionid = $2

Applying the patch fixed the issue.