I can infer that your student must have been Indian. As an Indian she would be aware of the onion garlic thing even if she isn't Hindu herself.
The Quora answer which Miriam referred to is only partially correct. First, the root vegetable idea isn't Buddhist but that of another offshoot sect of Hinduism called Jains. There are two kinds of Jains and only one of those go by that rule. Buddhists eat pretty much everything, there are no explicit dietary restrictions in Buddhism. You only need to look at the cuisine of Buddhist majority countries such as Thailand, Laos and Myanmar as well as China at one time to realize that.
Technically there are no dietary restrictions in Hinduism either in any of the recognized scriptures. There is nothing similar to the kashrut laws of the Jews or the halal rules of Islam. But even so there are certain social customs which appear to have taken on religious overtones in time.
The actual idea is a bit more complex, which I will try to reduce to the bare essence here. There are three lifestyles: the spiritual, the royal and the consumerist one. The first is about simple living, the second about wealth and power, and the third about indulgence. Under the spiritual way, things like onion and garlic are considered to cause body heat, desire and restlessness. So are things like fish, meat and eggs, but it does not include dairy and honey like present day vegans do.
It's for that reason onion and garlic are not used during spiritual pursuit or payer rituals. This has a weird outcome: you'll find plenty of otherwise non vegetarian people who will abstain from all those things including onion and garlic for a day, several days or even a full month when those are considered auspicious and ideal for prayer and worship.