checking for module in use

Is there a way to check which module (model, drafting, ect) the user currently is in?

The code at the link below shows how to get the currently active module.

http://nxjournaling.com/comment/2539#comment-2539