The correct way to do this would be to override the renderer or template used to display that page in your theme, so that it uses your method to output the page rather than the core one.
Unfortunately, group/assign.php doesn't currently use a renderer or template, it just echoes some HTML, which makes overriding it in this way impossible. If you were feeling particularly civic-minded you could raise a tracker issue and submit a patch that moves the HTML to a template - then you'd be able to override it in your theme (you could even offer some UX improvements along the way!).