Yeah, Marevix just gave the best advice if you're going to risk it and bring weed and/or paraphernalia to school. They sometimes test cars, and run the dogs around the lockers, but during these searching lockdowns, they don't go into the class room and have the dogs sniff you, so that's your best way to avoid being busted by a random search.

Also, an advantage of keeping it on you, is you can get rid of it if you need to get rid of it fast. For instance, eating it, throwing it away, or hiding it are all options that you can complete in a very short time frame if you need to.