You're not reading the latest revision of this page, which is here.

Courses and tasks json

This site is for you if you are a course creator.

If you want a course to be available for external LMS, the Server needs to have the course and tasks listed in the course-and-tasks.json file.

Course JSON Definition

The course JSON File contains a list of courses:

1
2
3
{
  "courses": []
}

If a course has the parameter 'lms-include' with value other than none, then the course will be listed in the json file.

Course

A course has the following properties:

1
2
3
4
5
6
7
8
9
10
11
{
   "name": [
      {
         "name":"[Localized Course Name]",
         "language": "[Lang-Code]
      }
   ],
   "tasks": Task[],
   "pathToCourseFile": "[pathToCourseFile]",
   "link": "[Permalink to course overview page]",
}

link will only be included if the lms-include contains course or all.

Tasks

Tasks are elements which can then be linked from the LMS. (e.g as Mumie Activity in Moodle)
A task looks like so:

1
2
3
4
5
6
7
8
9
10
{
   "link": "[permalink to task]",
   "tags": [list of tags for this task],
   "headline": [
      {
         "language": "[lang code]",
         "name": "[Translated titel for task]
      }
   ]
}

The value of the headline is generated as follows:
[branchName] - [containerName] - [subBranchName] - [elementName]

  • branchName is optional, it will appear if the container is added inside a branch in the course tree file.
  • containerName is the name of the element's container (worksheet, lecture or annex)
  • subBranchName is also optional. it will appear if the element is added inside a branch in the container's tree file
  • elementName is the name of the element (e.g. problem, article, exercise) itself

Tag

Tags are used to filter the task on the plugin side

1
2
3
4
5
6
{
   "name": "[Category name for tag]",
   "values: [
      "[any value of your choice]"
   ]
}

Non problem elements will have a special ungraded tag

1
2
3
4
5
6
{
   "name": "grading",
   "values": [
      "Ungraded"
   ]
}

Automatic Generation of Courses and Tasks JSON

For the automatic generation of courses and tasks json file, the course document needs to have the following parameters.

Course Parameters

1. lms-include

With this parameter you can control whether or not and what elements of the course should be included as tasks in the automatic generated course json.
Possible values:

  • none: the course will not be included
  • all: the course will be included, and all elements will appear as tasks
  • comma separated combination of course,worksheet,lecture: ex. if lms-include = course,worksheet then the course and worksheet will appear as tasks.
  • (worksheet|lecture):[role] - use this to include worksheets and lectures with the specific role

    2. lms-languages

    This parameter takes a comma separated value of language codes e.g. "de,en,fr".
    With this parameter, you can control which languages should be generated for the tasks headlines. Default value is "de,en".
    Note that the actual headlines can only be generated if the course file and element file also have the translated names in the metainfo.

Container (lecture, worksheet, annex) Parameters