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

Session Timeout alert

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Edit config.php and add the following:

        $CFG->sessiontimeout = 60;
        

      Test

      Not logged in
      1. Go to the login page (don't login yet!).
      2. Wait more than 60 seconds.
      3. Verify the page does not reload and no alerts are shown.
      Logged in user.
      1. Log in and go to a course home page.
      2. Wait about 50 seconds
      3. Verify you see the following alert warning

        No recent activity
        Your session is about to timeout. Do you want to extend your current session?
         

      4. Click "Cancel".
      5. Wait another 10 seconds
      6. Verify you see an alert saying:

        Session expired
        Your session has timed out. Please log in again.
        

         

      7. Press OK
      8. Verify the page is not reloaded - this gives you a chance to copy and data you haven't saved yet.
         
        SCORM
      9. Login again as a teacher
      10. Make a SCORM activity. (For the package file, you can use the mod/scorm/tests/packages/RuntimeBasicCalls_SCORM20043rdEdition.zip inside your Moodle instance).
      11. Enter the scorm activity.
        # Wait more than 60 seconds.
      12. Verify the scorm can still be finished (the session was kept alive). 
      13. Enter the scorm again.
      14. Add "sleep(11);" in config.php
      15. Verify after a while you see a warning about :

         
         The SCORM player has determined that your Internet connection is unreliable or has been interrupted. If you continue in this SCORM activity, your progress may not be saved.
         You should exit the activity now, and return when you have a dependable Internet connection.
        

         

      16. Take "sleep(11);" out of config.php
         
        Marking guide
      17. Create an assignment with marking guide as the grading method. 
      18. On the "Define marking guide" page, wait 2 minutes.
      19. Verify you can continue editing and save the marking guide. 
      Show
      Setup Edit config.php and add the following: $CFG->sessiontimeout = 60; Test Not logged in Go to the login page (don't login yet!). Wait more than 60 seconds. Verify the page does not reload and no alerts are shown. Logged in user. Log in and go to a course home page. Wait about 50 seconds Verify you see the following alert warning No recent activity Your session is about to timeout. Do you want to extend your current session?   Click "Cancel". Wait another 10 seconds Verify you see an alert saying: Session expired Your session has timed out. Please log in again.   Press OK Verify the page is not reloaded - this gives you a chance to copy and data you haven't saved yet.   SCORM Login again as a teacher Make a SCORM activity. (For the package file, you can use the mod/scorm/tests/packages/RuntimeBasicCalls_SCORM20043rdEdition.zip inside your Moodle instance). Enter the scorm activity. # Wait more than 60 seconds. Verify the scorm can still be finished (the session was kept alive).  Enter the scorm again. Add "sleep(11);" in config.php Verify after a while you see a warning about :   The SCORM player has determined that your Internet connection is unreliable or has been interrupted. If you continue in this SCORM activity, your progress may not be saved. You should exit the activity now, and return when you have a dependable Internet connection.   Take "sleep(11);" out of config.php   Marking guide Create an assignment with marking guide as the grading method.  On the "Define marking guide" page, wait 2 minutes. Verify you can continue editing and save the marking guide. 
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-34498-master

      Description

      This is a new feature to give a notification to users when their session is about to expire. This is to avoid the problem where users have a page open for hours, typing an assignment submission, quiz answer or forum post, and then hit 'Submit', only to be told their session has expired, which loses their work.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                28 Vote for this issue
                Watchers:
                35 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours, 30 minutes
                  1d 3h 30m