ASP.NET VETtrak API web services
ContentsIndexHome
PreviousUpNext
VT_API.GetEnrolledUnitsForEnrolledTask Method

Retrieves a list of enrolled units that are mapped to an enrolled task.

C#
[WebMethod(Description = "Retrieves a list of enrolled units linked to an enrolled task")]
public TAuthEnunList GetEnrolledUnitsForEnrolledTask(string token, int enrolmentId, string taskCode);
Parameters 
Description 
string token 
String containing a token. 
int enrolmentId 
Integer ID of the enrolment to retrieve enrolled units for 
string taskCode 
String task code of the task to retrieve enrolled units for 

TAuthEnunList containing the list of enrolled units mapped to the enrolled task

This function retrieves a list of enrolled units that are mapped to a single enrolled task. Enrolled units include results. 

In VETtrak, a user can set up many:many mappings between enrolled units and enrolled tasks within one enrolment. This function retrieves those mappings from the point of view of an enrolled task. 

The enrolmentId and taskCode parameters identify a single enrolled task to retrieve enrolled units for. 

It is possible to specify an occurrence ID as the enrolmentId to get mappings linked to an occurrence itself, but the result-related fields of the enrolled units will be empty. 

Each enrolled unit is represented by a TEnun object. The list of enrolled units is in the returned TAuthEnunList object. 

A token is passed for authentication. If the authentication fails, or other errors occur, no enrolled tasks are returned. The result of the authentication is represented by a TAuthenticate object. 

Requires a valid registration key entry for the Tasks feature. 

This function has security level "Restricted". Users that have explicitly been granted permission to the API can use it with any parameters, otherwise, the logged-in client can only access their own data.

Copyright (c) VETtrak 2022. All rights reserved.