Menu -> Settings -> Gradebook (Options) -> Link student personal details across classes
The link between different classes only works when the student's name matches , if the name does not match, it is done with the email and if neither of the two matches, it is linked through the ID.
If any of these mentioned fields match, the data will be shared.
Double tap on the name of the student in a class, select Summary and all the classes related to the student will appear at the bottom.
In the bottom's list of classes, will appear classes located in the same list level or in the same folder.