Teachers cannot login into Moodle after installing Kaltura Plugin. Only admin can.

3 replies [Last post]
Joined: 04/08/2010
Points: 9

I have KalturaCE (v1.5) running with no problem. But the Moodle plugin (alpha 0.95) its giving me a lot of headaches. For the purpose of this discussion I'd say my moodle server is located at moodle.mydomain.net (moodle version 1.9.5+)

I can login as an administrator in moodle and I can even upload videos. But if I try to login with an account that has a "Course Creator" role then I get:

require_js: http://moodle.mydomain.net/mod/kaltura/js/jquery.js - file not found.
A required parameter (section) was missing

And I cannot login into moodle. All teachers are course creators in my moodle installation. So none of them can login at this point.

The jquery file is there. I have tried all kind of permissions to the file and folders, but nothing worked.

Any idea/suggestion is appreciated.

Thanks,

Guillermo.

Joined: 04/08/2010
Points: 9

Update:

Under Moodle Admin -> Security -> HTTP Security I have "Use HTTPS for Logins" enabled. If I disable this option, then I can login with any account.

It seems that moodle require_js() function does not like the https requirement... Trying to see if I can find out a workaround since I need the HTTPS security in the login page.

I have to say that my teacher accounts authenticate via LDAP, while my admin account is local. I'm not sure if that is why admin can login and teachers cannot.

Any suggestion is appreciated.

---
KalturaCE v1.5 | Ubuntu Server 9.10 64bit | Moodle 1.9.5+

Joined: 04/08/2010
Points: 9

Update / Solved:

On the file mod/kaltura/lib.php there were three lines that read:

require_js($CFG->wwroot.'/mod/kaltura/js/jquery.js');
require_js($CFG->wwwroot.'/mod/kaltura/js/kvideo.js');
require_js($CFG->wwwroot.'/mod/kaltura/js/swfobject.js');

That was causing the problem because require_js() needs to be called with the right url depending on wheter you use https or not. So to fix it, I changed the above to read:

if($CFG->loginhttps == '1') {
$kmdlroot = $CFG->httpswwwroot;
} else {
$kmdlroot = $CFG->wwwroot;
}

require_js($kmdlroot.'/mod/kaltura/js/jquery.js');
require_js($kmdlroot.'/mod/kaltura/js/kvideo.js');
require_js($kmdlroot.'/mod/kaltura/js/swfobject.js');

Now I can login as a teacher and student. Hope the above helps someone else with a similar moodle setup as mine.

---
KalturaCE v1.5 | Ubuntu Server 9.10 64bit | Moodle 1.9.5+

Joined: 03/29/2009
Points: 764

Thanks for posting this!