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

Update the Attendance for a Client in a Training Class. 

Use this function to set or change the attendance recorded for a client at a class. Updating the attendance includes setting the name of the attendance type, start and finish dates and times, and notes. If an attendance record already exists for the given client and class, then that attendance record is updated by this function. If no attendance record exists for the given client and class, then an attendance record is created by this function. 

A class ID (iInst_ID) is passed as a parameter. iInst_ID must specify a valid class, otherwise, the Attendance is not updated. 

A Client Code (sClie_Code) is passed as a parameter. sClie_Code must specify a valid client who is in the class (iInst_ID), otherwise, the Attendance is not updated. 

An Attendance Type Name (sAtty_Name) is passed as a parameter. sAtty_Name must specify a valid Attendance Type Name, otherwise, the Attendance is not updated. See the function, GetAttendanceTypes, for a listing of valid Attendance Type Names. 

The Attendance's Start and End Date/Times (xsdStart and xsdFinish) are passed as parameters. These are DateTime objects where the time component is significant. They must be populated with sensible dates (Start > Finish is not considered sensible), otherwise, the Attendance is not updated. 

The description (notes) is passed as a parameter. If updating an existing attendance, and the description parameter is null or empty, any existing description for the attendance will be kept and will not be cleared. 

Note that, depending on the configuration in VETtrak, it is possible that recording an attendance may automatically start one or more enrolled units or tasks in the client's occurrence enrolment. For this function to work, the automatic attendance result options must have been configured in VETtrak using Global Preferences. 

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

Requires a valid registration key entry for the Short Courses feature. 

This function has security level "Protected", and can only be accessed by users that have explicitly been granted permission to the API.

C#
[WebMethod(Description = "Adds or updates the attendance details for a client in a class (instance)")]
public TAuthenticate UpdateAttendanceForClientClass(string sToken, string sClie_Code, int iInst_ID, DateTime xsdStart, DateTime xsdFinish, string sAtty_Name, string description);
Parameters 
Description 
string sToken 
String containing a token. 
string sClie_Code 
String containing the Client code of the Student. 
int iInst_ID 
Integer ID of the training Class. 
DateTime xsdStart 
DateTime Start Date of the attendance. 
DateTime xsdFinish 
DateTime Finish Date of the attendance. 
string sAtty_Name 
String Name of the attendance type. 
string description 
Notes to record against the attendance. 

TAuthAtte : an Authenticated Attendance.

Copyright (c) VETtrak 2022. All rights reserved.