Forum .LRN Q&A: Changing dotLRN Roles

Collapse
Posted by Tilmann Singer on
In the following I will use the term 'dotlrn roles' for the different user types that can occur in dotlrn, of which there are currently these 4 as far as I understand: student, professor, admin and external. Please correct me if there are more or if  dotlrn role is the wrong term for that.

I wonder if and how it would be possible to add new such dotlrn roles, or remove existing ones.

For each dotlrn role creation, there seem to be 4 sql scripts:

student-profile-provider-create.sql
students-create.sql
students-init.sql
students-package-create.sql

Imagine I want to add an additional role 'alumni', would it be safe to assume that it could be achieved by adding 4 files like this with the appropriate replacements of the word 'student' by 'alumni', or are there other places in the code where dotlrn roles are defined, apart from hardcoded special behaviour that depends on role membership?

Likewise, if I want to remove the 'professor' role from appearing in my installation, could I just run all the associated drop scripts, or remove the create scripts and re-install? (Yes I know I should try that myself, will do so soon but maybe someone has tried it before).

Anyone has experiences, general thoughts or hints concerning such modifications of dotlrn roles?

And one more question about the profile-provider: for example in student-profile-provider-create.sql function calls like dotlrn_student_profile_provider::prettyName are registered, but I can't find where they are defined - what is getting executed when this implementation is called?

Collapse
2: Re: Changing dotLRN Roles (response to 1)
Posted by Dave Bauer on
I think the problem is with changing how permission is granted when "things happen". That is when a new class instance is created certain packages are mounted and privileges are granted based on the built in roles. If new roles are created,  would you want to change the default behavior when new packages are mounted, or when new objects are created? If you are actually creating new roles and not just renaming the existing ones, this is the issue.

I have been thinking about this for a project I am working on, and I haven't come up with a solution. Ideally you would want all of these things to be configurable. But then I think there would need to be a way to configure what roles would get which permissions on package install and object cretion of package objects.

I think adding this flexibility would be very useful for dotLRN and for dotWRK also, and generally for OpenACS.

Collapse
3: Re: Changing dotLRN Roles (response to 2)
Posted by Tilmann Singer on
In the beginning all my newly created roles would have the same permissions as currently students have, so it is only about different names for now. We consider to differentiate them later though by changing the profiles that are provided by each different role.

And even later we might want to create new community types  that allow memberships of only specific roles. As far as I can see this would be supported in the datamodel, since there is a dotlrn_community::get_roles proc that returns a roles list depending on the community type. Anyone has experience with creating custom community types in dotlrn?

Collapse
4: Re: Changing dotLRN Roles (response to 1)
Posted by kenneth wyrick on
Is there a bug in changing user type? I get an error when changing from student to professor and the others too.
Collapse
5: Re: Changing dotLRN Roles (response to 4)
Posted by Oliver Emmler on
I tried to recreate your error on the testing servers but didn't succeed.

Could you send some more information about your error ?