"Happy Birthday! It's your special day". That's what this block is all about. This block is a great way to celebrate the birthdays of class members and teachers.
Anthony Borrow is Moodle's "CONTRIB Co-ordinator", that means he co-ordinates code contributed to Moodle, among other things. All the module offerings reviewed in this book, that have been published in the last three years or so, have come before his eyes, and have been advised by his experience. The most amazing thing is that Anthony does this significant and necessary work voluntarily, despite offers of payment.
Anthony was asked to take on the role of CONTRIB co-ordinator after he contributed the Birthday block. Anthony was an early Moodle adopter. He has experience as an IT professional and continues to assist in the running of Moodle sites at a number of schools.
Apart from being a true Moodler, Anthony also leads an inspiring life as a Jesuit Priest, living in the United States. He speaks Spanish and is interested in Tai-Chi.
Unzip and copy the birthday
block directory into the /moodle/blocks/
directory, then visit the Notifications page.
Before adding this block to courses, there are a few steps that must be taken at the site level. First, visit the block's global configuration page at Site Administration | Modules | Blocks | Birthday.
There are four settings on the configuration page:
Save the changes to the Birthday block's global settings, then navigate to Site Administration | Users | Accounts | User profile fields. Here you will add a profile field for users' dates of birth:
In the drop-down list labeled Create a new profile field select the Text input option. You should be redirected to a new page in order to specify the new profile field:
The Common settings section has a number of settings you will need to change. The Short name should reflect the setting specified earlier in the Birthday block's global settings; the default there was DOB.
For the Name setting, enter an appropriate name that equates to Date of birth. You may also wish to add some prompt that indicates how the date should be entered if it is entered manually. You may also wish to add a description, but this is not seen by users.
The author of the Birthday block recommends that the field be locked. This means that it cannot be changed after it is first entered. You may wish to change the setting labeled Display on signup page depending on how user accounts are created on your site. If self-enrolment is possible, set this to Yes. Scrolling down you will see a grouping of Specific settings.
Leave the Default value setting blank. Set the Display size and Maximum length settings to 10 to accommodate sufficient characters for dates, including date-part separators. Save these settings and this field should now appear at the bottom of each user's Edit profile page.
With this field in place, it is also possible to include the field when creating accounts by uploading users.
You will only need to make these site-wide changes once. Afterwards, teachers can add the Birthday block as they see fit by selecting Birthday from the Blocks menu.
Once added to a course page (assuming user's birthdays have been entered) the Birthday block will display current and upcoming birthdays. If there are no birthdays to show, the block will either be absent, or show the following (depending on the block's global visibility setting):
When there are people having birthdays on the current day or (if a number of days has been specified) in coming days, they will be presented with their name and profile picture:
Clicking on a user's name shows their profile. Clicking on the envelope below the user's profile allows someone to send a birthday greeting using the messaging facility.
52.15.42.128