Moodle 2 plugin - various issues

9 replies [Last post]
Joined: 11/29/2010
Points: 110

VERSION
I've installed the new plugin on my local moodle (recent build), but it won't install on our live 2.1 server as it's a slightly older build than is required. I edited version.php and tricked it into installing, but the add Kaltura Video Resource form doesn't render properly. Are different 2.1 builds (ours is from August last year) THAT different?

CONNECTION
The live moodle also can't connect to kaltura. However I ran an fsockopen() PHP script to test this, under apache on that server, and it can get a test php file, within the kaltura domain name, just fine. Any ideas why the plugin can't talk to it? Is it a moodle version thing? It connects fine from my local server. We added the kaltura hostname to the server's hosts file and it still doesn't work (but passes my fsock test to read the output of a small php file just fine).

NO UPLOAD WIDGET
Back to the local, working install - I click the Add Video button and no upload widget appears. I'm using default settings for player/widgets, just the server URL (and fact that's CE edition) + username/password.

The kaltura server I have full control of, just not the external firewall or DNS or NAT (both the live moodle and kaltura servers are in the same part of the network and can talk to each other on internal IP addresses - we used IP addressing on the moodle 1.9 / kaltura ce1 setup just fine).
It also hosts other websites so hacking the apache vhost config that kaltura generated so it just listens on the IP address would be awkward, but if necessary could be done.

Any suggestions/help appreciated. Sadly I don't have direct access to the live moodle server so a colleague will have to answer log file and database queries on that end.

Thanks,
Dave

Joined: 11/29/2010
Points: 110

EDIT - I managed to find the correct player and upload widget UI Conf IDs using FireBug and the KMC pages. Now these settting are in my local moodle plugin configuration, the test moodle setup is working a treat.

Joined: 11/29/2010
Points: 110

This feels like it should be a bug report now. If the Kaltura server is unavailable, the layout gets broken (on the Video Resource form - see the attached screenshot).

There is also a problem with the Assignment module - clicking the Add Video Submission button generates these javascript errors:

mw is not defined
mw.setConfig('EmbedPlayer.EnableIframeApi', false);
http://localhost/moodle2_clean/local/kaltura/js/frameapi.js (line 1)

YAHOO.widget.Panel is not a constructor
var widget_panel=new YAHOO.widget.Pane...tBody(kcw_code);widget_panel.show();}
http://localhost/moodle2_clean/lib/javascript.php?file=/local/kaltura/js... (line 11)

AttachmentSize
kaltura_moodle2_noserver-layout-error.jpg111.34 KB
Joined: 02/22/2009
Points: 97

Hi Dave,

what version of CE are you using?
what you describe in the last post seem to be related to HTML5 not supported on old CE versions.
The Moodle 2 extension was officially tested against CE 4.

Regarding connectivity to the Kaltura server:
is it possible your production moodle is configured with proxy settings?

Joined: 11/29/2010
Points: 110

It's working fine now. Turns out the moodle server couldn't see DNS, and even when that was fixed our firewall/NAT routing wasn't letting it see the external IP. So we did mass DNS flushing and host file mucking around on the moodle end and now it's taking videos happily.

Still no logging though, even to a new folder that all windows users can read/write to - we suspect file permissions and apache together but couldn't figure out the right combination of settings.

Joined: 11/29/2010
Points: 110

Argh it lost my post!

CEv4 is the installed version we're trying to hook moodle up to. I'm using Firefox 5.

There are no proxies anywhere on our servers in the DMZ.

Thanks,
Dave

Joined: 02/22/2009
Points: 97

Re JS errors - is it causing any issues? is something not working (like the ability to upload video, modal boxes not loading...)?
you can try to disable the HTML5 support (in the plugin settings - http://{MOODLE HOST NAME}/admin/settings.php?section=local_kaltura) - uncheck the 'Enable HTML5 flavour'.

if JS errors disappear and things are working then:
1. you can work with the limitation of HTML5 turned off
2. the HTML5 support with CE4 should be re-investigated to understand what can be done.

Re connectivity to Kaltura server:
do you see any requests coming from the moodle server in your CE4 api log? (/opt/kaltura/log/kaltura_api_v3.log)

can you check and make sure in moodle DB that the kaltura server host was saved correctly to the settings in the DB?

SELECT * FROM mdl_config_plugins WHERE plugin = 'local_kaltura' AND name ='uri';
Joined: 11/29/2010
Points: 110

I've unticked HTML5 checkbox and this isn't helping with the layout bit when server is unavailable.

No sign of any attempts in the api log of live moodle trying to connect, but I examined it after uploading a video assignment via my test moodle (the one it does work with) and there is no specific 'client url xxxx connected' entry - I just recognised certain things like the .mp4 file extension that the file was uploaded as (no sign of the original file name etc). And the fact all the activity that took place today in the log was for that one task.
As a final test I refreshed the local_plugins editing page on the live moodle server a few times and refreshed the api log - no new entries in it.

ANOTHER ISSUE (more refinement)
From testing I did using my local moodle setup, the Video Resource and Assignment moodle2 modules don't seem to report anything in the logs that STUDENTS see. We've made a block that offers quick links to student activity without them having to faff with the Navigation block, but students can't seem to see the same level of reporting detail generally and nothing shows about them having viewed a Kaltura Video or submitting something to a Video Assignment.
I actually got (logged in as a teacher) an error on the Participation Report when looking at these two resources/activity types:
"Module kalvidres is missing the code needed to perform this function"
Is this something that will be addressed later?

Joined: 02/22/2009
Points: 97

Hi Dave,

About the resource activity log - that would be a feature request. I passed that to our Moodle extension product manager.

To better understand what is wrong in your in environment, following are instructions to add logging of the kaltura client library on the moodle extension.
use these instructions to patch your code and the client library will write to a log file its requests and responses from the kaltura server.
it might help better understand where the failure is.

  • take the attached file (KalturaLog.php) and place it under {moodle installation path}/local/kaltura/API/
  • edit {moodle installation path}/local/kaltura/locallib.php
    • in function get_configuration_obj(), add the following lines:
      require_once(dirname(__FILE__) . '/API/KalturaLog.php');
      $logger = new KalturaLog();
      $config_obj->setLogger($logger);

      after

      $config_obj->serviceUrl = $uri;

your log file will be written under your moodledata folder, like:
/tmp/moodledata/kaltura_2012-02-16.log

if you can understand what is wrong and is something on your environment that you can fix - great.
otherwise, upload the log here and I'll see if I can help.

Gonen.

AttachmentSize
KalturaLog.php_.txt425 bytes
Joined: 11/29/2010
Points: 110

Thanks for the referral of the moodle bit and the debug code.

However, the connection logging doesn't seem to work on our live moodle (argh) - no sign of the log file anywhere, even when telling it to save to a folder with permissions set. It writes fine to moodledata on my local testmoodle though. If we manage to get it working will see how we get on!