MDL-59250 mod_workshop: Move assessment edition code to API function