Hi i am RCIC and will answer this for you. if you applied for Study permit extension and now you study permit has expired when you applied for PGWP- then the answer is " you can not work until you get the PGWP"
2nd scenrio - only thing would change this is once you get your SP then you apply...