We are experiencing the same problems, please vote for this tracker:
Restoring of grades is only possible when you add users manually to a course. We need user grades restored when users are added by metacourse, sitegroup/cohort or any other way!
Go to Site Admin
check the box next to:
This does not work with self enrollment at times in moodle 2.6 , can anyone verify this I could not find a tracker issue for that
I am using Moodle 3 and the student was auto matriculated in the first access. She left by error and then I manually added her after using the box that Paula said.