Hello @nhan_ti_7
Thank you for contacting the Canvas Community. We're sorry to hear you've been experiencing issues with access codes. If you had an access code on a quiz and it was required, yes the students need to enter that code before being able to take the quiz. However, we'd need to look at specifics of the assignment. When you imported it over, did you confirm the access code was still on it? There's nothing a student can do to "overwrite" and get into a quiz with a code if they don't have it. What edits were made to the quiz before/after the students started taking it? You will likely want to speak with Canvas Support if you want to get to the bottom of what happened.
Because of the complexity of the issue, and the concerns for privacy, it would be best if you contacted Canvas Support directly to pinpoint the source of the issue and provide a resolution:
https://community.canvaslms.com/t5/Canvas-Basics-Guide/How-do-I-contact-Canvas-Support/ta-p/389767