This follows on from
The goal is for the links in the navigation from one part of the question bank to another to preserve the current category.
At the moment, it finds the current category just by looking for a parm 'cat' in $PAGE->url that looks like 123,456. (Fortunately this is quite distinctive!) However, if, in future, something else used a parameter called cat that was two comma-separated integers, then this would go wrong.
Sam Hemelryk suggested a better approach, a new function something like:
This is definitely better, but will have to wait until after 2.1 is released.