Hello,
The coil and plugs could be the issue if the spark plugs are not torqued correctly, the wrong plug for that engine, or have incorrect gaps set.
If the battery is not holding a charge, however, that could be caused by a poor connection at the battery (maybe it was disconnected before removing the coils), a bad battery or alternator, bad and a number of other charging system issues.
The check engine light is your friend here, and scanning for trouble codes will help you understand what i going on.
Feel free to post them here for analysis.
RepairPal Certified shops can diagnose and repair your 2011 BMW 335i xDrive. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.