Add new question tab in a plugin

Re: Add new question tab in a plugin

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think that a) is the way to go.

Since the standard way qformat_ plugins work is to load a file, I wonder if it would work better to make your plugin a local_ plugin?

Anyway, whatever you do, I think that you can use the extend_navigation_course callback in your plugin without needing renderer hacks. You just need a bit of logic to decide whether to add the navigation node that links to your script, by looking to see if the 'questionbank' node is present, and then adding your node as a child of that. Somethign like:

$qbanknode = $navigation->find('questionbank')
if ($qbanknode) {
$qbanknode->add(...);
}