Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-17385 Moodle 4.2 QA
  3. MDLQA-17762

CLONE - A PDO-compatible DB server may be used for external DB authentication and enrolment

XMLWordPrintable

      Pre-requisite: PDO-compatible DB server; PHP compiled with a PDO DB extension

      1. Go to Authentication / Manage authentication and enable External Database authentication
      2. Set the following value for the following fields:
        1. Host : pgsql:host=localhost;port=5432;dbname=externaldb
        2. Database: pdo
        3. User/Password: to your user / password for postgres connexion
        4. Table: authtable
        5. Username field: username
        6. Password field: password
        7. Data mapping (First name) : firstname
        8. Data mapping (Surname) : lastname
      3. Go to the Manage enrol plugins page and enable  External database enrolment:
      4. Set the following value for the following fields:
        1. Database driver: pdo
        2. Database host: pgsql:host=localhost;port=5432;dbname=externaldb
        3. User/Password: to your user / password for postgres connexion
        4. Local course field: idnumber
        5. Local user field: username
        6. Local role field: shortname
        7. Local category field: id
        8. Remote user enrolment table: enroltable
        9. Remote course field: courseid
        10. Remote user field: userid
        11. Remote role field: role
        12. Remote new courses table: coursetable
        13. New course full name field: fullname
        14. New course short name field: shortname
        15. New course ID number field: idnumber
      • Setup a course with:
        • MDLQA-XXXX as Course ID number
        • Ensure you can log in with "myuser" as username and "pw" as password. 

      External database example attached to this (you will need to change the MDLQA-XXX reference in the data).

      Test steps:

      • Run the cron or  
        php admin/cli/scheduled_task.php --execute='\enrol_database\task\sync_enrolments'

       

      • Check the logs of the cron to see if the user has been enroled and new course created

      Check that:

      • A new user  called "myuser" has been created
      • A new course called MDLQA-17762-autocreate has been created
      • That the user myuser is enrolled into the MDLQA-17762 course

            cescobedo Carlos Escobedo
            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.