Line 426: |
Line 426: |
| ===Using Karma Templates=== | | ===Using Karma Templates=== |
| ===Using Sugar Activities=== | | ===Using Sugar Activities=== |
| + | |
| + | There is currently no automated support for creating these lessons. It requires some command-line knowledge. |
| + | When a lesson is opened in the edit mode, the file being edited is 'source.txt'. The first line of this file |
| + | contains a directive to launch a specific Sugar activity, e.g., |
| + | |
| + | <!--B:TurtleArt,lines_lesson.ta,application/x-turtle-art--> |
| + | |
| + | For technical reasons, this line appears in the edit mode as: |
| + | |
| + | /*B:TurtleArt,lines_lesson.ta,application/x-turtle-art*/ |
| + | |
| + | The source.txt file uses html5 markup in which <!-- and --> enclose a comment. As a result, this line is |
| + | not visible in the editor. By converting the markup to /* */, the user can create and edit this line. |
| + | |
| + | The B: is required to signal this comment contains a directive. There are three parts to the directive separated by commas: |
| + | |
| + | #name of the Sugar activity. This is the same as the name in /home/olpc/Activities minus the activity. |
| + | So Turtle Art (Blocks) appears as /home/olpc/Activities/TurtleArt.activity. |
| + | #file name of the activity bundle (lines_lesson.ta) including the file extension. This bundle must be in |
| + | the folder for this lesson in Learn. |
| + | #mime_type of the bundle. The mime_type of a bundle is given in /home/olpc/Activities/TurtleArt.activity/activity/activity.info. For 'some.activity', look in /home/olpc/Activities/some.activity/activity/activity.info. |
| + | |
| + | A Sugar activity can be launched as a new start by: |
| + | |
| + | /*B:some.activity*/ |
| + | |
| + | The Learn.activity creates a Journal object with the bundle file as data. It then resumes the activity from this Journal object. |
| + | |
| + | The user needs to quit the launched activity when finished to return to the Learn activity. Sugar treats the launched activity as a window opened by Learn and so gets confused if the user tries to return to Learn via the frame. |
| | | |
| ==Update== | | ==Update== |