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

Repeating chat activities are not updated in the calendar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.4, 2.6.1, 2.6.9, 2.6.10, 2.6.11, 2.7, 2.7.6, 2.7.7, 2.7.8, 2.7.9, 2.8.4, 2.8.5, 2.8.6, 2.8.7, 2.9, 2.9.1
    • Fix Version/s: 2.9.4, 3.0.1
    • Component/s: Chat
    • Labels:
    • Testing Instructions:
      Hide
      1. Add a new course
      2. Add a new chat, in the settings select a start time in 5mins from now, and select it to repeat the same time every week
      3. Verify the chat says "The next chat session will start in 58 secs" (future time)
      4. Go to course calendar, verify the event is there for the chat
      5. Wait for the scheduled start time to pass do not visit the chat page
      6. Run cron after the time has passed
      7. Go to the calendar and note that next chat time should be updated to a weeks time
      8. Go to the chat page should say -'The next chat session will start in 6 days 23 hours'
      9. Test for 1c2a11fcfa5: Verify that the 'Next scheduled session:' in the administration block matches the calendar entry and has the timezone fully enclosed in parenthesis e.g. "Next scheduled session: Thursday, November 12, 2015, 3:55 PM (Europe/London)" rather than "Next scheduled session: Thursday, November 12, 2015, 3:55 PM (Europe/London"
      Show
      Add a new course Add a new chat, in the settings select a start time in 5mins from now, and select it to repeat the same time every week Verify the chat says "The next chat session will start in 58 secs" (future time) Go to course calendar, verify the event is there for the chat Wait for the scheduled start time to pass do not visit the chat page Run cron after the time has passed Go to the calendar and note that next chat time should be updated to a weeks time Go to the chat page should say -'The next chat session will start in 6 days 23 hours' Test for 1c2a11fcfa5: Verify that the 'Next scheduled session:' in the administration block matches the calendar entry and has the timezone fully enclosed in parenthesis e.g. "Next scheduled session: Thursday, November 12, 2015, 3:55 PM (Europe/London)" rather than "Next scheduled session: Thursday, November 12, 2015, 3:55 PM (Europe/London"
    • Workaround:
      Hide

      In mod/chat/lib.php chat_update_chat_times function where setting the $params variable for the event (line 652 in version 2015051100) change...

      $params = array('chattime'=>$chat->chattime, 'chatid'=>$chatid);
      

      ...to...

      $params = array('chattime'=>$chat->chattime, 'chatid'=>$chat->id);
      

      Show
      In mod/chat/lib.php chat_update_chat_times function where setting the $params variable for the event (line 652 in version 2015051100) change... $params = array('chattime'=>$chat->chattime, 'chatid'=>$chatid); ...to... $params = array('chattime'=>$chat->chattime, 'chatid'=>$chat->id);
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull Master Branch:
      MDL-46049-master

      Description

      When a chat activity is set to repeat an event is created for the first scheduled chat but no further events are created in the calendar.

      Steps to reproduce:

      • Add a chat activity to a course
      • In 'Chat sessions' add a 'Next chat time'
      • Set 'Repeat/publish session times' to 'At the same time every week'
      • Check the course calendar, you should see an event for the first scheduled chat
      • When the event time has passed and the cron has run check the course calendar again

      What I expected:

      • The chat event in the course calendar to have moved to the same time a week later

      What happens:

      • The chat event stays where it is

      To fix:
      In mod/chat/lib.php chat_update_chat_times function where setting the $params variable for the event (line 652 in version 2015051100) change...

      $params = array('chattime'=>$chat->chattime, 'chatid'=>$chatid);
      

      ...to...

      $params = array('chattime'=>$chat->chattime, 'chatid'=>$chat->id);
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                21/Dec/15