-
Notifications
You must be signed in to change notification settings - Fork 0
How to ship a lesson
After creating or modifying a lesson and/or its exercises, you will want to give it to (your) students. Depending on your goal, you have two ways to do so:
- Package it in a lesson JAR, so they can load it in the JLM,
- Edit the JLM code, to create a custom JLM with your lesson in it.
If you want to give this lesson directly to your students, the simplest and preferred way is the first one.
If you want to add your lesson to the JLM project, please create a fork of the project on Github, and push your changes on it for review.
The JLM allows users to load a custom lesson JAR from the lesson chooser. You can package your lesson in such a JAR package, and give it to your students with the JLM.
The only requirement to create such a JAR is adding a line to the Manifest file, indicating what is the name of the lesson package you’re shipping in the JAR. The attribute to add to the Manifest is the following:
LessonPackage: yourPackageName
Once generated, your JAR should have the following structure:
-
META-INF/
- MANIFEST.MF (with the LessonPackage attribute)
- lessons/
-
yourPackageName/
- Main.java
- all of your lesson files
-
yourPackageName/
If you have created your lesson inside of the Eclipse IDE, you should be able to export it as a JAR pretty easily.
- First, create a Manifest file in your project, so you can use it for the JAR. It must contain at least the LessonPackage attribute, as described above.
- Then, right-click on your lesson package, and select “Export…”. In the popup, select “JAR file”, and validate.
- Your package should be selected in the resources frame. Input the file destination for your JAR, and check the options.
- On the last screen, choose the option “Use existing manifest from workspace”, and select the Manifest you’ve created before.
- Create the JAR!
You should now have a package ready to be loaded into the JLM, using the appropriate link in the lesson chooser.
Edit the lessons.chooser.LessonChooser.html file and add a link to the lesson you’ve just created.
<li> <a href="lesson://lessons.myPackage"> Name your lesson </a> Description of whatever your lesson is supposed to teach </li>
You may now repackage the JLM using the Ant build script provided in the project, which will generate a new JAR containing everything needed.