David, my daughter recently bought a 2009 A4 Avant 2.0 tdi se.
On hers all doors would lock with the fob but when unlocking the two front doors remained locked and had to be opened from the inside. Once opened the two front doors could be opened and closed normally but once locked with the fob they would not reopen apart from using the inside handle.
I subsequently found that this is an incredibly common issue with Audi and can affect all doors.
It is possible to repair the door lock but I bought two brand new replacements ( probably Chinese ) from Ebay for £54 and installed them.
They were a direct replacement and worked first time.
I will post a youtube video that I found useful. One last point, in order to remove the door lock assembly you need the correct 12 spline tool. A Torx will chew the nut up as it is the wrong tool.
Regards Darryl