This sentence is gonna be awkward no matter what because we don't use the passive tense like this. But maybe it would be better to say "That course is joined by twelve students". Because students don't follow a course, they join it.
It's debatable, but I think "attended" should be accepted. For me, Ikut-ing a class carries the meaning of "coming along to" so basically "showing up" and attended is a nice natural word that shares those meanings.