This part will need to have the correct (6,8,11,13) for midterm grades and then (5,7,10,12) for quarter grades and = 14 for the yearly average. Then below will need to be set for the correct term you are posting for.
and gt.taskid in (6,8,11,13) -- M1,M2,M3,M4 --(5,7,10,12)-Q1,Q2,Q3,Q4 -- = 14 --Yearly Average
For the term seq just set it to the term you are running for:
and t.seq = 3
Make sure the window is open and set it to run in the future.
Here are the settings for Q2