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

Calendar detailed monthly view is not working.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Calendar
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide
      1. Make sure you have a bunch of course events,site events and user events in your calendar, before proceeding
      2. Goto sitepages>calendar> on top drop down change the course and make sure correct course loads
      3. Click on show/hide links at bottom of the page and make sure the course selected doesnt change when click on them
      4. click on Next/previous Month links and make sure they take you to the currently selected course's page
      5. make sure you can revert back to all courses from the drop down without any issue
      6. Repeat 2 -5 by going to a course calnder page (goto a course>add a calendar block)
      Show
      Make sure you have a bunch of course events,site events and user events in your calendar, before proceeding Goto sitepages>calendar> on top drop down change the course and make sure correct course loads Click on show/hide links at bottom of the page and make sure the course selected doesnt change when click on them click on Next/previous Month links and make sure they take you to the currently selected course's page make sure you can revert back to all courses from the drop down without any issue Repeat 2 -5 by going to a course calnder page (goto a course>add a calendar block)
    • Workaround:
      Hide

      Changing the course id from the URL of the page seems to work. As shown:

      moodle/calendar/view.php?view=month&cal_d=1&cal_m=8&cal_y=2011&course=1

      change it to any other course id:

      moodle/calendar/view.php?view=month&cal_d=1&cal_m=8&cal_y=2011&course=2

      Edit: There is a suggested solution, and it seems to work: http://moodle.org/mod/forum/discuss.php?d=183424
      Thank you Craig.

      Show
      Changing the course id from the URL of the page seems to work. As shown: moodle/calendar/view.php?view=month&cal_d=1&cal_m=8&cal_y=2011&course=1 change it to any other course id: moodle/calendar/view.php?view=month&cal_d=1&cal_m=8&cal_y=2011&course=2 Edit: There is a suggested solution, and it seems to work: http://moodle.org/mod/forum/discuss.php?d=183424 Thank you Craig.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-28735-master

      Description

      Detailed monthly view for courses is not working in calendar page. When you click on any course name, it refreshes the page and goes back to "all courses" view.

      Replication instructions:

      1. Click on the month name on the calendar block
      2. From "detailed monthly view" choose a course
      3. See that it will take you back to the "all courses" page.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment - - edited

            Thanks for reporting this.

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

            In the meantime feel free to help us work on this issue.

            Show
            salvetore Michael de Raadt added a comment - - edited Thanks for reporting this. I've put it on our backlog and we'll try to get to it as soon as we can. In the meantime feel free to help us work on this issue.
            Hide
            oguzkonya Oguz Konya added a comment -

            In the previous version it was working perfectly fine, so I checked the files to understand what the hell is wrong. I have found this line in calendar/view.php on line 73:

            //TODO: the courseid handling in /calendar/ is a bloody mess!!!

            It made me smile, because now courseid handling is not working at all

            Show
            oguzkonya Oguz Konya added a comment - In the previous version it was working perfectly fine, so I checked the files to understand what the hell is wrong. I have found this line in calendar/view.php on line 73: //TODO: the courseid handling in /calendar/ is a bloody mess!!! It made me smile, because now courseid handling is not working at all
            Hide
            salvetore Michael de Raadt added a comment -

            I also noted that when you are in a course and viewing a calendar, you cannot switch from one course to another, nor can you switch to the "All courses" view. This happens if you are looking at upcoming events or the monthly calendar.

            Show
            salvetore Michael de Raadt added a comment - I also noted that when you are in a course and viewing a calendar, you cannot switch from one course to another, nor can you switch to the "All courses" view. This happens if you are looking at upcoming events or the monthly calendar.
            Hide
            clitwiller craig litwiller added a comment -

            http://moodle.org/mod/forum/discuss.php?d=183424
            There is a fix suggested here that appears to work. Could this be reviewed and possibly moved into core?

            Change the $select = new single_select line to: $select = new single_select(new moodle_url(CALENDAR_URL.'view.php', array('return' => $returnurl, 'view' => 'month')), 'course', $courseoptions, $selected, null);

            Show
            clitwiller craig litwiller added a comment - http://moodle.org/mod/forum/discuss.php?d=183424 There is a fix suggested here that appears to work. Could this be reviewed and possibly moved into core? Change the $select = new single_select line to: $select = new single_select(new moodle_url(CALENDAR_URL.'view.php', array('return' => $returnurl, 'view' => 'month')), 'course', $courseoptions, $selected, null);
            Hide
            oguzkonya Oguz Konya added a comment -

            Yes, the fix mentioned above seems to work. I have implemented it in our production Moodle.

            Show
            oguzkonya Oguz Konya added a comment - Yes, the fix mentioned above seems to work. I have implemented it in our production Moodle.
            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for working on this, guys.

            I've labelled this as having a patch so it will hopefully make it into a STABLE Sprint soon. Votes will make that happen faster.

            Show
            salvetore Michael de Raadt added a comment - Thanks for working on this, guys. I've labelled this as having a patch so it will hopefully make it into a STABLE Sprint soon. Votes will make that happen faster.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            We currently use 'course' and 'id' to represent course id in the calendar module. This should be made consistent through out the module to avoid confusion and issues.

            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - We currently use 'course' and 'id' to represent course id in the calendar module. This should be made consistent through out the module to avoid confusion and issues. Thanks
            Hide
            rwijaya Rossiani Wijaya added a comment -

            This looks good Ankit.

            Show
            rwijaya Rossiani Wijaya added a comment - This looks good Ankit.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Thanks Rosie for the review.
            Sending for integration
            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - Thanks Rosie for the review. Sending for integration Thanks
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Ankit, this has been integrated now.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Ankit, this has been integrated now.
            Hide
            phalacee Jason Fowler added a comment -

            Looks good Ankit

            Show
            phalacee Jason Fowler added a comment - Looks good Ankit
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            UPDATE tracker_issues
               SET status = 'Closed',
                  comment = 'Thanks!'
            WHEN participants = 'Did a gorgeous work'

            This landed upstream some hours ago (some - me - developer fell slept in the sofa yesterday before spamming this).

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - UPDATE tracker_issues SET status = 'Closed', comment = 'Thanks!' WHEN participants = 'Did a gorgeous work' This landed upstream some hours ago (some - me - developer fell slept in the sofa yesterday before spamming this).

              People

              • Votes:
                9 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12