Hello,
Given a function (like those in /mod/quiz/rendered.php) using the $slots variable (that is the questions for a quiz attempt) how can I get the original database ID of the questions?
(The questions may be random)
The question is random. e.g. there is no mod/quiz/rendered.php. Understanding Moodle's DB structure is important, so you are right to try to do that.
Hello Tim,
Sorry, I wrote "rendered.php" but it was "renderer.php".
Anyway, by studying https://github.com/moodle/moodle/blob/master/mod/quiz/attemptlib.php I was able to get the data I needed through API and thus didn't need the database ID of the questions anymore. Thank you anyway for the reply.
Sorry, I wrote "rendered.php" but it was "renderer.php".
Anyway, by studying https://github.com/moodle/moodle/blob/master/mod/quiz/attemptlib.php I was able to get the data I needed through API and thus didn't need the database ID of the questions anymore. Thank you anyway for the reply.
Great! Well done for working it out, and generally it is better to use the API when you can.