It seems to me like the sentence you �ve provided is passive. This means that, in the right context (think of a devil on someone �s shoulder telling them to lie), it �s actually fine.
Expressions with do or did, such as what I �ve done or all I did can follow either pattern.
- I hate shopping so what I �ve done is (to) order a new computer over the Internet.
- All I did was (to) suggest that she should lend him no more money. I didn �t insist on it.
A few other ideas that can relate to this sentence:
If it were active then you would use - �All you have to do is tell it �
The �it � needs to refer to another part of the dialogue or writing for it to make sense.
It may also, again depending on context, need someone/thing to tell it �to �:
�All you have to do is (to) tell it to your teacher �
but
�All you have to do is (to) tell your teacher � is far more natural sounding... but it all depends on the context of the dialogue/written piece as to which one would be the best to use.
Where is the English teacher from? Different dialects of English do have different rules in practice of grammar ( �descriptive grammar �) as distinct from the �prescriptive grammar � of ESL/EFL instruction. I recommend the teacher who put that sentence & reason to you should stop & think about the language a little more (& perhaps provide a little more contextual information) before declaring something as wrong.
Regards,
AB