Chamilo
Chamilo 1.11 - English
Chamilo 1.11 - English
  • Introduction
  • Teacher Guide
    • Introduction
    • Getting to know Chamilo
      • What is Chamilo?
      • About this guide
      • Who is this guide for?
      • How to use this guide.
      • General usability
      • Why Chamilo?
        • Learning paradigm
        • Common interface elements
    • The Chamilo homepage
    • Registering on the platform
    • Finding your way in Chamilo
    • Course creation
    • Control course access
    • Organizing courses
      • Personal categories
      • Subscribing to other courses
      • Courses management icons
    • Course administration
    • Course homepage
      • Introductory text
      • Authoring tools
      • Interaction tools
      • Administration tools
    • First Steps: Documents
      • Create a directory
      • Quick-change of directory
      • Importing a document
      • Authoring content in Chamilo
      • Saving documents
      • Deleting a file or a directory
      • Watching course quotas
      • Slideshow
    • Interactivity: Tests
      • Introduction
      • Creating a new test
      • Feedback, score and correct answers
      • Test types
      • Adding questions to the test
      • Recycling existing questions
      • Importing: HotPotatoes, IMS/QTI2, Excel
      • Test results
    • Communication : Forums
      • Using forum views
      • Add forum categories
      • Add forum
      • Manage forum categories
      • Manage forums
      • Start a new topic
      • Manage discussion threads
      • Manage messages
      • Give your learners a score
      • Give a score from a message
      • Add a message to a thread
      • Reply to a specific message
      • Quote a previous message
      • Reply or Reply to this topic
      • Search a forum element
    • Structure: Learning paths
      • Introduction
      • Create a learning path
      • Add Learning Objects and Activities
      • Import AICC and SCORM
      • Managing learning paths
      • Prerequisites
      • Generating certificates
    • Reporting
      • Tracking learners
      • Show individual learner's details
      • Course reporting
      • Resource Reporting
      • Test/exam Reporting
    • Assignments
      • Assignment creation
      • Completion of assignments by students
      • Manage assignments
      • Setting up the assignment evaluation
      • Assignment expiry dates
      • Marking assignments
    • Users
      • Subscribe users
    • Assessments
      • Assessments pre-configuration
      • Sub-assessments
      • Adding classroom activities
      • Adding online activities
      • Weights
      • List view
      • How students generate certificates
      • Students certificates management
      • Linking assessments with skills
      • Linking certificates with learning paths
    • Wiki
      • Starting the wiki
      • Add a new linked page
      • Add a new orphan page
      • Commenting a page
      • Other wiki features
    • Links
      • Links categories
      • Links
      • Manage links
      • Links checker
    • Announcements
      • Add an announcement
      • Announcements management
    • Glossary
      • New term
      • Glossary terms management
    • Attendances
      • Create an attendance sheet
      • Recording attendances
    • Course progress
      • Create a thematic section
      • Define the thematic plan
      • Create steps for the course progress
    • Agenda
      • Adding an event to the course agenda
      • Import and export events
      • Adding an event to the personal Agenda
    • Dropbox
      • Folders
      • Send a file to specific users
      • Managing dropbox files
      • Read and add comments on a file
    • Groups
      • Create a group
      • Groups settings
      • Auto-filling a group
      • Fill a group manually
      • Getting into a group space
      • Overview /Export of group members
      • Groups management
    • Chat
      • Send a message
      • Empty messages
    • Survey
      • Survey creation
      • Add survey questions
      • Survey preview
      • Survey publication
      • Results
      • Surveys management
    • Notebook
      • Notes creation
      • Sort notes
    • Projects
      • Project creation
      • Subscribe learners to a project
      • New article/task
      • Roles management
      • Assign a role to a learner
      • Indicate the execution of a task
      • Learners' task management
    • Course settings
      • Update general course settings
      • Visibility and access
      • E-mail notifications
      • User rights
      • Chat settings
      • Learning path settings
      • Thematic advance settings
    • Backup
      • Create a backup
      • Import backup
      • Copy course
      • Empty this course
    • The Reporting tab
      • Own courses and sessions reporting
    • Social network
      • Profile information
      • Internal messaging
      • “Friends”
      • Social groups
      • My files
    • Session view
      • Courses tab
      • Learning paths tab
      • My MCQ tab
      • My statistics tab
    • Appendix
      • Glossary
      • Frequently asked questions
      • Document license
      • Document history
  • Admin Guide
    • Getting to know Chamilo
      • About this guide
      • Whom is this guide meant for?
      • How to read this guide?
    • Installation and configuration
      • Server
      • Installation wizard
        • Launching the installation wizard
          • Step 1 of 6 : Language
          • Step 2 of 6 : Prerequisites
          • Step 3 of 6: License
          • Step 4 of 6 : MySQL database parameters
          • Step 5 of 6: Configuration settings
          • Step 6 of 6 : Last check before installation
        • Last installation settings
      • Updating Chamilo
        • Download the latest stable version
        • Replace the older version by the new one
    • Backups
      • External backups
        • PhpMyAdmin database backup
        • Command-line backup
        • The Chamilo root directory
      • Saving the Chamilo interface
        • Learning path export
        • Saving a course
      • Recovering a backup
        • Learning paths
        • Courses
        • Complete recovery
    • Platform administration
      • Chamilo configuration settings
        • Portal
        • Training (admin/courses)
        • Sessions
        • Languages
          • Creating a sub-language
          • Defining one's own terms
          • Assigning the new sub-language
        • Users
        • Modules
        • HTML Editor
        • Security
        • Tuning
        • Assessments
        • Time zones
        • Reporting
        • Search
        • Stylesheets
        • Templates
        • Plugins
        • LDAP
        • CAS
        • Shibboleth
        • Facebook
      • Portal news
      • Global agenda
      • Edit portal homepage
      • Setting the registration page
      • Statistics
      • Reports
    • Users management
      • User roles
        • Learner (admin/or student)
        • The course assistant
        • The human resources manager (admin/or supervisor)
        • The course coach
        • The session coach (admin/or session tutor)
        • Teacher (admin/or trainer)
        • Sessions administrator
        • Portal administrator
        • Global administrator
        • Special case: the anonymous user
      • Users list
        • Learner
        • Teacher
        • Administrator
        • Anonymous
      • Add a user
      • Export users list
      • Import users list
      • Add groups
      • Groups list
      • Profiling
    • Courses management
      • Courses list
        • Update course details
        • Tracking and backup
      • Create a course
      • Export courses
      • Import courses list
      • Courses categories
      • Add users to course
      • Import users list
    • Sessions management
      • Use cases
        • The academic year
        • Personal tutoring
        • Corporate induction courses
      • Managing the sessions
      • Add a session
      • Sessions categories (admin/or periods)
      • Export sessions list
      • Copy from course in session to another session
      • Move users results from/to a session
      • Careers and promotions
        • Careers
        • Promotions
        • Copy
        • Use case
      • Classes
    • System
      • Special exports
      • System status
      • Data filler
      • Archive directory clean-up
    • Global features
      • Multi-URL
        • Use case – University faculties
        • Use case – Corporate branding
        • The solution
        • Installation
      • Video-conference
      • Chamilo Rapid
      • Style sheets
      • Templates
      • Web services
      • The Prestashop plugin
      • The Drupal plugin
      • The xAPI plugin
      • Logging in with OpenID
      • Securing your site with SSL / HTTPS
      • Optimization
    • Appendix
      • Frequently asked questions
        • Sending e-mails from the platform doesn't work
        • How do I prevent teachers to subscribe or unsubscribe learners into/from their courses?
        • How do I block access to the course catalog for learners?
        • How much bandwidth does the videoconference tool (admin/BigBlueButton) consume?
      • Security in Chamilo LMS
      • Database structure
      • Accessing the database
      • Configuration settings list
      • Glossary
      • Document license
      • Document history
  • Developer Guide
    • Introduction
      • About this guide
      • Who is this guide for?
      • How to use this guide
      • General usability
    • Why Chamilo?
      • Learning paradigm
      • Common interface elements
    • The Chamilo files & database structure
      • History
      • Database structure : fixed in all minor versions
      • The Chamilo LMS files structure today
      • The Chamilo LMS database structure today
      • General conventions for future database structure
    • Coding conventions
    • Theming through templates
      • Cleaning the cache
      • Structure of a page
      • Usable variables
      • Modifiers
    • Theming through CSS
      • The cascading structure
      • Style files purposes
      • The stylesheets inclusion mechanism
      • Extending the icons set
      • Default course image
      • Example procedure for new design
    • Document templates
      • Structure
    • Theming certificates
    • Customizing the online editor
    • The Chamilo logo
    • Global settings
      • Sub-languages
    • Participating to the development
      • Using Git
      • Updating you code
    • Clear the template cache
    • Fixing bugs
    • System AdministratorsWeb services
      • SOAP, REST and XML-RPC
      • Connection and security key
      • Restriction on calling IP addresses
      • Other methods
    • Extra Chamilo fields
    • Plugins
      • General workflow of plugins
      • General plugins development
      • The Dashboard
      • Language variables
    • System AdministratorsAuthentication methods
      • LDAP
      • CAS
      • Shibboleth
      • Facebook
      • OpenID
      • Custom SSO methods
    • Passwords generation
