Now, I've come across a fascinating legend from the other end of Europe that says essentially the same thing. First, let's take a look at the legend as given in a standard book of Icelandic folklore. Then, I'll have a few thoughts about the relationships of Iceland's "Black School" to Transylvania's Scholomance.
The Black School
It happened once that three Icelanders went to this school, by the name of Sæmundur the Learned, Kálfur Arnason, and Hálfdán Eldjárnsson; and as they all arrived at the same time, they were all supposed to leave at the same time. Sæmundur declared himself willing to be the last of them, at which the others were much lightened in mind. So he threw over himself a large mantle, leaving the sleeves loose and the fastenings free.
A staircase led from the school to the upper world, and when Sæmundur was about to mount this the devil grasped at him and said, "You are mine!"
But Sæmundur slipped out of this mantle and made off with all speed, leaving the devil the empty cloak. However, just as he left the school the heavy iron door was slammed suddenly to, and wounded Sæmundur on the heels. Then he said, "That was pretty close upon my heels," which words have since passed into a proverb. The Sæmundur contrived to escape from the Black School, with his companions, scot-free.
Some people relate, that, when Sæmundur came into the doorway, the sun shone upon him and threw his shadow onto the opposite wall. And as the devil stretched out his hand to grapple with him, Sæmundur said, "I am not the last. Do you not see who follows me?"
So the devil seized the shadow, mistaking it for a man, and Sæmundur escaped with a blow on his heels from the iron door.
But from that hour he was always shadowless, for whatever the devil took, he never gave back again.
Saemundur was one of Iceland's most famous scholars, and after his return from the Continent, where he studied, he was apparently regarded as a Faust-like figure in league with Satan. A similar, though less developed, version of the story (obviously without Saemundur's name) was also told in Scotland under the name of the "Black Airt," and legends of the Black School were also current in Denmark and Friesland.
Some Scandinavian legends place the Black School near Wittenberg, suggesting a Germanic origin for the tale. Since the Germans had colonized much of Transylvania in the Middle Ages (prior to the Turkish conquest), it would thus appear that the story of the Scholomance, too irresistable to remain in Romania, moved westward in the Middle Ages, eventually making it all the way to Iceland, where, as Victorian scholars noted, the story of outwitting the Devil displaced an earlier legend of Saemundur's outwitting of an astrologer.
Other versions of the story suggest that the Black School was located in Paris. Some scholars feel that the Icelandic name, svarta skola or Swartaskoli ("Black School") could have referred to the black robes worn by monks who taught at medieval universities, perhaps also punning on the famed French university, the Sorbonne, founded in 1257. At any rate, the conjecture is that religious, rural peasantry would have viewed academic learning as demonic, especially any secret studies that involved alchemy or the use of cadavers for medical training.
In some respects, it's an obvious jump from the association of the Devil with forbidden knowledge to the idea of a secret school. However, the fact that we have a Classical antecedent for the Devil's school in the work of Herodotus on Dacia (as discussed in my article), along with anthropological evidence that Dacian priests were identified with the devil's scholars after the advent of Christianity, seems to point to an origin in ancient Dacia for a fascinating legend.