This will only work for this year's class's, to view last year's tasks you can only view by pupil.

Step 1: Click on tasks

Step 2: Untick your name under the 'Ownership' filter section

Step 3: Under the class filter, find the name of the class and tick the box next to it.