Ilias Client

The Java ilias client

ILIAS is the preferred e-learning platform at the University of Applied Sciences in Karlsruhe. In general

ILIAS is a powerful Open Source Learning Management System for developing and realizing web-based e-learning. The software was developed to reduce the costs of using new media in education and further training and to ensure the maximum level of customer influence in the implementation of the software. ILIAS is published under the General Public Licence and free of charge.

The reasons for a java client#

During my 2 years as a research assistant while I was completing my M.Sc. in Computer Science there were recurring tasks to be done mostly at the beginning of each semester or sometimes during the semester such as

  • removing all users from all or only some groups in one course,
  • removing all uploaded materials from all or only some groups in one course,
  • setting or updating a registration period in all or only some groups in one course,
  • setting or updating a maximum amount of members in all or only some groups in one course,
  • setting file upload permissions
  • or printing all groups with its members in different output formats such as HTML or PDF.

All steps were performed manually and took about 8 hours to be completed, not speaking of the last one which was about copy-pasting into an Excel/Word file and then fixing the formatting. At the end of the day it was good training for the right index finger, but this is not what Engineers love to do, right?

We’re are not the robot, we build the robot

So I decided to write a small command line application to automate those tasks as much as possible.

After some research, it turned out, there is such a library for Java (which was my strongest language at the moment), so I decided to build it as well. In the beginning, only the methods I need. In a next step open-source it and then step-by-step add more features if the community desires them.

The goals#

So I thought, why not learn a lot of new things on the way as well. At the moment I was still on the level of Java 7, and I heard about those new cool streams in Java 8 and which opportunity is better than a small project to gain experience in this new feature.

From the former company I was already infected by Test Driven Development (TDD ) which

[…] is a software development process that relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standards.

So I could try out the way I was used to code and then refactor the code and try out the new language features. However, I felt like there was more to explore like

Implementation#

After designing the architecture, I ended up with an easily extensible state-machine. After the login, all courses are displayed where the user is an admin. After selecting one course, an action on the course can be selected. Currently only the groups of a course until a folder depth of 5 can be collected. On each course, multiple actions like, e.g. removing all users and/or removing all uploaded materials can be performed.

I choose the TDD approach explained in the book Growing Object-Oriented Software which was tough, especially in the beginning when I was not used to write the test first. TBH I did not do it through the whole developing process, but I’m grateful that it showed me how the test could drive the architecture. Moreover, I’m happy to have also mocked final classes like Console with PowerMock to be able to simulate user inputs.

For the output, I choose Velocity templates to separate the logic from the presentation and the ability to add more templates in the future without having to re-compile the tool. Nevertheless, two templates are provided in the jar.

The full code can be found here on my github profile.

Conclusion#

I’m happy and proud for this little tool which helped me and will help others in the future to get tedious tasks done faster and have more time to do creative things. Furthermore, it encouraged me to explore new fields in tech with ease because I had a project with a purpose.

© 2021