A government guaranteed student loan is only discharged when you file bankruptcy in Canada if, when you file bankruptcy, you have “ceased to be a student” for at least seven years prior to filing. So, for example, if you graduated in May, 2005, you have to wait until June, 2012 before you can file bankruptcy and expect for your student loans to be automatically discharged.
There is a special rule that says that, in cases of “hardship”, the bankrupt may apply to bankruptcy court after five years to have their student loan reduced or discharged.
In addition, even if a student loan is more than seven years old, it is possible for the government to oppose the former student’s discharge and request that the bankrupt repay some or all of their student loan.
You read that sentence correctly: even if your student loan was more than seven years old when you went bankrupt, the government could object, and you could still end up being required to pay some or all of it back.