Some can and some can't.
But even the Canadian government is telling people not to travel.
There are very few countries where travel. wasn't possible International students protested and demanded the right to come to Canada even if they were studying online. Canada's directions were that nobody should do any non-essential travel. It would be up to you to determine whether you studied online from your home country or whether you came to Canada knowing that you are required to be in Canada for half of your studies. If you can prove there was a complete ban on travel outside your home country for the past year then you would likely be given an exception but I'm not sure whether that situation exists. If so it is likely a remote island.