0

Moodle 1.8 and emeeting plug-in

Ok, I was tasked at work to make a plugin for Moodle that uses Marratech technology to work with Moodle 1.8. It worked with older versions of Moodle but with 1.8, the developers decided to change the schema of the db. This change removed the following tables:

sessions
user_students
user_teachers

Sessions has been renamed to sessions2 and students/teachers are now managed by the new set of tables listed under role. The php code calls for the old user_teachers table to determine the moderator for Marratech. Now I need to figure out where in .sql file the devs move my stuff. You see, I am lazy. I like things to be straight-forward. I do not mind working on code, in fact I love a good challenge. I am just a bit burned out on it right now. For those interested, here are the details:

Marratech Moodle integration allows users to have video conferencing within Moodle. Course delivery now has an AV component. NITLE (where I work) gathered a group of extremely talented CS students across the private liberal arts campuses we support and put them in a room to build this plug-in. Within eight weeks, we had a plug-in that was very stable with then current release of Moodle (1.6). Since then, Moodle has been moving along and with that, changes to its schema. When 1.8 came out, the schema changed so much, the plug-in failed by dumping an error that stated we were making outdated sql calls.

The reason why we are getting an outdated sql call is due to the plug-in calling for _user_teacher table. 1.8 has removed user_teacher and user_student and put in place a new set of tables called roles to managed permissions better for these two groups (and other new groups). Under adapters > mstatus_adapter.php, we find this:

function get_moderators($mid){
return emeeting_get_moderators($mid);

emeeting_get_moderators is handled by another file called lib.php. In lib.php we have this:

$teachers = get_records(“user_teachers”, “course”, $record->id);

Since user_teachers no longer exist, teacher call cannot occur. To verify, we changed the call in mstatus_adapter.php to “test” and viola, the plugin works. But now it is not looking up who is the moderator. To fix this, we need to understand the upgrade path from 1.7 to 1.8. We need to look at the sql file for mysql on 1.8 upgrade to see where they put the user_teachers data. This will also add a layer of complexity to the query. We are almost there, but right now with moderator hard-assign to “test”, the plug-in works.

So my work continues; but hey, I was given the green light to take a couple of days off for spring break. I am looking forward to that.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *