Configuration settings misunderstood or misbehavin'

Configuration settings misunderstood or misbehavin'

by Alan Zaitchik -
Number of replies: 0
The following is with Moodle 1.9.

I guess I misunderstand the settings enrol_db_ignorehiddencourse in the external database configuration page and the settings Course enrollable and Availability in the Add/Edit Course Settings page.

According to the Help for these settings and pages I should be able to set a course to Not Enrollable without impacting enrollment through the external database plugin, right? (The courses are not set to unavailable, and in any event the "ignorehiddencourse" setting is left as "No".)

But my testing reveals something different. When I log in for the first time as a student who is enrolled in the XYZ course (in the external database) I see the XYZ course listed under "My courses" but cannot get into the course! (I get the "course not available" message.) Only if I set the XYZ course to enrollable am I offered the self-enrollment option; if I say yes I can subsequently login in to the course without a problem.

But here is the really bizarre thing:
Until I "self-enroll" in XYZ, when I log in I see ALL the courses (on my test system) -- even those that are set to be Not Enrollable and in which I am not enrolled in the external DB!! (If I try to log in to any of these courses I get the "Course is not availble" message. That makes sense-- they are set to Not Enrollable and I am not enrolled in them in the external db.) But as soon as I do self-enroll in the XYZ course in which I am really enrolled, when I next log in I do not see any of these other courses! They are simply gone from my Moodle home page. I see only XYZ listed under "My Courses".

This raises the obvious questions:
1. Why do I initially see these other courses in which I am not enrolled and which are set to "Not Enrollable"?
2. Why does my "self-enrolling" in the XYZ course in which I really am enrolled (in the external database) make the others suddenly hidden?
3. How do I arrange it that the courses are hidden from anyone who is not enrolled in them (assuming they are not open to Guest access and to "internal enrollment self-enrollment" but are restricted to users who are enrolled in the courses through the external database)?
4. In fact, can I avoid self-enrollment for courses in which I really am enrolled in the external database? Since the system plainly knew that I was enrolled in XYZ as far as the external db plugin was concerned, why did it force me to agree to self enroll in the course?
5. It would be helpful to me to learn what SQL statement would indicate whcih student is enrolled in which course. I haven't figured out how the mdl_user table and the mdl_course table are related to each other, so I would ask anyone replying to this posting to volunteer the relevant sql, if I may.

Thanks,

Alan
Average of ratings: -