your 2 end statments are not indented . one of them close the if pr.title and the other closes the @track loop the if lecturer _ signed _ in is not closed . it is closed below