Added attendance button functionality