Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-12282 Moodle 3.6 QA
  3. MDLQA-12775

CLONE - File and database session handlers can be used to manage users sessions

    XMLWordPrintable

    Details

      Description

      Prerequisites

      1. Set $CFG->autologinguests = 0; in config.php
      2. A course with students enrolled and an assignment activity.

      Setup
      We need to test each of them so we need repeat the steps below after setting each of the session handlers in our config.php:

      • database session handler
        1. Log out if you are logged in
        2. Remove any config.php $CFG->session_handler_* stuff you previously added
        3. Paste this in your config.php before require_once...lib/setup.php

              $CFG->session_handler_class = '\core\session\database';
              $CFG->session_database_acquire_lock_timeout = 120;
              

      • file session handler
        1. Log out if you are logged in
        2. Remove any config.php $CFG->session_handler_* stuff you previously added
        3. Paste this in your config.php before require_once...lib/setup.php

              $CFG->session_handler_class = '\core\session\file';
              $CFG->session_file_save_path = $CFG->dataroot.'/sessions';
              

      Test

      1. Use the CLI to run php admin/cli/purge_caches.php
      2. Set it up according to config-dist.php instructions (you can also check Session_handling moodle docs page)
      3. Log in, go to a course and visit the gradebook (Grades).
      4. Filter the Grader report by First name.
      5. The table should only show users with the specified filter.
      6. Visit the course page, and then return to the gradebook (Grades). The filter for the first name should still be active.
      7. Open a different browser and log into the site with the same user.
      8. Go to the grades page. Note that no filters are currently set.
      9. Set the Surname filter. The results should be filtered according to the surname filter selected.
      10. On the first browser refresh the page. The filter should still remain as the first name and have no impact on the second browser.
      11. Log out (all opened sessions)
      12. Set http://YOURSITE/admin/index.php url in your browser, you should be redirected to the login page
      13. Log in as admin, you should be directed to admin/index.php

        Attachments

        1. MDLQA-12775_boost.PNG
          MDLQA-12775_boost.PNG
          124 kB
        2. MDLQA-12775_boost(2).PNG
          MDLQA-12775_boost(2).PNG
          117 kB
        3. MDLQA-12775_clean.PNG
          MDLQA-12775_clean.PNG
          129 kB
        4. MDLQA-12775_clean(2).PNG
          MDLQA-12775_clean(2).PNG
          108 kB

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: