Another fun fact - one of the points to certify a school as "gymnasium" is attendance. My school was certifying for that status during my last year. One of the vice-principals was nicknamed "12th graders attendance" since her office door was opening directly to cafeteria/lounge area and her #1 job was to make sure we attend as many classes as possible :)
No amount of absence would invalidate the course. But you if miss a test/quiz/project/etc, you automatically get 1 (out of 10). If you bring in a good excuse - of course you can re-do it at later date. If annual average drops bellow 3.5, school jury decides wether you can transfer to next year or not. In final year, < 3.5 would prevent you from taking that specific exam (which may give bonus points at your chosen university). If that exam is mandatory, then you have to repeat the course next year or drop out...