No, you cannot take STCW courses online. The training must be completed in-person at an approved training center.