With short-term employments (less than 3 months), it is possible to only "register" the employment with the authorities. This is called a "Meldeverfahren" and no physical permit is issued.
However, as far as I know, this only applies to EU citizens, with a small number of exceptions for non-EU citizens, specifically if the company sending you here is based in the EU. Assuming you are studying in Iran, that is clearly not the case. That being said, it may be that also for non-EU citizens on short-term employment, no actual permit is issued.
Despite the above, for EVERY non-EU citizen, the employer needs to go through the usual process of e.g. providing proof that no Swiss/EU/EFTA citizen could do this job, submitting a justification as to why you're the ideal candidate and whatnot.
I used to hire many non-EU citizens on short-term employments including a variety of internships and many of them didn't receive an actual permit. But the process was still the same as with every permanent non-EU hire - no exceptions.
Obviously, we don't know if they did all this after all, but it doesn't sound like it... And if they didn't, it'd be wise to back out anyway as you were then working here illegally - and that could get you into massive trouble, even though it was clearly not your fault.
There is zero way around the steps outlines above in case your employment shall be extended. Moreover, as Medea says, if the university doesn't agree to extending your employment, for whatever reason, you can't extend it yourself anyway, i.e. for non-EU citizens, it is the company who needs to apply for a permit/extension, based on an employment contract - if they don't want to do it, there's nothing you can do yourself.
Sorry to say that, but I see absolutely no chance for extension here.
That's only partly correct. Yes they need to have a letter confirming the internship is a compulsory part of the studies, but even with this, the employer has to prove they didn't find a Swiss/EU/EFTA citizen to do the job. Granted, in most of these cases, the migration office isn't overly fussy and a brief justification rather than an extensive list of applicants will usually suffice.