External Database issues

External Database issues

by J Rob -
Number of replies: 4
Hi all, Here's what I'm dealing with. I'm trying to get enrolment functioning based on an external database (MySQL), but regardless of how I set things up and restrict the courses, all the users end up having access to courses they're not in. Environment: - PHP 5.2.0 - MySQL 4.1.22 - Moodle 1.8.3+ Local enrolment data: - course.idnumber - user.idnumber - role.shortname enrol_db_defaultcourseroleid: I've tried Default and Student Course settings: - Default Role: I've tried Default(student) and Guest - Course enrollable: No - Availability: available to students - Enrolment key: blank - Guest access: not allowed I have a user who is able to log in to the Moodle site, but DOES NOT show up anywhere in the enrolment database. Nevertheless, ALL existing courses show up under "My Courses" when the user logs in. What am I missing? Any ideas? Cheers, JRob
Average of ratings: -
In reply to J Rob

Re: External Database issues

by Jonathan Moore -
Has someone changed the role for authenticated users to student? Or has someone assigned these users the student role under global assigments? I think either of these might perform as you have reported.
In reply to Jonathan Moore

Re: External Database issues

by J Rob -
Hi Jonathan,

Thanks for your reply.

I looked up the sample user (the one that shouldn't be able to see any courses) in the role_assignments table, and the user does not occur anywhere.

I also checked on the role definitions, and no changes have been made to the authenticated user role, so it still as its default settings.

Any other ideas?

Cheers,
JRob

P.S. -- sorry about the lack of line breaks in the original post!
In reply to J Rob

Re: External Database issues

by J Rob -
I have discovered that this is an internal problem, although I'm not sure why: context capabilities are reporting (to the "My courses" block) that a user has viewcourse access, when in reality that should not be the case.

So I'll be taking this to a different forum.
In reply to J Rob

Re: External Database issues

by Raymond Williams -

Hi all, having problems with the external database enrollment issue.  Have set up a odbc access database with the three columns - user, course, role - because I imported the users from a csv file, both students and teachers.  Can't get the database enrollment to work.  Can anyone tell me how to put the settings in correctly.

Our moodle site sits on one server and the odbc db on another!

When a user logs in they get the three courses that have been setup so far and not the ones that they should be in!  I have set up a default course template for the auto creation bit.

Any help greatly appreciated. Thanks - Ray