there is no such as temporary residence permit, if you are willing to learn the language and the institute in Germany is sending you the formal letter of invitation,, which carries the number of days the course is intended, you are allowed to stay only till that period, for EU Citizens / residents it is not a question, but for outsiders it is allowed to stay only till that period.