A reworked plan to turn a former Leicester hosiery factory into a six-storey block of student flats has been decided.