General developer forum

 
 
Picture of Gary tsoi
How to create an activity plugin like "Label"
 

Dear All,

I am designing to develop an activity plugin like "Label". User only need to enter the video link, and then the video will embed in the course page.

Then i have create a activity plugin following some tutorial successfully. But i don't know how to edit the plugin to make it display like a "Label", rather than having a 'view' page.

Can anyone tell me how to do it? Any example?

Thanks,
Gary

 
Average of ratings: -
Davo
Re: How to create an activity plugin like "Label"
Group DevelopersGroup Particularly helpful Moodlers

You should probably include the Moodle version that you are working with.

Also, mod_label is a pretty good example of how to display a label - the code for it is pretty short and easy to read (lib.php is only 350 lines of code, with half of that being drag & drop upload support), but to get you started, you should search for 'get_coursemodule_info' and 'NO_VIEW_LINK'.

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: How to create an activity plugin like "Label"
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Also, does this even need a separate module? The Multimedia filter and a standard Label do this, don't they?

 
Average of ratings: -