Note: You are currently viewing documentation for Moodle 2.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Birthday block.

Birthday block: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 34: Line 34:
===Advanced Options===
===Advanced Options===


It is possible to mass import the user profile date field data when importing users. More detailed instructions are available on the [https://docs.moodle.org/20/en/Upload_users#Fields_that_can_be_included|Upload users] page.  
It is possible to mass import the user profile date field data when importing users. More detailed instructions are available on the [https://docs.moodle.org/20/en/Upload_users#Fields_that_can_be_included Upload users] page.  


===Styling===
===Styling===
Line 49: Line 49:


===See also===
===See also===
[http://moodle.org/mod/data/view.php?d=13&rid=901|Birthday block's Modules and Plugins database entry]
[http://moodle.org/mod/data/view.php?d=13&rid=901 Birthday block's Modules and Plugins database entry]


[[Category:Contributed code]]
[[Category:Contributed code]]

Revision as of 03:47, 31 July 2011

Birthday Block

The Birthday Block makes use of a user profile date field to store the date of birth (or anniversary) for each user. The Birthday Block alphabettically displays the user's full name with picture and the ability to click on the send message icon to directly send the user a Moodle message.

The settings page allows the site admin to select which user profile date field to use (currently only one can be used throughout the site). The data stored in the user profile date field is now a unix timestamp (this was not the case in the 1.9 version). Typically institutions auto-populate this field using a CSV upload of the data and then prevent the users from editing the data.

Installation

  • Copy the files into the \blocks folder.
  • Go to the \admin page and allow the block to be installed
  • Go to Users, Accounts, User profile fields
  • Create a new user profile date field
  • Input a Shortname (for example, dob), Name (for example, Birthday), and a Description
  • Generally speaking, it is recommended that the field not be required, that it be locked, and visible to user
  • Click on the Save Changes button
  • In the Site Administration Block, click on Modules, Blocks, and the settings link for the Birthday block
  • Select the newly created user profile date field you wish to use to store the birth dates
  • Enter the Birth Dates into the created user profile date field (or upload them via a CSV file)
  • Add the Birthday block to your page to see a list of those celebrating birthdays

Languages

Thanks to the generosity of translators, the Birthday Block is available in many languages:

  • English
  • Spanish
  • French
  • Japanese
  • German
  • Italian
  • and many more

If the block is not available in your language feel free to contact me so that we can create one.

Advanced Options

It is possible to mass import the user profile date field data when importing users. More detailed instructions are available on the Upload users page.

Styling

Styling varies from theme to theme. The following has been setup in the birthday block's styles.php file:

.block_birthday .listentry div.user { float: left; } .block_birthday .listentry div.message { float: right; }

Some themes allow for the styles.css to be overridden or added to.

Contributor/Maintainer

The Birthday Block was contributed and is maintained by [User:Anthony_Borrow|Anthony Borrow].

See also

Birthday block's Modules and Plugins database entry