+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
Virtual Learning Platforms Thread, Moodle - Course Creator won't stay put!! in Technical; I've asked the question on the moodle forum but I'd ask you lot anyway New to Moodle so hopefully just ...
  1. #1
    alan-d's Avatar
    Join Date
    Aug 2005
    Location
    Sutton Coldfield
    Posts
    2,414
    Thank Post
    359
    Thanked 256 Times in 187 Posts
    Rep Power
    75

    Moodle - Course Creator won't stay put!!

    I've asked the question on the moodle forum but I'd ask you lot anyway

    New to Moodle so hopefully just my error somewhere.

    Whenever I assign a user to the site course creator role, as soon as they have logged in and out moodle decides to remove them from that role.

    It seems to stick when giving the creator role in a course, but that is no use when staff need to be able to create the course in the first place.

    New Install - Currently using 1.7, with latest Php, apache & MySQL 0n a Win2k3 Box. LDAP authentication which works fine.

    Any pointers would be useful - none of the roles have been edited in any way.

  2. #2

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Moodle - Course Creator won't stay put!!

    In your LDAP authentication configuration, is ldap_creators set to something?

  3. #3
    alan-d's Avatar
    Join Date
    Aug 2005
    Location
    Sutton Coldfield
    Posts
    2,414
    Thank Post
    359
    Thanked 256 Times in 187 Posts
    Rep Power
    75

    Re: Moodle - Course Creator won't stay put!!

    It could be that ops:

    At the moment it reads

    cn=teachers,ou-Staff,o=scgsnet

    does 'cn' need to read 'Course Creator' ?

    *Edit* I just tried with cn=Course creator and the user is still kicked out after logging off

  4. #4
    Irazmus's Avatar
    Join Date
    Feb 2006
    Location
    Suffolk
    Posts
    313
    Thank Post
    13
    Thanked 20 Times in 15 Posts
    Rep Power
    22

    Re: Moodle - Course Creator won't stay put!!

    Setting ldap_creators seems to override the manual assignment. Try removing it.

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Moodle - Course Creator won't stay put!!

    The way you have it set at the moment is that anyone in the 'teachers' group in the 'staff' OU in the dns domain 'scgsnet' will be a Course Creator. Anyone who isn't can not be a Course Creator and will have their Course Creator access removed, unless they are an Admin.

    Is that what you intend?

  6. #6
    alan-d's Avatar
    Join Date
    Aug 2005
    Location
    Sutton Coldfield
    Posts
    2,414
    Thank Post
    359
    Thanked 256 Times in 187 Posts
    Rep Power
    75

    Re: Moodle - Course Creator won't stay put!!

    Quote Originally Posted by Irazmus
    Setting ldap_creators seems to override the manual assignment. Try removing it.
    I just did that and .............. no change

    All the other roles seem to work fine. It's only the course creator that is causing the problem.

  7. #7

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Moodle - Course Creator won't stay put!!

    There's been patches to the roles stuff, try updating to the latest Stable snapshot.

  8. #8
    alan-d's Avatar
    Join Date
    Aug 2005
    Location
    Sutton Coldfield
    Posts
    2,414
    Thank Post
    359
    Thanked 256 Times in 187 Posts
    Rep Power
    75

    Re: Moodle - Course Creator won't stay put!!

    Quote Originally Posted by Geoff
    The way you have it set at the moment is that anyone in the 'teachers' group in the 'staff' OU in the dns domain 'scgsnet' will be a Course Creator. Anyone who isn't can not be a Course Creator and will have their Course Creator access removed, unless they are an Admin.

    Is that what you intend?
    That's right.

    Now the confession ops: I forgot to create the teachers group in the Staff OU ops:

    However - it's there now, and members added It's still kicking the member of staff out of the Course creator when logging off

    I'll upgrade to the 1.8 beta - at the risk of killing everything - I'll post the result .

  9. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Moodle - Course Creator won't stay put!!

    This thread might be relevant:

    http://moodle.org/mod/forum/discuss.php?d=65306

  10. #10
    alan-d's Avatar
    Join Date
    Aug 2005
    Location
    Sutton Coldfield
    Posts
    2,414
    Thank Post
    359
    Thanked 256 Times in 187 Posts
    Rep Power
    75

    Re: Moodle - Course Creator won't stay put!!

    Upgraded to 1.8 beta and the problem is still there.

    Next option is to create a similar role to replace Course creator and see if that works.

    @ Geoff - I saw that, but it made no difference.

  11. #11

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Moodle - Course Creator won't stay put!!

    Are you sure you've not got any legacy roles selected?

  12. #12
    alan-d's Avatar
    Join Date
    Aug 2005
    Location
    Sutton Coldfield
    Posts
    2,414
    Thank Post
    359
    Thanked 256 Times in 187 Posts
    Rep Power
    75

    Re: Moodle - Course Creator won't stay put!!

    Quote Originally Posted by Geoff
    Are you sure you've not got any legacy roles selected?
    Yep

    Just created an identical role called Course-Admin - and that works perfectly. Even with legacy roles selected.

    All I need to work out now is what I need to edit so when my course creators log in for the first time they are assigned the Course admin role instead of the Course creator role?

    I can try and sort out the course creator role out when I have more time

  13. #13

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Moodle - Course Creator won't stay put!!

    All I need to work out now is what I need to edit so when my course creators log in for the first time they are assigned the Course admin role instead of the Course creator role?
    I just looked at the LDAP PHP. It works by finding the first role with the "moodle/legacy:coursecreator" role set. If you remove this role from your Course Creators role then the LDAP auth will skip it and pick up your new role instead.

    Here's the relevant chunk of code:

    PHP Code:
                if ($creatorroles get_roles_with_capability('moodle/legacy:coursecreator'CAP_ALLOW)) {

                    
    $creatorrole array_shift($creatorroles);      // We can only use one, let's use the first one

                    
    begin_sql();
                    
    $xcount=0$maxxcount=100;
                    foreach (
    $users as $user) {
                        echo 
    "updating user $user->username \n";
                        
    auth_ldap_update_user_record($user->username$updatekeys);

                        
    // update course creators
                        
    if (!empty($CFG->ldap_creators) && !empty($CFG->ldap_memberattribute) ) {
                            if (
    auth_iscreator($user->username)) {   // Following calls will not create duplicates
                                
    role_assign($creatorrole->id$user->id0$sitecontext->id000'ldap');
                                
    $xcount++;
                            } else {
                                
    role_unassign($creatorrole->id$user->id0$sitecontext->id);
                                
    $xcount++;
                            }
                        }

                        if (
    $xcount++ > $maxxcount) {
                            
    commit_sql();
                            
    begin_sql();
                            
    $xcount=0;
                        }
                    }
                    
    commit_sql();
                    unset(
    $users); // free mem
                


  14. #14
    alan-d's Avatar
    Join Date
    Aug 2005
    Location
    Sutton Coldfield
    Posts
    2,414
    Thank Post
    359
    Thanked 256 Times in 187 Posts
    Rep Power
    75

    Re: Moodle - Course Creator won't stay put!!

    I'm not sure what you mean by 'remove the course creator role.

    Do you mean delete it from moodle via the admin >define roles page then edit the above code to read
    PHP Code:
    if ($creatorroles get_roles_with_capability('moodle/legacy:course_admin'CAP_ALLOW) ) { 
    You may have guessed that scripty things are not my strong point

  15. #15

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Moodle - Course Creator won't stay put!!

    Do you mean delete it from moodle via the admin >define roles page
    Yes.

    edit the above code to read
    no.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Music creator
    By danIT in forum General Chat
    Replies: 8
    Last Post: 20th March 2008, 09:02 AM
  2. Command Line ISO Creator
    By russdev in forum Windows
    Replies: 1
    Last Post: 27th September 2007, 08:04 PM
  3. Thumbnail creator
    By alan-d in forum Downloads
    Replies: 0
    Last Post: 6th January 2007, 11:23 PM
  4. Replies: 1
    Last Post: 28th September 2006, 04:29 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •