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

Users stuck in Online Users block

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.3, 2.2.5
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      Hide
      1. As Admin, enable "Online user" block on a course and frontpage
      2. Enrol a student to the course
      3. check that user is display online online within the block (course and frontpage)

      In frontpage:

      1. Access the user table in DB and change the student lastaccess field to the past (eg: 1149936122)
      2. Refresh the page and make sure student name is not display within the block
      3. Access the user table in DB and change the student lastaccess field to the future (eg: 3349936122)
      4. Refresh the page and make sure student name is not display within the block

      In a course page:

      1. Access the user_lastaccess table in DB and change the student timeaccess field to the past (eg: 1149936122)
      2. Refresh the page and make sure student name is not display within the block
      3. Access the user_lastaccess table in DB and change the student timeaccess field to the future (eg: 3349936122)
      4. Refresh the page and make sure student name is not display within the block

      Make sure there's no error display on the page.

      Show
      As Admin, enable "Online user" block on a course and frontpage Enrol a student to the course check that user is display online online within the block (course and frontpage) In frontpage: Access the user table in DB and change the student lastaccess field to the past (eg: 1149936122) Refresh the page and make sure student name is not display within the block Access the user table in DB and change the student lastaccess field to the future (eg: 3349936122) Refresh the page and make sure student name is not display within the block In a course page: Access the user_lastaccess table in DB and change the student timeaccess field to the past (eg: 1149936122) Refresh the page and make sure student name is not display within the block Access the user_lastaccess table in DB and change the student timeaccess field to the future (eg: 3349936122) Refresh the page and make sure student name is not display within the block Make sure there's no error display on the page.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      If there are users in the database that have an invalid lastaccess, lastlogin or currentlogin timestamp in the mdl_user table, or have an invalid record in the mdl_user_lastaccess they will be stuck in the Online block, even if they are deleted.

      Fix: add "AND deleted = 0" to line 61 and 84 in /block/online_users/block_online_users.php

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Nov/12