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

Session Timeout alert

XMLWordPrintable

    • MOODLE_38_STABLE
    • MDL-34498-master
    • 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.Ā 

      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.

            Votes:
            28 Vote for this issue
            Watchers:
            36 Start watching this issue

              Created:
              Updated:
              Resolved:

                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

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