Archive

Archive for the ‘English’ Category

Prevent WordPress MailmanWidget widget to hide after registering your address

December 11, 2014 Leave a comment

If you use the Mailman Widget as an important design element, you might be annoyed by the fact it disappears once you registered your e-mail. A quick hack to this behaviour is to modify ns_widget_mailman.class.php (see comments):

 public function widget ($args, $instance) {
     extract($args);
     // Patch to continue showing block even if registered in this session
     //if ((isset($_COOKIE[$this->id_base . '-' . $this->number]) && $this->hash_mailing_list_id($this->number) == $_COOKIE[$this->id_base . '-' . $this->number]) || false == $this->ns_mm_plugin->get_mailman()) {
     if (false == $this->ns_mm_plugin->get_mailman()) {
         return 0;
     } else {
         $widget = $before_widget . $before_title . $instance['title'] . $after_title;

Categories: English, php Tags: ,

Tricks to debug Captivate SCORM 1.2 content

November 26, 2014 1 comment

If you have to make Captivate-generated SCORM 1.2 content in your (web) platform and you want *more* information about what’s going on, this guide might help.

One of the trickiest things about Captivate and SCORM is that Captivate doesn’t handle the credit/no-credit (cmi.core.credit) very well. This parameter, in combination with cmi.core.lesson_mode should let you retake exercises that you have already completed and passed.

In Chamilo, if you want to debug the SCORM interactions on the Chamilo side, use Firefox, login as admin, go to the learning paths list and click the ladybug icon in the action icons next to the learning path you want to debug. This will only affect you, so no worries about doing that in production.

ladybug debug iconThen enter the learning path itselt (simply click its name). Once you’re seeing the content, launch the Firefox debugger with SHIFT+F2 and go to the “Console” tab. Click on any item in the table of contents, and you should see the SCORM and LMS interactions pooring in. Something like the screenshot below.

Chamilo SCORM general debug screen

Chamilo SCORM general debug screen

This is already very nice to understand the interaction going on, and when Chamilo will save the information in its database, but it still lacks the possibility to understand what’s going on, on the Captivate side of things.

Captivate itself has debug features though, but they’re not prepared for just any tool. Luckily, we can tap into them with a moderate level of complexity.

First, you need to know where the Captivate content is on disk in your LMS. In Chamilo, this is typically in the {root-folder}/courses/{course-code}/scorm/{scorm-name}/{scorm-name}. For Captivate content, Chamilo usually generates its own folder, then Captivate, which means you have it duplicated.

You’ll have to get into that folder and, for each SCO (item in the table of content in the screen above), locate the scormdriver.js file.

Around line 1032 of scormdriver.js, you’ll find something like this:

function WriteToDebug(strInfo){if(blnDebug){var dtm=new Date();var strLine;strLine=aryDebug.length+”:”+dtm.toString()+” – “+strInfo;aryDebug[aryDebug.length]=strLine;if(winDebug&&!winDebug.closed){winDebug.document.write(strLine+”<br>\n”);}}
return;}

We’ll hack into that and just replace it straight away (keep a backup copy if you’re afraid) by the following line:

function WriteToDebug(strInfo){var dtm=new Date();var strLine;strLine=aryDebug.length+”:”+dtm.toString()+” – “+strInfo;aryDebug[aryDebug.length]=strLine; console.log(strLine); return;}

This will simply:

  • force the debug to be active (we don’t check blnDebug anymore, we assume it’s on!)
  • redirect the debug messages from this weird winDebug.document to the officially-supported-in-all-reasonnable-browsers “console.log”, which prints the log in the browser console, as illustrated above

Now, to get this to work, you need to clean the cache in your browser. My favorite way of doing this in Chamilo is to press CTRL+F5, then go *back* to the learning paths list, enter *another* learning path, then enter the hacked learning path again. Captivate debug information should start showing in your browser’s console:

Captivate logs in browser console

Captivate logs in browser console

Now you can analyze all the information flow.

That’s all, folks!

MySQL error: SQLSTATE[HY000]: General error: 126 Incorrect key file

November 11, 2014 Leave a comment

If you ever get this kind of error:


SQLSTATE[HY000]: General error: 126 Incorrect key file for table '/tmp/#sql_3aef_0.MYI'; try to repair it

without an internet connection… you are in a bad place :-)

The error message is very unclear about the issue. The problem is actually (most of the time) that the partition that holds the /tmp folder is too small to store a temporary table (for a big permanent table).
This triggers an error at building the temporary table (or part of it) and shows you this error.

To fix, edit you /etc/mysql/my.cnf file (or rather /etc/mysql/conf.d/local.cnf if you’re clean) and locate (or add) the tmpdir directive. Change it from /tmp to /var/tmp, for example, and restart MySQL.

Fixed!

If you’re using local.cnf, don’t forget to add the [mysqld] line before the setting itself.

Categories: English, Uncategorized

On the Criticality of Learning Management System

October 29, 2014 Leave a comment

I’m often surprised at the little importance large education institutions put on their Learning Management Systems (LMS). Many times, after years of starting a modest pilot and slowly convincing all the people involved, institutions find themselves in a situation in which students (and sometimes teachers, but rarely the institution itself) drive the development of the LMS by demanding for changes.

Students, of course, see it as a way to get better, more ubiquitous access to their course material, to practice more without the need of the teacher, to get feedback faster, etc. Sometimes students feel more confident facing a computer than they would do in class.
Anyway, expectations increase and the institution has to follow or, sometimes, lead this evolution.

However, where the “mild” integration might have been slow in classical educational institutions, there is one crucial step where institutions *have* to make sure everything goes right: the move to a critical LMS integration as fast as their end-users require it.

A critical LMS is a service (not only the software, but also the team around it) on which you can rely to launch and follow training/teaching activities that are critical to your organization.

Obviously, teaching is critical for an educational institution, but it is not critical in the LMS sense if the LMS acts as an *extension* of the classroom courses.

It becomes critical when:

  • students can access to the course *only* through the LMS
  • the LMS serves to generate the students’ grades
  • the LMS is used to generate reports on the activity of teachers or students
  • it is expected to be online permanently, without interruptions of more than half an hour every week or so

If you compare it to other systems deemed “critical” by the IT department in an education institution, you should get this kind of table:

System Must be up all time? Critical information? Must sustain high load?
ERP Not really Yes No
Website Yes No Not really
Library system Not really Not really Not really
LMS Yes Yes Yes

I’m sure some of these criteria can be discussed in specific situations, but when the LMS is used for the cases above (which is usually the case for any serious implementation), it *does* match all these criteria at the same time.

In each and everyone of these cases, it is necessary to be able to rely on a skilled team of specialists, that will be able to assess, intervene and report on any case that might cause some level of inconvenience to the students.

What this means is that a multi-dsiciplinary team of specialists will have to get involved in your project, and give you the power to do what you want and need. Building the team takes time, building and maintaining a high level of skills takes time, getting involved in a project takes time, and providing you with the best possible solution takes time, dedication and vision.

Many times, as the company behind the development of Chamilo LMS as a free software (we have high goals in terms of social responsability), we face this misunderstanding in the first step of our interaction with new customers.

The LMS is not *valued* by the IT department as it really should, and even less when it is based on free software. But software is just software, and although Chamilo LMS is in the top 3 best open source e-learning paltforms around, you can’t hope for a lot if your team doesn’t know how to manage it. And it’s not just a technical issue: dealing with online courses involve a combination of skills that you will need to have if you don’t have the right team to help you out:

  • planning the tools you will use for interaction (videoconference, chat, forum, etc)
  • knowing the limits of your students’ available technology (screen resolution, plugins, apps, etc)
  • being able to design lightweight courses (bandwidth)
  • knowing your students’ behaviour
  • being able to plan (and take action) for a load increase on a server, ahead of a high-attendance online event
  • being able to pinpoint reporting data to improve education methods
  • and much more…

Understanding all this, if the budget for your institutions’ online education project is a 10th of its ERP’s system, it’s probably not going in the right direction, for its first step.

Only once the institution has understood the criticality of their LMS and how it will affect their institution’s image and efficiency, the project can start in the right environment.

Learning Management Systems are critical, not only for educational institutions. They represent a very unique tool that is both desired and required to improve the efficiency of teaching, learning and managing skills. Don’t let it fail. Make sure everybody understands what a LMS is and how useful it will be, and your organization will thrive into the 21st century!

Chamilo LMS

Chamilo LMS is a web-based learning management system focused on usability. It is developed and published under the GNU/GPLv3 license, which allows anyone to use, analyse, modify and distribute copies and modified copies of the software. In its first 4 years of existence, Chamilo LMS has been granted several software prizes and has grown from a community of 10 developers to a community of 9 million users worldwide.

Chamilo allows you to create courses, manage administrators, teachers, students and other typical roles for organizations or departments focused on training. It is suitable for academical, corporate, associative and personal environments.

The BeezNest group

BeezNest is the company behind most of the developments in Chamilo LMS. It specializes in analysis, development and support of e-learning projects in about 40 countries, with offices and collaborators in Belgium, France, Spain, Germany, the UK, Peru and Mexico. Projects managed by BeezNest deal with portals from 100 to 680,000 students, worldwide. It deals with every aspect of e-learning projects, from analysis, to hosting, platform developments, training, online courses building, to data analysis. All you need but marketing (which it prefers leaving to its customers).

Contact BeezNest at info@beeznest.com

Start collecting “space miles” with NASA

October 24, 2014 Leave a comment

Nasa is doing something funny and great at the same time. Get your ticket for a test-flight that will count for space miles to be spent in the future :-)

