show join link for admin and instructor adding for testing purpose

That is 'hackish'. Use cleaner approaches in coding. This kind of tricks creates confusion in the reader's mind. At least you should document what's going on.