General developer forum

my first plugin

Picture of michael latif
my first plugin

hi dears ,

I'm new in Moodle , but I tried to build my first plugin to display and set the rates for teachers in their profile page as block but I can't even test it as I have to install it as plugin , but It can't installed  ( after I upload the zip file. and then asking me the Plugin type and I select 'Block' then reload the page without any change without installing ) 

now after along time I wanna your help how can I debug my plugin , how can I test it before I install it  

one more point is there any plugin or a way to rate the teachers 


Picture of Richard Oelmann
Re: my first plugin
Core developersParticularly helpful MoodlersPlugin developersTesters

Well, without going any further, you dont have the component name in version.php

And I'd have to check, but I dont think you can have caps in the plugin name.

Average of ratings: -
Re: my first plugin
Core developersParticularly helpful MoodlersPlugin developers

Michael - it sounds like the very first thing you should be doing is setting up a copy of Moodle on your local computer. That way, you can turn on debugging to 'developer' level (which you don't want to do on a production site) and you can directly edit the files in your plugin, without having to upload them every time.

You also have the option of installing xdebug and being able to set breakpoints and step through your code a line at a time.

Average of ratings: Useful (1)