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

Avoid session timeout for guest users

XMLWordPrintable

    • MOODLE_24_STABLE
    • MOODLE_24_STABLE
    • MDL-35029_master
    • 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

      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

            dmonllao David Monllaó
            dmonllao David Monllaó
            Petr Skoda Petr Skoda
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.