Please sign in to comment.
update enrol/database to use roles.
Credit: Alastair Pharo <email@example.com> Database -------- 1) This plugin previously only worked for students. I have made it so that you can _optionally_ specify a third column in your external database that contains some kind of role information (similar to the other two fields, you can choose any column in the mdl_role table to map to). If you do this, then the code loops over for each different kind of role and queries the external database. 2) There is a *slight* problem to be aware of, if a moodle configuration was upgraded to use the new role columns, then downgraded again, some roles might get left behind in the database when the large-scale sync thing goes through (that is, record pruning doesn't scale back quite properly). These would be cleaned away by setup_enrolments at login time, however, and the scenario was unlikely enough for me to decide to leave it for now. 3) If you don't have role columns there is a 'default role' setting that you can set (made by Martin D). This will only be obeyed when no role columns are specified. If this is set to 'default', then the course default role is used, on a per-course basis (which usually means student apparently). 4) From (3), my understanding is that if no config settings are changed, and the default role for all upgraded courses is student, that a smooth upgrade to 1.7 will occur for users of the database enrolment plugin.
- Loading branch information...
Showing with 271 additions and 122 deletions.
Oops, something went wrong.