Moodle
  1. Moodle
  2. MDL-27542

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Calendar
    • Labels:
    • Environment:
      Mac + Safari + MySQL
    • Testing Instructions:
      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.
    • Difficulty:
      Moderate
    • 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:
    • Rank:
      17204

      Description

      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

        Issue Links

          Activity

          Eloy Lafuente (stronk7) created issue -
          Eloy Lafuente (stronk7) made changes -
          Field Original Value New Value
          Fix Version/s STABLE backlog [ 10463 ]
          Priority Minor [ 4 ] Critical [ 2 ]
          Labels triaged
          Difficulty Moderate
          Eloy Lafuente (stronk7) made changes -
          Link This issue has been marked as being related by MDL-27192 [ MDL-27192 ]
          moodle.com made changes -
          Fix Version/s STABLE Sprint 15 [ 11158 ]
          Fix Version/s STABLE backlog [ 10463 ]
          Assignee moodle.com [ moodle.com ] Rossiani Wijaya [ rwijaya ]
          Rossiani Wijaya made changes -
          Status Open [ 1 ] Development in progress [ 3 ]
          Rossiani Wijaya made changes -
          Pull Master Diff URL https://github.com/rwijaya/moodle/compare/master...MDL-27542 https://github.com/rwijaya/moodle/compare/master...MDL-27542b
          Pull Master Branch MDL-27542 MDL-27542b
          Pull 2.0 Diff URL https://github.com/rwijaya/moodle/compare/MOODLE_20_STABLE...MDL-27542_m20 https://github.com/rwijaya/moodle/compare/MOODLE_20_STABLE...MDL-27542b_m20
          Pull 2.0 Branch MDL-27542_m20 MDL-27542b_m20
          Testing Instructions before applying patch, do the following:
          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
          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.
          Pull 2.1 Branch MDL-27542_m21 MDL-27542b_m21
          Pull 2.1 Diff URL https://github.com/rwijaya/moodle/compare/MOODLE_21_STABLE...MDL-27542_m21 https://github.com/rwijaya/moodle/compare/MOODLE_21_STABLE...MDL-27542b_m21
          Rossiani Wijaya made changes -
          Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
          Peer reviewer ankit_frenz
          Ankit Agarwal made changes -
          Original Estimate 0 minutes [ 0 ]
          Remaining Estimate 0 minutes [ 0 ]
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Rossiani Wijaya made changes -
          Testing Instructions before applying patch, do the following:
          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
          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.
          1. add or view events for the month on calendar page.
          2. select 'export calendar' button

          Make sure the export and get calendar url works.

          Also make sure old calendar url works by modifying the link param from username to userid.
          for example:
          Rossiani Wijaya made changes -
          Testing Instructions 1. add or view events for the month on calendar page.
          2. select 'export calendar' button

          Make sure the export and get calendar url works.

          Also make sure old calendar url works by modifying the link param from username to userid.
          for example:
          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.
          Ankit Agarwal made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Rossiani Wijaya made changes -
          Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
          Eloy Lafuente (stronk7) made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator stronk7
          Currently in integration Yes [ 10041 ]
          Eloy Lafuente (stronk7) made changes -
          Link This issue has a non-specific relationship to MDL-30200 [ MDL-30200 ]
          Eloy Lafuente (stronk7) made changes -
          Eloy Lafuente (stronk7) made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Affects Version/s 2.1.2 [ 10851 ]
          Affects Version/s 2.2 [ 10656 ]
          Fix Version/s 2.0.6 [ 11250 ]
          Fix Version/s 2.1.3 [ 11251 ]
          Glenn Ansley made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Tester blepoxp
          Glenn Ansley made changes -
          Status Testing in progress [ 10011 ] Problem during testing [ 10007 ]
          Rossiani Wijaya made changes -
          Link This issue testing discovered MDL-30246 [ MDL-30246 ]
          Eloy Lafuente (stronk7) made changes -
          Status Problem during testing [ 10007 ] Integration review in progress [ 10004 ]
          Eloy Lafuente (stronk7) made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Eloy Lafuente (stronk7) made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Eloy Lafuente (stronk7) made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes [ 10041 ]
          Integration date 15/Nov/11
          Michael de Raadt made changes -
          Security Could be a security issue [ 10030 ]
          Eloy Lafuente (stronk7) made changes -
          Fix Version/s STABLE Sprint 15 [ 11158 ]

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: