MDL-46907 gradereport_history: Refactor user_button class to remove js methods

Part of MDL-46191