The student needs to apply within six months or 180 days before the official letter from the DLI is received about the successful course completion. The study permit should be valid before the results in case it is expired the student may apply for the visitor record to stay in Canada or leave the country and apply for PGWP.