Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27752

iCal button export bug/fix included

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rwijaya Rossiani Wijaya
              Reporter:
              georgeprout George Prout
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Oct/11