Powered by GitBook
On this page
  • Configuring LDAP
  • Running synchronisations
Export as PDF
  1. Developer Guide
  2. System AdministratorsAuthentication methods

LDAP

The LDAP authentication system in Chamilo has been submitted to various deep changes over time, and the current situation is somewhat confusing and always require some kind of manual update.

A patch by Eric Marguin in version 1.10.0 fixed a series of issues from previous versions, related to import scripts not using the configuration file for LDAP (main/inc/conf/auth.conf.php).

Configuring LDAP

To configure LDAP, check the LDAP variables in main/inc/conf/auth.conf.php.

By default, it will come like this (more or less), where elements to be adapted to your own LDAP server and configuration have been coloured in red :

/**
 * LDAP
 */
/**
 * Array of connection parameters
 **/
$extldap_config = array(
    //base dommain string
    'base_dn' => 'DC=cblue,DC=be',
    //admin distinguished name
    'admin_dn' => 'CN=admin,dc=cblue,dc=be',
    //admin password
    'admin_password' => 'pass',
    //ldap host
    'host' => array('1.2.3.4', '2.3.4.5', '3.4.5.6'),
    // filter
    // 'filter' => '',
    // no () arround the string
    //'port' => ,default on 389
    //protocol version (2 or 3)
    'protocol_version' => 3,
    // set this to 0 to connect to AD server
    'referrals' => 0,
    //String used to search the user in ldap. %username will ber replaced
    // by the username.
    //See extldap_get_user_search_string() function below
    // 'user_search' => 'sAMAccountName=%username%',
    // no () arround the string
    'user_search' => 'uid=%username%',
    // no () arround the string
    //encoding used in ldap (most common are UTF-8 and ISO-8859-1
    'encoding' => 'UTF-8',
    //Set to true if user info have to be update at each login
    'update_userinfo' => true
);
/**
 * Correspondance array between chamilo user info and ldap user info
 * This array is of this form :
 * '<ldap_>' =><ldap_field>
 *
 * If <ldap_field>is "func", then the value of <chamilo_field>will be
 * the return value of the function
 * extldap_get_<chamilo_field>($ldap_array)
 * In this cas you will have to declare the extldap_get_<chamilo_field>
 * function
 *
 * If <ldap_field>is a string beginning with "!", then the value will be
 * this string without "!"
 *
 * If <ldap_field>is any other string then the value of<chamilo_field>
 * will be
 * $ldap_array[<ldap_field>][0]
 *
 * If <ldap_field>is an array then its value will be an array of values
 * with the same rules as above
 **/
