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

Avoid session timeout for guest users

    Details

    • Testing Instructions:
      Hide

      Run the test in a browser with a single window

      1. Login as an admin
      2. Enable Users -> Permissions -> User policies -> autologinguests
      3. Enable Server -> Session handling -> dbsessions if it's not already enabled
      4. Set Front page -> Front page settings -> frontpage to "List of courses"
      5. Create or set a course without guest access
      6. Logout as admin
      7. Go to the database and delete all the mdl_sessions records with userid = 1
      8. Edit the database and set mdl_config->sessiontimeout to 1
      9. Without being logged (you will be automatically logged as a guest) go to the front page and click the course
      10. You will be redirected to enrol/index.php?id=NNN
      11. Reload the page after waiting a second, you SHOULD be on enrol/index.php?id=NNN instead of the login page
      12. Close the browser
      13. Go to the database and check the mdl_session table, there should be a record with userid = 1
      14. Wait for 5 seconds, run the cron and make sure that it finish successfully
      15. The mdl_session record with userid = 1 SHOULD NOT remain in the DB
      16. Probably you will want to change your $CFG->sessiontimeout value
      Show
      Run the test in a browser with a single window Login as an admin Enable Users -> Permissions -> User policies -> autologinguests Enable Server -> Session handling -> dbsessions if it's not already enabled Set Front page -> Front page settings -> frontpage to "List of courses" Create or set a course without guest access Logout as admin Go to the database and delete all the mdl_sessions records with userid = 1 Edit the database and set mdl_config->sessiontimeout to 1 Without being logged (you will be automatically logged as a guest) go to the front page and click the course You will be redirected to enrol/index.php?id=NNN Reload the page after waiting a second, you SHOULD be on enrol/index.php?id=NNN instead of the login page Close the browser Go to the database and check the mdl_session table, there should be a record with userid = 1 Wait for 5 seconds, run the cron and make sure that it finish successfully The mdl_session record with userid = 1 SHOULD NOT remain in the DB Probably you will want to change your $CFG->sessiontimeout value
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-35029_master

      Description

      After talking with Petr about MDL-34965, seems a good option to remove the session timeout for guest users when auto login as guest is enabled

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12