Create a custom block

Create a custom block

par Andrew Senior,
Nombre de réponses : 4

Hi, I'm attempting to create a custom block for 2.5.1+ and have followed the instructions http://docs.moodle.org/dev/Blocks to create a new block but I get the attached error when trying to upgrade the database. Any ideas?

Thanks

 

Annexe error.jpg
Moyenne des évaluations  -
En réponse à Andrew Senior

Re: Create a custom block

par ajay sharma,

$plugin->version   = 2013050100;        // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires  = 2013050100;        // Requires this Moodle version

you have to change the $plugin->version(when u change in your block so change this with current date)

you have to change the $plugin->requires(it will change according to moodle version,so search in moodle what willbe use for $plugin->requires  = 2013050100; or u can try same as 2013050100

Moyenne des évaluations Useful (1)
En réponse à ajay sharma

Re: Create a custom block

par Andrew Senior,

Thanks for your reply Ajay. I had found the issue and now have my custom block working.

En réponse à Andrew Senior

Re: Create a custom block

par Josh Willcock,
Avatar Core developers Avatar Plugin developers

I know this is old, but ^ these replies are so frustrating...  

"I had found the issue and now have my custom block working, It was..."

En réponse à Josh Willcock

Re: Create a custom block

par Mario Tomelin,
I had the same error; the issue was a typo in the class name.

The tutorial is working for me, Moodle 2.1.10 (Build: 20130114)