Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:229Bishr b. Hilāl al-Ṣawwāf > Dāwud b. al-Zibriqān > Bakr b. Khunays > ʿAbd al-Raḥman b. Ziyād > ʿAbdullāh b. Yazīd > ʿAbdullāh b. ʿAmr

"The Messenger of Allah came out of one of his apartments one day and entered the mosque, where he saw two circles, one reciting Qur'an and supplicating to Allah, and the other learning and teaching. The Prophet said: 'Both of them are good. These people are reciting the Qur'an and supplicating to Allah, and if He wills He will give them, and if He wills He will withhold from them. And these people are learning and teaching. Verily I have been sent as a teacher.' Then he sat down with them."  

ابن ماجة:٢٢٩حَدَّثَنَا بِشْرُ بْنُ هِلاَلٍ الصَّوَّافُ حَدَّثَنَا دَاوُدُ بْنُ الزِّبْرِقَانِ عَنْ بَكْرِ بْنِ خُنَيْسٍ عَنْ عَبْدِ الرَّحْمَنِ بْنِ زِيَادٍ عَنْ عَبْدِ اللَّهِ بْنِ يَزِيدَ عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو قَالَ

خَرَجَ رَسُولُ اللَّهِ ﷺ ذَاتَ يَوْمٍ مِنْ بَعْضِ حُجَرِهِ فَدَخَلَ الْمَسْجِدَ فَإِذَا هُوَ بِحَلْقَتَيْنِ إِحْدَاهُمَا يَقْرَءُونَ الْقُرْآنَ وَيَدْعُونَ اللَّهَ وَالأُخْرَى يَتَعَلَّمُونَ وَيُعَلِّمُونَ فَقَالَ النَّبِيُّ ﷺ كُلٌّ عَلَى خَيْرٍ هَؤُلاَءِ يَقْرَءُونَ الْقُرْآنَ وَيَدْعُونَ اللَّهَ فَإِنْ شَاءَ أَعْطَاهُمْ وَإِنْ شَاءَ مَنَعَهُمْ وَهَؤُلاَءِ يَتَعَلَّمُونَ وَيُعَلِّمُونَ وَإِنَّمَا بُعِثْتُ مُعَلِّمًا فَجَلَسَ مَعَهُمْ  


See similar narrations below:

Collected by Suyūṭī
suyuti:16818a
Request/Fix translation

  

السيوطي:١٦٨١٨a

"كُلٌّ عَلَى خيرٍ، هَؤُلاءِ يَقْرَأُونَ القرآنَ وَيدعونَ الله، فإِنْ شَاءَ أعْطَاهُمْ، وَإنْ شَاءَ مَنَعَهُمْ، وَهَؤُلاءِ يَتَعَلَّمُون وَيُعَلِّمُون، وَإنَّمَا بُعِثْتُ مُعَلِّمًا".  

[هـ] ابن ماجة عن ابن عمرو