When creating themes it is sometimes necessary to know whether a block contains editing controls. Unfortunately there is no way for a theme to tell (apart from literally the existence of the 'controls' div, which is fine, but you might need to make changes at the level above).
A potential mistake (which I made) is to assume that the .editing class on BODY provides this information but it does not. This class is only reliable on course view pages. Everywhere else it may or may not coincide with editing status of blocks.
I have attached a trivial patch (affects one line of code, uses existing logic) which adds the 'block_with_controls' class to existing classes if a block contains editing controls. Effect on generated html is as follows:
1) If block does not have editing controls - no change
2) If block does have editing controls -
<div id="inst21" class="block_html sideblock">
<div id="inst21" class="block_html block_with_controls sideblock">