How to query all the topics per course inside a block ?

How to query all the topics per course inside a block ?

by Kenny Marlo Cid -
Number of replies: 1

Hi good day, I want to create a block that will query all topics per course and put it inside a HTML select statement.

Would that be possible ? Hoping you can help me. Thanks in advance. 

Average of ratings: -
In reply to Kenny Marlo Cid

Re: How to query all the topics per course inside a block ?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You can get a data structure that contains lots of information about the structure of the course by calling get_fast_modinfo($courseid);