http://mars.nasa.gov/participate/send-your-name/orion-first-flight/?action=getcert&e=1&cn=1150667

Categories: English, Misc Tags:

The complete guide to screencasting in Ubuntu 14.04 + Gnome Shell

October 16, 2014 1 comment

For those developers of you wanting to do more than just develop under Linux, you’ll have realized that there are many things stopping you for doing proper video tutorials as easily as you would do it with some non-free (as in freedom) software.

Fear not, though, as this tutorial, written at a time between Ubuntu 14.04 and 14.10 with the Gnome Shell, will help you go through it and hopefully setup a perfect environment that you will be able to re-use anytime, anywhere (with your laptop).

YouTube requirements

In order to prepare a good video tutorial, the first thing you need is: standards! You need to get a clear list of what you will record, in which size, which quality and which destination.

A common destination for video tutorials is YouTube, and as explained by @JanetRichard in this article, and combined with what you have natively in Ubuntu, you might be deciding for these:

  • Video format/CODEC: MPEG-4
  • Aspect ratio: 16:9
  • Resolution: 1280 x 720 (16×9 HD)
  • Audio CODEC: MP3 or OGA (from OGG)
  • Audio bitrate: 44kHz
  • Channels: 2

With these basis, we can move on and start preparing tool.

Screen recorder

The first tool you will need is a simple, efficient screen recorder. For those who knew stuff like Kazam and other screen recorders, you might have had issues with their latest versions. SimpleScreenRecorder is a well-maintained little GTK application developed by Maarten Baert.

By clicking the link, you will get to the Github page that contains detailed (but simple) installation instructions.

Start SimpleScreenCaster, set the parameters to the ones suggested above (including resolution), pick a destination file and… start recording.

Sound quality

One of the most essential items of a good screencast (considering recording your screen will give you extremely good image quality anyway) is sound quality. If you are going to explain stuff to your public, you don’t want noise/echo/low volume issues anywhere near your screencast. Laptop microphones are usually good quality, but they are omnidirectional, which means they will catch your cat mauwing 6 meters from you, or the rain hitting on your window.

You need a microphone that is built for recording one single voice (or at least focused on that). I personally use a USB Behringer C-1U, which cost me about US$60 delivered at my home. Check my article explaining how to get past the low volume issue.

With this setup, you should get a crisp sound quality focused on your mouth. Oh, and this microphone doesn’t have a base, so I hacked and cut an old plastic CD tower for 50 CDs and screwed the microphone in there, which works just fine.

Embedding webcam

If you want to embed your webcam inside the screencast, you’ll have to use the command line a bit, because SimpleScreenRecorder doesn’t allow it directly, but it will focus its recording on the area you define, so you can just include a small webcam feed into this area and you’re done.

Check my article on how to do that. Shorthand: use mplayer with the command:

mplayer tv:// -tv driver=v4l2:width=640:height=480 -vo xv

Zooming in and out

Many times, you will want to zoom in and out, so that you can show things in more detail (on a 1024×720 video, sometimes text appears too small to read).

There is a script called gnome-shell-mousewheel-zoom which works (since a recent update) on Ubuntu 14.04 (and before that on 12.04). You’ll need to restart your desktop interface before it starts working (with the ALT key + the mousewheel).

Conclusion

Although there is no single tool at the moment that handles all this, a small combination of tools will easily enable your “videotutorial recording station”. The only missing feature now is the zooming part. Hopefully, someone will either fix an existing system or develop a GNOME extension at extension.gnome.org…

Categories: English

Can’t use function return value in write context

September 26, 2014 Leave a comment

Did you ever develop some nice code, then simply wanted to check if a string was only composed of white spaces or tabs, and used something like this:

