Moodle
  1. Moodle
  2. MDL-8661

Yearly Repeating Calendar Events

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.7.2
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE
    • Rank:
      3505

      Description

      Being able to create yearly repeats for events would be extremely beneficial for Moodles used on a long term basis.

      Currently holidays, special events, birthdays, and other items must be inserted one by one every new year, which is a time consuming and busy-work task. A school might be working with 50+ regular events and holidays on a yearly basis.

      An alternative to this would be creating some type of "import calendar events" option. A school could have a list of events typed out in some XML format, and then easily import the dates every new year. This would also enable something similar to Microsoft Outlook where one can select a list of holidays for a given country and then automatically add them to his/her calendar.

      Hopefully this feature can be added on in future versions-

        Activity

        Christopher created issue -
        Jon Papaioannou made changes -
        Field Original Value New Value
        Assignee Martin Dougiamas [ dougiamas ] Jon Papaioannou [ pj ]
        Hide
        Martin Dougiamas added a comment -

        Cool, Jon!

        Can I make you the default assignee for calendar bugs?

        Show
        Martin Dougiamas added a comment - Cool, Jon! Can I make you the default assignee for calendar bugs?
        Hide
        Jon Papaioannou added a comment -

        Yep, sure! Give me Blocks too if you want!

        Show
        Jon Papaioannou added a comment - Yep, sure! Give me Blocks too if you want!
        Hide
        Mark Burnet added a comment -

        Monthly events would also be helpful.

        Show
        Mark Burnet added a comment - Monthly events would also be helpful.
        Hide
        Bruce Schmoetzer added a comment -

        When creating a new calendar event, it only gives the option to repeat weekly. It would be nice to have the option of repeating bi-weekly, monthly, every Monday and Thursday, etc. Maybe similar to how iCal handles repeating events.

        Show
        Bruce Schmoetzer added a comment - When creating a new calendar event, it only gives the option to repeat weekly. It would be nice to have the option of repeating bi-weekly, monthly, every Monday and Thursday, etc. Maybe similar to how iCal handles repeating events.
        Hide
        Tom Lanyon added a comment -

        iCalendar, rfc 2445, implements these as a combination of 'frequency' and 'interval'. It would be nice to have this implemented similarly in Moodle.

        Show
        Tom Lanyon added a comment - iCalendar, rfc 2445, implements these as a combination of 'frequency' and 'interval'. It would be nice to have this implemented similarly in Moodle.
        Hide
        Rhodry Korb added a comment -

        I am interested in this becuase my organisation would like to use something like this too

        Show
        Rhodry Korb added a comment - I am interested in this becuase my organisation would like to use something like this too
        Hide
        Bruce Schmoetzer added a comment -

        I have modified some PHP code that I found on the 'Net - can't remember where. It calculates any periodic date based on the day of week, week of the month and year. For example, the Third Wednesday of September, 2008 (= 18Sep2008). Someone needs to integrate this function in to the standard Moodle structures, but I suggest that it might look like:

        Repeats

        • No repeat
        • Repeat weekly, creating altogether xxx events
        • Repeat monthly, creating altogether yyy events
        • Repeat yearly, creating altogether zzz events
        • Repeat periodically, the WeekOfMonth (1st, 2nd, 3rd, 4th) DayOfWeek (Mon, Tue, Wed,...) of the month, creating altogether aaa events

        Here is the function for the periodic part:

        <?php

        // dayOfWk >> Sun=0; Mon=1, Tue=2, Wed=3, thu=4, Fri=5, Sat=6
        // $mont = number of the month >> Jan=01; Feb=02; Mar=03; ... Dec=12
        // $year = number of the year. eg. 2008, 2009, ...
        function get_periodicDate($wkOfMth,$dayOfWk,$month,$year)

        { $num = date("w",mktime(0,0,0,$month,1,$year)); if($num==$dayOfWk) return date("Y-M-d H:i:s",mktime(0,0,0,$month,1,$year)+(86400*(($dayOfWk-$num) + (7*($wkOfMth-1))))); elseif($num>$dayOfWk) return date("Y-M-d H:i:s",mktime(0,0,0,$month,1,$year)+(86400*((7+$dayOfWk-$num) + (7*($wkOfMth-1))))); else return date("Y-M-d H:i:s",mktime(0,0,0,$month,1,$year)+(86400*(($dayOfWk-$num) + (7*($wkOfMth-1))))); }

        ?>

        And, yes, it could use some bumming to make it more efficient. Just wanted to get it out there and get it going. I am catching a lot of heat from clients on this issue. Please use it as you see fit.

        Show
        Bruce Schmoetzer added a comment - I have modified some PHP code that I found on the 'Net - can't remember where. It calculates any periodic date based on the day of week, week of the month and year. For example, the Third Wednesday of September, 2008 (= 18Sep2008). Someone needs to integrate this function in to the standard Moodle structures, but I suggest that it might look like: Repeats No repeat Repeat weekly, creating altogether xxx events Repeat monthly, creating altogether yyy events Repeat yearly, creating altogether zzz events Repeat periodically, the WeekOfMonth (1st, 2nd, 3rd, 4th) DayOfWeek (Mon, Tue, Wed,...) of the month, creating altogether aaa events Here is the function for the periodic part: <?php // dayOfWk >> Sun=0; Mon=1, Tue=2, Wed=3, thu=4, Fri=5, Sat=6 // $mont = number of the month >> Jan=01; Feb=02; Mar=03; ... Dec=12 // $year = number of the year. eg. 2008, 2009, ... function get_periodicDate($wkOfMth,$dayOfWk,$month,$year) { $num = date("w",mktime(0,0,0,$month,1,$year)); if($num==$dayOfWk) return date("Y-M-d H:i:s",mktime(0,0,0,$month,1,$year)+(86400*(($dayOfWk-$num) + (7*($wkOfMth-1))))); elseif($num>$dayOfWk) return date("Y-M-d H:i:s",mktime(0,0,0,$month,1,$year)+(86400*((7+$dayOfWk-$num) + (7*($wkOfMth-1))))); else return date("Y-M-d H:i:s",mktime(0,0,0,$month,1,$year)+(86400*(($dayOfWk-$num) + (7*($wkOfMth-1))))); } ?> And, yes, it could use some bumming to make it more efficient. Just wanted to get it out there and get it going. I am catching a lot of heat from clients on this issue. Please use it as you see fit.
        Hide
        Ken Tuley added a comment -

        While an import is a great idea and I'd love to see it....I'd like to have more options for repeating events. so that events don't have to be entered over and over.
        especially for a multiple day event. extending the event over multiple days, includes hours that the event is not happening (overnight)
        for example I have a basketball tournament is this 3 days. if I enter one event to start on day one, and end on day three i have a lot of hours that the tournament is not on. to avoid the issue, I have to enter the event 3 times. having the ability to repeat the event daily, would allow me to enter the event one time, yet it would show up on all the applicable days.

        Thanks for considering this.

        Show
        Ken Tuley added a comment - While an import is a great idea and I'd love to see it....I'd like to have more options for repeating events. so that events don't have to be entered over and over. especially for a multiple day event. extending the event over multiple days, includes hours that the event is not happening (overnight) for example I have a basketball tournament is this 3 days. if I enter one event to start on day one, and end on day three i have a lot of hours that the tournament is not on. to avoid the issue, I have to enter the event 3 times. having the ability to repeat the event daily, would allow me to enter the event one time, yet it would show up on all the applicable days. Thanks for considering this.
        Martin Dougiamas made changes -
        Workflow jira [ 19611 ] MDL Workflow [ 42015 ]
        Martin Dougiamas made changes -
        Workflow MDL Workflow [ 42015 ] MDL Full Workflow [ 70444 ]

          People

          • Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated: