Changeset 1330 for lliurex-moodle


Ignore:
Timestamp:
May 2, 2016, 12:06:21 PM (3 years ago)
Author:
kbut
Message:

add script to sync users on install

Location:
lliurex-moodle/trunk/fuentes/lliurex-moodle.install-files/usr/share/lliurex-moodle
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-moodle/trunk/fuentes/lliurex-moodle.install-files/usr/share/lliurex-moodle/update_moodle_sql.py

    r283 r1330  
    3333                cursor = connection.cursor()
    3434                try:
    35                                 sql="UPDATE `moodle`.`mdl_config_plugins` SET `value` = '"+passwd+"' WHERE `mdl_config_plugins`.`name` like 'bind_pw' and `mdl_config_plugins`.`plugin` like 'auth/ldap';"
    36                                 cursor.execute(sql)
    37                                 connection.commit()
    38                                 sql="UPDATE `moodle`.`mdl_config_plugins` SET `value` = 'cn=teachers,ou=Profiles,ou=Groups,dc=ma5,dc=lliurex,dc=net' WHERE `mdl_config_plugins`.`name` like 'creators' and `mdl_config_plugins`.`plugin` like 'auth/ldap';"
    39                                 cursor.execute(sql)
    40                                 connection.commit()
     35                                #sql="UPDATE `moodle`.`mdl_config_plugins` SET `value` = '"+passwd+"' WHERE `mdl_config_plugins`.`name` like 'bind_pw' and `mdl_config_plugins`.`plugin` like 'auth/ldap';"
     36                                #cursor.execute(sql)
     37                                #connection.commit()
     38                                #sql="UPDATE `moodle`.`mdl_config_plugins` SET `value` = 'cn=teachers,ou=Profiles,ou=Groups,dc=ma5,dc=lliurex,dc=net' WHERE `mdl_config_plugins`.`name` like 'creators' and `mdl_config_plugins`.`plugin` like 'auth/ldap';"
     39                                #cursor.execute(sql)
     40                                #connection.commit()
    4141
    4242                                passwordcrypted = bcrypt.hashpw(adminpassword,bcrypt.gensalt(10))
Note: See TracChangeset for help on using the changeset viewer.