Hi @JennLong ,
If the student doesn't refresh their page, they will still be able to access the content. However, if they go to submit it, the submission will fail.
However, please take note that once students start submitting assignments, you will not be able to unpublish the assignment. However, as long as the assignment is under an unpublished module, the students won't be able to see the details of the assignment (such as the directions), if they go to access the assignment through their to-do list oe grades page (teachers cannot disable the grades page), however they can still access some information such as the title and point values, as well as view any of their existing submissions.