I have managed to configured for the LDAP authentication and it is working properly. And then when it comes to LDAP enrollment, I have encountered a problem.
Currently, I am testing with 2 courses, defined in LDAP. (Both of them do not exist on moodle at the very beginning.) I have managed to configured for the LDAP enrollment, and the 2 courses were created automatically after executing the synchronizing cron script. And the teaching role and student role were also synchronized successfully for course2.
Here is the schema for course2:

But then, when it comes to course1, an error occurred:
== Synching course 'course1' for role 'student'
Could not find user '{$a}', skipping
It should be because I was specifying the DN of a LDAP group (cn=026, ou=ou, ou=groups, dc=test) for uniqueMember, instead of giving the DN of individual users (e.g. as in course2: uid=7001, ou=users, dc=test), and it seemed like it could not recognize the difference and fail to search cn=026 for the users.
Schema for course1:

Schema for cn=026 group:

So, could anyone please tell me what could be the problems and how I should set up properly for this?
Thank you very much. I hope I have made myself clear enough.