If in a hurry- for example this happened in the middle of a liveaboard safari- you can use the OPV valve from your spare DSMB. Assuming you have one. Or from an old BCD, many dive clubs have old junk that you can salvage an OPV from.
For a provisory repair, you don't really need to glue- just detach the rubber disc, place the cave cord- if the stopping knot is not huge, then the rubber disc will hold against the spring. However, I think it is better to glue it.
Also not a bad idea to have a spare one- they are really inexpensive and may come handy when needed.