Is it permitted to study and write homework for secular subjects in school during chol hamoed? (If i will be way behind and be in trouble due to an upcoming test right after chag). If so, can this also be done in the succah?
It is permitted to study secular subjects during chol hamo’ed. If you need to write during this time, and refraining from doing so will cause you a loss (you will have trouble passing your test), it is also permitted to write (it is considered a davar ha-aved; in addition, this is not the type of writing that the formal prohibition applies to, and although it is customary to refrain from writing, in cases of need and loss one can be lenient).
This can be done in the Sukkah.