I understand that Moshe ascended Har Sinai 3 times.
The 1st time was on 6th of Sivan
The 2nd time seems to have occurred after the sin of the Golden Calf, starting on 18 Tamuz and he spent 40 days praying to God for forgiveness.
The 3rd time began on Rosh Hodesh Elul and ended on Yom Kipur. This is when Moshe brought to God his own fashioned set of tablets, and God wrote the Ten Commandments on it. ( I will b"n followup with a separate question regarding what "version" was written on it.)
In asking my rabbi this question, he explained that Midrashim discuss a controversy as to what happened the 1st time and the 3rd time. One Midrash explains that only the 10 Commandments were received the 1st time, and the 3rd time he was taught Torah, Mishnah, Talmud, halacha and Midrash. Another opinion says that he was taught everything the first time.
My question - if on the 1st time, he was given only the 10 Commandments, why the 40 days to explain just that? It seems like a long time for that. If, he was taught everything the first time, then what was happening the 3rd time?