NSW teacher shortages affecting classes