I took my classes seriously and worked hard.
I took my classes seriously when I attended them.