What no one is saying to you is that 當 [DANG] is used for the meaning "to act as something [like President, secretary, a student, a dog trainer, etc.] instead of 是 [Shi]。 是 is only used when you're saying X is Y (and both have to be specific: think "this one is that one".)
So you "dang" when your sentence involves your actually BEING that thing (doing things in that capacity). When you DANG laoshi, you mean the whole thing: to grade papers, give tests, etc. When you Shi laoshi, you are simply identifying with that label. When you Shi laoshi, you are only labeling yourself.
我 是 學生。 當 學生 很 好玩。 "I am a student. Being a student is fun."
You can sort of see this in the English in the difference between "is" and "being". "He is a student" uses Shi; "he likes being a student" uses DANG.