Fix bug -refs #6902

Add a parameter to get_number_of_attendance() to choose all, active o inactive attendance.
Change in get_attendance_data() to show all attendance if the user can edit it and isn't in student view mode.