Git repository with block template available on github

Git repository with block template available on github

Napisane przez: Daniel Neis Araujo ()
Liczba odpowiedzi: 9
Obraz Core developers Obraz Particularly helpful Moodlers Obraz Plugin developers Obraz 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)
Średnia ocen:Useful (4)
W odpowiedzi na Daniel Neis Araujo

Re: Git repository with block template available on github

Napisane przez: Rex Lorenzo ()

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.

 

W odpowiedzi na Rex Lorenzo

Re: Git repository with block template available on github

Napisane przez: Daniel Neis Araujo ()
Obraz Core developers Obraz Particularly helpful Moodlers Obraz Plugin developers Obraz Translators

Hello,

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

 

Kind regards,

Daniel

W odpowiedzi na Daniel Neis Araujo

Re: Git repository with block template available on github

Napisane przez: Tomasz Muras ()
Obraz Core developers Obraz Plugin developers Obraz Plugins guardians Obraz 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

W odpowiedzi na Tomasz Muras

Re: Git repository with block template available on github

Napisane przez: Daniel Neis Araujo ()
Obraz Core developers Obraz Particularly helpful Moodlers Obraz Plugin developers Obraz 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

W odpowiedzi na Daniel Neis Araujo

Re: Git repository with block template available on github

Napisane przez: Alex Black ()

Hi,

I can see the block listed in Site Administration >> Plugins Overview >> Blocks >> Manage blocks, however it does not show in the "Add Block" drop down.

What am I missing?


Regards,

Alexx