by Andrew Sadler.
I am using question_edit_contexts with a course context to populate a mform questioncategory element.
my $contexts variable returns count 1 but returns nothing in a foreach statement. The SQL to build the dropdown returns an error as the array is empty.
The end purpose is to have a nicely formatted drop down to use as a question category filter in a sql customizable_report.
I guess what I'm asking is why I only get one context and why that one context is not displayed in the drop down.
This was previously working when I populated the list direct from SQL with all question categories.