Creating Hierarchies

With the IMS-ES Template you can easily create Hierarchies in Itslearning. First you have to create a Hierarchy object, as described in the section "Hierarchies". Then you can send this Hierarchy (or even an array of Hierarchies) to Itslearning, where they will be created.

CreateHierarchy

This function creates a new Hierarchy in Itslearning, with the properties of the given Hierarchy object.

Syntax:

OperationResult warning = ImsEsClient.CreateHierarchy(Hierarchy newHierarchy);

Parameters:

newHierarchy:

The Hierarchy object to be created in Itslearning.

Returns:

The OperationResult containing the warning that Itslearning has send back, or if there was none, null.

Exceptions:

  • ImsEsException: If IMS-ES encountered an error in Itslearning, this exception will be thrown.

  • ValidationException: If the new Hierarchy is not valid (required properties not set, other properties too long) this exception will be thrown.

CreateHierarchies

This function creates several new Hierarchies in Itslearning, with the properties of the given Hierarchy objects.

Syntax:

BatchOperationResult warning = ImsEsClient.CreateHierarchies(ICollection<Hierarchy> newHierarchies);

Parameters:

newHierarchies:

An ICollection with the Hierarchy objects to be created in Itslearning.

Returns:

A BatchOperationResult containing the list of warnings that Itslearning has send back (this list can be empty).

Exceptions:

  • ImsEsBatchException: If IMS-ES encountered an error in Itslearning, this exception will be thrown.

  • ValidationException: If one of the new Hierarchies is not valid (required properties not set, other properties too long) this exception will be thrown.