Praise be to
Allaah.
It appears, in sha’ Allaah, that this does not undermine
sincerity of intention, because it is natural for a person to feel happy
about something good and be upset by something bad. Allaah has explained
that things which do not agree with man are called bad things (sayi’ah),
so that should upset him, and that the good things (hasanah) should
make him feel happy.
This does not affect your sincerity of intention if,
as you say, your intention is good. But if your concern is only your
grades or certificate, then this is another matter. Look at ‘Abd-Allaah
ibn ‘Umar ibn al-Khattaab (may Allaah be pleased with him), when the
Prophet
(peace and blessings of Allaah be upon him) posed a question to his
companions and said, “Among the trees there is one which resembles the
believer.” The Sahaabah (may Allaah be pleased with them) started guessing
the names of all kind of trees, guessing the names of desert trees.
Ibn ‘Umar said: “I thought that it was the date-palm, but I was young
and I did not want to speak.” (narrated by al-Bukhaari, Kitaab al-‘Ilm).
‘Umar (may
Allaah be pleased with him) said to his son, “I wish that you had said
it.” This indicates that there is nothing wrong with a person feeling
happy when he does well and the like.
From Fataawa al- Shaykh Muhammad ibn Saalih al-‘Uthaymeen, Kitaab al-‘Ilm, p. 133