General developer forum

 
 
Picture of Daniel Neis Araujo
Git repository with block template available on github
Group DevelopersGroup Particularly helpful MoodlersGroup Translators

Hello,

 

inspired by https://github.com/moodlehq/moodle-mod_newmodule and following the instructions from http://docs.moodle.org/dev/Blocks i've made available at github a minimal block template ( https://github.com/danielneis/moodle-block_newblock ). Hope you like.

Any comments are welcome.

Kind regards,

Daniel


(Edited by Dan Poltawski to make the url work correctly - original submission Friday, 18 January 2013, 12:02 PM)
 
Average of ratings:Useful (4)
Picture of Joseph Rézeau
Re: Git repository with block template available on github
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Correct URL of Daniel's github newblock repo is: https://github.com/danielneis/moodle-block_newblock

Joseph

 
Average of ratings:Useful (1)
Picture of Rex Lorenzo
Re: Git repository with block template available on github
Group DevelopersGroup Particularly helpful MoodlersGroup Testers

I love it! I would like to see more sample code for the different Moodle plugins. I did notice that in your db/access.php you seem to have an errant capability block/simplehtml:myaddinstance.

 

 
Average of ratings: -
Picture of Daniel Neis Araujo
Re: Git repository with block template available on github
Group DevelopersGroup Particularly helpful MoodlersGroup Translators

Hello,

thanks for the corrections (link and code)! ;D
I've updated the code on github to correct the capability.

 

Kind regards,

Daniel

 
Average of ratings: -
Picture of Tomasz Muras
Re: Git repository with block template available on github
Group DevelopersGroup Particularly helpful MoodlersGroup Translators

Hi Daniel,

Nice work on the template. You could change the readme from:

Rename the file lang/en/newblock.php to lang/en/widget.php where "widget" is the name of your module

to

Rename the file lang/en/block_newblock.php to lang/en/block_widget.php where "widget" is the name of your module. Also rename block_newblock.php in the main directory to block_widget.php

I have used your template to create new moosh command - generate-block, which will generate an empty block based on your code - I hope you don't mind!

cheers,
Tomek

 
Average of ratings: -
Picture of Daniel Neis Araujo
Re: Git repository with block template available on github
Group DevelopersGroup Particularly helpful MoodlersGroup Translators

Hello, Tomasz

 

thanks for the suggestions (i've updated the readme on github) and for the new moosh command (its really an honor ;)

I've made another template, this time for gradereports. It's avaialable on github too: https://github.com/danielneis/moodle-gradereport_newgradereport

 

Hope you like!

 

Kind regards,

Daniel

 
Average of ratings: -
Picture of Tomasz Muras
Re: Git repository with block template available on github
Group DevelopersGroup Particularly helpful MoodlersGroup Translators

Hi Daniel,

Thanks for your template, I've added it to moosh 0.7 as a new command generate-gradereport - see here.

cheers,
Tomek

 
Average of ratings: -