Creating a block for send emails

Creating a block for send emails

by Ramon Vicente -
Number of replies: 2

Hello guys! I'm new in the moodle universe. I want to creat a block that allow  a manager to send a email to all users in a database, but only the manager user. So my questions are:

1 - Which APIs can I use for creat this block?

2 - How can I put to see this block only the manager?

I made the tutorial for creat blocks and it helped a lot, but the moodle API is so big and I don't know for where I start. Sorry if my english is not so good (I'm learning english). Thanks for all, guys!

Average of ratings: -
In reply to Ramon Vicente

Re: Creating a block for send emails

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

You might want to start by looking at one of the existing email blocks such as Quickmail. That way you may only need to update it rather than create a block.

Only allowing managers to use it is then a matter of setting the capabilities for the block appropriately.

Average of ratings: Useful (1)
In reply to Richard Oelmann

Re: Creating a block for send emails

by Ramon Vicente -
Thank you very much! I'm analyzing the Quickmail's source code and it's so big hehehe.