As a teacher of modern Romance Languages, using the accusative here was a big surprise! However, it's a real thing, and, it turns out, many other verbs use the double accusative. See item 396 at this site for more. (Note that in modern Romance Languages the person whom one is teaching would be an indirect object.) http://dcc.dickinson.edu/grammar/latin/double-accusatives
Thanks for the clarification! I was imagining an invisible double direct object (i.e. the subject one would be teaching TO the boys). In other words, in modern Romance languages, the boys would not be a direct object, but an indirect object whether or not the direct object was included. However, I do note that the verb/meaning of docere is not kept in the modern languages, which use other verbs to mean to teach, in which case the boys would always be indirect objects.