"Es ist immer schön, wenn eine passende Antwort zur Frage kommt."
My German has improved since I left this comment. I also received a Cassel's German-English/English-German dictionary in the mail today. The entry for "wenn": 1. (time) when, whenever; as long as, as soon as; 2. (condition) if, in case, provided (that)
I stand corrected regarding the use of "wenn". In the context of the Duolingo sentence, when is the best English translation.
"When" can also be used in the sense of "if". Compare: "When I came home, I found Mum cooking in the kitchen" ("when" definitely means time) and "When I work hard, I always get good results" ("when" is used with a condition and can be replaced with "if").
"Wenn" is the word for "if" or "when" in that sense. However, if you need "when" in the sense of time, use "wann" in German.