Not quite sure what the problem is here - could be PHP garbage collection or temporary caching by Moodle. Anyway, loading every current question on the server in quick succession does not lead to happy times.
I've done a quick copy of the initial question retrieval SQL to another function and narrowed down the search to only return questions with '[[todo' in questiontext, generalfeedback, questionnote, specificfeedback or questiondescription (via a join with qtype_stack_options). Presumably that still leaves us with an upper limit on the number of todos but the alternative is a fairly major and messy re-write.
(Also, addition of a missing language string I found while trawling settings.)
Not quite sure what the problem is here - could be PHP garbage collection or temporary caching by Moodle. Anyway, loading every current question on the server in quick succession does not lead to happy times.
I've done a quick copy of the initial question retrieval SQL to another function and narrowed down the search to only return questions with '[[todo' in questiontext, generalfeedback, questionnote, specificfeedback or questiondescription (via a join with qtype_stack_options). Presumably that still leaves us with an upper limit on the number of todos but the alternative is a fairly major and messy re-write.
(Also, addition of a missing language string I found while trawling settings.)