Updating CourseGroups

For changing the properties of an CourseGroup the following functions can be used.

UpdateCourseGroup

This function updates the given CourseGroup in Itlearning, by changing the properties that are given in the CourseGroup object. Changing the SyncId of a CourseGroup has to be done with the ChangeCourseGroupId function.

Syntax:

OperationResult warning = ImsEsClient.UpdateCourseGroup(CourseGroup updatedCourseGroup);

Parameters:

updatedCourseGroup:

The CourseGroup object containing the updated properties.

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 updated CourseGroup is not valid (properties too long) this exception will be thrown.

UpdateCourseGroups

This function updates the given CourseGroups in Itslearning, by changing the properties that are given in the CourseGroup objects.

Syntax:

BatchOperationResult warnings = ImsEsClient.UpdateCourseGroups(ICollection<CourseGroup> updatedCourseGroups);

Parameters:

updatedCourseGroups:

An ICollection with the CourseGroup objects containing the updated properties.

Returns:

A BatchOperationResult 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 updated CourseGroups is not valid (properties too long) this exception will be thrown.

ReplaceCourseGroup

This function replaces the given CourseGroup in Itslearning, by changing the properties that are given in the CourseGroup object, and deleting all the properties that are not given. Changing the SyncId of a CourseGroup has to be done with the ChangeCourseGroupId function.

Syntax:

OperationResult warning = ImsEsClient.ReplaceCourseGroup(CourseGroup updatedCourseGroup);

Parameters:

updatedCourseGroup:

The CourseGroup object containing the updated properties.

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 updated CourseGroup is not valid (required properties not filled in, other properties too long) this exception will be thrown.

ReplaceCourseGroups

This function replaces the given CourseGroups in Itslearning, by changing the properties that are given in the CourseGroup objects, and deleting all the properties that are not given.

Syntax:

BatchOperationResult warnings = ImsEsClient.ReplaceCourseGroups(ICollection<CourseGroup> updatedCourseGroups);

Parameters:

updatedCourseGroups:

An ICollection with the CourseGroup objects containing the updated properties.

Returns:

A BatchOperationResult 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 updated CourseGroups is not valid (required properties not filled in, other properties too long) this exception will be thrown.

ChangeCourseGroupId

This function changes the SyncId of a CourseGroup.

Syntax:

OperationResult warning = ImsEsClient.ChangeCourseGroupId(string oldId, string newId);

Parameters:

oldId:

The current SyncId of the CourseGroup.

newId:

The new SyncId for the CourseGroup.

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.

ChangeCourseGroupIds

This function changes the SyncIds of multiple CourseGroups. The input of this function is an array with KeyPairs, an KeyPair is an custom object with two properties: OldKey and NewKey. This is done to easily group the keys (ids) together.

Syntax:

BatchOperationResult warnings = ImsEsClient.ChangeCourseGroupIds(ICollection<KeyPair> syncIdPairs);

Parameters:

syncIdPairs:

An array with the id pairs that need changing.

Returns:

A BatchOperationResult 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.