Moodle
  1. Moodle
  2. MDL-27752

iCal button export bug/fix included

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Calendar
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1. Create two upcoming events for a course, eg one tomorrow and one sometime next week
      2. View the calendar and select ical button to export to ics file
      3. The ics file should contain both events

      Show
      1. Create two upcoming events for a course, eg one tomorrow and one sometime next week 2. View the calendar and select ical button to export to ics file 3. The ics file should contain both events
    • Workaround:
      Hide
      {moodle}

      /calendar/view.php line 187 has a small typo in "preset_time" meaning that the default defined in export_execute.php is used rather than the intended parameter.

      Correct the typo from prest_time to preset_time.

      • $link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'prest_time'=>'recentupcoming', 'username'=>$USER->username, 'authtoken'=>$authtoken));
        + $link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'preset_time'=>'recentupcoming', 'username'=>$USER->username, 'authtoken'=>$authtoken));
      Show
      {moodle} /calendar/view.php line 187 has a small typo in "preset_time" meaning that the default defined in export_execute.php is used rather than the intended parameter. Correct the typo from prest_time to preset_time. $link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'prest_time'=>'recentupcoming', 'username'=>$USER->username, 'authtoken'=>$authtoken)); + $link = new moodle_url('/calendar/export_execute.php', array('preset_what'=>'all', 'preset_time'=>'recentupcoming', 'username'=>$USER->username, 'authtoken'=>$authtoken));
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Only the current weeks calendar entries are exported when using iCal button. The default 'preset_time' isn't overriden and always takes the default of 'weeknow' due to a small typo in the code.

      Reproduction steps:

      1. Create two upcoming events for a course, eg one tomorrow and one sometime next week.
      2. View the calendar and select ical button to export ics file.
      3. The ics file only contains this week's event and not both.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Michael de Raadt added a comment -

            Thanks for reporting this.

            I've put it on our backlog and we'll try to get to it as soon as we can.

            Show
            Michael de Raadt added a comment - Thanks for reporting this. I've put it on our backlog and we'll try to get to it as soon as we can.
            Hide
            Rossiani Wijaya added a comment -

            Hi George,

            Thank you for reporting and providing the solution.

            Created patch to address the issue.

            Show
            Rossiani Wijaya added a comment - Hi George, Thank you for reporting and providing the solution. Created patch to address the issue.
            Hide
            Rajesh Taneja added a comment - - edited

            Looks good to me, Rossie...
            Thanks for improving moodle

            Show
            Rajesh Taneja added a comment - - edited Looks good to me, Rossie... Thanks for improving moodle
            Hide
            Rossiani Wijaya added a comment -

            Thanks Raj for reviewing.

            Submitting for integration.

            Show
            Rossiani Wijaya added a comment - Thanks Raj for reviewing. Submitting for integration.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks!

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
            Hide
            Michael de Raadt added a comment -

            Test result: Multiple future events, both this week and next, are delivered in ICS file.

            Show
            Michael de Raadt added a comment - Test result: Multiple future events, both this week and next, are delivered in ICS file.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Such an effort has get its prize. Universal Award to the very-best Moodle developer in the family. Thanks!

            Closing. Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Such an effort has get its prize. Universal Award to the very-best Moodle developer in the family. Thanks! Closing. Ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: