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

Export calendar by userid & problem getting the calendar URL for subscription

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.0.6, 2.1.3
    • 2.0.3, 2.1.2, 2.2
    • Calendar
    • Mac + Safari + MySQL
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • Moderate
    • Hide

      before applying patch, do the following:
      if you are testing it on 2.1 or 2.2, do the following:

      • on calendar/export.php line 97, add: $now = usergetdate(time());
      • on calendar/lib.php line 1809, change:
        $context = get_context_instance(CONTEXT_USER);
        to
        $context = get_context_instance(CONTEXT_USER, $data->userid);

      The above hacks are existing bug that occurs on 2.1 and 2.2. Without the hack, you won't be able to add event or perform the testing.

      1. add new events for the calendar.
      2. view the calendar by month
      3. select 'export calendar' button
      4. copy get calendar url link.
      5. apply the patch
      if you are on 2.1 or 2.2, make sure you remove the above hacks before applying the patch.
      6. go to view calendar by month
      7. select 'export calendar' button

      make sure the export and get calendar url works. Also make sure old calendar url works after applying the patch.

      Show
      before applying patch, do the following: if you are testing it on 2.1 or 2.2, do the following: on calendar/export.php line 97, add: $now = usergetdate(time()); on calendar/lib.php line 1809, change: $context = get_context_instance(CONTEXT_USER); to $context = get_context_instance(CONTEXT_USER, $data->userid); The above hacks are existing bug that occurs on 2.1 and 2.2. Without the hack, you won't be able to add event or perform the testing. 1. add new events for the calendar. 2. view the calendar by month 3. select 'export calendar' button 4. copy get calendar url link. 5. apply the patch if you are on 2.1 or 2.2, make sure you remove the above hacks before applying the patch. 6. go to view calendar by month 7. select 'export calendar' button make sure the export and get calendar url works. Also make sure old calendar url works after applying the patch.

      This is one follow-up of MDL-27192.

      1) Right now the calendar/export_execute.php script uses to work by username + token, completely ignoring any possible mnet stuff, potentially leading to privacy problems or, at least, wrong behavior because username is not a valid unique identifier at all.

      Solution: Make it work with "userid" parameter instead but keep the old (username based) way working for BC. Marking it as deprecated for, say, 2.3

      2) The export interface doesn't seem to work ok here, so switching from week to 60 days back and forth doesn't cause the URL for subscriptions to be refreshed at all (always "weekly" is shown).

      Ciao

            rwijaya Rossiani Wijaya
            stronk7 Eloy Lafuente (stronk7)
            Ankit Agarwal Ankit Agarwal
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Glenn Ansley Glenn Ansley
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.