Creating Users

For creating Users with the IMS-ES Template, you first have to create a User object (See "Users"). Then you can send this User (or even an array of Users) to Itslearning, where they will be created.

CreateUser

This function creates a new User in Itslearning, by sending the given User object to IMS-ES.

Syntax:

OperationResult warning = ImsEsclient.CreateUser(User newUser);

Parameters:

newUser:

The new User to be created.

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 given User is not valid (required properties not set, other properties too long) this exception will be thrown.

CreateUsers

This function creates several new Users in Itslearning, by sending the given User objects to IMS-ES.

Syntax:

BatchOperationResult warnings = ImsEsclient.CreateUsers(ICollection<User> newUsers);

Parameters:

newUsers:

An ICollection with all new Users to be created.

Returns:

A OperationResult with 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 given Users is not valid (required properties not set, other properties too long) this exception will be thrown.