We couldn't find any regulation expressly forbidding to switch to a residence permit for the reason of studying while you are directly in China, if you have a residence permit in China for other reasons, including the so-called T-visa - a temporary visa, also called a humanitarian visa, therefore the decision will be made by the Exit-Entry Department of your city (but if you know such a document, please provide its details).
There are two types of study visas: X1 and X2.
The X1 visa is issued to those who study in China for a long period (more than 180 days), and the X2 visa is issued to those who study in China for a short period (no more than 180 days).
DOCUMENTS FOR STUDY VISA REGISTRATION
Foreigner's passports must be valid for more than 6 months, and you must provide the original passport with blank visa pages and a photocopy of the passport.
2. Visa application and photos
International students must provide a copy of the "People's Republic of China Visa Application Form" and a recent full-face photo pasted on the application form.
3. Proof of legal stay or residence (applicable to those who do not apply for a visa in the country of citizenship)
If a foreigner does not apply for a visa in his country of citizenship, he must provide a valid certificate of his legal stay, residence, work and study in China, or an original and a photocopy of a valid visa.
4. Various materials required to apply for an X1 and X2 visa.
FOR X1 VISA:
(1) Original and photocopy of the notice of admission issued by the study department of admission in China;
(2) Original and copy of China Study Visa Application (JW201 or JW202).
[Note] After entering China, the holder must apply for a residence permit at the entry-exit administrative agency of the public security authority of the local people's government at or above the county level of the place of residence within 30 days.
FOR X2 VISA:
original and photocopy of the notice of admission issued by the study department of admission in China