|
|
|
Environment:
|
Probably not applicable but here it is anyway: Mac OS X 10.4.8; Intel Xserve Core2 3 GHz Xeon, 4 GB RAM; MySQL 5.0.24a; PHP 5.2.0
|
|
|
If student logs in using either the Login block or the login page they can authenticate but the auto-enrollment trigger is not executed. The My Courses block does not display their courses. (Course assignments are defined in a MySQL external database and authentication is done through LDAP.)
Workaround is for the student to first to click on the course's link, and then authenticate, after which point they get the "You are about to enrol... Are you sure..." message.
|
|
Description
|
If student logs in using either the Login block or the login page they can authenticate but the auto-enrollment trigger is not executed. The My Courses block does not display their courses. (Course assignments are defined in a MySQL external database and authentication is done through LDAP.)
Workaround is for the student to first to click on the course's link, and then authenticate, after which point they get the "You are about to enrol... Are you sure..." message. |
Show » |
|
First, the information. I wasn't explicit in saying that I'm using the MySQL external database plug-in. So maybe some of the environment information given may be pertinent.
As far as I can tell the bug appears to be occurring in the ADOdb library. In the file enrol/database/enrol.php, I found around line 65 (see snippet) that the $rs struct doesn't contain the proper data. The values of its results array are NULL. I haven't had time to bone up on ADOdb and delve further into it than this. If someone else doesn't do it before I get free, I'll eventually look into it.
if ($rs = $enroldb->Execute("SELECT {$CFG->enrol_remotecoursefield}
FROM {$CFG->enrol_dbtable}
WHERE {$CFG->enrol_remoteuserfield} = " . $useridfield .
(isset($remote_role_name, $remote_role_value) ? ' AND '.$remote_role_name.' = '.$remote_role_value : ''))) {
As for the correction. The student's ability to enroll themselves was due to not having an enrolment key set on the course (duh). So, when the enrolment key is set, the student is required to enter the key, even though they are in the enrollment table. This negates the advantage of using external enrollment tables at this time.