Could you please explain to me why the grammatical form in the first sentence is correct while the uasage of passive voice in the second sentence is not permitted.
I was given money.
The pupils were explained everything to by the teacher.
Could you please explain to me why the grammatical form in the first sentence is correct while the uasage of passive voice in the second sentence is not permitted.
I was given money.
The pupils were explained everything to by the teacher.
I really wonder on what your assessment that "the usage of passive voice in the second sentence is not permitted" is based. There is really no reason why it would not be permitted.
However, the sentence is ungrammatical for another reason:
*The pupils were explained everything to by the teacher.
If we leave that to out of there, there is nothing wrong with the sentence:
The pupils were explained everything by the teacher.
Note: as Peter Shor mentions in his comment to the question, there are plenty of people who will not agree that this sentence is grammatical.
There seem to be various levels of acceptance of the ditransitive use of explain. Personally, I fully understand the meaning of "A explained C to B" => "B was explained C by A", I see no reason to label it ungrammatical. Whether it is idiomatic is another thing, that largely depends on your audience.
Now, what was that to doing there? Actually, if you would have formed your first sentence in a similar way, it would have been:
*I was given to money.
You can choose what the subject of your sentence is — if the sentence in the active voice is You give me the money, you can make me or the money the subject. If you make me the subject, you use the nominative of me, which is I. To is used only with the me form (dative), not with the I form (nominative):
The money was given to me. (the money is the subject)
I was given the money. (I is the subject)
The same goes for your students:
The teacher explained everything to the students. (active)
Everything was explained to the pupils by the teacher. (passive, everything is the subject)
The pupils were explained everything by the teacher. (passive, the pupils is the subject)
As Peter mentions in his answer, whether the passive form where the indirect object become the subject is considered grammatical, depends on whether the indirect object can be used without a preposition. Although I have seen several people mention that this is an exceptional, or rare, occurrence in English, I beg to differ:
sing me a song
read me a story
show me a trick
teach me English
give me a break
lend me some money
send me a letter
These are just some quick examples I off the top of my head.
It does seem to be generally accepted in at least English and American English that in the case of explain, the preposition can not be dropped. However, in Indian English speakers seem to agree that it can. Also in (some?) Spanish-influenced English dialects, the preposition seems to be dropped habitually.
So if you want to make sure nobody criticizes your English, do not use sentences like:
Please explain me what is happening!
Can someone explain us how we got here?
On the other hand, as long as people get away with meaning the opposite of what the mean, I personally won't call those sentences wrong — they are clear in meaning and convey the intended message. If some consider it ungrammatical, I couldn't care less.
Generally, if a verb is transitive and the indirect object of this verb requires a preposition before it (as opposed to being an indirect object which only requires a preposition if the direct object is before it), you can't use the indirect object as a subject in passive voice.
So you can put this sentence into the passive:
I told a story to the pupils.
I told the pupils a story.
The pupils were told a story.
But here the last two sentences here are ungrammatical:
I mentioned the contest to the pupils.
* I mentioned the pupils the contest.
* The pupils were mentioned the contest to by me.
For explained, it seems to be a grey area grammatically, because apparently some people think "he explained me the situation" is grammatical, and some don't.
This rule doesn't apply to intransitive verbs and to some phrasal verbs:
He drove on the roads.
The roads were driven on.We will not put up with bad grammar.
Bad grammar will not be put up with.
A more idiomatic way to use the passive voice would be "The pupils had everything explained [to them] by their teacher". (The text in square brackets is optional because it is implied by the reference to the teacher.)
Less idiomatic, but still acceptable, is "The pupils were explained everything by their teacher". This is almost the same as your version, the main difference being that the preposition 'to' is discarded; this is not required when you have an indirect object (in this case, "The pupils").
Explain is a tricky verb to do this with, because different people think it works differently.
Let's try it with send. This is a great example of a ditransitive verb.
I sent John the letter.
When you switch direct and indirect object, you have to add the preposition to:
I sent the letter to John.
Now, you can put it into passive form in two different ways with two different subjects:
The letter was sent to John (by me).
John was sent the letter (by me).
You cannot say
*John was sent the letter to, (asterisks mean ungrammatical)
even though I sent the letter to John is fine.
Now, let's see how the grammar of a singly transitive verb, reveal, works:
You can say:
I revealed the secret to John,
but you can't say
*I revealed John the secret.
You can put it into passive form with the secret as the subject.
The secret was revealed to John.
but not with John as the subject:
*John was revealed the secret to.
To make John the subject, you have to use a different passive construction:
John had the secret revealed to him.
You can use this construction with ditransitive verbs, as well, but there's a difference. when you say John had the letter sent to him, it sounds like John directed me to send the letter to him. This implication isn't present in this construction with a monotransitive verb, like reveal.
Now, in some dialects explain can be ditransitive, in which case you can say
The teacher explained the pupils everything.
Speakers of these dialects make the sentence passive the standard way for ditransitive verbs:
The pupils were explained everything by the teacher.
Some dialects can't treat explain as ditransitive, in which case they have to say:
The teacher explained everything to the pupils.
To make it passive in these dialects, you have to say
The pupils had everything explained to them by the teacher.
TL:DR It is ungrammatical to say:
*The pupils were explained everything to by the teacher.
Depending on how you think the grammar of explain works, you must use one of:
The pupils were explained everything by the teacher.
The pupils had everything explained to them by the teacher.