Jobseekers in higher education will be forced to disclose allegations or investigations of sexual harm and universities could be fined if they don’t meet safety standards under a code to prevent gender-based violence on campus.