Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37679

Re: Getting question categories from course category contexts

$
0
0
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.

 


Viewing all articles
Browse latest Browse all 37679

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>