Reading Users

When there are have been changes to Users in Itslearning, it is also convenient to also retrieve this information again. With the functions below you can retrieve Users from Itslearning by their SyncKey, or by the Hierarchy SyncId that they are enrolled in.

ReadUser

This function retrieves the User from Itslearning with the given SyncKey.

Syntax:

OperationResult warning = ImsEsClient.ReadUser(string syncKey, out User readUser);

Parameters:

syncKey:

The Synchronization key of the User to be retrieved.

readUser:

The retrieved User from 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.

ReadUsers

This function retrieves the specified Users from Itslearning.

Syntax:

BatchOperationResult warning = ImsEsClient.ReadUsers(ICollection<string> syncKeys, out List<User> readUserList);

Parameters:

syncKeys:

An ICollection with the User SyncKeys to be retrieved.

readUserList:

The list with the retrieved Users.

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.

ReadUsersFromHierarchy

This function retrieves all Users added to the given Hierarchy.

Syntax:

OperationResult warning = ImsEsClient.ReadUsersFromHierarchy(string hierarchySyncId, out List<User> readUserList);

Parameters:

hierarchySyncId:

The Synchonization Id of the Hierarchy.

readUserList:

A list with the retrieved Users.

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.

ReadAllUsers

This function retrieves all Users from Itslearning.

Syntax:

OperationResult warning = ImsEsClient.ReadAllUsers(out List<User> readUserList);

Parameters:

readUserList:

A list with the retrieved Users.

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.