Attendance in API (example to get all timetable and check)

Question:

Howto:
1. Get all timetable periods for the specified date period
2. Check if there is a record for the user at the current

Answer:

//Get all timetable periods for the specified date period
 var periods = course.Attendance.GetPeriods(DateTime.Now);
 var login = "example\\l1";
 bool marked = false;
 foreach (var period in periods)
 {
     //Check if there is a record for the user at the current date
     if(course.Attendance.ExistRecord(period.ID, login, DateTime.Now))
     {
          marked = true;
          break;
     }
 }
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.