Upvote:2
I assume you must take both passports with you. If you have no obligation to do the check in online, do it at the airport and explain your situation showing both passports
Upvote:3
I am assuming, since we are talking Ryanair, that you have two separate tickets. Unless the policy has changed, they do not offer connecting flights on a single ticket, and they do not guarantee the connection. What this means, for your question, is that the first Ryanair agent will not care about your visa into Morocco, only whether you can be admitted into Germany.
Obviously you will need to take both passports, so that later you can get into Morocco.