General developer forum

Writing Quizzes in other programming languages

 
Picture of Marcus Green
Re: Writing Quizzes in other programming languages
Core developersParticularly helpful MoodlersPlugin developersTesters

Thanks for posting Charlie, that should work but you should consider something like

$DB->get_record('question_categories',['id'=>$cat_id)  

Then it will work if someone has a prefix other than mdl.

See 

https://docs.moodle.org/dev/Data_manipulation_API#Main_info

I suspect most people most of the time leave the default mdl_ but  it is nice to cover unusual situations.




 
Average of ratings: -
Picture of Charlie Daly
Re: Writing Quizzes in other programming languages
 

Thanks Marcus,

It's good to see an elegant approach.

 
Average of ratings:Useful (1)