Julie- You're kidding right??
If they do a comprehensive drug screen at delivery, which they most likely will (not to be rude but doctors usually have a hunch when someone is doing crack) it will show up on the test. They can do a test that shows pretty much all drug use during the entire pregnancy at delivery by testing the amniotic fluid and/or meconium - no way to fool this test, and no way for it to "time out" (i.e. let enough time pass that it won't show positive).
Your student immediately needs to tell her doctor. babies born to mothers addicted to crack need special care and monitoring, as they are at high risk for delivery and after-delivery complications from the crack. the only thing your student can do right now is tell her doctor everything. if they find the crack in the baby's system, her baby will likely be taken immediately until she can meet certain criteria for CPS to get her child back. if she confesses, they will monitor the baby and follow up with social services and chances are she will not have the baby taken...but it is vital, ABSOLUTELY VITAL, SO important that she tell her doctor so they can watch the baby...so that the baby doesn't die or have seizures as a result of the crack usage. "crack babies" are easily overstimulated after birth and require being handled differently than "normal" newborns...so the student will need special advice on how to handle this.
all in all..she must tell her doctor. must. it does not matter how long the crack stays in the baby's system at this point, any damage is done - the only thing she can do is tell her doctor to keep the baby as safe as possible. my MIL was an OB nurse and delivered a baby to a crack-addicted mother, but because the doctor knew she did not have her baby taken away.