Non-core contributed modules

When block in placed inside a course, it should show birthdays of only those course users

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.1
  • Component/s: Block: Birthday
  • Labels:
    None
  • Environment:
    MySql 5, Php 5, Moodle 1.8 onwards
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

When the birthday block in place on the Frontpage, it should show birthdays of all users on the site - this happens presently.

When the birthday block in placed inside a course, it should display birthday's of only those users who are enrolled in the course.

  1. birthday_2008041601.diff
    17/Apr/08 7:03 AM
    24 kB
    Anthony Borrow
  1. bday_display.jpg
    30 kB
    16/Apr/08 6:12 PM

Issue Links

Activity

Hide
Anthony Borrow added a comment -

This also should be fairly easily implemented. I'm a little surprised that is not what is happening as that is the behavior I would have expected by default but I probably changed something in the code that changes that. If there is a course id supplied to limit the number of students returned I would like to change the heading so that it indicates that there are no birthdays Course $shortname. Peace - Anthony

Show
Anthony Borrow added a comment - This also should be fairly easily implemented. I'm a little surprised that is not what is happening as that is the behavior I would have expected by default but I probably changed something in the code that changes that. If there is a course id supplied to limit the number of students returned I would like to change the heading so that it indicates that there are no birthdays Course $shortname. Peace - Anthony
Hide
Anthony Borrow added a comment -

I am attaching patch that should resolve both CONTRIB-358 and CONTRIB-359.

Show
Anthony Borrow added a comment - I am attaching patch that should resolve both CONTRIB-358 and CONTRIB-359.
Hide
Anthony Borrow added a comment -

Anil - Attached is a zip file that should allow the setting of the number of days to look ahead for the birthday block. In addition, it should now respect the course boundaries and only show users within a course.I have not done much testing but once I get a thumbs up from you that this works I will go ahead and officially add it to CVS. Peace - Anthony

Show
Anthony Borrow added a comment - Anil - Attached is a zip file that should allow the setting of the number of days to look ahead for the birthday block. In addition, it should now respect the course boundaries and only show users within a course.I have not done much testing but once I get a thumbs up from you that this works I will go ahead and officially add it to CVS. Peace - Anthony
Hide
Anil Sharma added a comment - - edited

Theres some error in the display of dates. Instead of the day and month being shown , its showing the name of the month in numbers (04 in the attached pic is for April) and the date is being shown as name of month. It supposed to look forward 15 days from April 16 but the dates are being shown incorrectly

I have only tested this in EUR date format since our data is in that format.

Show
Anil Sharma added a comment - - edited Theres some error in the display of dates. Instead of the day and month being shown , its showing the name of the month in numbers (04 in the attached pic is for April) and the date is being shown as name of month. It supposed to look forward 15 days from April 16 but the dates are being shown incorrectly I have only tested this in EUR date format since our data is in that format.
Hide
Anthony Borrow added a comment -

Corrected get_month_day fucntion for EUR date format - I had days and months reversed. Thanks for catching it.

Show
Anthony Borrow added a comment - Corrected get_month_day fucntion for EUR date format - I had days and months reversed. Thanks for catching it.
Hide
Anthony Borrow added a comment -

Anil - I want to clean up the mdl_config table and start using the mdl_config_plugins to store the saved settings for the birthday block. I'm testing that and once I finish I will go ahead and commit the changes. Thanks for your help in testing and the good suggestions for improving this block. Keep in mind that currently the max number of students is 50; however, I may play and get that so that it is adjustable by the site admin. Let me know if you have any other suggestion or run into any other problems. Peace - Anthony

Show
Anthony Borrow added a comment - Anil - I want to clean up the mdl_config table and start using the mdl_config_plugins to store the saved settings for the birthday block. I'm testing that and once I finish I will go ahead and commit the changes. Thanks for your help in testing and the good suggestions for improving this block. Keep in mind that currently the max number of students is 50; however, I may play and get that so that it is adjustable by the site admin. Let me know if you have any other suggestion or run into any other problems. Peace - Anthony
Hide
Anthony Borrow added a comment -

Anil - OK I think everything should work for now. The upgrade should take the previously entered values from mdl_config and move them to mdl_config_plugins. Let me know if you catch any errors. Peace - Anthony

Show
Anthony Borrow added a comment - Anil - OK I think everything should work for now. The upgrade should take the previously entered values from mdl_config and move them to mdl_config_plugins. Let me know if you catch any errors. Peace - Anthony
Hide
Anil Sharma added a comment -

Thanks. It works fine now, the dates appear properly.

We need a block similar to this for Anniversaries in addition to Birthdays- for the faculty. Is there a way two copies of the block could be installed ? I've tried renaming the block folder and uploading in /bocks but that doesn't work.

Show
Anil Sharma added a comment - Thanks. It works fine now, the dates appear properly. We need a block similar to this for Anniversaries in addition to Birthdays- for the faculty. Is there a way two copies of the block could be installed ? I've tried renaming the block folder and uploading in /bocks but that doesn't work.
Hide
Anthony Borrow added a comment -

I think that we would have to move the name of the field from a global configuration and set it up as a local configuration so that each block could have its own settings. It is possible but it will not be a high priority as I really need to spend some time on the 1.8 gradebook and GBPv2 code. I was able to get some of this done in between classes. Feel free to create a tracker issue - it seems like a reasonable request so that you could have birthdays and anniversaries - currently you have to choose between one or the other. At that point, we should probably give some options for describing the event so that it would say Today's $instance_name so that it could be defined as Birthday, Anniversary, etc. Peace - Anthony

Show
Anthony Borrow added a comment - I think that we would have to move the name of the field from a global configuration and set it up as a local configuration so that each block could have its own settings. It is possible but it will not be a high priority as I really need to spend some time on the 1.8 gradebook and GBPv2 code. I was able to get some of this done in between classes. Feel free to create a tracker issue - it seems like a reasonable request so that you could have birthdays and anniversaries - currently you have to choose between one or the other. At that point, we should probably give some options for describing the event so that it would say Today's $instance_name so that it could be defined as Birthday, Anniversary, etc. Peace - Anthony
Hide
Anil Sharma added a comment - - edited

I'll create another tracker issue for the request

A question :why spend time on the Gradebook V2 , isn't the 1.9 gradebook as powerful as the GBV2 ?

Show
Anil Sharma added a comment - - edited I'll create another tracker issue for the request A question :why spend time on the Gradebook V2 , isn't the 1.9 gradebook as powerful as the GBV2 ?
Hide
Anthony Borrow added a comment -

Thanks for creating a new issue. I need to do something with the GBPv2 code and the 18STABLE gradebook because I am the maintainer of both of those and they are related to one another. Moodle supports older versions with bug fixes in so far as we have the manpower to do so. But yes, my hope is that 1.9 makes GBPv2 obsolete. Peace - Anthony

Show
Anthony Borrow added a comment - Thanks for creating a new issue. I need to do something with the GBPv2 code and the 18STABLE gradebook because I am the maintainer of both of those and they are related to one another. Moodle supports older versions with bug fixes in so far as we have the manpower to do so. But yes, my hope is that 1.9 makes GBPv2 obsolete. Peace - Anthony
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: