Some bug fixes.
Fixing tests.
Merge pull request #101 from claroline/refatoring-for-unit-test-nico

Some bug fixes.