course autocreate fails with mssql_n as external database

course autocreate fails with mssql_n as external database

by Jay Lee -
Number of replies: 1
I'm attempting to test external enrollment with mssql_n as the external database since our primary student records system is in mssql (Sungard PowerCampus). I am already using mssql_n as the primary database for moodle (we want to build a number of bridges between PowerCampus and moodle) so I am confident that I have the php odbtp plugin installed correctly already.

I have created a table in a separate mssql database and populated it with 3 columns; studentid, courseid and role. If the course already exists, then the student will be enrolled in the course if the external database has a record for the student and course (and role). But if the course does not already exist, moodle will not autocreate the course.

To further test things out, I switched the external database to mysql, pointed it at one of our mysql servers, created a table with just the 3 columns and it was able to correctly create the non-existent course and enroll the student on their next login. So I believe I've narrowed the problem down to using mssql_n as the external database for enrollment.

I checked the error_log for anything meaningful on student login but don't see anything. However, if from the command prompt I run "php enrol_database_sync.php" I do see a few meaningful errors:

PHP Notice: Undefined index: courseid in /var/www/html/moodle/lib/adodb/drivers/adodb-mssql.inc.php on line 785
course
PHP Notice: Undefined index: courseid in /var/www/html/moodle/lib/adodb/drivers/adodb-mssql.inc.php on line 785
course
PHP Notice: Undefined index: courseid in /var/www/html/moodle/lib/adodb/drivers/adodb-mssql.inc.php on line 785
course

So it looks like there is some problem that prevents the new course from being created.

Any help is greatly appreciated! Some further details on my setup:

RHEL4 Linux Server (php 4.3.9, apache 2)
Moodle 1.7 final
ODBTP php module 1.1.4 custom compiled for RHEL4
SQL Server Express Edition 2005 w/ SP1 on WinXP box



Jay
Average of ratings: -
In reply to Jay Lee

Re: course autocreate fails with mssql_n as external database

by Van Howell -

Just curious to see if you have resolved this issue. I am doing the same with SCT PowerCampus and Moodle. I need to have this up by the Fall.

I am using Moodle 1.8
MySQL
CentOS 5
PHP, Apache

I want to be able to create courses, assign teachers and enroll students.

Van