$extldap_user_correspondance = array(
    'firstname' => 'givenName',
    'lastname' => 'sn',
    'status' => 'func',
    'admin' => 'func',
    'email' => 'mail',
    'auth_source' => '!extldap',
    //'username' => ,
    'language' => '!english',
    'password' => '!PLACEHOLDER',
    'extra' => array(
        'title' => 'title',
        'globalid' => 'employeeID',
        'department' => 'department',
        'country' => 'co',
        'bu' => 'Company'
    )
);

Once you've got that file setup, you'll have to change configuration.php before a few things are added to your administration interface.

If you look at app/config/configuration.php and search for « ldap », you'll find these 3 lines:

// -> Uncomment the two lines bellow to activate LDAP AND edit main/auth/external_login/ldap.conf.php 
// for configuration
// $extAuthSource["extldap"]["login"] = $_configuration['root_sys']. $_configuration['code_append']."auth/external_login/login.ldap.php";
// $extAuthSource["extldap"]["newUser"] = $_configuration['root_sys'].$_configuration['code_append']."auth/external_login/newUser.ldap.php";

Uncomment them to enable a few additional scripts.

When uncommenting, you'll see the following item appear in the administration panel.

This will give you access to a search list for users on the LDAP server, and options to import those users. Versions 1.9.x of Chamilo LMS, however, might have had a little issue with that, making it actually impossible to search from this screen.

To fix that, you should go and edit the ldapget_users functions in main/auth/external_login/ldap.inc.php. There, you'll see that no matter what mapping you gave in the $extldap_user_correspondance_variable in auth.conf.php, it isn't taken into account. Update that to get the search working.

Note that this should be fixed in Chamilo LMS 1.10.x.

Running synchronisations

Some synchronization mechanisms are made to be run automatically (through CRON). To find these, look deeper into the main/auth/external_login/ folder.

The ldap_import_all_users.php script, for example, can be executed to automatically insert all users from LDAP (following specific criterias defined in ldap.inc.php) into Chamilo. Please note that, once again, in version 1.9.x, this used to be slightly broken, requiring a review of the ldap.inc.php functions in order to work.

PreviousSystem AdministratorsAuthentication methodsNextCAS

Last updated 4 years ago