visa change from L to residence permit
I am a student in Xi'an. My wife came with me and after some time she got admission in Xi'an Jiaotong University. She got all the necessary documents from university and went to PSB to change it into residence permit. They did all the process but when they saw the visa type as "L" they refused to put residence permit and told her to go to her own country and get X visa and come back with it. The problem is the return ticket is very expensive and I cannot afford it. I already paid the university their fee. I cannot go to hong kong as i need a visa for hong kong which will take 4-6 weeks. I was thinking of thailand as the consulate is within xi'an.
I wanted to know is their a simple solution of this problem without going abroad or not?What should I do, I have heard that this problem was solvable in Beijing. But my university is in Xi'an, so I think that is not feasible too. Any good help will be highly appreciated.