I am interested in passing a couple variables (userid and quizid) to an external bash script, so I have added the requisite code to processattempt.php in mod/quiz. I can get the userid with the following code:
global $USER;
$userid=$USER->id;
But, I cannot figure out how to get the current quizid with similar code.
Thoughts?