if (!empty(trim($string))) { ... }

…only to get a bad error appear (only on your PHP 5.4 server) in the middle of your app, like this?:

Fatal error: Can't use function return value in write context

Well, this has a simple explanation…

Prior to PHP 5.5, the empty() function did not accept something else than a variable. From php.net/empty:

Note:

Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.

So the easy solution (but kind of making PHP feel beyond help) is to do what is recommended in the comment (trim($string) == false) or decompose your statement (although it will be less efficient than the above):

$string = trim($string);
if (!empty($string)) { ... }

This is due to the fact that empty() is a language construct, not really a function (it works as a function to make things easier). So, under the same logic, this will not work with other language constructs, like echo, require, etc (although the explanation in empty’s documentation is clearer than any other).

Categories: Development, English, php Tags:

Quick PhoneGap setup on Ubuntu

September 5, 2014 Leave a comment

(tested on Ubuntu 14.04)

Install NodeJS

Go to https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager to get the following instructions updated:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs

Install PhoneGap

sudo npm install -g phonegap
sudo npm install -g cordova

If some part of the output of this (xcode, etc) gives error messages, I recommend uninstalling (sudo npm uninstall phonegap) and trying again, to avoid weird dependency issues later on.

The Cordova installation seems not to be mandatory, although you will need it if you start installing Cordova plugins.

Create a PhoneGap app

phonegap create my-app
cd my-app
phonegap run android

This last line is to run it as an Android app (but you can also do that in other environments).

If, for some reason (libraries dependencies, etc) the last line doesn’t work, you can still test your app launching the PhoneGap local server in what I understand is a special independent web mode, by typing

phonegap serve

This will give you the IP that you need to give in the next step.

Test your PhoneGap app

Since recently, PhoneGap offers a PhoneGap “app” that will allow you to run a locally-developed app on your device.

See instructions here http://app.phonegap.com/ (or basically download the “PhoneGap Developer” app).

Installing the Android SDK

Remember the failing “phonegap run android” command above? Well, this was due to the missing Android SDK. To get it, you need to do something like this:

wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz

And then uncompress the file

tar zxvf android-sdk_r23.0.2-linux.tgz

Finally, you’ll have to add the path to some of the subfolders of this uncompressed archive to your PATH system variable:

PATH=”${PATH}:/path-to-android-sdk/tools:/path-to-android-sdk/platform-tools”

export PATH

If you only do this, you’ll have to repeat this action after each reboot (at least when you want to “phonegap run android”).

Categories: English, Uncategorized

Crowdin terms review for Chamilo LMS translations

As we migrate to gettext for Chamilo LMS v10, we are also looking for a platform to host our translation system (considering our current translation system does not support gettext).

We will migrate most existing translations, but we were looking for the right platform to manage the translations as a community. One tool that attracted our attention was Pootle, a Python-based open source translation system that seems to be lead by the right, passionate people.

In this first phase though, we really need to avoid being distracted by other things than the development of the core code of Chamilo LMS v10. This is why we looked for a hosted solution, with an existing community, preferrably with special plans for open source projects (like Github has).

So we found Crowdin.net, with apparently all the features we will need at first. We also looked at terms and conditions and privacy terms. Terms and conditions indicate that all content translated remain the property of the user, which is good, but we will have to manage some kind of agreement with all translators that their translation work will be considered Creative Commons BY-SA. Finally, privacy terms are pretty reasonnable and respectful of our privacy, but they *do* indicate that Crowdin.net can send promotional e-mails about its services to all members, which means that translators will get a (hopefully reasonnable) amount of spam (I call it spam anyway), but that’s limited to Crowdin.net services only. This being said, we will try it as a reduced core of developers for a while and see if the mails flow is reasonnable before we generalize its use.

So if you want to try it, you should be able to take a look within a few days from now on https://crowdin.com/project/chamilo-lms

Skype 4.2 for Linux: Unable to connect

August 4, 2014 3 comments

If your Skype 4.2 for Linux is reporting an “Unable to connect” error since about the 28th of July 2014 or so… that’s because you need version 4.3. There isn’t much documentation around about this, so I’m writing this short post.

To replace it on Ubuntu 13.10 or 14.04:

  • download version 4.3 from the Skype website
  • sudo apt-get remove skype
  • sudo dpkg -i skype-ubuntu-precise_4.3.0.37-1_i386.deb (this filename may vary slightly)

Done.

Categories: English, Misc Tags: