It shows a student has no courses when trying to enter attendance!!
This is probably because:
If you have assigned a teacher to a particular class and course and no students enrolled in the course this can occur.
For what teacher did you get this error???