Applying for permanent residency "INLAND" it is very clear that you may not attend a school in Canada or study in Canada. Are you allowed to study online through a school in your home country?
Would you be allowed to do a two years masters online, while in Canada as a visitor, the university is...