Avendoo® online documentation

Instructional material API



Shows the version number of the current API. By now this function transmits the value “2”.(Status: February 2023).


Shows, on which page you actual are. page 1 = 0001, page 2 = 0002, subpage 1 of page 2 = 0002, 0001 etc.


Set all pages of instructional material to “visited”. Then the instructional material is valued as “Completed” on the learning path. The learner is automatically on the last page of instructional material.

The changes in an instructional material are first seen on the next opening or after a new loading of the instructional material.
See also „fn_reload_page()“.


Loads the page new.


Transmits the login name.

Example of use:
A user should be welcomed with his/her name.
API Code


Transmits the language, which is provided for the learner, via a country code.
The country codes are in accordance with ISO 639-1.

The language, which is provided for the learner, is often not in accordance with the language, in which the learner has been processed the instructional material.


Transmits the value “true” or “false”, depending on if the a page was already seen (true) or not (false).


This function delivers an array with all pages, which the learner has already seen.


Transmits the ID, with which each instructional material is numbered.


Transmits the ID, with which each course activation is numbered.


Transmits the ID, with which each page of instructional material is numbered.


Sets the data for all JavaScript variants with text, even false-true-values.
fn_setData(“objectType”, 4): “objectType” could be”question 1″ sein.


Reads the saved data for all JavaScript variants with text.Liest die
fn_setData(“objectType”, 4);
fn_setData(“objectType”, fn_getData(“objectType”) + 6);
fn_getData(“objectType”); => 10

The tutorial-assigment and the page ID are unique 13-digit numbers and look like “1437638469552_1”. Two different instructional materials, course activations or pages of instructional materials have never the same ID.


There isn’t a limitation of 26 pages in the tutorial assistant anymore since 17.27.

Onboard navigation in the instructional material



Shows or hides the menu for navigation by the instructional material.


Hides the menu for navigation by the instructional material.


Opens the previous page.


If it is an indented page the function opens the page, which is one level higher.


Opens the next page.

These functions allow the author to create an individual navigation within the instructional materials by reproducing the functionality of the onboard navigation of Avendoo®.

Example of use:

The navigation should be within the instructional material via individual buttons. Thus the menu bar of the instructional material is hidden by default and is shown only if applicable.


Functions to go to other pages of instructional material



This function detects an Array, in which each page of instructional material is assigned to a number, beginning with “0001”. For each indention to each number is added a further number, beginning with an “0001”.
Thus the first sub page of the first page has the value “0001, 0001”. The fourth sub page of the third page has the value “0003, 0004” and so on.

Because there is added a value to each page, this function is ideal in combination with the method “lenghth” to count all pages of an instructional material.
fn_getPages().length – 1 transmits the total number of pages of an instructional material.


With the function fn_openPageByMenuPosition(position) you can go to any page of an instructional material. Thus you insert for
position“ simply the matching character code of the appropriate page of instructional material. (See fn_getPages()).

Example of use:
You want to go to the second sub page of the fourth page:

API Code 3


This function is similar to the function „fn_openPageByMenuPosition(position)“. But the position is not defined as characters but as page ID (see fn_getPage/a>).


Via these two function you can go to any page in another instructional material.

For going to another instructional material, both instructional materials have to be on the same learning path.

By requesting a certain page within or outside an instructional material Avendoo® supports the author in many ways. If you click on “Link instructional material” in the editor, a link to the favored page of instructional material is created. You can copy, change and reuse the created link in the source code.