Learning institutions in Muslims lands took a variety of shapes and sizes and ranged from Madrasas, khans, Mosques, and academies of diverse sorts. These institutions, as S.P Scott notes ,
"….composed voluminous treatises on surgery and medicine. They bestowed upon the stars the Arabic names which still cover the map of the heavens. Above the lofty station of the muezzin, as he called the devout to prayer, were projected against the sky the implements of science to whose uses religion did not refuse the shelter of her temples,—the gnomon, the astrolabe, the pendulum clock, and the armillary sphere." 
It is already known that institutions such as al-Qayrawan, al-Qarawiyyin and al-Azhar, above all, were amongst the first universities throughout history. Another great body of institutions initiated by the Muslims were the Madrasas, or colleges , of which Ibn Jubayr (d. 614H/1217CE) counted thirty on his visit to Baghdad. Before we take a close look at a Madrasa by the name of al-Mustansiriyah , we will first receive a background of how learning institutions thrived in Muslim lands.
Following the establishment of Seljuk rule, Muslim lands experienced a considerable rise in the number of scholarly institutions, which were largely sponsored by the powerful and wealthy elite. Hence, in Iraq it was the Vizier Nizam al-Mulk (d. 485H/1092CE) that both founded and took responsibility for the spread of Madrasas within his jurisdiction. Al-Mulk founded the Madrasa system towards 459H/1066CE within Baghdad, and was then responsible for the spread of such institutions to the more Eastern parts of the Muslim World. According to Abu Shamah, ‘the schools founded by Nizam al-Mulk are very famous all over the world. No single village lacks one of these schools.'  The state exercised some supervision over teaching, such as that at the Nizamiyya, in which the permission of the Caliph had to be obtained before a teaching post was occupied. 
Following Nizam al-Mulk, it became a practice, or rather a competition between rulers, to build more Madrasas. Nur ad-Din, who ascended to the throne in 541H/1148CE, founded many such institutions in Damascus and the other large cities of his kingdom. In Egypt, it was Salah ad-Din who founded five colleges in Cairo, followed by over twenty six other such Madrasas that were established by both his followers and later Mamluk sultans . Individuals, too, did the same. A Madrasa for women was established in Cairo in 634H/1237CE by the daughter of the Mamluk Sultan Tahir, while Khatun, the daughter of Malik Ashraf constructed a women's Madrasa in Damascus; yet another such Madrasa was founded by Zamurrad, wife of Nasir ad-Din of Aleppo . The spread of the Madrasa was so rapid that at some point in the medieval times, according to Tawtah , there were 73 colleges in Damascus, 41 in Jerusalem, 40 in Baghdad, 14 in Aleppo, 13 in Tripoli, 9 in al-Mawsil and 74 in Cairo, in addition to numerous institutions in other cities. A later author, writing around 1,500, counted about 150 Madrasas in Damascus alone . At some point, the whole of the Muslim land with the exception of Spain and Sicily was just a wide, dense network of colleges, of varying sizes, providing education to tens of thousands, maybe hundreds of thousands of pupils, at a time, when education in Europe was just the privilege of a minority of clergy or the top elite, most certainly not exceeding the few hundreds.
Jerusalem had a great number of famed institutions, described in great detail by the late medieval scholar, Qadi Mudjir ad-Din (d. 918H/1521CE) . Inside al-Aqsa Mosque, just near the women's area, is the Madrasa Farisiya founded by Emir Faris ad-Din al-Baky. There were also the Madrasas Nahriya and Nasiriya. The latter was named after the Jerusalem scholar, Sheikh Nasr, before it became known as the Ghazaliya, after the famed scholar al-Ghazali, as it was a place both of his residence and employment. Outside of al-Aqsa Mosque were the Qataniya, the Fakriya, al-Baladiya and the Tankeziya. The latter, says Ibn Mudjir, is an immense Madrasa, situated on the Khatt road (it is also worth noting that the founder of this Madrasa Emir Tankiz Nasri, vice ruler of Syria, was also responsible for building the aqueduct for the water supply of Jerusalem). A number of the Madrasas within and around al-Aqsa Mosque were built by Turkish women. For example, the Madrasa Othmania was constituted in trust by a woman belonging to one of the greatest families of the country, Isfahan Shah Khatun in the year 920H/1523CE. Earlier, in 751H/1354CE, the Khatuniya Madrasa was constituted in a trust by Oghl Khatun, daughter of Shams ad-Din Mohammed ibn Sayf ad-Din of Baghdad. This Madrasa itself was financed by the local businesses .
Shalaby offers an excellent description of one such illustrious Madrasa: al-Nuriyyah al-Kubra in Damascus  founded by Nur ad-Din, which was described by Ibn Jubair as one of the best colleges in the world . Here follows the summary of Shalaby's description:
"The school is situated in Khatt al-Khawwasin which is now called `al-Khayyarin', about half a mile south west of the Umayyad Mosque. The school has a 'monumental' entrance: an arch with an outer door, and a broad passage leading to the court with a second door halfway along. The lintel of the outer door is adorned with the endowment tablet. The school had its Iwan, which then, was the most important place in the Muslim school. It is the equivalent of the modern lecture room, and there where the halaqat were held. Not far from the Iwan was the Mosque, which took the significant place in a medieval school. The Mosque was also open to other worshippers, and it was thus normal that it was remote from the Iwan. The school also included eight lodges for the students, and the caretaker's lodgings, the latrines, and also a kitchen and dining hall, the food store, and the general store for the building. This Madrasa, in most parts, still stands up to now."
 S. P. Scott: History of the Moorish Empire in Europe; Philadelphia and London: J. B. Lippincott Company, 1904, vol 3; p. 468.
 Ibid, p. 468.
 For a summary on the role and impact of the Madrasa: -George Makdisi: The Rise of Humanism in Classical Islam and the Christian West; Edinburgh University Press, 1990. -B. Dodge: Muslim Education in the Medieval Times; the Middle East Institute; Washington D.C; 1962.
 Ibn Jubayr in J. Pedersen, The Arabic Book, translated by G. French, Princeton-New Jersey: Princeton University Press, 1984, p. 128.
 Quoted in A. Shalaby. History of Muslim education, Beirut: Dar Al Kashaf, 1954, p. 58.
 A. S. Tritton: Muslim Education in the Middle Ages. London: Luzac and Co. Ltd., 1957, p. 91.
 Bayard Dodge: Muslim Education in Medieval times; op cit; p. 22.
 S. M Hossain: A Plea for a Modern Islamic university; op cit; p. 100.
 Bayard Dodge, Muslim Education in Medieval Times; Washington D.C.: The Middle East Institute, 1962, p. 23.
 J. Pedersen: The Arabic Book, p. 128.
 Mudjir Eddin: Al-Euns al-jalil bi Tarikh el-Qods wa'l Khalil, translated into French as Histoire de Jerusalem et Hebron, by H. Sauvaire; Paris; Ernest Leroux; 1875; and 1926; pp. 140 fwd.
 Mudjir Eddin: Al-Euns (Histoire de Jerusalem); p. 145.
 A. Shalaby: History, op cit, pp. 65-67.
 Ibn Jubayr: Al-Rihla, The Travels of Ibn Jubayr, Tr. R.J.C. Broadhurst, Jonathan Cape, 1952 , p. 284).
 A. Shalaby: History, op cit, pp 65-7.