<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl">
	<id>https://docs.moodle.org/2x/pl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Minkus</id>
	<title>MoodleDocs - Wkład użytkownika [pl]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/2x/pl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Minkus"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/Specjalna:Wk%C5%82ad/Minkus"/>
	<updated>2026-06-02T18:10:39Z</updated>
	<subtitle>Wkład użytkownika</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Active_Directory&amp;diff=76062</id>
		<title>Active Directory</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Active_Directory&amp;diff=76062"/>
		<updated>2010-09-22T16:49:41Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Renamed the title of the section to make it clearer as well - it has nothing to do with Group Policy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Microsoft&#039;s Active Directory (AD) provides a variety of network directory services including Lightweight Directory Access Protocol (LDAP) like functions.  It is included in Windows 2000 Server and later versions of their operating system.   The focus of this page will be with the [[LDAP authentication]] functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Trouble shooting AD and LDAP authentication==&lt;br /&gt;
===Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled.===&lt;br /&gt;
This usually means that the main ldap dll or one of the supporting dlls are missing.&lt;br /&gt;
Let&#039;s start with the main one itself. &lt;br /&gt;
Browse to &amp;lt;nowiki&amp;gt;http://(moodleserver)/admin/phpinfo.php&amp;lt;/nowiki&amp;gt; and examine the &amp;quot;Configuration File (php.ini) Path&amp;quot; field to determine which php.ini is being used and open it with an editor. Find the line &#039;extension=php_ldap.dll&#039; and take out the semi-colon if it is there. That semi-colon will stop it loading the module all together! &lt;br /&gt;
While you have that file open, search for &#039;extension_dir&#039; and note which folder it is set to. Open that folder and ensure the php_ldap.dll file is in there. If it isn&#039;t then put it in there.&lt;br /&gt;
If that still hasn&#039;t fixed it you are missing a supporting dll, but you don&#039;t get told that. To see what dlls are missing open the Command Prompt and navigate to the php directory and execute the following line &#039;php -m&#039;. You should get some error messages now. Ugly, but at least they give you information! Find the dlls listed and copy them to the php directory. You may now need to restart the apache/httpd service. Run &#039;php -m&#039; again and you should be error free and the message in Moodle should be gone now.&lt;br /&gt;
&lt;br /&gt;
===LDAP-module cannot connect any LDAP servers===&lt;br /&gt;
 LDAP-module cannot connect any LDAP servers: &lt;br /&gt;
 Server: &#039;ldap://my.ldap.server/&#039; &lt;br /&gt;
 Connection: &#039;Resource id #26&#039; Bind result: &#039;&#039;&lt;br /&gt;
Getting this message when you are trying to log in is a result of incorrect details for the Bind user, or the user account having insufficient permissions in Active Directory. The best way to test and resolve this is use ldp.exe to test binding until it suceeds. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open the program and Connect to AD, giving the server name, then from the Connection menu choose Bind. Enter the details you think are correct and you will probably find that an error is returned. Try adjusting the accounts priveleges or another account until you are returned an &amp;quot;Authenticated as&amp;quot; message.&lt;br /&gt;
Once you are sure your account can be used to bind to AD, check that the DN of that users name is correct. Expand the tree on the left until you find the user you used to bind. Right click on that item and choose Copy DN. Go to the User Authentication page in Moodle and paste the value into the ldap_bind_dn field. Add the password and you can now feel safe your user is binding sucessfully.&lt;br /&gt;
&lt;br /&gt;
===Getting correct CNs for Contexts and Creators===&lt;br /&gt;
For those not familiar with AD this could be very confusing, and not that easy for some who are familiar with it. Again, ldp.exe is your friend. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open it up and expand the tree on the left until you find the group or user you want to use and right click on it and select Copy DN. Go back to the Moodle User Authentication page and paste that value into either ldap_contexts or ldap_creators.&lt;br /&gt;
&lt;br /&gt;
===Getting the right user_attribute===&lt;br /&gt;
By default, Moodle uses an accounts cn (full name) to verify against, but most networks don&#039;t use a full given name for logon as it&#039;s too easy to guess and you can easily have two people with the same name. If this is the case for you too you need to tell Moodle to look at another field for the logon id.&lt;br /&gt;
In ldp.exe navigate the tree on the left to find a user account, preferably your own. Double-click the item in the tree and full-details will be loaded into the screen on the right. Look down the details until you find your logon id and note the item listed against it. For me, and a lot of people, it is sAMAccountName. Copy this name and paste it into the ldap_user_attribute on the Moodle User Authentication page.&lt;br /&gt;
There are instructions on installing ldp.exe below.&lt;br /&gt;
&lt;br /&gt;
===Installing ldp.exe Server Tool===&lt;br /&gt;
ldp.exe comes as part of the Server Tools on most versions of Windows Server. Find your Windows Server installation disc and find a folder on it called Support\Tools. In there will be a SupTools.msi which will install the server tools if run. You should now have a folder under Program Files called Support Tools, in which will be ldp.exe. ldp.exe is also available in the Windows XP Support Tools, which you can download from Microsoft [http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&amp;amp;displaylang=en here]. Alternatively, a single download of ldp.exe is available [http://www.computerperformance.co.uk/w2k3/utilities/ldp.htm here].&lt;br /&gt;
&lt;br /&gt;
===Example Active Directory Configuration===&lt;br /&gt;
Below is an example configuration for Active Directory. As detailed above, the values may vary based on your local Active Directory configuration, but should provide a good starting point for most cases.&lt;br /&gt;
&lt;br /&gt;
 ldap_host_url = ldap://ads.example.com&lt;br /&gt;
 ldap_version = 3&lt;br /&gt;
 ldap_preventpassindb = yes&lt;br /&gt;
 ldap_bind_dn = bind-user@example.com&lt;br /&gt;
 ldap_bind_pw = bind-password&lt;br /&gt;
 ldap_user_type = MS ActiveDirectory&lt;br /&gt;
 ldap_contexts = ou=moodleusers,dc=example,dc=com&lt;br /&gt;
 ldap_user_attribute = sAMAccountName&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the ldap_bind_dn value should work in either the CN=bin-user,CN=Users,DC=example,DC=com format as shown in the main instructions or the bind-user@example.com format shown in this example.&lt;br /&gt;
&lt;br /&gt;
==Global Catalogs==&lt;br /&gt;
Moodle currently only has limited support for multiple domain controllers; specifically it expects each of the LDAP servers listed to contain identical sets of information. If you have users in multiple domains this presents an issue. One solution when working with MS-AD is to use the Global Catalog. The Global Catalog is designed to be a read-only, partial representation of an entire MS-AD forest, designed for searching the entire directory when the domain of the required object is not known.&lt;br /&gt;
&lt;br /&gt;
===Enabling the Global Catalog===&lt;br /&gt;
&lt;br /&gt;
The Global Catalog is available on Windows 2000 and Windows 2003 Active Directory servers. To enable, open the ‘Active Directory Sites and Services’ MMC (Microsoft Management Console) snap-in. Extend ‘Sites’ and then the name of the Site containing the active directory forest you wish to use. Expand the server you wish to enable the Global Catalog on, right click ‘NTDS settings’ and select the ‘Properties’ tab. To enable, simply click the ‘Global Catalog’ checkbox. Under a Windows 2000 server it is necessary to restart the server (although it won’t prompt you to); under Windows 2003 server it is not necessary to restart the server. In either case you will generally have to wait for the AD forest to replicate before the Global Catalog offers a representation of the entire AD forest. Changes made in Active Directory will also be subject to a short delay due to the latency involved with replication. If your AD servers are firewalled port 3268 will need to be opened for Global Catalog servers.&lt;br /&gt;
If your organisation uses Microsoft Exchange then it its highly likely that at least one Domain Controller will already have Global Catalog enabled – Exchange 2000 and 2003 rely on the Global Catalog for address information, users also access the Global Catalog when using the GAL (Global Address List)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Child Domains===&lt;br /&gt;
If your organisation has a main domain example.org, staff and students are contained in two child domains staff.example.org and students.example.org. The 3 domains (example.org, staff.example.org and students.example.org) each have a domain controller (dc01, dc02 and dc03 respectively.) Each domain controller contains a full, writable, representation of only the objects that belong to its domain. However, assuming that the Global Catalog has been enabled (see below) on one of the domain controllers (for example dc01) a query to the Global Catalog would reveal matching objects from all three domains. The Global Catalog is automatically maintained through replication across the active directory forest, it can also be enabled on multiple servers (if, for example, you need redundancy / load balancing.)&lt;br /&gt;
&lt;br /&gt;
To make use of this in Moodle to allow logins from multiple domains is simple. The Global Catalog runs on port 3268 as opposed to 389 for standard LDAP queries. As a result, still assuming the Global Catalog is running on dc01, the &#039;&#039;&#039;&#039;ldap_host_url&#039;&#039;&#039;&#039; would be &#039;&#039;ldap://dc01.example.org:3268&#039;&#039;. The rest of the settings are the same as for other MS-AS Auth setups.&lt;br /&gt;
&lt;br /&gt;
You should use the &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting to indicate the locations of individuals you wish to grant access. To extend the example above a little: In the example.org domain users are all in the&#039;&#039; &#039;Users&#039; &#039;&#039;OU, in the staff.example.org domain users are in two OUs at the root of the domain,&#039;&#039; &#039;Support Staff&#039; &#039;&#039;and&#039;&#039; &#039;Teaching Staff&#039; &#039;&#039;, and in the students.example.org domain students are in an OU indicating the year that they enrolled, all of which are under the&#039;&#039; &#039;Students&#039; &#039;&#039;OU. As a result our &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting may look a little like this:&#039;&#039; &#039;OU=Users,DC=example,DC=org; OU=Support Staff,DC=staff,DC=example,DC=org; OU=Teaching Staff,DC=staff,DC=example,DC=org; OU=Students,DC=students,DC=example,DC=org&#039;&#039;.&#039; The &#039;&#039;&#039;&#039;ldap_search_sub&#039;&#039;&#039;&#039; option should be set to&#039;&#039; &#039;Yes&#039; &#039;&#039;to allow moodle to search within the child OUs.&lt;br /&gt;
&lt;br /&gt;
Its worth noting that the Global Catalog only contains a partial representation of the attributes of each object, as defined in the Partial Attribute Set supplied by Microsoft. However common information likely to be of use to a general Moodle installation (Forename, Surname, Email Address, sAMAccountName etc) is included in the set. For specific needs the schema can be altered to remove or add various attributes - see Microsoft [http://support.microsoft.com/kb/248717 KB248717] for more information.&lt;br /&gt;
&lt;br /&gt;
In most cases the Global Catalog is read-only, update queries must be made over the standard LDAP ports to the domain controller that holds the object in question (in our example, updating a student&#039;s details would require an LDAP query to the students.example.org domain controller - dc03, it would not be possible to update details by querying the Global Catalog.) The exception to this would be in an environment where there is only a single domain in the active directory forest; in this case the Global Catalog holds a writable full set of attributes for each object in the domain. However, for the purposes of Moodle authorisation, there would be no need to use the Global Catalog in this case.&lt;br /&gt;
&lt;br /&gt;
===MaxPageSize setting===&lt;br /&gt;
Modifying the number of Active Directory objects to search: &lt;br /&gt;
&lt;br /&gt;
By default Active Directory only allows searches returning a limited number of objects per search. Since there is currently no Page control support in PHP 5.2.x which would enable smaller page searches you may need to modify your MaxPageSize setting to make sure LDAP Client searches can return enough user objects to support the number of authenticating users. &lt;br /&gt;
&lt;br /&gt;
If you find that the script is not running through all of your users properly and you have MS Active Directory + over 1000 users, follow the instructions [http://support.microsoft.com/kb/315071 here] to set the MaxPageSize setting to a number higher than your total number of users (both now and in future) to fix it.  This is a forest-wide setting.&lt;br /&gt;
&lt;br /&gt;
== Active Directory with Moodle 1.8==&lt;br /&gt;
There is an issue with the PHP ldap options that are required for Active Directory access in version 1.8 of Moodle. &lt;br /&gt;
&lt;br /&gt;
Using moodle on a LAMP platform with authentication to Active Directory may give some errors. &lt;br /&gt;
&lt;br /&gt;
Check this bug [http://tracker.moodle.org/browse/MDL-10921 MDL-10921] or this post http://moodle.org/mod/forum/discuss.php?d=78316 for further information.&lt;br /&gt;
&lt;br /&gt;
==MS Active Directory + SSL ==&lt;br /&gt;
&lt;br /&gt;
If the Certificate Authority is not installed you&#039;ll have to install it first as follows:&lt;br /&gt;
# Click &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Control Panel&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Add or Remove programs.&#039;&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;&#039;Add/Remove Windows Components&#039;&#039;&#039; and select &#039;&#039;&#039;Certificate Services.&#039;&#039;&#039;&lt;br /&gt;
# Follow the procedure provided to install the &#039;&#039;&#039;Certificate Authority&#039;&#039;&#039;. Enterprise level is a good choice.&lt;br /&gt;
&lt;br /&gt;
Verify that SSL has been enabled on the server by installing suptools.msi from Windows installation cd&#039;s \Support\tools directory. After support tools installation:&lt;br /&gt;
# Select &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Run&#039;&#039;&#039;, write &#039;&#039;&#039;ldp&#039;&#039;&#039; in the Open field.&lt;br /&gt;
# From the ldp window select &#039;&#039;&#039;Connection&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Connect&#039;&#039;&#039; and supply valid hostname and port number &#039;&#039;&#039;636&#039;&#039;&#039;. Also select the SSL check box.&lt;br /&gt;
&lt;br /&gt;
If successful, you should get information about the connection.&lt;br /&gt;
&lt;br /&gt;
See [[LDAP_authentication#Enabling_LDAPS_on_the_client_side_.28Moodle_server.29|Enabling LDAPS on the client side (Moodle server)]] for details on the client side configuration.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[LDAP authentication]] in Moodle&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Directory_service Directory services] overview in Wikipedia&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol LDAP] in Wikipedia&lt;br /&gt;
&lt;br /&gt;
[[ja:Active Directory]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=LDAP_authentication&amp;diff=76061</id>
		<title>LDAP authentication</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=LDAP_authentication&amp;diff=76061"/>
		<updated>2010-09-22T16:48:18Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Added forest-wide note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Moodle 1.9}}&lt;br /&gt;
Location: Settings link in &#039;&#039;Administration &amp;gt; Users &amp;gt; [[Authentication]] &amp;gt; LDAP Server&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to set up Lightweight Directory Access Protocol (LDAP) authentication in Moodle.  We cover the basic, advanced and some trouble shooting sections to assist the user in the installation and administrating LDAP in Moodle.  &lt;br /&gt;
==Table of Contents==&lt;br /&gt;
__TOC__&lt;br /&gt;
==Basic Scenario==&lt;br /&gt;
The simple and straightforward approach  for most installations.&lt;br /&gt;
&lt;br /&gt;
===Assumptions===&lt;br /&gt;
&lt;br /&gt;
# Your Moodle site is located at &#039;&#039;&#039;http://your.moodle.site/&#039;&#039;&#039;&lt;br /&gt;
# You have configured your PHP installation with the LDAP extension. It is loaded and activated, and it shows when you go to &#039;&#039;&#039;http://your.moodle.site/admin/phpinfo.php&#039;&#039;&#039; (logged in as user &#039;admin&#039;).&lt;br /&gt;
# Your LDAP server has &#039;&#039;&#039;192.168.1.100&#039;&#039;&#039; as its IP address.&lt;br /&gt;
# You are not using LDAP with SSL (also known as LDAPS) in your settings. This might prevent certain operations from working (e.g., you cannot update data if you are using MS Active Directory -- MS-AD from here on --), but should be OK if you just want to authenticate your users.&lt;br /&gt;
# You don&#039;t want your users to change their passwords the first time they log in into Moodle.&lt;br /&gt;
# You are using a single domain as the source of your authentication data in case you are using MS-AD (more on this in the Appendices).&lt;br /&gt;
# You are using a top level distinguished name (DN) of &#039;&#039;&#039;dc=my,dc=organization,dc=domain&#039;&#039;&#039; as the root of your LDAP tree. &lt;br /&gt;
# You have a non-privileged LDAP user account you will use to bind to the LDAP server. This is not necessary with certain LDAP servers, but MS-AD requires this and it won&#039;t hurt if you use it even if your LDAP server doesn&#039;t need it. Make sure &#039;&#039;&#039;this account and its password don&#039;t expire&#039;&#039;&#039;, and make this password as strong as possible. Remember you only need to type this password once, when configuring Moodle, so don&#039;t be afraid of making it as hard to guess as possible. Let&#039;s say this user account has a DN of &#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;, and password &#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;.&lt;br /&gt;
# All of your Moodle users are in an organizational unit (OU) called &#039;&#039;&#039;moodleusers&#039;&#039;&#039;, which is right under your LDAP root. That OU has a DN of &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039;.&lt;br /&gt;
# You &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want your LDAP users&#039; passwords to be stored in Moodle at all.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Configuring Moodle authentication===&lt;br /&gt;
&lt;br /&gt;
Log in as an admin user and go to Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. In the table that appears, enable the &amp;quot;LDAP Server&amp;quot; authentication option (click on the closed eye to make it open) and then click on the associated &#039;Settings&#039; link. You will get a page similar to this one:&lt;br /&gt;
&lt;br /&gt;
[[Image:auth_ldap_config_screenshot.jpg|center]]&lt;br /&gt;
&lt;br /&gt;
Now, you just have to fill in the values. Let&#039;s go step by step.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP Server Settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Host URL&lt;br /&gt;
| As the IP of your LDAP server is 192.168.1.100, type &amp;quot;&#039;&#039;&#039;ldap://192.168.1.100&#039;&#039;&#039;&amp;quot; (without the quotes), or just &amp;quot;&#039;&#039;&#039;192.168.1.100&#039;&#039;&#039;&amp;quot; (some people have trouble connecting with the first syntax, specially on MS Windows servers).&lt;br /&gt;
|-&lt;br /&gt;
| Version&lt;br /&gt;
| Unless you are using a really old LDAP server, &#039;&#039;&#039;version 3&#039;&#039;&#039; is the one you should choose.&lt;br /&gt;
|-&lt;br /&gt;
| LDAP Encoding&lt;br /&gt;
| Specify encoding used by LDAP server. Most probably utf-8.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Bind settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Hide passwords&lt;br /&gt;
| As you &#039;&#039;&#039;don&#039;t&#039;&#039;&#039; want to store the users&#039;s password in Moodle&#039;s database, choose &#039;&#039;&#039;Yes&#039;&#039;&#039; here.&lt;br /&gt;
|-&lt;br /&gt;
| Distinguished Name&lt;br /&gt;
| This is the distinguished name of the bind user defined above. Just type &amp;quot;&#039;&#039;&#039;cn=ldap-user,dc=my,dc=organization,dc=domain&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|-&lt;br /&gt;
| Password&lt;br /&gt;
| This is the bind user password defined above. Type &amp;quot;&#039;&#039;&#039;hardtoguesspassword&#039;&#039;&#039;&amp;quot; (without the quotes).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====User lookup settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| User type&lt;br /&gt;
| Choose: &lt;br /&gt;
* &#039;&#039;&#039;Novel Edirectory&#039;&#039;&#039; if your LDAP server is running Novell&#039;s eDdirectory.&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307)&#039;&#039;&#039; if your LDAP server is running a RFC-2307 compatible LDAP server (choose this is your server is running OpenLDAP, including Mac OS X server).&lt;br /&gt;
* &#039;&#039;&#039;posixAccount (rfc2307bis)&#039;&#039;&#039; if your LDAP server is running a RFC-2307bis compatible LDAP server.&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount (v.3.0.7)&#039;&#039;&#039; if your LDAP server is running with SAMBA&#039;s 3.x LDAP schema extension and you want to use it.&lt;br /&gt;
* &#039;&#039;&#039;MS ActiveDirectory&#039;&#039;&#039; if your LDAP server is running Microsoft&#039;s Active Directory (MS-AD)&lt;br /&gt;
|-&lt;br /&gt;
| Contexts&lt;br /&gt;
| The DN of the context (container) where all of your Moodle users are found. Type &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.  &lt;br /&gt;
&lt;br /&gt;
On a Mac OS X Server, this is usually &#039;&#039;&#039;cn=users,dc=my,dc=organization,dc=domain&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Search subcontexts&lt;br /&gt;
| If you have any sub organizational units (subcontexts) hanging from &#039;&#039;&#039;ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; and you want Moodle to search there too, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. Otherwise, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Dereference aliases&lt;br /&gt;
| Sometimes your LDAP server will tell you that the real value you are searching for is in fact in another part of the LDAP tree (this is called an alias). If you want Moodle to &#039;dereference&#039; the alias and fetch the real value from the original location, set this to &#039;&#039;&#039;yes&#039;&#039;&#039;. If you don&#039;t want Moodle to dereference it, set this to &#039;&#039;&#039;no&#039;&#039;&#039;. If you are using MS-AD, set this to &#039;&#039;&#039;no&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| User attribute&lt;br /&gt;
| The attribute used to name/search users in your LDAP tree. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you chose above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By the way, it&#039;s usually &#039;&#039;&#039;cn&#039;&#039;&#039; (Novell eDirectory and MS-AD) or &#039;&#039;&#039;uid&#039;&#039;&#039; (RFC-2037, RFC-2037bis and SAMBA 3.x LDAP extension), but if you are using MS-AD you could use &#039;&#039;&#039;sAMAccountName&#039;&#039;&#039; (the pre-Windows 2000 logon account name) if you need too.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute&lt;br /&gt;
| The attribute used to list the members of a given group. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By the way, the usual values are &#039;&#039;&#039;member&#039;&#039;&#039; and &#039;&#039;&#039;memberUid&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Member attribute uses dn&lt;br /&gt;
| Whether the member attribute contains distinguished names (1) or not (0).This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Object class&lt;br /&gt;
| The type of LDAP object used to search for users. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you chose above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
* If you leave it blank, the filter &amp;quot;(objectClass=*)&amp;quot; will be used.&lt;br /&gt;
* If you provide &amp;quot;objectClass=some-string&amp;quot;, then it will provide &amp;quot;(objectClass=some-string)&amp;quot; as the filter.&lt;br /&gt;
* If you provide a value that does not start with &amp;quot;(&amp;quot;, it is assumed to be a value that should be set to &amp;quot;objectClass&amp;quot;. So if you provide &amp;quot;some-string&amp;quot;, then it will provide &amp;quot;(objectClass=some-string)&amp;quot; as the filter.&lt;br /&gt;
* If you provide a string that starts with a &amp;quot;(&amp;quot;, then it will pass that as is. So if you provide &amp;quot;(&amp;amp;(objectClass=user)(enabledMoodleUser=1))&amp;quot;, then it will pass that as the filter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the default values for each of the &#039;&#039;ldap_user_type&#039;&#039; values:&lt;br /&gt;
* &#039;&#039;&#039;User&#039;&#039;&#039; for Novel eDirectory&lt;br /&gt;
* &#039;&#039;&#039;posixAccount&#039;&#039;&#039; for RFC-2037 and RFC-2037bis&lt;br /&gt;
* &#039;&#039;&#039;sambaSamAccount&#039;&#039;&#039; for SAMBA 3.0.x LDAP extension&lt;br /&gt;
* &#039;&#039;&#039;user&#039;&#039;&#039; for MS-AD&lt;br /&gt;
If you get an error about a problem with updating the ldap server (even if you have specified not to write changes back to the ldap server) try setting the ldap object class to * - see http://moodle.org/mod/forum/discuss.php?d=70566 for a discussion on this problem&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Force change password====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Force change password&lt;br /&gt;
| Set this to &#039;&#039;Yes&#039;&#039; if you want to force your users to change their password on the first login into Moodle. Otherwise, set this to &#039;&#039;no&#039;&#039;. Bear in mind the password they are forced to change is the one stored in your LDAP server.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;As you don&#039;t want your users to change their passwords in their first login, leave this set to &#039;&#039;No&#039;&#039;&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Use standard Change Password Page&lt;br /&gt;
|&lt;br /&gt;
* Setting this to &#039;&#039;Yes&#039;&#039; makes Moodle use it&#039;s own standard password change page, everytime users want to change their passwords.&lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; makes Moodle use the the page specified in the field called &amp;quot;Password change URL&amp;quot; (see below).&lt;br /&gt;
&lt;br /&gt;
Bear in mind that changing your LDAP passwords from Moodle might require a LDAPS connection (this is actually a requirement for MS-AD). In addition to that, the bind user specified above must have the rights needed to change other users&#039; passwords.&lt;br /&gt;
&lt;br /&gt;
Also, code for changing passwords from Moodle for anything but Novell eDirectory and Active Directory is almost not tested, so this may or may not work for other LDAP servers.&lt;br /&gt;
|-&lt;br /&gt;
| Password Format&lt;br /&gt;
| Specify how the new password is encrypted before sending it to the LDAP server: Plain text, MD5 hash or SHA-1 hash. MS-AD uses plain text, for example.&lt;br /&gt;
|-&lt;br /&gt;
| Password change URL&lt;br /&gt;
| Here you can specify a location at which your users can recover or change their username/password if they&#039;ve forgotten it. This will be provided to users as a button on the login page and their user page. if you leave this blank the button will not be printed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====LDAP password expiration settings====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Expiration&lt;br /&gt;
| &lt;br /&gt;
* Setting this to &#039;&#039;No&#039;&#039; will make Moodle not to check if the password of the user has expired or not.&lt;br /&gt;
* Setting this to &#039;&#039;LDAP&#039;&#039; will make Moodle check if the LDAP password of the user has expired or not, and warn her a number of days before the password expires.&lt;br /&gt;
&lt;br /&gt;
Current code only deals with Novell eDirectory LDAP server and MS-AD.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server or MS-AD, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Expiration warning&lt;br /&gt;
| This value sets how many days in advance of password expiration the user is warned that her password is about to expire.&lt;br /&gt;
|-&lt;br /&gt;
| Expiration attribute.&lt;br /&gt;
| The LDAP user attribute used to check password expiration. This option takes a default value based on the &#039;&#039;User type&#039;&#039; value you choosed above. &amp;lt;u&amp;gt;So unless you need something special, you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace logins&lt;br /&gt;
| This setting is specific to Novell eDirectory. If set to &#039;&#039;Yes&#039;&#039;, enable LDAP gracelogin support. After password has expired the user can login until gracelogin count is 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So unless you have Novell eDirectory server and want to allow gracelogin support, choose &#039;&#039;No&#039;&#039; here.&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Grace login attribute&lt;br /&gt;
| This setting is currently not used in the code (and is specific to Novell eDirectory). &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;So you don&#039;t need to fill this in.&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Enable user creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Create users externally&lt;br /&gt;
| New (anonymous) users can self-create user accounts on the external LDAP server and confirm them via email. If you enable this, remember to also configure module-specific options for user creation and to fill in some instructions in &#039;&#039;auth_instructions&#039;&#039; field in Administration &amp;gt;&amp;gt; Users &amp;gt;&amp;gt; Authentication &amp;gt;&amp;gt; Manage authentication. Otherwise the new users won&#039;t be able to self-create new accounts.&lt;br /&gt;
&lt;br /&gt;
As of now, only Novell eDirectory and MS-AD can create users externally.&lt;br /&gt;
|-&lt;br /&gt;
| Context for new users&lt;br /&gt;
| Specify the context where users are created. This context should be different from other users&#039; contexts to prevent security issues. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Course creation====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Creators&lt;br /&gt;
| The DN of the group that contains all of your Moodle creators. This is typically a posixGroup with a &amp;quot;memberUid&amp;quot; attribute for each user you want to be a creator.  If your group is called &#039;&#039;creators&#039;&#039;, type &#039;&#039;&#039;cn=creators,ou=moodleusers,dc=my,dc=organization,dc=domain&#039;&#039;&#039; here.  Each memberUid attribute contains the CN of a user who is authorized to be a creator.  Do not use the user&#039;s full DN (e.g.,  not &#039;&#039;&#039;memberUid: cn=JoeTeacher,ou=moodleusers,dc-my,dc=organizations,dc=domain&#039;&#039;&#039;, but rather &#039;&#039;&#039;memberUid: JoeTeacher&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In eDirectory, the objectClass for a group is (by default) not &#039;&#039;&#039;posixGroup&#039;&#039;&#039; but &#039;&#039;&#039;groupOfNames,&#039;&#039;&#039; whose member attribute is &#039;&#039;&#039;member,&#039;&#039;&#039; not &#039;&#039;&#039;memberUid,&#039;&#039;&#039; and whose value is the full DN of the user in question.  Although you can probably modify Moodle&#039;s code to use this field, a better solution is just to add a new &#039;&#039;&#039;objectClass&#039;&#039;&#039; attribute of &#039;&#039;&#039;posixGroup&#039;&#039;&#039; to your creators group and put the CNs for each creator in a &#039;&#039;&#039;memberUid&#039;&#039;&#039; attribute.&lt;br /&gt;
&lt;br /&gt;
In MS Active Directory, you will need to create a security group for your creators to be part of and then add them all. If your ldap context above is &#039;ou=staff,dc=my,dc=org&#039; then your group should then be &#039;cn=creators,ou=staff,dc=my,dc=org&#039;. If some of the users are from other contexts and have been added to the same security group, you&#039;ll have to add these as separate contexts after the first one using the same format.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Cron synchronization script====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Removed ext user&lt;br /&gt;
| Specify what to do with internal user account during mass synchronization when user was removed from external source. Only suspended users are automatically revived if they reappear in ext source.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====NTLM SSO====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| Enable&lt;br /&gt;
| If you want to use NTLM SSO (see details at [[NTLM_authentication]]), choose &#039;&#039;Yes&#039;&#039; here. Otherwise, choose &#039;&#039;No&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| Subnet&lt;br /&gt;
| Specify the subnets of the clients that will use NTLM SSO (see details at [[NTLM_authentication]]).&lt;br /&gt;
|-&lt;br /&gt;
| MS IE Fast Path?&lt;br /&gt;
| If all of you clients (or most of them) are using MS Internet Explorer, you can set this option to bypasses certain steps of the SSO login and speed up login times. This only works with MS Internet Explorer, but deals with other browsers in a sensible way (they are automatically sent to the plain login page).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
====Data Mapping====&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Field name&lt;br /&gt;
! Value to fill in&lt;br /&gt;
|-&lt;br /&gt;
| First name&lt;br /&gt;
| The name of the attribute that holds the first name of your users in your LDAP server. This is usually &#039;&#039;&#039;givenName&#039;&#039;&#039; or &#039;&#039;&#039;displayName&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Surname&lt;br /&gt;
| The name of the attribute that holds the surname of your users in your LDAP server. This is usually &#039;&#039;&#039;sn&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Email address&lt;br /&gt;
| The name of the attribute that holds the email address of your users in your LDAP server. This is usually &#039;&#039;&#039;mail&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| City/town&lt;br /&gt;
| The name of the attribute that holds the city/town of your users in your LDAP server. This is usully &#039;&#039;&#039;l&#039;&#039;&#039; (lowercase L) or &#039;&#039;&#039;localityName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| Country&lt;br /&gt;
| The name of the attribute that holds the country of your users in your LDAP server. This is usully &#039;&#039;&#039;c&#039;&#039;&#039; or &#039;&#039;&#039;countryName&#039;&#039;&#039; (not valid in MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Language&lt;br /&gt;
| &#039;&#039;&#039;preferredLanguage&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Description&lt;br /&gt;
| &#039;&#039;&#039;description&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Webpage&lt;br /&gt;
| &amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| ID Number&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Institution&lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Department&lt;br /&gt;
| The name of the attribute that holds the department name of your users in your LDAP server. This is usully &#039;&#039;&#039;departmentNumber&#039;&#039;&#039; (for posixAccount and maybe eDirectory) or &#039;&#039;&#039;department&#039;&#039;&#039; (for MS-AD).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 1&lt;br /&gt;
| The name of the attribute that holds the telephone number of your users in your LDAP server. This is usually &#039;&#039;&#039;telephoneNumber&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Phone 2&lt;br /&gt;
|  The name of the attribute that holds an additional telephone number of your users in your LDAP server. This can be &#039;&#039;&#039;homePhone&#039;&#039;&#039;, &#039;&#039;&#039;mobile&#039;&#039;&#039;, &#039;&#039;&#039;pager&#039;&#039;&#039;, &#039;&#039;&#039;facsimileTelephoneNumber&#039;&#039;&#039; or even others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Address&lt;br /&gt;
| The name of the attribute that holds the street address of your users in your LDAP server. This is usully &#039;&#039;&#039;streetAddress&#039;&#039;&#039; or &#039;&#039;&#039;street&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;This setting is optional&amp;lt;/u&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
===Setting up regular automatic synchronisation using cron===&lt;br /&gt;
There is a script located at /auth/ldap/auth_ldap_sync_users.php which will create or suspend/delete (see the setting above) all LDAP accounts automatically. Ideally, this is called from the command line once a day during a quiet time using exactly the same procedure as the standard [[Cron|cron]] job (so you will end up with two cron entries). It is important, however, to make sure that all of the above LDAP settings are working properly before you try this, as well as backing up your database and moodledata folders. Poor LDAP configuration could lead to users being wrongly deleted.&lt;br /&gt;
&lt;br /&gt;
If you find that the script is not running through all of your users properly and you have MS Active Directory + over 1000 users, this is because by default, MS AD only sends back 1000 users at a time. Follow the instructions [http://support.microsoft.com/kb/315071 here] to set the MaxPageSize setting to a number higher than your total number of users (both now and in future) to fix it. This is a forest-wide setting.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Active Directory help==&lt;br /&gt;
[[Active Directory]] is Microsoft&#039;s directory service. It is included in Windows 2000 Server and later versions of their operating system. For more information about subjects below, &#039;&#039;&#039;[[Active Directory|please go here]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*Warning: The PHP LDAP module does not seem to be present&lt;br /&gt;
*LDAP-module cannot connect any LDAP servers &lt;br /&gt;
*Getting correct CNs for Contexts and Creators&lt;br /&gt;
*Getting the right user_attribute&lt;br /&gt;
*Installing ldp.exe Server Tool&lt;br /&gt;
*Example Active Directory Configuration&lt;br /&gt;
*Child Domains and the Global Catalog in MS Active Directory&lt;br /&gt;
*Enabling the Global Catalog&lt;br /&gt;
*Active Directory with Moodle 1.8&lt;br /&gt;
*MS Active Directory + SSL&lt;br /&gt;
&lt;br /&gt;
==Advanced Scenarios - Multiple servers or locations==&lt;br /&gt;
For larger installations with  multiple LDAP servers, or multiple locations (contexts) in a LDAP tree.&lt;br /&gt;
&lt;br /&gt;
===Using multiple LDAP Servers===&lt;br /&gt;
Entering more than one name in the ldap_host_url field can provide some sort of resilience to your system. Simply use the syntax :&lt;br /&gt;
ldap://my.first.server ; ldap://my.second.server ; ...&lt;br /&gt;
&lt;br /&gt;
Of course, this will only work if all the servers share the same directory information, using a replication or synchronization mecanism once introduced in eDirectory and now generalized to the main LDAP-compatible directories.&lt;br /&gt;
&lt;br /&gt;
There is one drawback in Moodle 1.5 - 1.6 implementation of LDAP authentication : the auth_ldap_connect() function processes the servers sequentially, not in a round robin mode. Thus, if the primary server fails, you will have to wait for the connection to time out before switching to the following one.&lt;br /&gt;
&lt;br /&gt;
===Using multiple user locations (contexts) in your LDAP tree===&lt;br /&gt;
There is no need to use multiple user locations if your directory tree is flat, i.e. if all user accounts reside in a &#039;&#039;&#039;ou=people,dc=my,dc=organization,dc=domain&#039;&#039;&#039; or &#039;&#039;&#039;ou=people,o=myorg&#039;&#039;&#039; container. &lt;br /&gt;
&lt;br /&gt;
At the opposite, if you use the ACL mecanism to delegate user management, there are chances that your users will be stored in containers like &#039;&#039;&#039;ou=students,ou=dept1,o=myorg&#039;&#039;&#039; and &#039;&#039;&#039;ou=students,ou=dept2,o=myorg&#039;&#039;&#039; ...&lt;br /&gt;
&lt;br /&gt;
Then there is an alternative :&lt;br /&gt;
* Look at the &#039;&#039;&#039;o=myorg&#039;&#039;&#039; level with the ldap_search_sub attribute set to &#039;&#039;&#039;yes&#039;&#039;&#039;.&lt;br /&gt;
* Set the ldap_context to &#039;&#039;&#039;ou=students,ou=dept1,o=myorg ; ou=students,ou=dept2,o=myorg&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Choosing between these two solutions supposes some sort of benchmarking, as the result depends heavily on the structure of your directory tree &#039;&#039;&#039;and&#039;&#039;&#039; on your LDAP software indexing capabilities. Simply note that there is a probability in such deep trees that two users share the same &#039;&#039;common name&#039;&#039; (cn), while having different &#039;&#039;distinguished names&#039;&#039;. Then only the second solution will have a deterministic result (returning allways the same user).&lt;br /&gt;
&lt;br /&gt;
===Using LDAPS (LDAP + SSL)===&lt;br /&gt;
====Enabling LDAPS on the LDAP server side====&lt;br /&gt;
&lt;br /&gt;
* [[Active_Directory#MS_Active_Directory_.2B_SSL|Enabling LDAPS on MS Active Directory ]]&lt;br /&gt;
&lt;br /&gt;
====Enabling LDAPS on the client side (Moodle server)====&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on MS Windows, you need to tell PHP&#039;s OpenLDAP extension to disable SSL server certificate checking. You must create a directory called &#039;&#039;C:\OpenLDAP\sysconf&#039;&#039;. In this directory, create a file called &#039;&#039;ldap.conf&#039;&#039; with the following content (If you are using certain versions of PHP 5.3.x you may need to place the file at other locations, [http://bugs.php.net/bug.php?id=48866 see PHP bug #48866]):&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
* If you are running Moodle on Linux or any other Unix-like operating system, and you want to disable SSL server certificate checking, you need to edit the OpenLDAP client configuration file (usually /etc/ldap.conf or /etc/ldap/ldap.conf or even /etc/openldap/ldap.conf) and make sure you have a line like the following one:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT never&lt;br /&gt;
&lt;br /&gt;
Now you should be able to use &#039;&#039;&#039;ldaps://&#039;&#039;&#039; when connecting to your LDAP server.&lt;br /&gt;
&lt;br /&gt;
If you have the certificate of the LDAPS server as a file and want to check the certificate for the connection, copy the certificate file to an arbitary directory (e.g. /etc/ldap/certificate.pem) on your client and change the content of the &#039;&#039;ldap.conf&#039;&#039; as follows:&lt;br /&gt;
&lt;br /&gt;
 TLS_REQCERT demand&lt;br /&gt;
 TLS_CACERT  /etc/ldap/certificate.pem&lt;br /&gt;
&lt;br /&gt;
When the requested server certificate is bad or not provided, the connection to the LDAPS server is immediately terminated.&lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==Appendices==&lt;br /&gt;
===ldap auth_user_create() only suports Novell===&lt;br /&gt;
&lt;br /&gt;
After configuring user authentication with ldap I realized ldap only support edir (Novell) when combining ldap an email user confirmation. For example in my case (I use openldap) I have the following error after filling the user form:&lt;br /&gt;
&lt;br /&gt;
auth: ldap auth_user_create() does not support selected usertype:&amp;quot;rfc2307&amp;quot; (..yet)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting Resource Limits RedHat Directory Server ===&lt;br /&gt;
&lt;br /&gt;
Operational attributes can be set for the bind user DN using the command-line. &lt;br /&gt;
One can simply use ldapmodify to add the following attributes:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Attribute Name &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| nsLookThroughLimit&lt;br /&gt;
| Specifies how many entries are examined for a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsSizeLimit &lt;br /&gt;
| Specifies the maximum number of entries the server returns to a client application in response to a search operation. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsTimeLimit &lt;br /&gt;
| Specifies the maximum time the server spends processing a search operation. Giving this attribute a value of -1 indicates that there is no time limit.&lt;br /&gt;
|-&lt;br /&gt;
| nsIdleTimeout 	        &lt;br /&gt;
| Specifies the time a connection to the server can be idle before the connection is dropped. The value is given in seconds. Giving this attribute a value of -1 indicates that there is no limit.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; LDAP Console Command-Line&lt;br /&gt;
&lt;br /&gt;
 ldapmodify -h redhat_dir_server -p 389 -D &amp;quot;cn=directory manager&amp;quot; -w secretpwd&lt;br /&gt;
&lt;br /&gt;
 dn: uid=MoodleAdmin,ou=system,dc=myschool,dc=edu&lt;br /&gt;
 changetype: modify&lt;br /&gt;
 add:nsSizeLimit&lt;br /&gt;
 nsSizeLimit: 1000&lt;br /&gt;
 &amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[LDAP_authentication#Table of Contents|Table of Contents]]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[NTLM_authentication]]&lt;br /&gt;
* [[Active_Directory]]&lt;br /&gt;
* [[LDAP enrolment]]&lt;br /&gt;
* [http://download.moodle.org/download.php/docs/en/how-to_guides/ldap_auth_and_enrolment_set-up.pdf LDAP auth and enrolment set-up guide] (PDF 227KB)&lt;br /&gt;
&lt;br /&gt;
Using Moodle:&lt;br /&gt;
* [http://moodle.org/mod/forum/view.php?id=42 User authentication forum]&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=32168 PHP LDAP module does not seem to be present] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=140901 Syncronisation with AUTH_LDAP_SYNC_USERS.PHP produces fewer accounts than it should] forum discussion&lt;br /&gt;
* [http://moodle.org/mod/forum/discuss.php?d=17198 Using multiple LDAP servers] forum discussion&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Authentication]]&lt;br /&gt;
&lt;br /&gt;
[[es:LDAP_authentication]]&lt;br /&gt;
[[fr:Utiliser un serveur LDAP]]&lt;br /&gt;
[[ja:LDAP認証]]&lt;br /&gt;
[[zh:LDAP认证]]&lt;br /&gt;
[[de:Authentifizierung über LDAP]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Active_Directory&amp;diff=76060</id>
		<title>Active Directory</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Active_Directory&amp;diff=76060"/>
		<updated>2010-09-22T16:47:20Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Old instructions for updating MaxPageSize were incorrect - updated with details from &amp;#039;LDAP Authentication&amp;#039; page instead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Microsoft&#039;s Active Directory (AD) provides a variety of network directory services including Lightweight Directory Access Protocol (LDAP) like functions.  It is included in Windows 2000 Server and later versions of their operating system.   The focus of this page will be with the [[LDAP authentication]] functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Trouble shooting AD and LDAP authentication==&lt;br /&gt;
===Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled.===&lt;br /&gt;
This usually means that the main ldap dll or one of the supporting dlls are missing.&lt;br /&gt;
Let&#039;s start with the main one itself. &lt;br /&gt;
Browse to &amp;lt;nowiki&amp;gt;http://(moodleserver)/admin/phpinfo.php&amp;lt;/nowiki&amp;gt; and examine the &amp;quot;Configuration File (php.ini) Path&amp;quot; field to determine which php.ini is being used and open it with an editor. Find the line &#039;extension=php_ldap.dll&#039; and take out the semi-colon if it is there. That semi-colon will stop it loading the module all together! &lt;br /&gt;
While you have that file open, search for &#039;extension_dir&#039; and note which folder it is set to. Open that folder and ensure the php_ldap.dll file is in there. If it isn&#039;t then put it in there.&lt;br /&gt;
If that still hasn&#039;t fixed it you are missing a supporting dll, but you don&#039;t get told that. To see what dlls are missing open the Command Prompt and navigate to the php directory and execute the following line &#039;php -m&#039;. You should get some error messages now. Ugly, but at least they give you information! Find the dlls listed and copy them to the php directory. You may now need to restart the apache/httpd service. Run &#039;php -m&#039; again and you should be error free and the message in Moodle should be gone now.&lt;br /&gt;
&lt;br /&gt;
===LDAP-module cannot connect any LDAP servers===&lt;br /&gt;
 LDAP-module cannot connect any LDAP servers: &lt;br /&gt;
 Server: &#039;ldap://my.ldap.server/&#039; &lt;br /&gt;
 Connection: &#039;Resource id #26&#039; Bind result: &#039;&#039;&lt;br /&gt;
Getting this message when you are trying to log in is a result of incorrect details for the Bind user, or the user account having insufficient permissions in Active Directory. The best way to test and resolve this is use ldp.exe to test binding until it suceeds. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open the program and Connect to AD, giving the server name, then from the Connection menu choose Bind. Enter the details you think are correct and you will probably find that an error is returned. Try adjusting the accounts priveleges or another account until you are returned an &amp;quot;Authenticated as&amp;quot; message.&lt;br /&gt;
Once you are sure your account can be used to bind to AD, check that the DN of that users name is correct. Expand the tree on the left until you find the user you used to bind. Right click on that item and choose Copy DN. Go to the User Authentication page in Moodle and paste the value into the ldap_bind_dn field. Add the password and you can now feel safe your user is binding sucessfully.&lt;br /&gt;
&lt;br /&gt;
===Getting correct CNs for Contexts and Creators===&lt;br /&gt;
For those not familiar with AD this could be very confusing, and not that easy for some who are familiar with it. Again, ldp.exe is your friend. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open it up and expand the tree on the left until you find the group or user you want to use and right click on it and select Copy DN. Go back to the Moodle User Authentication page and paste that value into either ldap_contexts or ldap_creators.&lt;br /&gt;
&lt;br /&gt;
===Getting the right user_attribute===&lt;br /&gt;
By default, Moodle uses an accounts cn (full name) to verify against, but most networks don&#039;t use a full given name for logon as it&#039;s too easy to guess and you can easily have two people with the same name. If this is the case for you too you need to tell Moodle to look at another field for the logon id.&lt;br /&gt;
In ldp.exe navigate the tree on the left to find a user account, preferably your own. Double-click the item in the tree and full-details will be loaded into the screen on the right. Look down the details until you find your logon id and note the item listed against it. For me, and a lot of people, it is sAMAccountName. Copy this name and paste it into the ldap_user_attribute on the Moodle User Authentication page.&lt;br /&gt;
There are instructions on installing ldp.exe below.&lt;br /&gt;
&lt;br /&gt;
===Installing ldp.exe Server Tool===&lt;br /&gt;
ldp.exe comes as part of the Server Tools on most versions of Windows Server. Find your Windows Server installation disc and find a folder on it called Support\Tools. In there will be a SupTools.msi which will install the server tools if run. You should now have a folder under Program Files called Support Tools, in which will be ldp.exe. ldp.exe is also available in the Windows XP Support Tools, which you can download from Microsoft [http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&amp;amp;displaylang=en here]. Alternatively, a single download of ldp.exe is available [http://www.computerperformance.co.uk/w2k3/utilities/ldp.htm here].&lt;br /&gt;
&lt;br /&gt;
===Example Active Directory Configuration===&lt;br /&gt;
Below is an example configuration for Active Directory. As detailed above, the values may vary based on your local Active Directory configuration, but should provide a good starting point for most cases.&lt;br /&gt;
&lt;br /&gt;
 ldap_host_url = ldap://ads.example.com&lt;br /&gt;
 ldap_version = 3&lt;br /&gt;
 ldap_preventpassindb = yes&lt;br /&gt;
 ldap_bind_dn = bind-user@example.com&lt;br /&gt;
 ldap_bind_pw = bind-password&lt;br /&gt;
 ldap_user_type = MS ActiveDirectory&lt;br /&gt;
 ldap_contexts = ou=moodleusers,dc=example,dc=com&lt;br /&gt;
 ldap_user_attribute = sAMAccountName&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the ldap_bind_dn value should work in either the CN=bin-user,CN=Users,DC=example,DC=com format as shown in the main instructions or the bind-user@example.com format shown in this example.&lt;br /&gt;
&lt;br /&gt;
==Global Catalogs==&lt;br /&gt;
Moodle currently only has limited support for multiple domain controllers; specifically it expects each of the LDAP servers listed to contain identical sets of information. If you have users in multiple domains this presents an issue. One solution when working with MS-AD is to use the Global Catalog. The Global Catalog is designed to be a read-only, partial representation of an entire MS-AD forest, designed for searching the entire directory when the domain of the required object is not known.&lt;br /&gt;
&lt;br /&gt;
===Enabling the Global Catalog===&lt;br /&gt;
&lt;br /&gt;
The Global Catalog is available on Windows 2000 and Windows 2003 Active Directory servers. To enable, open the ‘Active Directory Sites and Services’ MMC (Microsoft Management Console) snap-in. Extend ‘Sites’ and then the name of the Site containing the active directory forest you wish to use. Expand the server you wish to enable the Global Catalog on, right click ‘NTDS settings’ and select the ‘Properties’ tab. To enable, simply click the ‘Global Catalog’ checkbox. Under a Windows 2000 server it is necessary to restart the server (although it won’t prompt you to); under Windows 2003 server it is not necessary to restart the server. In either case you will generally have to wait for the AD forest to replicate before the Global Catalog offers a representation of the entire AD forest. Changes made in Active Directory will also be subject to a short delay due to the latency involved with replication. If your AD servers are firewalled port 3268 will need to be opened for Global Catalog servers.&lt;br /&gt;
If your organisation uses Microsoft Exchange then it its highly likely that at least one Domain Controller will already have Global Catalog enabled – Exchange 2000 and 2003 rely on the Global Catalog for address information, users also access the Global Catalog when using the GAL (Global Address List)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Child Domains===&lt;br /&gt;
If your organisation has a main domain example.org, staff and students are contained in two child domains staff.example.org and students.example.org. The 3 domains (example.org, staff.example.org and students.example.org) each have a domain controller (dc01, dc02 and dc03 respectively.) Each domain controller contains a full, writable, representation of only the objects that belong to its domain. However, assuming that the Global Catalog has been enabled (see below) on one of the domain controllers (for example dc01) a query to the Global Catalog would reveal matching objects from all three domains. The Global Catalog is automatically maintained through replication across the active directory forest, it can also be enabled on multiple servers (if, for example, you need redundancy / load balancing.)&lt;br /&gt;
&lt;br /&gt;
To make use of this in Moodle to allow logins from multiple domains is simple. The Global Catalog runs on port 3268 as opposed to 389 for standard LDAP queries. As a result, still assuming the Global Catalog is running on dc01, the &#039;&#039;&#039;&#039;ldap_host_url&#039;&#039;&#039;&#039; would be &#039;&#039;ldap://dc01.example.org:3268&#039;&#039;. The rest of the settings are the same as for other MS-AS Auth setups.&lt;br /&gt;
&lt;br /&gt;
You should use the &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting to indicate the locations of individuals you wish to grant access. To extend the example above a little: In the example.org domain users are all in the&#039;&#039; &#039;Users&#039; &#039;&#039;OU, in the staff.example.org domain users are in two OUs at the root of the domain,&#039;&#039; &#039;Support Staff&#039; &#039;&#039;and&#039;&#039; &#039;Teaching Staff&#039; &#039;&#039;, and in the students.example.org domain students are in an OU indicating the year that they enrolled, all of which are under the&#039;&#039; &#039;Students&#039; &#039;&#039;OU. As a result our &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting may look a little like this:&#039;&#039; &#039;OU=Users,DC=example,DC=org; OU=Support Staff,DC=staff,DC=example,DC=org; OU=Teaching Staff,DC=staff,DC=example,DC=org; OU=Students,DC=students,DC=example,DC=org&#039;&#039;.&#039; The &#039;&#039;&#039;&#039;ldap_search_sub&#039;&#039;&#039;&#039; option should be set to&#039;&#039; &#039;Yes&#039; &#039;&#039;to allow moodle to search within the child OUs.&lt;br /&gt;
&lt;br /&gt;
Its worth noting that the Global Catalog only contains a partial representation of the attributes of each object, as defined in the Partial Attribute Set supplied by Microsoft. However common information likely to be of use to a general Moodle installation (Forename, Surname, Email Address, sAMAccountName etc) is included in the set. For specific needs the schema can be altered to remove or add various attributes - see Microsoft [http://support.microsoft.com/kb/248717 KB248717] for more information.&lt;br /&gt;
&lt;br /&gt;
In most cases the Global Catalog is read-only, update queries must be made over the standard LDAP ports to the domain controller that holds the object in question (in our example, updating a student&#039;s details would require an LDAP query to the students.example.org domain controller - dc03, it would not be possible to update details by querying the Global Catalog.) The exception to this would be in an environment where there is only a single domain in the active directory forest; in this case the Global Catalog holds a writable full set of attributes for each object in the domain. However, for the purposes of Moodle authorisation, there would be no need to use the Global Catalog in this case.&lt;br /&gt;
&lt;br /&gt;
===Group Policy Objects===&lt;br /&gt;
Modifying the number of Active Directory objects to search: &lt;br /&gt;
&lt;br /&gt;
By default most Active Directory Lightweight Directory Service (ADLS) only allows searches returning a limited number of objects per search. Since there is currently no Page control support in PHP 5.2.x which would enable smaller page searches you may need to modify your MaxPageSize setting to make sure LDAP Client searches can return enough user objects to support the number of authenticating users. &lt;br /&gt;
&lt;br /&gt;
If you find that the script is not running through all of your users properly and you have MS Active Directory + over 1000 users, follow the instructions [http://support.microsoft.com/kb/315071 here] to set the MaxPageSize setting to a number higher than your total number of users (both now and in future) to fix it.&lt;br /&gt;
&lt;br /&gt;
== Active Directory with Moodle 1.8==&lt;br /&gt;
There is an issue with the PHP ldap options that are required for Active Directory access in version 1.8 of Moodle. &lt;br /&gt;
&lt;br /&gt;
Using moodle on a LAMP platform with authentication to Active Directory may give some errors. &lt;br /&gt;
&lt;br /&gt;
Check this bug [http://tracker.moodle.org/browse/MDL-10921 MDL-10921] or this post http://moodle.org/mod/forum/discuss.php?d=78316 for further information.&lt;br /&gt;
&lt;br /&gt;
==MS Active Directory + SSL ==&lt;br /&gt;
&lt;br /&gt;
If the Certificate Authority is not installed you&#039;ll have to install it first as follows:&lt;br /&gt;
# Click &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Control Panel&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Add or Remove programs.&#039;&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;&#039;Add/Remove Windows Components&#039;&#039;&#039; and select &#039;&#039;&#039;Certificate Services.&#039;&#039;&#039;&lt;br /&gt;
# Follow the procedure provided to install the &#039;&#039;&#039;Certificate Authority&#039;&#039;&#039;. Enterprise level is a good choice.&lt;br /&gt;
&lt;br /&gt;
Verify that SSL has been enabled on the server by installing suptools.msi from Windows installation cd&#039;s \Support\tools directory. After support tools installation:&lt;br /&gt;
# Select &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Run&#039;&#039;&#039;, write &#039;&#039;&#039;ldp&#039;&#039;&#039; in the Open field.&lt;br /&gt;
# From the ldp window select &#039;&#039;&#039;Connection&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Connect&#039;&#039;&#039; and supply valid hostname and port number &#039;&#039;&#039;636&#039;&#039;&#039;. Also select the SSL check box.&lt;br /&gt;
&lt;br /&gt;
If successful, you should get information about the connection.&lt;br /&gt;
&lt;br /&gt;
See [[LDAP_authentication#Enabling_LDAPS_on_the_client_side_.28Moodle_server.29|Enabling LDAPS on the client side (Moodle server)]] for details on the client side configuration.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[LDAP authentication]] in Moodle&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Directory_service Directory services] overview in Wikipedia&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol LDAP] in Wikipedia&lt;br /&gt;
&lt;br /&gt;
[[ja:Active Directory]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Upgrading&amp;diff=72905</id>
		<title>Upgrading</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Upgrading&amp;diff=72905"/>
		<updated>2010-06-11T13:46:59Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Changed around the order of the installation instructions. Pretty sure this is correct now&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moodle is designed to upgrade cleanly from one version to the next.  Please refer to [[Upgrading to Moodle 1.6]], [[Upgrading to Moodle 1.8]], [[Upgrading to Moodle 1.9]] or [[Upgrading to Moodle 2.0]] for particular considerations related to the upgraded version.  &lt;br /&gt;
Changes that have been made to the original code, such as installing a contributed module (non-standard module) or a site edit of a php file, may not upgrade. This includes modifications to standard themes that might be overwritten during an upgrade.&lt;br /&gt;
&lt;br /&gt;
* For those using cpanel, you can use [http://ic.eflclasses.org/tutorials/howtoupgrademoodlewithcpanel.swf this tutorial]. It is a bit rough around the edges and is a little dated, but you should get the idea.&lt;br /&gt;
&lt;br /&gt;
* For those who have installed the package version of Moodle using an Ubuntu/Kubuntu/Debian package manager, upgrade instructions can be found [[Ubuntu_Debian_Upgrades|here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
When upgrading a Moodle installation you should follow these steps:&lt;br /&gt;
&lt;br /&gt;
==Check the requirements==&lt;br /&gt;
Spend some time re-reading the [[Installing Moodle | installation documentation]] and documentation for the new version. Check the system requirements for the target version you want to upgrade-to in &#039;&#039;Administration &amp;gt; Server &amp;gt; [[Environment]]&#039;&#039;.&lt;br /&gt;
==Put your Site into Maintenance Mode==&lt;br /&gt;
Before you begin upgrading your site, you should put it into [[Maintenance_mode | Maintenance Mode]] to stop any non-admin users from logging in.&lt;br /&gt;
&lt;br /&gt;
== Backup important data ==&lt;br /&gt;
There are three areas that need backing up:&lt;br /&gt;
#Moodle software directory/folder (For example, everything in server/htdocs/moodle)&lt;br /&gt;
#Moodle data (For example, server/moodledata)&lt;br /&gt;
#Moodle SQL database&lt;br /&gt;
&lt;br /&gt;
Experienced site administrators know that it is a best practice (a very good idea) to make a backup of any production system before a major upgrade. In fact, it is a good idea to automate your server to backup your Moodle installation daily.  Most upgrades on sites that have used the standard Moodle packages (no contributed code and no little tweaks to the php files), will not have any major issue.  &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; One more time, &amp;quot;do not risk what you can not afford to lose&amp;quot;: do regular backups, make sure it backed up and know how to restore it! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Moodle software directory ===&lt;br /&gt;
Make a separate copy of these files before the upgrade, so that you can retrieve your config.php and any modules you have added like themes, and languages.&lt;br /&gt;
&lt;br /&gt;
The best way is to rename the current Moodle directory to something else, then unpack the new Moodle archive into the old location.&lt;br /&gt;
&lt;br /&gt;
=== Moodle data directory ===&lt;br /&gt;
The default name for this folder is moodledata. This is where uploaded content resides (such as course resources and student assignments). It is very important to have a backup of these files on a regular basis as a best practice. Sometimes upgrades may move or rename directories within your data directory. &lt;br /&gt;
&lt;br /&gt;
In Linux you can use the cp (copy) command to make a temporary copy of the moodledata. example:&lt;br /&gt;
====Linux====&lt;br /&gt;
 mkdir /var/moodledata_backup&lt;br /&gt;
 cp -rv /var/moodledata/* /var/moodledata_backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SQL database ===&lt;br /&gt;
Most Moodle upgrades will alter the SQL database tables, adding or changing fields. Each SQL server program (for example,MySQL, Postgresql, Oracle) has different ways to backup. In a MySQL server, one way of backing up is to &#039;dump&#039; it to a single SQL file. The following example shows Unix commands to dump the database called &amp;quot;moodle&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -C -Q -e --create-options moodle &amp;gt; moodle-backup-2007-04-01.sql&lt;br /&gt;
&lt;br /&gt;
Substitute your database user account for username. The -p flag will prompt you for the password for the username specified by -u.&lt;br /&gt;
&lt;br /&gt;
If your database host is different from the host you want to execute the backup command (usually the web server), you have to specify it with the -h option to mysqldump:&lt;br /&gt;
&lt;br /&gt;
 mysqldump -u username -p -h databasehost -C -Q -e --create-options moodle &amp;gt; moodle-backup-2007-04-01.sql &lt;br /&gt;
&lt;br /&gt;
You can also use the &amp;quot;Export&amp;quot; feature in Moodle&#039;s optional &amp;quot;MySQL Admin&amp;quot; web interface to do the same thing on all platforms. In Moodle v1.9 and greater, this is located in &#039;&#039;&#039;Site Administration&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Server&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Database&#039;&#039;&#039;. This interface can also be downloaded from http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=448. It is an integration of PHPMyAdmin for the Moodle administration interface.&lt;br /&gt;
&lt;br /&gt;
==== SQL dump caveats ====&lt;br /&gt;
There are a &#039;&#039;&#039;MANY&#039;&#039;&#039; options possible for mysqldump. &lt;br /&gt;
*Please talk with your Systems Administrator (if you have one) or similar to see if there are site-specific flags you should use for your SQL dump.&lt;br /&gt;
** For example, if your local installation is running MySQL 5.2 and you are moving to a system running MySQL 5.0 or 4.1, you really ought to use the &amp;quot;--compat=mysql40&amp;quot; flag. (This is not too uncommon of a situation given the nature of ISP hosting as compared to local user Moodle setups)&lt;br /&gt;
* This seems obvious, but should be said outright: These instructions only work for dumping from MySQL! Postgresql, Oracle, and other database servers have different tools to dump databases.&lt;br /&gt;
* Given the example mysql import lines, above, you really should use the --no-create-db flag. If your database locally is named something differently from the migration site, not including this flag could cause problems.&lt;br /&gt;
&lt;br /&gt;
== Install the new Moodle software ==&lt;br /&gt;
Upgrading can be a simple process or a more complicated process.  Sites that have not used contributed code and are migrating from say Moodle 1.x.1 to 1.x.3 &#039;&#039;&#039;should&#039;&#039;&#039; not have a problem.  However, we still recommend that with any production server that you have made a successful backup of the MySQL database, the moodledata directory and the moodle program folders and files.  &lt;br /&gt;
&lt;br /&gt;
*Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new installations. Review the backup section above.&lt;br /&gt;
&lt;br /&gt;
=== Standard install package ===&lt;br /&gt;
Having read the cautions about backups, download a copy of the standard install package. Here is a set of simple instructions for an average site.&lt;br /&gt;
*It is probably a good idea to use the site administration block&amp;gt;Server&amp;gt;Maintenance mode to prevent user activity as the site upgrades. &lt;br /&gt;
*Having moved your old Moodle software program files to another location, unzip or unpack the upgrade file so that all new the Moodle software program files are in the location the old files used to be in on the server.  Moodle will adjust SQL and moodledata if it needs to in the upgrade.&lt;br /&gt;
*Copy your old config.php file back to the new Moodle directory, along with any custom themes, blocks or files you have in your old version.&lt;br /&gt;
*Use the notification link in the site administration to start the upgrade process. You will see a series of lines indicating progress.  &lt;br /&gt;
*After a successful upgrade, turn off the maintenance mode for your users.&lt;br /&gt;
&lt;br /&gt;
=== Using a downloaded archive ===&lt;br /&gt;
*Do not overwrite an old installation unless you know what you are doing ... sometimes old files can cause problems in new installations. The best way is to rename the current Moodle directory to something else, then unpack the new Moodle archive into the old location.&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
 mv moodle moodle.backup&lt;br /&gt;
 tar xvzf moodle-1.1.tgz&lt;br /&gt;
&lt;br /&gt;
Next, copy across your config.php, any other plugins such as custom themes, and your .htaccess file if you created one:&lt;br /&gt;
&lt;br /&gt;
 cp moodle.backup/config.php moodle&lt;br /&gt;
 cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme&lt;br /&gt;
 cp -pr moodle.backup/mod/mymod moodle/mod/mymod&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to &lt;br /&gt;
&lt;br /&gt;
 sudo chown www-data moodle/config.php&lt;br /&gt;
&lt;br /&gt;
if necessary.&lt;br /&gt;
&lt;br /&gt;
where www-data is whatever user the Apache user is on your system. This is often &#039;apache&#039; or &#039;www&#039;.&lt;br /&gt;
You can find out by doing &#039;ls -l&#039; in your /var/www/moodle folder (or wherever your moodle site is)&lt;br /&gt;
and then looking at the owner and group.&lt;br /&gt;
&lt;br /&gt;
so you may see something like&lt;br /&gt;
&lt;br /&gt;
 ls -l&lt;br /&gt;
 ...lots of lines...&lt;br /&gt;
 -rw-r--r--   1 apache system     784 Jun 28  2007 config.php &lt;br /&gt;
 ...lots more lines...&lt;br /&gt;
&lt;br /&gt;
so the owner is apache and the group is system. &lt;br /&gt;
&lt;br /&gt;
To replicate this on your new system you can do  &#039;chown apache:system config.php&#039; &lt;br /&gt;
&lt;br /&gt;
or to do a whole group do&lt;br /&gt;
&lt;br /&gt;
 chown apache:system ./*&lt;br /&gt;
&lt;br /&gt;
and recursively&lt;br /&gt;
&lt;br /&gt;
 chown -R apache:system ./*&lt;br /&gt;
&lt;br /&gt;
=== Using CVS ===&lt;br /&gt;
&lt;br /&gt;
You can use CVS for updating or upgrading your Moodle.&lt;br /&gt;
First you need to do a CVS checkout in your (empty) Moodle root directory.&lt;br /&gt;
&lt;br /&gt;
You can use any of our [[CVS_for_Administrators#CVS_Servers|CVS Mirror servers]]. Just replace &#039;&#039;&#039;SERVER.cvs.moodle.org&#039;&#039;&#039; in the instructions below with the name of the mirror server you chose!.&lt;br /&gt;
&lt;br /&gt;
====For Linux servers====&lt;br /&gt;
&lt;br /&gt;
To do a CVS checkout of Moodle, you first have to logon to the Moodle CVS server.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle login&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  No password for anonymous, so just hit the Enter button.&lt;br /&gt;
&lt;br /&gt;
Go to the directory where you want the Moodle root to come and type&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -r MOODLE_18_STABLE moodle&amp;lt;/nowiki&amp;gt; &lt;br /&gt;
  (where MOODLE_18_STABLE is the desired version)&lt;br /&gt;
&lt;br /&gt;
To update, just go into the Moodle root directory and update to the new files:&lt;br /&gt;
&lt;br /&gt;
  cvs update -dP&lt;br /&gt;
To update to a new version type in the following and change 18 to whatever newest version upgrade number is&lt;br /&gt;
  cvs -Q update -dP -r MOODLE_18_STABLE&lt;br /&gt;
&lt;br /&gt;
Make sure you use the &amp;quot;d&amp;quot; parameter to create new directories if necessary, and the &amp;quot;P&amp;quot; parameter to prune empty directories.&lt;br /&gt;
&lt;br /&gt;
====For Windows servers====&lt;br /&gt;
&lt;br /&gt;
You can use Tortoise CVS to do the initial checkout and the updates.&lt;br /&gt;
&lt;br /&gt;
If you have been editing Moodle files, watch the messages very closely for possible conflicts. All your customised themes and non-standard plugins will be untouched.&lt;br /&gt;
&lt;br /&gt;
Do not forget to trigger the install process in the site administration block (see below).&lt;br /&gt;
&lt;br /&gt;
== Finishing the upgrade ==&lt;br /&gt;
&lt;br /&gt;
The last step is to trigger the upgrade processes within Moodle. &lt;br /&gt;
&lt;br /&gt;
To do this just visit the site administration block admin page (or &#039;&#039;&amp;lt;nowiki&amp;gt;http://example.com/moodle/admin&amp;lt;/nowiki&amp;gt;&#039;&#039;) and the &amp;quot;Notifications&amp;quot; link.&lt;br /&gt;
&lt;br /&gt;
Moodle will automatically detect the new version and perform all the SQL database or file system upgrades that are necessary. If there is anything it can&#039;t do itself (very rare) then you will see messages telling you what you need to do.&lt;br /&gt;
&lt;br /&gt;
Assuming all goes well (no error messages) then you can start using your new version of Moodle and enjoy the new features!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; Use the site administration block&amp;gt;Server&amp;gt;Maintenance mode to prevent users from changing data during the upgrade.&lt;br /&gt;
:&#039;&#039;TIP:&#039;&#039; If you are running a large scale Moodle site (e.g. have more tha 10,000+ courses and 40,000+ users), make sure that you do your own performance profiling testing.  Post a thread or check the [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum] and check [[Tracker]] for potential issues.&lt;br /&gt;
&lt;br /&gt;
== Verify the upgrade (optional) ==&lt;br /&gt;
&lt;br /&gt;
If you wish to confirm that the database definitions in the upgraded database match the definitions of a new, clean install (which they should) you might like to look at [[Verify Database Schema]].&lt;br /&gt;
&lt;br /&gt;
==Upgrading more than one version==&lt;br /&gt;
&lt;br /&gt;
In general, it is recommended to upgrade via each version of Moodle, for example 1.7 -&amp;gt; 1.9. An exception to this is when upgrading from 1.5 or 1.6, when it is recommended that 1.7 and 1.8 are skipped, in other words upgrade 1.5 -&amp;gt; 1.6 -&amp;gt; 1.9. (The main reason for this recommendation is that the default roles settings obtained when upgrading to 1.7 are not ideal for 1.8 onwards, 1.8 has problems with groups, etc.)&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[Installing Moodle]]&lt;br /&gt;
*[[Installation FAQ]]&lt;br /&gt;
*[[Upgrading to Moodle 1.6]]&lt;br /&gt;
*[[Upgrading to Moodle 1.8]]&lt;br /&gt;
*[[Upgrading to Moodle 1.9]]&lt;br /&gt;
*[[Upgrading to Moodle 2.0]]&lt;br /&gt;
*[[Environment]]&lt;br /&gt;
*[[Git]] Version control and upgrading&lt;br /&gt;
*Moodle.org [http://moodle.org/mod/forum/view.php?id=28 Installation problems forum] &lt;br /&gt;
*[http://ic.eflclasses.org/tutorials/howtoupgrademoodlewithcpanel.swf How to upgrade Moodle with cpanel tutorial] - screencasts of older Moodle/Cpanel install but useful (also, a very large file that will take some time to load).&lt;br /&gt;
&lt;br /&gt;
Using Moodle.org forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=26731&amp;amp;parent=125858 Using cvs]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=56915 Upgrading from 1.5.2 to 1.7]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=56991 Upgrade nightmares.... any help appreciated]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=62463 After upgrading i get &amp;quot;Your site may not be secure.&amp;quot; msg]&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=104887 Best practices for QA]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[es:Actualización de moodle]]&lt;br /&gt;
[[fr:Mise à jour]]&lt;br /&gt;
[[ja:アップグレード]]&lt;br /&gt;
[[nl:Upgraden]]&lt;br /&gt;
[[zh:升级]]&lt;br /&gt;
[[pl:Aktualizacja]]&lt;br /&gt;
[[de:Aktualisierung von Moodle]]&lt;br /&gt;
[[ru:Обновление]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=LDAP_enrolment&amp;diff=72394</id>
		<title>LDAP enrolment</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=LDAP_enrolment&amp;diff=72394"/>
		<updated>2010-05-24T15:07:03Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Added mention of distinguishedName for AD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Location: LDAP edit settings link in &#039;&#039;Administration &amp;gt; Courses &amp;gt; [[Enrolment plugins|Enrolments]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to set up LDAP enrollment==&lt;br /&gt;
This describes how to set up Lightweight Directory Access Protocol (LDAP) enrollment in Moodle (first written by Lars Jensen). [[LDAP enrolment]] works best in Moodle when used in conjunction with [[LDAP authentication]], and we&#039;re going to assume that you have already set Moodle up for LDAP authentication.&lt;br /&gt;
&lt;br /&gt;
=== Assumptions ===&lt;br /&gt;
&lt;br /&gt;
# You are running a recent version of Moodle. We have tested the setup presented here on versions 1.5.2+ and 1.6dev. It is likely to work on Moodle 1.4.5 as well.&lt;br /&gt;
# You are using LDAP authentication as your primary authentication method.&lt;br /&gt;
# Each user in has a uid attribute in the users LDAP record, that matches the ID number in the same users Moodle profile (this can easily be arranged with a mapping on the Moodle LDAP Authentication setup page - for Active Directory, use &#039;distinguishedName&#039;, without the quotes)&lt;br /&gt;
&lt;br /&gt;
=== The Course Setup ===&lt;br /&gt;
&lt;br /&gt;
Our setup involves the following course and user definitions:&lt;br /&gt;
&lt;br /&gt;
* Two courses, &#039;&#039;&#039;Math101&#039;&#039;&#039; and &#039;&#039;&#039;Eng201&#039;&#039;&#039;.&lt;br /&gt;
* Two teachers, &#039;&#039;&#039;TeacherA&#039;&#039;&#039; and &#039;&#039;&#039;TeacherB&#039;&#039;&#039;.&lt;br /&gt;
* Three students, &#039;&#039;&#039;StudentD&#039;&#039;&#039;, &#039;&#039;&#039;StudentE&#039;&#039;&#039;, and &#039;&#039;&#039;StudentF&#039;&#039;&#039;.&lt;br /&gt;
* StudentD and StudentE are enrolled as students in Math101, and TeacherA is enrolled as teacher of Math101. StudentE and StudentF are enrolled as students in Eng201, and TeacherA and TeacherB are both enrolled as teachers of Eng201.&lt;br /&gt;
&lt;br /&gt;
=== The LDAP Container Setup ===&lt;br /&gt;
&lt;br /&gt;
# Define two LDAP containers ou=StudentEnrollment and ou=TeacherEnrollment&lt;br /&gt;
# For each course we define an LDAP group entry (e.g a posixGroup entry) in the StudentEnrollment and TeacherEnrollment containers. Thus, we define a Math101 posixGroup under StudentEnrollment, and we define a Math101 posixGroup under TeacherEnrollment. We define the two Eng201 groups in a similar way. Be careful, &#039;&#039;&#039;the name of the posixGroup has to match the Course ID number of the Moodle course.&#039;&#039;&#039; Do not use the course short name, it will not work.&lt;br /&gt;
# Enroll students and teachers as members of in the LDAP-groups we just defined. This is done by entering the users uid attribute (idnumber) in the memberUid attribute of the relevant group:&lt;br /&gt;
#* TeacherA is a member of the Math101 group under TeacherEnrollment.&lt;br /&gt;
#* StudentD and StudentE are a members of the Math101 group under StudentEnrollment.&lt;br /&gt;
#* TeacherA and TeacherB are members of the Eng201 group under TeacherEnrollment&lt;br /&gt;
#* StudentE and StudentF are a members of the Eng201 group under StudentEnrollment.&lt;br /&gt;
&lt;br /&gt;
=== The LDAP Enrollment Configuration in Moodle ===&lt;br /&gt;
&lt;br /&gt;
The LDAP enrollment settings in Moodle corresponding to the above setup are as follows:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot;  cellpadding=&amp;quot;5&amp;quot;  border=&amp;quot;1&amp;quot;&lt;br /&gt;
! LDAP Enrollment Variable:&lt;br /&gt;
! Value:&lt;br /&gt;
|- &lt;br /&gt;
| enrol_ldap_student_contexts:&lt;br /&gt;
| ou=StudentEnrollment,dc=ldapserver,dc=tmcc,dc=edu&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_student_memberattribute:&lt;br /&gt;
| memberUid  (use &#039;member&#039; -without the quotes- for Active Directory)&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_teacher_contexts:&lt;br /&gt;
| ou=TeacherEnrollment,dc=ldapserver,dc=tmcc,dc=edu&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_teacher_memberattribute:&lt;br /&gt;
| memberUid  (use &#039;member&#039; -without the quotes- for Active Directory)&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_objectclass:&lt;br /&gt;
| posixGroup (use &#039;group&#039; -without the quotes- for Active Directory)&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_course_idnumber:&lt;br /&gt;
| cn&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_course_shortname:&lt;br /&gt;
| cn&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_course_fullname:&lt;br /&gt;
| cn&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_autocreate:&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Additionally, since you are using LDAP authentication, you should also map the Moodle &amp;quot;ID number&amp;quot; of users to the &amp;quot;uid&amp;quot; in the ldap entry of the user. This is done on the Moodle LDAP Authentication page (not the LDAP Enrollment page).&lt;br /&gt;
&lt;br /&gt;
=== Automatic course creation ===&lt;br /&gt;
&lt;br /&gt;
Courses can be created automatically if there are LDAP enrolments to a course that doesn&#039;t yet exist in Moodle. To enable this, set &#039;&#039;&#039;enrol_ldap_autocreate&#039;&#039;&#039; to &#039;&#039;&#039;Yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enrol_ldap_category&#039;&#039;&#039; field sets the category for the automatically created courses.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;enrol_ldap_template&#039;&#039;&#039; field can contain the &#039;&#039;shortname&#039;&#039; of a course that is used as a template in the automatic course creation.&lt;br /&gt;
&lt;br /&gt;
=== Notes: ===&lt;br /&gt;
&lt;br /&gt;
# You do not need to create the courses manually in Moodle. If they don&#039;t exist, they will be created when the first enrolled user login.&lt;br /&gt;
# We are using the same string cn and uid in a users LDAP record. This is not necessary, I believe. However, if you use different values, you will need to define the ldap_user_attribute to uid in the LDAP authentication setup.&lt;br /&gt;
# The value of the group id number (gidNumber) defined for the groups in step 2 of the LDAP Container Setup above is not critical. It is not used in this setup.&lt;br /&gt;
# The attached .ldif file assumes that users are in the ou=People container in LDAP. You will need to configure your LDAP Authentication setup to reflect this (ldap_contexts variable).&lt;br /&gt;
# User passwords for this setup are defined in the attached .ldif file.&lt;br /&gt;
# If you use the attached .ldif file, you&#039;ll need to edit the ldap server information (the &amp;quot;dn=&amp;quot; lines).&lt;br /&gt;
&lt;br /&gt;
==Other LDAP Layout==&lt;br /&gt;
&lt;br /&gt;
I do suggest to create a new LDAP object, say &amp;lt;TT&amp;gt;moodleCourse&amp;lt;/TT&amp;gt;, which contains all information,&amp;amp;amp; members of the course, including teachers, students a.s.o. For instance (OpenLDAP):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
attributetype ( oidAttrBase:44 NAME ( &#039;teacherUid&#039; ) SUP memberUid&lt;br /&gt;
        DESC &#039;which person is a teacher of this course&#039;&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
objectclass ( oidObjRoot:14 NAME &#039;moodleCourse&#039; SUP top STRUCTURAL&lt;br /&gt;
        DESC &#039;course available in Moodle&#039;&lt;br /&gt;
        MUST ( cn  )&lt;br /&gt;
        MAY ( owner $ gn $ sn $ seeAlso $ description $ memberUid $ teacherUid )&lt;br /&gt;
        )&lt;br /&gt;
&lt;br /&gt;
Note: Openldap 2.x will need something like:&lt;br /&gt;
&lt;br /&gt;
attributetype   ( 1.2.1.1.1.1.2.1 NAME &#039;teacherUid&#039;&lt;br /&gt;
                SUP memberUid&lt;br /&gt;
                DESC &#039;which person is a teacher of this course&#039;&lt;br /&gt;
                EQUALITY caseExactIA5Match&lt;br /&gt;
                SUBSTR caseExactIA5SubstringsMatch&lt;br /&gt;
                SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )&lt;br /&gt;
&lt;br /&gt;
objectclass     ( 1.2.1.1.1.1.1.1&lt;br /&gt;
                NAME &#039;moodleCourse&#039;&lt;br /&gt;
                SUP top STRUCTURAL&lt;br /&gt;
                DESC &#039;course available in Moodle&#039;&lt;br /&gt;
                MUST ( cn  )&lt;br /&gt;
                MAY ( owner $ gn $ sn $ seeAlso $ description $ memberUid $ teacherUid )&lt;br /&gt;
                )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The configuration is like this, in &amp;lt;B&amp;gt;bold&amp;lt;/B&amp;gt; you see required changes, in &amp;lt;I&amp;gt;italic&amp;lt;/I&amp;gt; you see&lt;br /&gt;
useful changes.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot;  cellpadding=&amp;quot;5&amp;quot;  border=&amp;quot;1&amp;quot;&lt;br /&gt;
! LDAP Enrollment Variable:&lt;br /&gt;
! Value:&lt;br /&gt;
|- &lt;br /&gt;
| enrol_ldap_student_contexts:&lt;br /&gt;
| &amp;lt;I&amp;gt;ou=moodle,ou=groups,dc=ldapserver,dc=tmcc,dc=edu&amp;lt;/I&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_student_memberattribute:&lt;br /&gt;
| memberUid&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_teacher_contexts:&lt;br /&gt;
| &amp;lt;I&amp;gt;ou=moodle,ou=groups,dc=ldapserver,dc=tmcc,dc=edu&amp;lt;/I&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_teacher_memberattribute:&lt;br /&gt;
| &amp;lt;B&amp;gt;teacherUid&amp;lt;/B&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_objectclass:&lt;br /&gt;
| &amp;lt;B&amp;gt;moodleGroup&amp;lt;/B&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_course_idnumber:&lt;br /&gt;
| &amp;lt;I&amp;gt;cn&amp;lt;/I&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_course_shortname:&lt;br /&gt;
| givenname&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_course_fullname:&lt;br /&gt;
| sn&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_course_summary:&lt;br /&gt;
| description&lt;br /&gt;
|-&lt;br /&gt;
| enrol_ldap_autocreate:&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;STRONG&amp;gt;Note:&amp;lt;/STRONG&amp;gt; The &amp;lt;TT&amp;gt;enrol_ldap_course_idnumber&amp;lt;/TT&amp;gt; (&amp;lt;TT&amp;gt;cn&amp;lt;/TT&amp;gt; in my setup) is used to identify the course by the LDAP enrolment script and the database uses an &amp;lt;TT&amp;gt;INTEGER&amp;lt;/TT&amp;gt; numeric here, in Moodle v1.8 anyway. When you&lt;br /&gt;
call &amp;lt;CODE&amp;gt;cd enrol/ldap/ &amp;amp;&amp;amp; php -f enrol_ldap_sync.php&amp;lt;/CODE&amp;gt; any course with the same idnumber is updated, hence,&lt;br /&gt;
it is quite important for the LDAP synchronisation and needs to be unique.&lt;br /&gt;
&lt;br /&gt;
Sample of an moodleCourse LDAP object:&lt;br /&gt;
&amp;lt;pre&amp;gt;dn: cn=851,ou=moodle,ou=groups,dc=ldapserver,dc=tmcc,dc=edu&lt;br /&gt;
objectClass: moodleCourse&lt;br /&gt;
cn: 851&lt;br /&gt;
givenName: LV851&lt;br /&gt;
sn: 2007S/Introduction to Moodle&lt;br /&gt;
description: Jahr: 2007 Sommer, &amp;amp;lt;A TARGET=_blank HREF=&amp;quot;https://other_server/display/851&amp;quot;&amp;gt;Announcement&amp;amp;lt;/A&amp;gt;&lt;br /&gt;
teacherUid: userA&lt;br /&gt;
memberUid: user1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the same fashion one can add all the other role mappings.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [http://download.moodle.org/download.php/docs/en/how-to_guides/ldap_auth_and_enrolment_set-up.pdf LDAP auth and enrolment set-up guide] (PDF 227KB)&lt;br /&gt;
&lt;br /&gt;
Using Moodle forum discussions:&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=31761 LDAP Enrollment HOWTO] with Lars Jensen&#039;s 2005 post&lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=39549 LDAP Auto enrollment] &lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=41829 LDAP nightmare Part II] &lt;br /&gt;
*[http://moodle.org/mod/forum/discuss.php?d=56198 Moodle + AD + LDAP = Confusion - Help Required and Provided]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol Wikipedia on LDAP:] a great deal of information beyond the context of Moodle&lt;br /&gt;
&lt;br /&gt;
[[Category:Administrator]]&lt;br /&gt;
[[Category:Enrolment]]&lt;br /&gt;
&lt;br /&gt;
[[fr:Inscription par LDAP]]&lt;br /&gt;
[[ja:LDAPユーザ登録]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Active_Directory&amp;diff=65412</id>
		<title>Active Directory</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Active_Directory&amp;diff=65412"/>
		<updated>2009-11-18T15:31:29Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Added link for adding attributes to the Global Catalog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Microsoft&#039;s Active Directory (AD) provides a variety of network directory services including Lightweight Directory Access Protocol (LDAP) like functions.  It is included in Windows 2000 Server and later versions of their operating system.   The focus of this page will be with the [[LDAP authentication]] functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Trouble shooting AD and LDAP authentication==&lt;br /&gt;
===Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled.===&lt;br /&gt;
This usually means that the main ldap dll or one of the supporting dlls are missing.&lt;br /&gt;
Let&#039;s start with the main one itself. &lt;br /&gt;
Browse to &amp;lt;nowiki&amp;gt;http://(moodleserver)/admin/phpinfo.php&amp;lt;/nowiki&amp;gt; and examine the &amp;quot;Configuration File (php.ini) Path&amp;quot; field to determine which php.ini is being used and open it with an editor. Find the line &#039;extension=php_ldap.dll&#039; and take out the semi-colon if it is there. That semi-colon will stop it loading the module all together! &lt;br /&gt;
While you have that file open, search for &#039;extension_dir&#039; and note which folder it is set to. Open that folder and ensure the php_ldap.dll file is in there. If it isn&#039;t then put it in there.&lt;br /&gt;
If that still hasn&#039;t fixed it you are missing a supporting dll, but you don&#039;t get told that. To see what dlls are missing open the Command Prompt and navigate to the php directory and execute the following line &#039;php -m&#039;. You should get some error messages now. Ugly, but at least they give you information! Find the dlls listed and copy them to the php directory. You may now need to restart the apache/httpd service. Run &#039;php -m&#039; again and you should be error free and the message in Moodle should be gone now.&lt;br /&gt;
&lt;br /&gt;
===LDAP-module cannot connect any LDAP servers===&lt;br /&gt;
 LDAP-module cannot connect any LDAP servers: &lt;br /&gt;
 Server: &#039;ldap://my.ldap.server/&#039; &lt;br /&gt;
 Connection: &#039;Resource id #26&#039; Bind result: &#039;&#039;&lt;br /&gt;
Getting this message when you are trying to log in is a result of incorrect details for the Bind user, or the user account having insufficient permissions in Active Directory. The best way to test and resolve this is use ldp.exe to test binding until it suceeds. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open the program and Connect to AD, giving the server name, then from the Connection menu choose Bind. Enter the details you think are correct and you will probably find that an error is returned. Try adjusting the accounts priveleges or another account until you are returned an &amp;quot;Authenticated as&amp;quot; message.&lt;br /&gt;
Once you are sure your account can be used to bind to AD, check that the DN of that users name is correct. Expand the tree on the left until you find the user you used to bind. Right click on that item and choose Copy DN. Go to the User Authentication page in Moodle and paste the value into the ldap_bind_dn field. Add the password and you can now feel safe your user is binding sucessfully.&lt;br /&gt;
&lt;br /&gt;
===Getting correct CNs for Contexts and Creators===&lt;br /&gt;
For those not familiar with AD this could be very confusing, and not that easy for some who are familiar with it. Again, ldp.exe is your friend. There are instructions on installing ldp.exe below.&lt;br /&gt;
Open it up and expand the tree on the left until you find the group or user you want to use and right click on it and select Copy DN. Go back to the Moodle User Authentication page and paste that value into either ldap_contexts or ldap_creators.&lt;br /&gt;
&lt;br /&gt;
===Getting the right user_attribute===&lt;br /&gt;
By default, Moodle uses an accounts cn (full name) to verify against, but most networks don&#039;t use a full given name for logon as it&#039;s too easy to guess and you can easily have two people with the same name. If this is the case for you too you need to tell Moodle to look at another field for the logon id.&lt;br /&gt;
In ldp.exe navigate the tree on the left to find a user account, preferably your own. Double-click the item in the tree and full-details will be loaded into the screen on the right. Look down the details until you find your logon id and note the item listed against it. For me, and a lot of people, it is sAMAccountName. Copy this name and paste it into the ldap_user_attribute on the Moodle User Authentication page.&lt;br /&gt;
There are instructions on installing ldp.exe below.&lt;br /&gt;
&lt;br /&gt;
===Installing ldp.exe Server Tool===&lt;br /&gt;
ldp.exe comes as part of the Server Tools on most versions of Windows Server. Find your Windows Server installation disc and find a folder on it called Support\Tools. In there will be a SupTools.msi which will install the server tools if run. You should now have a folder under Program Files called Support Tools, in which will be ldp.exe. ldp.exe is also available in the Windows XP Support Tools, which you can download from Microsoft [http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&amp;amp;displaylang=en here]. Alternatively, a single download of ldp.exe is available [http://www.computerperformance.co.uk/w2k3/utilities/ldp.htm here].&lt;br /&gt;
&lt;br /&gt;
===Example Active Directory Configuration===&lt;br /&gt;
Below is an example configuration for Active Directory. As detailed above, the values may vary based on your local Active Directory configuration, but should provide a good starting point for most cases.&lt;br /&gt;
&lt;br /&gt;
 ldap_host_url = ldap://ads.example.com&lt;br /&gt;
 ldap_version = 3&lt;br /&gt;
 ldap_preventpassindb = yes&lt;br /&gt;
 ldap_bind_dn = bind-user@example.com&lt;br /&gt;
 ldap_bind_pw = bind-password&lt;br /&gt;
 ldap_user_type = MS ActiveDirectory&lt;br /&gt;
 ldap_contexts = ou=moodleusers,dc=example,dc=com&lt;br /&gt;
 ldap_user_attribute = sAMAccountName&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the ldap_bind_dn value should work in either the CN=bin-user,CN=Users,DC=example,DC=com format as shown in the main instructions or the bind-user@example.com format shown in this example.&lt;br /&gt;
&lt;br /&gt;
==Global Catalogs==&lt;br /&gt;
Moodle currently only has limited support for multiple domain controllers; specifically it expects each of the LDAP servers listed to contain identical sets of information. If you have users in multiple domains this presents an issue. One solution when working with MS-AD is to use the Global Catalog. The Global Catalog is designed to be a read-only, partial representation of an entire MS-AD forest, designed for searching the entire directory when the domain of the required object is not known.&lt;br /&gt;
&lt;br /&gt;
===Enabling the Global Catalog===&lt;br /&gt;
&lt;br /&gt;
The Global Catalog is available on Windows 2000 and Windows 2003 Active Directory servers. To enable, open the ‘Active Directory Sites and Services’ MMC (Microsoft Management Console) snap-in. Extend ‘Sites’ and then the name of the Site containing the active directory forest you wish to use. Expand the server you wish to enable the Global Catalog on, right click ‘NTDS settings’ and select the ‘Properties’ tab. To enable, simply click the ‘Global Catalog’ checkbox. Under a Windows 2000 server it is necessary to restart the server (although it won’t prompt you to); under Windows 2003 server it is not necessary to restart the server. In either case you will generally have to wait for the AD forest to replicate before the Global Catalog offers a representation of the entire AD forest. Changes made in Active Directory will also be subject to a short delay due to the latency involved with replication. If your AD servers are firewalled port 3268 will need to be opened for Global Catalog servers.&lt;br /&gt;
If your organisation uses Microsoft Exchange then it its highly likely that at least one Domain Controller will already have Global Catalog enabled – Exchange 2000 and 2003 rely on the Global Catalog for address information, users also access the Global Catalog when using the GAL (Global Address List)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Child Domains===&lt;br /&gt;
If your organisation has a main domain example.org, staff and students are contained in two child domains staff.example.org and students.example.org. The 3 domains (example.org, staff.example.org and students.example.org) each have a domain controller (dc01, dc02 and dc03 respectively.) Each domain controller contains a full, writable, representation of only the objects that belong to its domain. However, assuming that the Global Catalog has been enabled (see below) on one of the domain controllers (for example dc01) a query to the Global Catalog would reveal matching objects from all three domains. The Global Catalog is automatically maintained through replication across the active directory forest, it can also be enabled on multiple servers (if, for example, you need redundancy / load balancing.)&lt;br /&gt;
&lt;br /&gt;
To make use of this in Moodle to allow logins from multiple domains is simple. The Global Catalog runs on port 3268 as opposed to 389 for standard LDAP queries. As a result, still assuming the Global Catalog is running on dc01, the &#039;&#039;&#039;&#039;ldap_host_url&#039;&#039;&#039;&#039; would be &#039;&#039;ldap://dc01.example.org:3268&#039;&#039;. The rest of the settings are the same as for other MS-AS Auth setups.&lt;br /&gt;
&lt;br /&gt;
You should use the &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting to indicate the locations of individuals you wish to grant access. To extend the example above a little: In the example.org domain users are all in the&#039;&#039; &#039;Users&#039; &#039;&#039;OU, in the staff.example.org domain users are in two OUs at the root of the domain,&#039;&#039; &#039;Support Staff&#039; &#039;&#039;and&#039;&#039; &#039;Teaching Staff&#039; &#039;&#039;, and in the students.example.org domain students are in an OU indicating the year that they enrolled, all of which are under the&#039;&#039; &#039;Students&#039; &#039;&#039;OU. As a result our &#039;&#039;&#039;&#039;ldap_contexts&#039;&#039;&#039;&#039; setting may look a little like this:&#039;&#039; &#039;OU=Users,DC=example,DC=org; OU=Support Staff,DC=staff,DC=example,DC=org; OU=Teaching Staff,DC=staff,DC=example,DC=org; OU=Students,DC=students,DC=example,DC=org&#039;&#039;.&#039; The &#039;&#039;&#039;&#039;ldap_search_sub&#039;&#039;&#039;&#039; option should be set to&#039;&#039; &#039;Yes&#039; &#039;&#039;to allow moodle to search within the child OUs.&lt;br /&gt;
&lt;br /&gt;
Its worth noting that the Global Catalog only contains a partial representation of the attributes of each object, as defined in the Partial Attribute Set supplied by Microsoft. However common information likely to be of use to a general Moodle installation (Forename, Surname, Email Address, sAMAccountName etc) is included in the set. For specific needs the schema can be altered to remove or add various attributes - see Microsoft [http://support.microsoft.com/kb/248717 KB248717] for more information.&lt;br /&gt;
&lt;br /&gt;
In most cases the Global Catalog is read-only, update queries must be made over the standard LDAP ports to the domain controller that holds the object in question (in our example, updating a student&#039;s details would require an LDAP query to the students.example.org domain controller - dc03, it would not be possible to update details by querying the Global Catalog.) The exception to this would be in an environment where there is only a single domain in the active directory forest; in this case the Global Catalog holds a writable full set of attributes for each object in the domain. However, for the purposes of Moodle authorisation, there would be no need to use the Global Catalog in this case.&lt;br /&gt;
&lt;br /&gt;
===Group Policy Objects===&lt;br /&gt;
Modifying the number of Active Directory objects to search: &lt;br /&gt;
&lt;br /&gt;
By default most Active Directory Lightweight Directory Service (ADLS) only allows searches returning a limited number of objects per search. Since there is currently no Page control support in PHP 5.2.x which would enable smaller page searches you may need to check and verify you MaxPageSize settings to make sure LDAP Client searches can return enough user objects to support the number of authenticating users. &lt;br /&gt;
 &lt;br /&gt;
 As your organization grows, you might need to change the number of objects to search&lt;br /&gt;
 at some point in time. A simple rule of thumb is to maintain a MaxPageSize which is at least equal to the number of users being &lt;br /&gt;
 searched in an average organizational Unit or Group DN. &lt;br /&gt;
&lt;br /&gt;
Setting the number for a group policy object (MaxPageSize):&lt;br /&gt;
&lt;br /&gt;
   1. Start the MMC Active Directory Users and Computers snap-in. (Select Programs,   Administrative Tools, &lt;br /&gt;
       Active Directory Users and Computers from the Start menu.)&lt;br /&gt;
   2. Right-click the container, and select Properties.&lt;br /&gt;
   3. Select the Group Policy tab.&lt;br /&gt;
   4. Select the Group Policy Object, and select Edit.&lt;br /&gt;
   5. Select the User Configuration branch, and expand Administrative Templates, Desktop, Active Directory.&lt;br /&gt;
   6. Double-click Maximum size of Active Directory searches.&lt;br /&gt;
   7. Select Enabled, and set the number (e.g.,1000)&lt;br /&gt;
      Click Apply.&lt;br /&gt;
   8. Click OK.&lt;br /&gt;
   9. Close the Group Policy Editor.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
     MaxPageSize - This value controls the maximum number of objects that are &lt;br /&gt;
     returned in a single search result, independent of how large each returned object is. &lt;br /&gt;
     To perform a search where the result might exceed this number of objects, the client&lt;br /&gt;
     must specify  the paged search control. This is to group the returned results in &lt;br /&gt;
     groups that are no larger than the MaxPageSize value. &lt;br /&gt;
&lt;br /&gt;
     To summarize, MaxPageSize controls the number of objects that are returned &lt;br /&gt;
     in a single search result.&lt;br /&gt;
&lt;br /&gt;
== Active Directory with Moodle 1.8==&lt;br /&gt;
There is an issue with the PHP ldap options that are required for Active Directory access in version 1.8 of Moodle. &lt;br /&gt;
&lt;br /&gt;
Using moodle on a LAMP platform with authentication to Active Directory may give some errors. &lt;br /&gt;
&lt;br /&gt;
Check this bug [http://tracker.moodle.org/browse/MDL-10921 MDL-10921] or this post http://moodle.org/mod/forum/discuss.php?d=78316 for further information.&lt;br /&gt;
&lt;br /&gt;
==MS Active Directory + SSL ==&lt;br /&gt;
&lt;br /&gt;
If the Certificate Authority is not installed you&#039;ll have to install it first as follows:&lt;br /&gt;
# Click &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Control Panel&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Add or Remove programs.&#039;&#039;&#039;&lt;br /&gt;
# Click &#039;&#039;&#039;Add/Remove Windows Components&#039;&#039;&#039; and select &#039;&#039;&#039;Certificate Services.&#039;&#039;&#039;&lt;br /&gt;
# Follow the procedure provided to install the &#039;&#039;&#039;Certificate Authority&#039;&#039;&#039;. Enterprise level is a good choice.&lt;br /&gt;
&lt;br /&gt;
Verify that SSL has been enabled on the server by installing suptools.msi from Windows installation cd&#039;s \Support\tools directory. After support tools installation:&lt;br /&gt;
# Select &#039;&#039;&#039;Start&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Run&#039;&#039;&#039;, write &#039;&#039;&#039;ldp&#039;&#039;&#039; in the Open field.&lt;br /&gt;
# From the ldp window select &#039;&#039;&#039;Connection&#039;&#039;&#039; -&amp;gt; &#039;&#039;&#039;Connect&#039;&#039;&#039; and supply valid hostname and port number &#039;&#039;&#039;636&#039;&#039;&#039;. Also select the SSL check box.&lt;br /&gt;
&lt;br /&gt;
If successful, you should get information about the connection.&lt;br /&gt;
&lt;br /&gt;
See [[LDAP_authentication#Enabling_LDAPS_on_the_client_side_.28Moodle_server.29|Enabling LDAPS on the client side (Moodle server)]] for details on the client side configuration.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[LDAP authentication]] in Moodle&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Directory_service Directory services] overview in Wikipedia&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol LDAP] in Wikipedia&lt;br /&gt;
&lt;br /&gt;
[[ja:Active Directory]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65409</id>
		<title>Integrate Moodle, LDAP and SIMS.net</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65409"/>
		<updated>2009-11-18T15:27:29Z</updated>

		<summary type="html">&lt;p&gt;Minkus: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Integrate SIMS.net and LDAP (SIMS2AD)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
For SIMS2AD and SIMS2MOODLE modules to work every student  and teacher&#039;s LDAP account MUST have the employeeID field set. These need to be set to the following.&lt;br /&gt;
#Students = UPN&lt;br /&gt;
#Staff = SIMS.net Teacher Code&lt;br /&gt;
&lt;br /&gt;
Please note that if the account that you configure under Bind Settings/Distinguished Name does NOT have admin privileges on the domain (as best practise suggests), you may need to perform the following changes on your domain as well:&lt;br /&gt;
&lt;br /&gt;
*Load Active Directory Users and Computers&lt;br /&gt;
*Right click on the domain itself (domain.com), select &#039;Delegate Control...&#039;&lt;br /&gt;
*Click &#039;Next&#039;, and then select the LDAP user that is configured under Bind Settings/Distinguished Name&lt;br /&gt;
*Under &#039;Delegate the following common tasks&#039;, click &#039;Read all user information&#039;&lt;br /&gt;
*Click &#039;Finish&#039;&lt;br /&gt;
&lt;br /&gt;
This will allow the user account to read the employeeID attribute, which by default can only be read by domain admins.&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Account Creator (Unpublished)==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Account Creator is a moodle block that administers the process of LDAP account creation automatically.&lt;br /&gt;
===IMPORTANT - Please Read===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD Vbscript has been retired. It is in the process of being converted to a moodle block. The main aim of this is to improve configuration and quality.&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Access Manager==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Access Manager allows non technical members of staff to control student access to an education establishments computer network via SIMS.net.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Script Usage Details===&lt;br /&gt;
The Vbscript will run every 5 minutes, every day &amp;lt;br&amp;gt;&lt;br /&gt;
A log file is created in the same folder as the script, this hold a log of all processed changes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Add a new view to MS SQL Server===&lt;br /&gt;
----&lt;br /&gt;
#Open SQL Server Management Studio&lt;br /&gt;
#Use the Object Explorer window to browse to the database and the folder called ‘Views’.&lt;br /&gt;
#*[Server]\[Instance] -&amp;gt; Database -&amp;gt; sims -&amp;gt; Views&lt;br /&gt;
#Right-click the ‘Views’ folder and select ‘New View’.&lt;br /&gt;
#Close the Add Table dialog box – Copy and Paste the query below into the Query box &lt;br /&gt;
#Save the View via File, Save [the temporary name of the view] .&lt;br /&gt;
#Enter the above name for the new ‘View’ and click ‘OK’.&lt;br /&gt;
#If you refresh the list of views by right-clicking the ‘Views’ folder you will see the new view near the top of the list.&lt;br /&gt;
#Close SQL Server management Studio.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MS SQL 2005 Server View===&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: vbs_admanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Query to paste in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT     TOP (100) PERCENT sims.stud_via_student_browse.unique_pupil_no, sims.stud_via_student_browse.forename, &lt;br /&gt;
                      sims.stud_via_student_browse.surname, sims.udf_field.description AS type, sims.udf_lookup_value.description&lt;br /&gt;
FROM         sims.udf_value INNER JOIN&lt;br /&gt;
                      sims.udf_field ON sims.udf_value.field_id = sims.udf_field.field_id INNER JOIN&lt;br /&gt;
                      sims.stud_via_student_browse ON sims.udf_value.entity_id = sims.stud_via_student_browse.person_id INNER JOIN&lt;br /&gt;
                      sims.udf_lookup_value ON sims.udf_value.lookup_value_id = sims.udf_lookup_value.lookup_value_id&lt;br /&gt;
WHERE     (sims.udf_field.active = &#039;T&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Script&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The [https://docs.moodle.org/en/SIMS2AD_access_manager.vbs SIMS2AD Access Manager] script needs to copied to D:\SIMS2AD on the SIMS Server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the script is available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
https://docs.moodle.org/en/SIMS2AD_access_manager.vbs&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Setting Up a Scheduled Task===&lt;br /&gt;
----&lt;br /&gt;
A scheduled task needs to be created to run the SIMS2AD Access Manager Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This Task will need to run every 5 minutes from 08:00 AM to 20:00 PM &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Open Control Panel&lt;br /&gt;
#Open Scheduled Tasks&lt;br /&gt;
#*This will open the Schedule Task Windows&lt;br /&gt;
#Add Scheduled Task&lt;br /&gt;
#*This will open the Schedule Task Wizard&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Browse and Navigate to D:\SIMS2AD Folder&lt;br /&gt;
#Select SIMS2AD_Access_Manager.vbs&lt;br /&gt;
#Give the the name &amp;quot;SIMS2AD Access Manager&amp;quot;&lt;br /&gt;
#Select Daily&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Next as these Settings will be modified later.&lt;br /&gt;
#Enter the user account details that will be used to run the script&lt;br /&gt;
#Click Next &lt;br /&gt;
#Tick the box&lt;br /&gt;
#*This will open Advance Properties Window&lt;br /&gt;
#Click Finish&lt;br /&gt;
#Click the Schedule Tab&lt;br /&gt;
#Set the Start Time 08:00 AM&lt;br /&gt;
#Click the Advance Button&lt;br /&gt;
#*This will open an Advance Settings Window&lt;br /&gt;
#Set a Start date&lt;br /&gt;
#Tick Repeat Task&lt;br /&gt;
#Set it to repeat every 5 minutes&lt;br /&gt;
#Select Duration and set at 12 hours&lt;br /&gt;
#Click OK&lt;br /&gt;
#Click Apply&lt;br /&gt;
#Click OK&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Required Logon Script Changes===&lt;br /&gt;
----&lt;br /&gt;
The below code needs to be added to the beginning of the Kixtart Logon Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This will check the current time and see if the user belongs to a group that has restricted computer access.&amp;lt;br&amp;gt;&lt;br /&gt;
If the user has logged on during a restricted time a message box will be displayed informing of this and then forcefully log them off.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;20:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;08:50:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;11:15:00&amp;quot;) AND (@time &amp;lt; &amp;quot;11:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;,&lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;12:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;13:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;)  or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;13:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;14:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;16:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;18:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;18:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;20:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and LDAP (MOODLE2LDAP)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
MOODLE2LDAP is the process of linking moodle to LDAP, this will allow users to authenticate and underpin SIMS2AD - Account Creator Moodle Block.&lt;br /&gt;
==Setting up LDAP Authentication==&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Users - &amp;gt; Authentication -&amp;gt; LDAP Server&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;LDAP server settings&#039;&#039;&#039;&lt;br /&gt;
#**Host Url = ldap://server.domain.com/ &lt;br /&gt;
#**Version = 3&lt;br /&gt;
#**LDAP encoding = utf-8&lt;br /&gt;
#*&#039;&#039;&#039;Bind settings&#039;&#039;&#039; &lt;br /&gt;
#**Hide passwords = Yes&lt;br /&gt;
#**Distinguished Name = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Password = Password of LDAP Guest Account&lt;br /&gt;
#*&#039;&#039;&#039;User lookup settings&#039;&#039;&#039;&lt;br /&gt;
#**User type = MS Active Directory&lt;br /&gt;
#**Contexts = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Search subcontexts = Yes&lt;br /&gt;
#**Dereference aliases = Yes&lt;br /&gt;
#**User attribute = sAMAccountName&lt;br /&gt;
#**Member attribute = member&lt;br /&gt;
#*&#039;&#039;&#039;Force change password&#039;&#039;&#039;&lt;br /&gt;
#**Force change password = No&lt;br /&gt;
#**Use standard Change Password Page = No&lt;br /&gt;
#*&#039;&#039;&#039;LDAP password expiration settings&#039;&#039;&#039;&lt;br /&gt;
#**Expiration = No&lt;br /&gt;
#*&#039;&#039;&#039;Enable user creation&#039;&#039;&#039;&lt;br /&gt;
#**Create users externally = No&lt;br /&gt;
#*&#039;&#039;&#039;Data Mapping&#039;&#039;&#039;&lt;br /&gt;
#**First Name = givenName&lt;br /&gt;
#**Surname = sn&lt;br /&gt;
#**Email address = mail&lt;br /&gt;
#**Description = description&lt;br /&gt;
#**ID number = employeeID&lt;br /&gt;
#**Department = department&lt;br /&gt;
#Click Save&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and SIMS.net (SIMS2MOODLE)=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
Moodle requires FreeTDS to be installed for it to work with MS SQL 2005. &lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Unix Install FreeTDS on Linux]&lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows Install FreeTDS on Windows]&lt;br /&gt;
&lt;br /&gt;
==SIMS2Moodle - Enrolment Plug-in==&lt;br /&gt;
===Introduction===&lt;br /&gt;
SIMS2Moodle - Enrolment Plug-in is a part preconfigured version of moodle&#039;s external database plug-in tailored for use with SIMS.net.&lt;br /&gt;
&lt;br /&gt;
===Create Moodle SIMS.net Course Template===&lt;br /&gt;
----&lt;br /&gt;
Before the plug-in is installed it is best to create a template from which moodle will create any new SIMS.net courses &lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Miscellaneous&lt;br /&gt;
#Click New Course Button&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
#**Full name = SIMS Template Course&lt;br /&gt;
#**Short name = simstemplate&lt;br /&gt;
#**Course ID number = simstemplate&lt;br /&gt;
#**Format = Topics Format&lt;br /&gt;
#**Number of weeks/topics = 10&lt;br /&gt;
#**Course Start Date = 1st Sept&lt;br /&gt;
#**Hidden sections = Hidden sections are shown in collapsed form&lt;br /&gt;
#**News Items to show = 5&lt;br /&gt;
#**Show gradebook to students = Yes&lt;br /&gt;
#**Show activity reports = No&lt;br /&gt;
#**Maximum upload size = [Maximum Size Allowed]&lt;br /&gt;
#**Is this a meta course? = No&lt;br /&gt;
#*&#039;&#039;&#039;Enrolments&#039;&#039;&#039;&lt;br /&gt;
#**Enrolment Plugins = Site Default (Internal Enrolment)&lt;br /&gt;
#**Default role = Site Default (Student)&lt;br /&gt;
#**Course enrollable = Yes&lt;br /&gt;
#**Start date = Disabled&lt;br /&gt;
#**End date = Disabled&lt;br /&gt;
#**Enrolment duration = Unlimited&lt;br /&gt;
#*&#039;&#039;&#039;Enrolment expiry notification&#039;&#039;&#039;&lt;br /&gt;
#**Notify = No&lt;br /&gt;
#**Notify Students = No&lt;br /&gt;
#**Threshold = 10 days&lt;br /&gt;
#*&#039;&#039;&#039;Groups&#039;&#039;&#039;&lt;br /&gt;
#**Group mode = No Groups&lt;br /&gt;
#**Force = No&lt;br /&gt;
#**Default grouping = No&lt;br /&gt;
#*&#039;&#039;&#039;Availability&#039;&#039;&#039;&lt;br /&gt;
#**Availability = This course is avaliable to students&lt;br /&gt;
#**Enrolment key = [Blank]&lt;br /&gt;
#**Guest access = Do Not Allow Guest In&lt;br /&gt;
#*&#039;&#039;&#039;Language&#039;&#039;&#039;&lt;br /&gt;
#**Force language = No&lt;br /&gt;
#*&#039;&#039;&#039;Role renaming&#039;&#039;&#039;&lt;br /&gt;
#**[All Fields are Blank]&lt;br /&gt;
&lt;br /&gt;
===Download===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip SIMS.net Enrolment Plug-in] files needs to copied to the &#039;moodle\enrol&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Moodle Settings===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On the plug-in have been downloaded and installed.&lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Add New Category&lt;br /&gt;
#*Parent Category  = Top&lt;br /&gt;
#*Category Name  = SIMS Courses&lt;br /&gt;
#Click Save&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Enrolments&lt;br /&gt;
#Enable SIMS.net&lt;br /&gt;
#Click Edit&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;SIMS.net Server Settings&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbtype = mssql&lt;br /&gt;
#**enrol_dbhost = sims.school.lan &lt;br /&gt;
#**enrol_dbport = 1427 (1427 is default for MS SQL 2005)&lt;br /&gt;
#**enrol_dbuser = sa&lt;br /&gt;
#**enrol_dbpass = [SA Password]&lt;br /&gt;
&lt;br /&gt;
#*&#039;&#039;&#039;Academic Setting&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbacyear = 2009 (or current academic year)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==SIMS2MOODLE - SIMS.net Timetable Block ==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - SIMS.net Timetable Block V1.2 now has ability  to auto install, upgrade and remove views on Microsoft SQL Server 2005.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prerequisite=== &lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - Timetable block requires SIMS2MOODLE - Enrolment Plug-in to be installed and configured.  SIMS2MOODLE - Enrolment Plug-in does not have to be enabled if auto enrolment is not needed.&lt;br /&gt;
====IMPORTANT: IF UPGRADING====&lt;br /&gt;
----&lt;br /&gt;
If you are upgrading from a version before the release of 1.0, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Uninstall the SIMS.net Timetable block from moodle.&lt;br /&gt;
#Delete the folders \blocks\simstimetable and \mod\simstimtable&lt;br /&gt;
#Delete the view mdl_student_timetable from SQL Server Management Studio&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from release of 1.1, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Please install SIMS.net Enrolment Plug-in.&lt;br /&gt;
&lt;br /&gt;
===Download the Block===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip SIMS.net Timetable Block] files needs to copied to the &#039;moodle\blocks&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
#Copy simstimetable folder to the blocks folder in moodle&lt;br /&gt;
#Login to moodle as the admin account&lt;br /&gt;
#Click on Notifications&lt;br /&gt;
#*A message should state that the block has been successfully installed.&lt;br /&gt;
#Click Modules -&amp;gt; Blocks -&amp;gt; SIMS.net Timetable to configure the block. (You will have to configure the &#039;Lesson Labels&#039; field at the very least for your school&#039;s timetable).&lt;br /&gt;
&lt;br /&gt;
===Configure SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
Every schools timetable is slightly different, so the block will need to be configured. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Block Title:&amp;lt;/b&amp;gt; This text will be displayed as the block title.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Link Text:&amp;lt;/b&amp;gt; This is the text of the timetable url.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;No. Weeks:&amp;lt;/b&amp;gt; Number of weeks timetabled in SIMS.net. (Only 1 or 2 supported)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Seperator:&amp;lt;/b&amp;gt; The separator is the character using in the SIMS.net to separate the day from the period name eg Fri:1, so the separator will be &amp;quot;:&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Lesson Labels:&amp;lt;/b&amp;gt; These are the names all there periods that are timetabled in SIMS.net seperated with a &amp;quot;,&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category: Administrator]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65407</id>
		<title>Integrate Moodle, LDAP and SIMS.net</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65407"/>
		<updated>2009-11-18T15:26:57Z</updated>

		<summary type="html">&lt;p&gt;Minkus: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Integrate SIMS.net and LDAP (SIMS2AD)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
For SIMS2AD and SIMS2MOODLE modules to work every student  and teacher&#039;s LDAP account MUST have the employeeID field set. These need to be set to the following.&lt;br /&gt;
#Students = UPN&lt;br /&gt;
#Staff = SIMS.net Teacher Code&lt;br /&gt;
&lt;br /&gt;
Please note that if the account that you configure under Bind Settings/Distinguished Name does NOT have admin privileges on the domain (as best practise suggests), you may need to perform the following changes on your domain as well:&lt;br /&gt;
&lt;br /&gt;
*Load Active Directory Users and Computers&lt;br /&gt;
*Right click on the domain itself (domain.com), select &#039;Delegate Control...&#039;&lt;br /&gt;
*Click &#039;Next&#039;, and then select the LDAP user that is configured under Bind Settings/Distinguished Name&lt;br /&gt;
*Under &#039;Delegate the following common tasks&#039;, click &#039;Read all user information&#039;&lt;br /&gt;
*Click &#039;Finish&#039;&lt;br /&gt;
&lt;br /&gt;
This will allow the user account to read the employeeID attribute, which by default can only be read by domain admins&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Account Creator (Unpublished)==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Account Creator is a moodle block that administers the process of LDAP account creation automatically.&lt;br /&gt;
===IMPORTANT - Please Read===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD Vbscript has been retired. It is in the process of being converted to a moodle block. The main aim of this is to improve configuration and quality.&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Access Manager==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Access Manager allows non technical members of staff to control student access to an education establishments computer network via SIMS.net.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Script Usage Details===&lt;br /&gt;
The Vbscript will run every 5 minutes, every day &amp;lt;br&amp;gt;&lt;br /&gt;
A log file is created in the same folder as the script, this hold a log of all processed changes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Add a new view to MS SQL Server===&lt;br /&gt;
----&lt;br /&gt;
#Open SQL Server Management Studio&lt;br /&gt;
#Use the Object Explorer window to browse to the database and the folder called ‘Views’.&lt;br /&gt;
#*[Server]\[Instance] -&amp;gt; Database -&amp;gt; sims -&amp;gt; Views&lt;br /&gt;
#Right-click the ‘Views’ folder and select ‘New View’.&lt;br /&gt;
#Close the Add Table dialog box – Copy and Paste the query below into the Query box &lt;br /&gt;
#Save the View via File, Save [the temporary name of the view] .&lt;br /&gt;
#Enter the above name for the new ‘View’ and click ‘OK’.&lt;br /&gt;
#If you refresh the list of views by right-clicking the ‘Views’ folder you will see the new view near the top of the list.&lt;br /&gt;
#Close SQL Server management Studio.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MS SQL 2005 Server View===&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: vbs_admanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Query to paste in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT     TOP (100) PERCENT sims.stud_via_student_browse.unique_pupil_no, sims.stud_via_student_browse.forename, &lt;br /&gt;
                      sims.stud_via_student_browse.surname, sims.udf_field.description AS type, sims.udf_lookup_value.description&lt;br /&gt;
FROM         sims.udf_value INNER JOIN&lt;br /&gt;
                      sims.udf_field ON sims.udf_value.field_id = sims.udf_field.field_id INNER JOIN&lt;br /&gt;
                      sims.stud_via_student_browse ON sims.udf_value.entity_id = sims.stud_via_student_browse.person_id INNER JOIN&lt;br /&gt;
                      sims.udf_lookup_value ON sims.udf_value.lookup_value_id = sims.udf_lookup_value.lookup_value_id&lt;br /&gt;
WHERE     (sims.udf_field.active = &#039;T&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Script&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The [https://docs.moodle.org/en/SIMS2AD_access_manager.vbs SIMS2AD Access Manager] script needs to copied to D:\SIMS2AD on the SIMS Server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the script is available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
https://docs.moodle.org/en/SIMS2AD_access_manager.vbs&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Setting Up a Scheduled Task===&lt;br /&gt;
----&lt;br /&gt;
A scheduled task needs to be created to run the SIMS2AD Access Manager Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This Task will need to run every 5 minutes from 08:00 AM to 20:00 PM &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Open Control Panel&lt;br /&gt;
#Open Scheduled Tasks&lt;br /&gt;
#*This will open the Schedule Task Windows&lt;br /&gt;
#Add Scheduled Task&lt;br /&gt;
#*This will open the Schedule Task Wizard&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Browse and Navigate to D:\SIMS2AD Folder&lt;br /&gt;
#Select SIMS2AD_Access_Manager.vbs&lt;br /&gt;
#Give the the name &amp;quot;SIMS2AD Access Manager&amp;quot;&lt;br /&gt;
#Select Daily&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Next as these Settings will be modified later.&lt;br /&gt;
#Enter the user account details that will be used to run the script&lt;br /&gt;
#Click Next &lt;br /&gt;
#Tick the box&lt;br /&gt;
#*This will open Advance Properties Window&lt;br /&gt;
#Click Finish&lt;br /&gt;
#Click the Schedule Tab&lt;br /&gt;
#Set the Start Time 08:00 AM&lt;br /&gt;
#Click the Advance Button&lt;br /&gt;
#*This will open an Advance Settings Window&lt;br /&gt;
#Set a Start date&lt;br /&gt;
#Tick Repeat Task&lt;br /&gt;
#Set it to repeat every 5 minutes&lt;br /&gt;
#Select Duration and set at 12 hours&lt;br /&gt;
#Click OK&lt;br /&gt;
#Click Apply&lt;br /&gt;
#Click OK&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Required Logon Script Changes===&lt;br /&gt;
----&lt;br /&gt;
The below code needs to be added to the beginning of the Kixtart Logon Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This will check the current time and see if the user belongs to a group that has restricted computer access.&amp;lt;br&amp;gt;&lt;br /&gt;
If the user has logged on during a restricted time a message box will be displayed informing of this and then forcefully log them off.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;20:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;08:50:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;11:15:00&amp;quot;) AND (@time &amp;lt; &amp;quot;11:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;,&lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;12:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;13:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;)  or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;13:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;14:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;16:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;18:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;18:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;20:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and LDAP (MOODLE2LDAP)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
MOODLE2LDAP is the process of linking moodle to LDAP, this will allow users to authenticate and underpin SIMS2AD - Account Creator Moodle Block.&lt;br /&gt;
==Setting up LDAP Authentication==&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Users - &amp;gt; Authentication -&amp;gt; LDAP Server&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;LDAP server settings&#039;&#039;&#039;&lt;br /&gt;
#**Host Url = ldap://server.domain.com/ &lt;br /&gt;
#**Version = 3&lt;br /&gt;
#**LDAP encoding = utf-8&lt;br /&gt;
#*&#039;&#039;&#039;Bind settings&#039;&#039;&#039; &lt;br /&gt;
#**Hide passwords = Yes&lt;br /&gt;
#**Distinguished Name = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Password = Password of LDAP Guest Account&lt;br /&gt;
#*&#039;&#039;&#039;User lookup settings&#039;&#039;&#039;&lt;br /&gt;
#**User type = MS Active Directory&lt;br /&gt;
#**Contexts = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Search subcontexts = Yes&lt;br /&gt;
#**Dereference aliases = Yes&lt;br /&gt;
#**User attribute = sAMAccountName&lt;br /&gt;
#**Member attribute = member&lt;br /&gt;
#*&#039;&#039;&#039;Force change password&#039;&#039;&#039;&lt;br /&gt;
#**Force change password = No&lt;br /&gt;
#**Use standard Change Password Page = No&lt;br /&gt;
#*&#039;&#039;&#039;LDAP password expiration settings&#039;&#039;&#039;&lt;br /&gt;
#**Expiration = No&lt;br /&gt;
#*&#039;&#039;&#039;Enable user creation&#039;&#039;&#039;&lt;br /&gt;
#**Create users externally = No&lt;br /&gt;
#*&#039;&#039;&#039;Data Mapping&#039;&#039;&#039;&lt;br /&gt;
#**First Name = givenName&lt;br /&gt;
#**Surname = sn&lt;br /&gt;
#**Email address = mail&lt;br /&gt;
#**Description = description&lt;br /&gt;
#**ID number = employeeID&lt;br /&gt;
#**Department = department&lt;br /&gt;
#Click Save&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and SIMS.net (SIMS2MOODLE)=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
Moodle requires FreeTDS to be installed for it to work with MS SQL 2005. &lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Unix Install FreeTDS on Linux]&lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows Install FreeTDS on Windows]&lt;br /&gt;
&lt;br /&gt;
==SIMS2Moodle - Enrolment Plug-in==&lt;br /&gt;
===Introduction===&lt;br /&gt;
SIMS2Moodle - Enrolment Plug-in is a part preconfigured version of moodle&#039;s external database plug-in tailored for use with SIMS.net.&lt;br /&gt;
&lt;br /&gt;
===Create Moodle SIMS.net Course Template===&lt;br /&gt;
----&lt;br /&gt;
Before the plug-in is installed it is best to create a template from which moodle will create any new SIMS.net courses &lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Miscellaneous&lt;br /&gt;
#Click New Course Button&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
#**Full name = SIMS Template Course&lt;br /&gt;
#**Short name = simstemplate&lt;br /&gt;
#**Course ID number = simstemplate&lt;br /&gt;
#**Format = Topics Format&lt;br /&gt;
#**Number of weeks/topics = 10&lt;br /&gt;
#**Course Start Date = 1st Sept&lt;br /&gt;
#**Hidden sections = Hidden sections are shown in collapsed form&lt;br /&gt;
#**News Items to show = 5&lt;br /&gt;
#**Show gradebook to students = Yes&lt;br /&gt;
#**Show activity reports = No&lt;br /&gt;
#**Maximum upload size = [Maximum Size Allowed]&lt;br /&gt;
#**Is this a meta course? = No&lt;br /&gt;
#*&#039;&#039;&#039;Enrolments&#039;&#039;&#039;&lt;br /&gt;
#**Enrolment Plugins = Site Default (Internal Enrolment)&lt;br /&gt;
#**Default role = Site Default (Student)&lt;br /&gt;
#**Course enrollable = Yes&lt;br /&gt;
#**Start date = Disabled&lt;br /&gt;
#**End date = Disabled&lt;br /&gt;
#**Enrolment duration = Unlimited&lt;br /&gt;
#*&#039;&#039;&#039;Enrolment expiry notification&#039;&#039;&#039;&lt;br /&gt;
#**Notify = No&lt;br /&gt;
#**Notify Students = No&lt;br /&gt;
#**Threshold = 10 days&lt;br /&gt;
#*&#039;&#039;&#039;Groups&#039;&#039;&#039;&lt;br /&gt;
#**Group mode = No Groups&lt;br /&gt;
#**Force = No&lt;br /&gt;
#**Default grouping = No&lt;br /&gt;
#*&#039;&#039;&#039;Availability&#039;&#039;&#039;&lt;br /&gt;
#**Availability = This course is avaliable to students&lt;br /&gt;
#**Enrolment key = [Blank]&lt;br /&gt;
#**Guest access = Do Not Allow Guest In&lt;br /&gt;
#*&#039;&#039;&#039;Language&#039;&#039;&#039;&lt;br /&gt;
#**Force language = No&lt;br /&gt;
#*&#039;&#039;&#039;Role renaming&#039;&#039;&#039;&lt;br /&gt;
#**[All Fields are Blank]&lt;br /&gt;
&lt;br /&gt;
===Download===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip SIMS.net Enrolment Plug-in] files needs to copied to the &#039;moodle\enrol&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Moodle Settings===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On the plug-in have been downloaded and installed.&lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Add New Category&lt;br /&gt;
#*Parent Category  = Top&lt;br /&gt;
#*Category Name  = SIMS Courses&lt;br /&gt;
#Click Save&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Enrolments&lt;br /&gt;
#Enable SIMS.net&lt;br /&gt;
#Click Edit&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;SIMS.net Server Settings&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbtype = mssql&lt;br /&gt;
#**enrol_dbhost = sims.school.lan &lt;br /&gt;
#**enrol_dbport = 1427 (1427 is default for MS SQL 2005)&lt;br /&gt;
#**enrol_dbuser = sa&lt;br /&gt;
#**enrol_dbpass = [SA Password]&lt;br /&gt;
&lt;br /&gt;
#*&#039;&#039;&#039;Academic Setting&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbacyear = 2009 (or current academic year)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==SIMS2MOODLE - SIMS.net Timetable Block ==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - SIMS.net Timetable Block V1.2 now has ability  to auto install, upgrade and remove views on Microsoft SQL Server 2005.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prerequisite=== &lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - Timetable block requires SIMS2MOODLE - Enrolment Plug-in to be installed and configured.  SIMS2MOODLE - Enrolment Plug-in does not have to be enabled if auto enrolment is not needed.&lt;br /&gt;
====IMPORTANT: IF UPGRADING====&lt;br /&gt;
----&lt;br /&gt;
If you are upgrading from a version before the release of 1.0, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Uninstall the SIMS.net Timetable block from moodle.&lt;br /&gt;
#Delete the folders \blocks\simstimetable and \mod\simstimtable&lt;br /&gt;
#Delete the view mdl_student_timetable from SQL Server Management Studio&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from release of 1.1, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Please install SIMS.net Enrolment Plug-in.&lt;br /&gt;
&lt;br /&gt;
===Download the Block===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip SIMS.net Timetable Block] files needs to copied to the &#039;moodle\blocks&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
#Copy simstimetable folder to the blocks folder in moodle&lt;br /&gt;
#Login to moodle as the admin account&lt;br /&gt;
#Click on Notifications&lt;br /&gt;
#*A message should state that the block has been successfully installed.&lt;br /&gt;
#Click Modules -&amp;gt; Blocks -&amp;gt; SIMS.net Timetable to configure the block. (You will have to configure the &#039;Lesson Labels&#039; field at the very least for your school&#039;s timetable).&lt;br /&gt;
&lt;br /&gt;
===Configure SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
Every schools timetable is slightly different, so the block will need to be configured. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Block Title:&amp;lt;/b&amp;gt; This text will be displayed as the block title.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Link Text:&amp;lt;/b&amp;gt; This is the text of the timetable url.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;No. Weeks:&amp;lt;/b&amp;gt; Number of weeks timetabled in SIMS.net. (Only 1 or 2 supported)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Seperator:&amp;lt;/b&amp;gt; The separator is the character using in the SIMS.net to separate the day from the period name eg Fri:1, so the separator will be &amp;quot;:&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Lesson Labels:&amp;lt;/b&amp;gt; These are the names all there periods that are timetabled in SIMS.net seperated with a &amp;quot;,&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category: Administrator]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65398</id>
		<title>Integrate Moodle, LDAP and SIMS.net</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65398"/>
		<updated>2009-11-18T15:08:45Z</updated>

		<summary type="html">&lt;p&gt;Minkus: /* Install SIMS.net Timetable Block for Moodle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Integrate SIMS.net and LDAP (SIMS2AD)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
For SIMS2AD and SIMS2MOODLE modules to work every student  and teacher&#039;s LDAP account MUST have the employeeID field set. These need to be set to the following.&lt;br /&gt;
#Students = UPN&lt;br /&gt;
#Staff = SIMS.net Teacher Code &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==SIMS2AD - Account Creator (Unpublished)==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Account Creator is a moodle block that administers the process of LDAP account creation automatically.&lt;br /&gt;
===IMPORTANT - Please Read===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD Vbscript has been retired. It is in the process of being converted to a moodle block. The main aim of this is to improve configuration and quality.&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Access Manager==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Access Manager allows non technical members of staff to control student access to an education establishments computer network via SIMS.net.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Script Usage Details===&lt;br /&gt;
The Vbscript will run every 5 minutes, every day &amp;lt;br&amp;gt;&lt;br /&gt;
A log file is created in the same folder as the script, this hold a log of all processed changes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Add a new view to MS SQL Server===&lt;br /&gt;
----&lt;br /&gt;
#Open SQL Server Management Studio&lt;br /&gt;
#Use the Object Explorer window to browse to the database and the folder called ‘Views’.&lt;br /&gt;
#*[Server]\[Instance] -&amp;gt; Database -&amp;gt; sims -&amp;gt; Views&lt;br /&gt;
#Right-click the ‘Views’ folder and select ‘New View’.&lt;br /&gt;
#Close the Add Table dialog box – Copy and Paste the query below into the Query box &lt;br /&gt;
#Save the View via File, Save [the temporary name of the view] .&lt;br /&gt;
#Enter the above name for the new ‘View’ and click ‘OK’.&lt;br /&gt;
#If you refresh the list of views by right-clicking the ‘Views’ folder you will see the new view near the top of the list.&lt;br /&gt;
#Close SQL Server management Studio.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MS SQL 2005 Server View===&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: vbs_admanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Query to paste in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT     TOP (100) PERCENT sims.stud_via_student_browse.unique_pupil_no, sims.stud_via_student_browse.forename, &lt;br /&gt;
                      sims.stud_via_student_browse.surname, sims.udf_field.description AS type, sims.udf_lookup_value.description&lt;br /&gt;
FROM         sims.udf_value INNER JOIN&lt;br /&gt;
                      sims.udf_field ON sims.udf_value.field_id = sims.udf_field.field_id INNER JOIN&lt;br /&gt;
                      sims.stud_via_student_browse ON sims.udf_value.entity_id = sims.stud_via_student_browse.person_id INNER JOIN&lt;br /&gt;
                      sims.udf_lookup_value ON sims.udf_value.lookup_value_id = sims.udf_lookup_value.lookup_value_id&lt;br /&gt;
WHERE     (sims.udf_field.active = &#039;T&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Script&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The [https://docs.moodle.org/en/SIMS2AD_access_manager.vbs SIMS2AD Access Manager] script needs to copied to D:\SIMS2AD on the SIMS Server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the script is available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
https://docs.moodle.org/en/SIMS2AD_access_manager.vbs&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Setting Up a Scheduled Task===&lt;br /&gt;
----&lt;br /&gt;
A scheduled task needs to be created to run the SIMS2AD Access Manager Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This Task will need to run every 5 minutes from 08:00 AM to 20:00 PM &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Open Control Panel&lt;br /&gt;
#Open Scheduled Tasks&lt;br /&gt;
#*This will open the Schedule Task Windows&lt;br /&gt;
#Add Scheduled Task&lt;br /&gt;
#*This will open the Schedule Task Wizard&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Browse and Navigate to D:\SIMS2AD Folder&lt;br /&gt;
#Select SIMS2AD_Access_Manager.vbs&lt;br /&gt;
#Give the the name &amp;quot;SIMS2AD Access Manager&amp;quot;&lt;br /&gt;
#Select Daily&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Next as these Settings will be modified later.&lt;br /&gt;
#Enter the user account details that will be used to run the script&lt;br /&gt;
#Click Next &lt;br /&gt;
#Tick the box&lt;br /&gt;
#*This will open Advance Properties Window&lt;br /&gt;
#Click Finish&lt;br /&gt;
#Click the Schedule Tab&lt;br /&gt;
#Set the Start Time 08:00 AM&lt;br /&gt;
#Click the Advance Button&lt;br /&gt;
#*This will open an Advance Settings Window&lt;br /&gt;
#Set a Start date&lt;br /&gt;
#Tick Repeat Task&lt;br /&gt;
#Set it to repeat every 5 minutes&lt;br /&gt;
#Select Duration and set at 12 hours&lt;br /&gt;
#Click OK&lt;br /&gt;
#Click Apply&lt;br /&gt;
#Click OK&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Required Logon Script Changes===&lt;br /&gt;
----&lt;br /&gt;
The below code needs to be added to the beginning of the Kixtart Logon Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This will check the current time and see if the user belongs to a group that has restricted computer access.&amp;lt;br&amp;gt;&lt;br /&gt;
If the user has logged on during a restricted time a message box will be displayed informing of this and then forcefully log them off.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;20:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;08:50:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;11:15:00&amp;quot;) AND (@time &amp;lt; &amp;quot;11:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;,&lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;12:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;13:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;)  or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;13:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;14:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;16:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;18:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;18:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;20:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and LDAP (MOODLE2LDAP)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
MOODLE2LDAP is the process of linking moodle to LDAP, this will allow users to authenticate and underpin SIMS2AD - Account Creator Moodle Block.&lt;br /&gt;
==Setting up LDAP Authentication==&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Users - &amp;gt; Authentication -&amp;gt; LDAP Server&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;LDAP server settings&#039;&#039;&#039;&lt;br /&gt;
#**Host Url = ldap://server.domain.com/ &lt;br /&gt;
#**Version = 3&lt;br /&gt;
#**LDAP encoding = utf-8&lt;br /&gt;
#*&#039;&#039;&#039;Bind settings&#039;&#039;&#039; &lt;br /&gt;
#**Hide passwords = Yes&lt;br /&gt;
#**Distinguished Name = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Password = Password of LDAP Guest Account&lt;br /&gt;
#*&#039;&#039;&#039;User lookup settings&#039;&#039;&#039;&lt;br /&gt;
#**User type = MS Active Directory&lt;br /&gt;
#**Contexts = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Search subcontexts = Yes&lt;br /&gt;
#**Dereference aliases = Yes&lt;br /&gt;
#**User attribute = sAMAccountName&lt;br /&gt;
#**Member attribute = member&lt;br /&gt;
#*&#039;&#039;&#039;Force change password&#039;&#039;&#039;&lt;br /&gt;
#**Force change password = No&lt;br /&gt;
#**Use standard Change Password Page = No&lt;br /&gt;
#*&#039;&#039;&#039;LDAP password expiration settings&#039;&#039;&#039;&lt;br /&gt;
#**Expiration = No&lt;br /&gt;
#*&#039;&#039;&#039;Enable user creation&#039;&#039;&#039;&lt;br /&gt;
#**Create users externally = No&lt;br /&gt;
#*&#039;&#039;&#039;Data Mapping&#039;&#039;&#039;&lt;br /&gt;
#**First Name = givenName&lt;br /&gt;
#**Surname = sn&lt;br /&gt;
#**Email address = mail&lt;br /&gt;
#**Description = description&lt;br /&gt;
#**ID number = employeeID&lt;br /&gt;
#**Department = department&lt;br /&gt;
#Click Save&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and SIMS.net (SIMS2MOODLE)=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
Moodle requires FreeTDS to be installed for it to work with MS SQL 2005. &lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Unix Install FreeTDS on Linux]&lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows Install FreeTDS on Windows]&lt;br /&gt;
&lt;br /&gt;
==SIMS2Moodle - Enrolment Plug-in==&lt;br /&gt;
===Introduction===&lt;br /&gt;
SIMS2Moodle - Enrolment Plug-in is a part preconfigured version of moodle&#039;s external database plug-in tailored for use with SIMS.net.&lt;br /&gt;
&lt;br /&gt;
===Create Moodle SIMS.net Course Template===&lt;br /&gt;
----&lt;br /&gt;
Before the plug-in is installed it is best to create a template from which moodle will create any new SIMS.net courses &lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Miscellaneous&lt;br /&gt;
#Click New Course Button&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
#**Full name = SIMS Template Course&lt;br /&gt;
#**Short name = simstemplate&lt;br /&gt;
#**Course ID number = simstemplate&lt;br /&gt;
#**Format = Topics Format&lt;br /&gt;
#**Number of weeks/topics = 10&lt;br /&gt;
#**Course Start Date = 1st Sept&lt;br /&gt;
#**Hidden sections = Hidden sections are shown in collapsed form&lt;br /&gt;
#**News Items to show = 5&lt;br /&gt;
#**Show gradebook to students = Yes&lt;br /&gt;
#**Show activity reports = No&lt;br /&gt;
#**Maximum upload size = [Maximum Size Allowed]&lt;br /&gt;
#**Is this a meta course? = No&lt;br /&gt;
#*&#039;&#039;&#039;Enrolments&#039;&#039;&#039;&lt;br /&gt;
#**Enrolment Plugins = Site Default (Internal Enrolment)&lt;br /&gt;
#**Default role = Site Default (Student)&lt;br /&gt;
#**Course enrollable = Yes&lt;br /&gt;
#**Start date = Disabled&lt;br /&gt;
#**End date = Disabled&lt;br /&gt;
#**Enrolment duration = Unlimited&lt;br /&gt;
#*&#039;&#039;&#039;Enrolment expiry notification&#039;&#039;&#039;&lt;br /&gt;
#**Notify = No&lt;br /&gt;
#**Notify Students = No&lt;br /&gt;
#**Threshold = 10 days&lt;br /&gt;
#*&#039;&#039;&#039;Groups&#039;&#039;&#039;&lt;br /&gt;
#**Group mode = No Groups&lt;br /&gt;
#**Force = No&lt;br /&gt;
#**Default grouping = No&lt;br /&gt;
#*&#039;&#039;&#039;Availability&#039;&#039;&#039;&lt;br /&gt;
#**Availability = This course is avaliable to students&lt;br /&gt;
#**Enrolment key = [Blank]&lt;br /&gt;
#**Guest access = Do Not Allow Guest In&lt;br /&gt;
#*&#039;&#039;&#039;Language&#039;&#039;&#039;&lt;br /&gt;
#**Force language = No&lt;br /&gt;
#*&#039;&#039;&#039;Role renaming&#039;&#039;&#039;&lt;br /&gt;
#**[All Fields are Blank]&lt;br /&gt;
&lt;br /&gt;
===Download===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip SIMS.net Enrolment Plug-in] files needs to copied to the &#039;moodle\enrol&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Moodle Settings===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On the plug-in have been downloaded and installed.&lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Add New Category&lt;br /&gt;
#*Parent Category  = Top&lt;br /&gt;
#*Category Name  = SIMS Courses&lt;br /&gt;
#Click Save&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Enrolments&lt;br /&gt;
#Enable SIMS.net&lt;br /&gt;
#Click Edit&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;SIMS.net Server Settings&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbtype = mssql&lt;br /&gt;
#**enrol_dbhost = sims.school.lan &lt;br /&gt;
#**enrol_dbport = 1427 (1427 is default for MS SQL 2005)&lt;br /&gt;
#**enrol_dbuser = sa&lt;br /&gt;
#**enrol_dbpass = [SA Password]&lt;br /&gt;
&lt;br /&gt;
#*&#039;&#039;&#039;Academic Setting&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbacyear = 2009 (or current academic year)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==SIMS2MOODLE - SIMS.net Timetable Block ==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - SIMS.net Timetable Block V1.2 now has ability  to auto install, upgrade and remove views on Microsoft SQL Server 2005.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prerequisite=== &lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - Timetable block requires SIMS2MOODLE - Enrolment Plug-in to be installed and configured.  SIMS2MOODLE - Enrolment Plug-in does not have to be enabled if auto enrolment is not needed.&lt;br /&gt;
====IMPORTANT: IF UPGRADING====&lt;br /&gt;
----&lt;br /&gt;
If you are upgrading from a version before the release of 1.0, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Uninstall the SIMS.net Timetable block from moodle.&lt;br /&gt;
#Delete the folders \blocks\simstimetable and \mod\simstimtable&lt;br /&gt;
#Delete the view mdl_student_timetable from SQL Server Management Studio&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from release of 1.1, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Please install SIMS.net Enrolment Plug-in.&lt;br /&gt;
&lt;br /&gt;
===Download the Block===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip SIMS.net Timetable Block] files needs to copied to the &#039;moodle\blocks&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
#Copy simstimetable folder to the blocks folder in moodle&lt;br /&gt;
#Login to moodle as the admin account&lt;br /&gt;
#Click on Notifications&lt;br /&gt;
#*A message should state that the block has been successfully installed.&lt;br /&gt;
#Click Modules -&amp;gt; Blocks -&amp;gt; SIMS.net Timetable to configure the block. (You will have to configure the &#039;Lesson Labels&#039; field at the very least for your school&#039;s timetable).&lt;br /&gt;
&lt;br /&gt;
===Configure SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
Every schools timetable is slightly different, so the block will need to be configured. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Block Title:&amp;lt;/b&amp;gt; This text will be displayed as the block title.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Link Text:&amp;lt;/b&amp;gt; This is the text of the timetable url.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;No. Weeks:&amp;lt;/b&amp;gt; Number of weeks timetabled in SIMS.net. (Only 1 or 2 supported)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Seperator:&amp;lt;/b&amp;gt; The separator is the character using in the SIMS.net to separate the day from the period name eg Fri:1, so the separator will be &amp;quot;:&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Lesson Labels:&amp;lt;/b&amp;gt; These are the names all there periods that are timetabled in SIMS.net seperated with a &amp;quot;,&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category: Administrator]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65397</id>
		<title>Integrate Moodle, LDAP and SIMS.net</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65397"/>
		<updated>2009-11-18T15:07:01Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Updated the location where the files need to be copied to make it clearer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Integrate SIMS.net and LDAP (SIMS2AD)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
For SIMS2AD and SIMS2MOODLE modules to work every student  and teacher&#039;s LDAP account MUST have the employeeID field set. These need to be set to the following.&lt;br /&gt;
#Students = UPN&lt;br /&gt;
#Staff = SIMS.net Teacher Code &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==SIMS2AD - Account Creator (Unpublished)==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Account Creator is a moodle block that administers the process of LDAP account creation automatically.&lt;br /&gt;
===IMPORTANT - Please Read===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD Vbscript has been retired. It is in the process of being converted to a moodle block. The main aim of this is to improve configuration and quality.&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Access Manager==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Access Manager allows non technical members of staff to control student access to an education establishments computer network via SIMS.net.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Script Usage Details===&lt;br /&gt;
The Vbscript will run every 5 minutes, every day &amp;lt;br&amp;gt;&lt;br /&gt;
A log file is created in the same folder as the script, this hold a log of all processed changes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Add a new view to MS SQL Server===&lt;br /&gt;
----&lt;br /&gt;
#Open SQL Server Management Studio&lt;br /&gt;
#Use the Object Explorer window to browse to the database and the folder called ‘Views’.&lt;br /&gt;
#*[Server]\[Instance] -&amp;gt; Database -&amp;gt; sims -&amp;gt; Views&lt;br /&gt;
#Right-click the ‘Views’ folder and select ‘New View’.&lt;br /&gt;
#Close the Add Table dialog box – Copy and Paste the query below into the Query box &lt;br /&gt;
#Save the View via File, Save [the temporary name of the view] .&lt;br /&gt;
#Enter the above name for the new ‘View’ and click ‘OK’.&lt;br /&gt;
#If you refresh the list of views by right-clicking the ‘Views’ folder you will see the new view near the top of the list.&lt;br /&gt;
#Close SQL Server management Studio.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MS SQL 2005 Server View===&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: vbs_admanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Query to paste in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT     TOP (100) PERCENT sims.stud_via_student_browse.unique_pupil_no, sims.stud_via_student_browse.forename, &lt;br /&gt;
                      sims.stud_via_student_browse.surname, sims.udf_field.description AS type, sims.udf_lookup_value.description&lt;br /&gt;
FROM         sims.udf_value INNER JOIN&lt;br /&gt;
                      sims.udf_field ON sims.udf_value.field_id = sims.udf_field.field_id INNER JOIN&lt;br /&gt;
                      sims.stud_via_student_browse ON sims.udf_value.entity_id = sims.stud_via_student_browse.person_id INNER JOIN&lt;br /&gt;
                      sims.udf_lookup_value ON sims.udf_value.lookup_value_id = sims.udf_lookup_value.lookup_value_id&lt;br /&gt;
WHERE     (sims.udf_field.active = &#039;T&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Script&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The [https://docs.moodle.org/en/SIMS2AD_access_manager.vbs SIMS2AD Access Manager] script needs to copied to D:\SIMS2AD on the SIMS Server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the script is available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
https://docs.moodle.org/en/SIMS2AD_access_manager.vbs&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Setting Up a Scheduled Task===&lt;br /&gt;
----&lt;br /&gt;
A scheduled task needs to be created to run the SIMS2AD Access Manager Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This Task will need to run every 5 minutes from 08:00 AM to 20:00 PM &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Open Control Panel&lt;br /&gt;
#Open Scheduled Tasks&lt;br /&gt;
#*This will open the Schedule Task Windows&lt;br /&gt;
#Add Scheduled Task&lt;br /&gt;
#*This will open the Schedule Task Wizard&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Browse and Navigate to D:\SIMS2AD Folder&lt;br /&gt;
#Select SIMS2AD_Access_Manager.vbs&lt;br /&gt;
#Give the the name &amp;quot;SIMS2AD Access Manager&amp;quot;&lt;br /&gt;
#Select Daily&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Next as these Settings will be modified later.&lt;br /&gt;
#Enter the user account details that will be used to run the script&lt;br /&gt;
#Click Next &lt;br /&gt;
#Tick the box&lt;br /&gt;
#*This will open Advance Properties Window&lt;br /&gt;
#Click Finish&lt;br /&gt;
#Click the Schedule Tab&lt;br /&gt;
#Set the Start Time 08:00 AM&lt;br /&gt;
#Click the Advance Button&lt;br /&gt;
#*This will open an Advance Settings Window&lt;br /&gt;
#Set a Start date&lt;br /&gt;
#Tick Repeat Task&lt;br /&gt;
#Set it to repeat every 5 minutes&lt;br /&gt;
#Select Duration and set at 12 hours&lt;br /&gt;
#Click OK&lt;br /&gt;
#Click Apply&lt;br /&gt;
#Click OK&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Required Logon Script Changes===&lt;br /&gt;
----&lt;br /&gt;
The below code needs to be added to the beginning of the Kixtart Logon Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This will check the current time and see if the user belongs to a group that has restricted computer access.&amp;lt;br&amp;gt;&lt;br /&gt;
If the user has logged on during a restricted time a message box will be displayed informing of this and then forcefully log them off.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;20:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;08:50:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;11:15:00&amp;quot;) AND (@time &amp;lt; &amp;quot;11:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;,&lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;12:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;13:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;)  or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;13:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;14:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;16:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;18:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;18:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;20:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and LDAP (MOODLE2LDAP)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
MOODLE2LDAP is the process of linking moodle to LDAP, this will allow users to authenticate and underpin SIMS2AD - Account Creator Moodle Block.&lt;br /&gt;
==Setting up LDAP Authentication==&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Users - &amp;gt; Authentication -&amp;gt; LDAP Server&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;LDAP server settings&#039;&#039;&#039;&lt;br /&gt;
#**Host Url = ldap://server.domain.com/ &lt;br /&gt;
#**Version = 3&lt;br /&gt;
#**LDAP encoding = utf-8&lt;br /&gt;
#*&#039;&#039;&#039;Bind settings&#039;&#039;&#039; &lt;br /&gt;
#**Hide passwords = Yes&lt;br /&gt;
#**Distinguished Name = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Password = Password of LDAP Guest Account&lt;br /&gt;
#*&#039;&#039;&#039;User lookup settings&#039;&#039;&#039;&lt;br /&gt;
#**User type = MS Active Directory&lt;br /&gt;
#**Contexts = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Search subcontexts = Yes&lt;br /&gt;
#**Dereference aliases = Yes&lt;br /&gt;
#**User attribute = sAMAccountName&lt;br /&gt;
#**Member attribute = member&lt;br /&gt;
#*&#039;&#039;&#039;Force change password&#039;&#039;&#039;&lt;br /&gt;
#**Force change password = No&lt;br /&gt;
#**Use standard Change Password Page = No&lt;br /&gt;
#*&#039;&#039;&#039;LDAP password expiration settings&#039;&#039;&#039;&lt;br /&gt;
#**Expiration = No&lt;br /&gt;
#*&#039;&#039;&#039;Enable user creation&#039;&#039;&#039;&lt;br /&gt;
#**Create users externally = No&lt;br /&gt;
#*&#039;&#039;&#039;Data Mapping&#039;&#039;&#039;&lt;br /&gt;
#**First Name = givenName&lt;br /&gt;
#**Surname = sn&lt;br /&gt;
#**Email address = mail&lt;br /&gt;
#**Description = description&lt;br /&gt;
#**ID number = employeeID&lt;br /&gt;
#**Department = department&lt;br /&gt;
#Click Save&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and SIMS.net (SIMS2MOODLE)=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
Moodle requires FreeTDS to be installed for it to work with MS SQL 2005. &lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Unix Install FreeTDS on Linux]&lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows Install FreeTDS on Windows]&lt;br /&gt;
&lt;br /&gt;
==SIMS2Moodle - Enrolment Plug-in==&lt;br /&gt;
===Introduction===&lt;br /&gt;
SIMS2Moodle - Enrolment Plug-in is a part preconfigured version of moodle&#039;s external database plug-in tailored for use with SIMS.net.&lt;br /&gt;
&lt;br /&gt;
===Create Moodle SIMS.net Course Template===&lt;br /&gt;
----&lt;br /&gt;
Before the plug-in is installed it is best to create a template from which moodle will create any new SIMS.net courses &lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Miscellaneous&lt;br /&gt;
#Click New Course Button&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
#**Full name = SIMS Template Course&lt;br /&gt;
#**Short name = simstemplate&lt;br /&gt;
#**Course ID number = simstemplate&lt;br /&gt;
#**Format = Topics Format&lt;br /&gt;
#**Number of weeks/topics = 10&lt;br /&gt;
#**Course Start Date = 1st Sept&lt;br /&gt;
#**Hidden sections = Hidden sections are shown in collapsed form&lt;br /&gt;
#**News Items to show = 5&lt;br /&gt;
#**Show gradebook to students = Yes&lt;br /&gt;
#**Show activity reports = No&lt;br /&gt;
#**Maximum upload size = [Maximum Size Allowed]&lt;br /&gt;
#**Is this a meta course? = No&lt;br /&gt;
#*&#039;&#039;&#039;Enrolments&#039;&#039;&#039;&lt;br /&gt;
#**Enrolment Plugins = Site Default (Internal Enrolment)&lt;br /&gt;
#**Default role = Site Default (Student)&lt;br /&gt;
#**Course enrollable = Yes&lt;br /&gt;
#**Start date = Disabled&lt;br /&gt;
#**End date = Disabled&lt;br /&gt;
#**Enrolment duration = Unlimited&lt;br /&gt;
#*&#039;&#039;&#039;Enrolment expiry notification&#039;&#039;&#039;&lt;br /&gt;
#**Notify = No&lt;br /&gt;
#**Notify Students = No&lt;br /&gt;
#**Threshold = 10 days&lt;br /&gt;
#*&#039;&#039;&#039;Groups&#039;&#039;&#039;&lt;br /&gt;
#**Group mode = No Groups&lt;br /&gt;
#**Force = No&lt;br /&gt;
#**Default grouping = No&lt;br /&gt;
#*&#039;&#039;&#039;Availability&#039;&#039;&#039;&lt;br /&gt;
#**Availability = This course is avaliable to students&lt;br /&gt;
#**Enrolment key = [Blank]&lt;br /&gt;
#**Guest access = Do Not Allow Guest In&lt;br /&gt;
#*&#039;&#039;&#039;Language&#039;&#039;&#039;&lt;br /&gt;
#**Force language = No&lt;br /&gt;
#*&#039;&#039;&#039;Role renaming&#039;&#039;&#039;&lt;br /&gt;
#**[All Fields are Blank]&lt;br /&gt;
&lt;br /&gt;
===Download===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip SIMS.net Enrolment Plug-in] files needs to copied to the &#039;moodle\enrol&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Moodle Settings===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On the plug-in have been downloaded and installed.&lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Add New Category&lt;br /&gt;
#*Parent Category  = Top&lt;br /&gt;
#*Category Name  = SIMS Courses&lt;br /&gt;
#Click Save&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Enrolments&lt;br /&gt;
#Enable SIMS.net&lt;br /&gt;
#Click Edit&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;SIMS.net Server Settings&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbtype = mssql&lt;br /&gt;
#**enrol_dbhost = sims.school.lan &lt;br /&gt;
#**enrol_dbport = 1427 (1427 is default for MS SQL 2005)&lt;br /&gt;
#**enrol_dbuser = sa&lt;br /&gt;
#**enrol_dbpass = [SA Password]&lt;br /&gt;
&lt;br /&gt;
#*&#039;&#039;&#039;Academic Setting&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbacyear = 2009 (or current academic year)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==SIMS2MOODLE - SIMS.net Timetable Block ==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - SIMS.net Timetable Block V1.2 now has ability  to auto install, upgrade and remove views on Microsoft SQL Server 2005.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prerequisite=== &lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - Timetable block requires SIMS2MOODLE - Enrolment Plug-in to be installed and configured.  SIMS2MOODLE - Enrolment Plug-in does not have to be enabled if auto enrolment is not needed.&lt;br /&gt;
====IMPORTANT: IF UPGRADING====&lt;br /&gt;
----&lt;br /&gt;
If you are upgrading from a version before the release of 1.0, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Uninstall the SIMS.net Timetable block from moodle.&lt;br /&gt;
#Delete the folders \blocks\simstimetable and \mod\simstimtable&lt;br /&gt;
#Delete the view mdl_student_timetable from SQL Server Management Studio&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from release of 1.1, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Please install SIMS.net Enrolment Plug-in.&lt;br /&gt;
&lt;br /&gt;
===Download the Block===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip SIMS.net Timetable Block] files needs to copied to the &#039;moodle\blocks&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
#Copy simstimetable folder to the blocks folder in moodle&lt;br /&gt;
#Login to moodle as the admin account&lt;br /&gt;
#Click on Notifications&lt;br /&gt;
#*A message should state that the block has been successfully installed.&lt;br /&gt;
#Click Modules -&amp;gt; Blocks -&amp;gt; SIMS.net Timetable to configure the block.&lt;br /&gt;
&lt;br /&gt;
===Configure SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
Every schools timetable is slightly different, so the block will need to be configured. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Block Title:&amp;lt;/b&amp;gt; This text will be displayed as the block title.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Link Text:&amp;lt;/b&amp;gt; This is the text of the timetable url.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;No. Weeks:&amp;lt;/b&amp;gt; Number of weeks timetabled in SIMS.net. (Only 1 or 2 supported)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Seperator:&amp;lt;/b&amp;gt; The separator is the character using in the SIMS.net to separate the day from the period name eg Fri:1, so the separator will be &amp;quot;:&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Lesson Labels:&amp;lt;/b&amp;gt; These are the names all there periods that are timetabled in SIMS.net seperated with a &amp;quot;,&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category: Administrator]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65396</id>
		<title>Integrate Moodle, LDAP and SIMS.net</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65396"/>
		<updated>2009-11-18T15:05:52Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Fixed the name of the enrollment plugin to reflect the latest version, updated academic year&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Integrate SIMS.net and LDAP (SIMS2AD)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
For SIMS2AD and SIMS2MOODLE modules to work every student  and teacher&#039;s LDAP account MUST have the employeeID field set. These need to be set to the following.&lt;br /&gt;
#Students = UPN&lt;br /&gt;
#Staff = SIMS.net Teacher Code &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==SIMS2AD - Account Creator (Unpublished)==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Account Creator is a moodle block that administers the process of LDAP account creation automatically.&lt;br /&gt;
===IMPORTANT - Please Read===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD Vbscript has been retired. It is in the process of being converted to a moodle block. The main aim of this is to improve configuration and quality.&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Access Manager==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Access Manager allows non technical members of staff to control student access to an education establishments computer network via SIMS.net.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Script Usage Details===&lt;br /&gt;
The Vbscript will run every 5 minutes, every day &amp;lt;br&amp;gt;&lt;br /&gt;
A log file is created in the same folder as the script, this hold a log of all processed changes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Add a new view to MS SQL Server===&lt;br /&gt;
----&lt;br /&gt;
#Open SQL Server Management Studio&lt;br /&gt;
#Use the Object Explorer window to browse to the database and the folder called ‘Views’.&lt;br /&gt;
#*[Server]\[Instance] -&amp;gt; Database -&amp;gt; sims -&amp;gt; Views&lt;br /&gt;
#Right-click the ‘Views’ folder and select ‘New View’.&lt;br /&gt;
#Close the Add Table dialog box – Copy and Paste the query below into the Query box &lt;br /&gt;
#Save the View via File, Save [the temporary name of the view] .&lt;br /&gt;
#Enter the above name for the new ‘View’ and click ‘OK’.&lt;br /&gt;
#If you refresh the list of views by right-clicking the ‘Views’ folder you will see the new view near the top of the list.&lt;br /&gt;
#Close SQL Server management Studio.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MS SQL 2005 Server View===&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: vbs_admanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Query to paste in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT     TOP (100) PERCENT sims.stud_via_student_browse.unique_pupil_no, sims.stud_via_student_browse.forename, &lt;br /&gt;
                      sims.stud_via_student_browse.surname, sims.udf_field.description AS type, sims.udf_lookup_value.description&lt;br /&gt;
FROM         sims.udf_value INNER JOIN&lt;br /&gt;
                      sims.udf_field ON sims.udf_value.field_id = sims.udf_field.field_id INNER JOIN&lt;br /&gt;
                      sims.stud_via_student_browse ON sims.udf_value.entity_id = sims.stud_via_student_browse.person_id INNER JOIN&lt;br /&gt;
                      sims.udf_lookup_value ON sims.udf_value.lookup_value_id = sims.udf_lookup_value.lookup_value_id&lt;br /&gt;
WHERE     (sims.udf_field.active = &#039;T&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Script&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The [https://docs.moodle.org/en/SIMS2AD_access_manager.vbs SIMS2AD Access Manager] script needs to copied to D:\SIMS2AD on the SIMS Server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the script is available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
https://docs.moodle.org/en/SIMS2AD_access_manager.vbs&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Setting Up a Scheduled Task===&lt;br /&gt;
----&lt;br /&gt;
A scheduled task needs to be created to run the SIMS2AD Access Manager Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This Task will need to run every 5 minutes from 08:00 AM to 20:00 PM &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Open Control Panel&lt;br /&gt;
#Open Scheduled Tasks&lt;br /&gt;
#*This will open the Schedule Task Windows&lt;br /&gt;
#Add Scheduled Task&lt;br /&gt;
#*This will open the Schedule Task Wizard&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Browse and Navigate to D:\SIMS2AD Folder&lt;br /&gt;
#Select SIMS2AD_Access_Manager.vbs&lt;br /&gt;
#Give the the name &amp;quot;SIMS2AD Access Manager&amp;quot;&lt;br /&gt;
#Select Daily&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Next as these Settings will be modified later.&lt;br /&gt;
#Enter the user account details that will be used to run the script&lt;br /&gt;
#Click Next &lt;br /&gt;
#Tick the box&lt;br /&gt;
#*This will open Advance Properties Window&lt;br /&gt;
#Click Finish&lt;br /&gt;
#Click the Schedule Tab&lt;br /&gt;
#Set the Start Time 08:00 AM&lt;br /&gt;
#Click the Advance Button&lt;br /&gt;
#*This will open an Advance Settings Window&lt;br /&gt;
#Set a Start date&lt;br /&gt;
#Tick Repeat Task&lt;br /&gt;
#Set it to repeat every 5 minutes&lt;br /&gt;
#Select Duration and set at 12 hours&lt;br /&gt;
#Click OK&lt;br /&gt;
#Click Apply&lt;br /&gt;
#Click OK&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Required Logon Script Changes===&lt;br /&gt;
----&lt;br /&gt;
The below code needs to be added to the beginning of the Kixtart Logon Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This will check the current time and see if the user belongs to a group that has restricted computer access.&amp;lt;br&amp;gt;&lt;br /&gt;
If the user has logged on during a restricted time a message box will be displayed informing of this and then forcefully log them off.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;20:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;08:50:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;11:15:00&amp;quot;) AND (@time &amp;lt; &amp;quot;11:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;,&lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;12:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;13:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;)  or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;13:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;14:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;16:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;18:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;18:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;20:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and LDAP (MOODLE2LDAP)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
MOODLE2LDAP is the process of linking moodle to LDAP, this will allow users to authenticate and underpin SIMS2AD - Account Creator Moodle Block.&lt;br /&gt;
==Setting up LDAP Authentication==&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Users - &amp;gt; Authentication -&amp;gt; LDAP Server&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;LDAP server settings&#039;&#039;&#039;&lt;br /&gt;
#**Host Url = ldap://server.domain.com/ &lt;br /&gt;
#**Version = 3&lt;br /&gt;
#**LDAP encoding = utf-8&lt;br /&gt;
#*&#039;&#039;&#039;Bind settings&#039;&#039;&#039; &lt;br /&gt;
#**Hide passwords = Yes&lt;br /&gt;
#**Distinguished Name = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Password = Password of LDAP Guest Account&lt;br /&gt;
#*&#039;&#039;&#039;User lookup settings&#039;&#039;&#039;&lt;br /&gt;
#**User type = MS Active Directory&lt;br /&gt;
#**Contexts = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Search subcontexts = Yes&lt;br /&gt;
#**Dereference aliases = Yes&lt;br /&gt;
#**User attribute = sAMAccountName&lt;br /&gt;
#**Member attribute = member&lt;br /&gt;
#*&#039;&#039;&#039;Force change password&#039;&#039;&#039;&lt;br /&gt;
#**Force change password = No&lt;br /&gt;
#**Use standard Change Password Page = No&lt;br /&gt;
#*&#039;&#039;&#039;LDAP password expiration settings&#039;&#039;&#039;&lt;br /&gt;
#**Expiration = No&lt;br /&gt;
#*&#039;&#039;&#039;Enable user creation&#039;&#039;&#039;&lt;br /&gt;
#**Create users externally = No&lt;br /&gt;
#*&#039;&#039;&#039;Data Mapping&#039;&#039;&#039;&lt;br /&gt;
#**First Name = givenName&lt;br /&gt;
#**Surname = sn&lt;br /&gt;
#**Email address = mail&lt;br /&gt;
#**Description = description&lt;br /&gt;
#**ID number = employeeID&lt;br /&gt;
#**Department = department&lt;br /&gt;
#Click Save&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and SIMS.net (SIMS2MOODLE)=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
Moodle requires FreeTDS to be installed for it to work with MS SQL 2005. &lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Unix Install FreeTDS on Linux]&lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows Install FreeTDS on Windows]&lt;br /&gt;
&lt;br /&gt;
==SIMS2Moodle - Enrolment Plug-in==&lt;br /&gt;
===Introduction===&lt;br /&gt;
SIMS2Moodle - Enrolment Plug-in is a part preconfigured version of moodle&#039;s external database plug-in tailored for use with SIMS.net.&lt;br /&gt;
&lt;br /&gt;
===Create Moodle SIMS.net Course Template===&lt;br /&gt;
----&lt;br /&gt;
Before the plug-in is installed it is best to create a template from which moodle will create any new SIMS.net courses &lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Miscellaneous&lt;br /&gt;
#Click New Course Button&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
#**Full name = SIMS Template Course&lt;br /&gt;
#**Short name = simstemplate&lt;br /&gt;
#**Course ID number = simstemplate&lt;br /&gt;
#**Format = Topics Format&lt;br /&gt;
#**Number of weeks/topics = 10&lt;br /&gt;
#**Course Start Date = 1st Sept&lt;br /&gt;
#**Hidden sections = Hidden sections are shown in collapsed form&lt;br /&gt;
#**News Items to show = 5&lt;br /&gt;
#**Show gradebook to students = Yes&lt;br /&gt;
#**Show activity reports = No&lt;br /&gt;
#**Maximum upload size = [Maximum Size Allowed]&lt;br /&gt;
#**Is this a meta course? = No&lt;br /&gt;
#*&#039;&#039;&#039;Enrolments&#039;&#039;&#039;&lt;br /&gt;
#**Enrolment Plugins = Site Default (Internal Enrolment)&lt;br /&gt;
#**Default role = Site Default (Student)&lt;br /&gt;
#**Course enrollable = Yes&lt;br /&gt;
#**Start date = Disabled&lt;br /&gt;
#**End date = Disabled&lt;br /&gt;
#**Enrolment duration = Unlimited&lt;br /&gt;
#*&#039;&#039;&#039;Enrolment expiry notification&#039;&#039;&#039;&lt;br /&gt;
#**Notify = No&lt;br /&gt;
#**Notify Students = No&lt;br /&gt;
#**Threshold = 10 days&lt;br /&gt;
#*&#039;&#039;&#039;Groups&#039;&#039;&#039;&lt;br /&gt;
#**Group mode = No Groups&lt;br /&gt;
#**Force = No&lt;br /&gt;
#**Default grouping = No&lt;br /&gt;
#*&#039;&#039;&#039;Availability&#039;&#039;&#039;&lt;br /&gt;
#**Availability = This course is avaliable to students&lt;br /&gt;
#**Enrolment key = [Blank]&lt;br /&gt;
#**Guest access = Do Not Allow Guest In&lt;br /&gt;
#*&#039;&#039;&#039;Language&#039;&#039;&#039;&lt;br /&gt;
#**Force language = No&lt;br /&gt;
#*&#039;&#039;&#039;Role renaming&#039;&#039;&#039;&lt;br /&gt;
#**[All Fields are Blank]&lt;br /&gt;
&lt;br /&gt;
===Download===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip SIMS.net Enrolment Plug-in] files needs to copied to the &#039;moodle\enrol&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Moodle Settings===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On the plug-in have been downloaded and installed.&lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Add New Category&lt;br /&gt;
#*Parent Category  = Top&lt;br /&gt;
#*Category Name  = SIMS Courses&lt;br /&gt;
#Click Save&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Enrolments&lt;br /&gt;
#Enable SIMS.net&lt;br /&gt;
#Click Edit&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;SIMS.net Server Settings&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbtype = mssql&lt;br /&gt;
#**enrol_dbhost = sims.school.lan &lt;br /&gt;
#**enrol_dbport = 1427 (1427 is default for MS SQL 2005)&lt;br /&gt;
#**enrol_dbuser = sa&lt;br /&gt;
#**enrol_dbpass = [SA Password]&lt;br /&gt;
&lt;br /&gt;
#*&#039;&#039;&#039;Academic Setting&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbacyear = 2009 (or current academic year)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==SIMS2MOODLE - SIMS.net Timetable Block ==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - SIMS.net Timetable Block V1.2 now has ability  to auto install, upgrade and remove views on Microsoft SQL Server 2005.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prerequisite=== &lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - Timetable block requires SIMS2MOODLE - Enrolment Plug-in to be installed and configured.  SIMS2MOODLE - Enrolment Plug-in does not have to be enabled if auto enrolment is not needed.&lt;br /&gt;
====IMPORTANT: IF UPGRADING====&lt;br /&gt;
----&lt;br /&gt;
If you are upgrading from a version before the release of 1.0, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Uninstall the SIMS.net Timetable block from moodle.&lt;br /&gt;
#Delete the folders \blocks\simstimetable and \mod\simstimtable&lt;br /&gt;
#Delete the view mdl_student_timetable from SQL Server Management Studio&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from release of 1.1, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Please install SIMS.net Enrolment Plug-in.&lt;br /&gt;
&lt;br /&gt;
===Download the Block===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip SIMS.net Timetable Block] files needs to copied to the html folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
#Copy simstimetable folder to the blocks folder in moodle&lt;br /&gt;
#Login to moodle as the admin account&lt;br /&gt;
#Click on Notifications&lt;br /&gt;
#*A message should state that the block has been successfully installed.&lt;br /&gt;
#Click Modules -&amp;gt; Blocks -&amp;gt; SIMS.net Timetable to configure the block.&lt;br /&gt;
&lt;br /&gt;
===Configure SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
Every schools timetable is slightly different, so the block will need to be configured. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Block Title:&amp;lt;/b&amp;gt; This text will be displayed as the block title.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Link Text:&amp;lt;/b&amp;gt; This is the text of the timetable url.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;No. Weeks:&amp;lt;/b&amp;gt; Number of weeks timetabled in SIMS.net. (Only 1 or 2 supported)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Seperator:&amp;lt;/b&amp;gt; The separator is the character using in the SIMS.net to separate the day from the period name eg Fri:1, so the separator will be &amp;quot;:&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Lesson Labels:&amp;lt;/b&amp;gt; These are the names all there periods that are timetabled in SIMS.net seperated with a &amp;quot;,&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category: Administrator]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65395</id>
		<title>Integrate Moodle, LDAP and SIMS.net</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/2x/pl/index.php?title=Integrate_Moodle,_LDAP_and_SIMS.net&amp;diff=65395"/>
		<updated>2009-11-18T15:04:29Z</updated>

		<summary type="html">&lt;p&gt;Minkus: Fixed the place where you have to copy the files - was unclear before&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Integrate SIMS.net and LDAP (SIMS2AD)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
For SIMS2AD and SIMS2MOODLE modules to work every student  and teacher&#039;s LDAP account MUST have the employeeID field set. These need to be set to the following.&lt;br /&gt;
#Students = UPN&lt;br /&gt;
#Staff = SIMS.net Teacher Code &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==SIMS2AD - Account Creator (Unpublished)==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Account Creator is a moodle block that administers the process of LDAP account creation automatically.&lt;br /&gt;
===IMPORTANT - Please Read===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD Vbscript has been retired. It is in the process of being converted to a moodle block. The main aim of this is to improve configuration and quality.&lt;br /&gt;
&lt;br /&gt;
==SIMS2AD - Access Manager==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2AD - Access Manager allows non technical members of staff to control student access to an education establishments computer network via SIMS.net.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Script Usage Details===&lt;br /&gt;
The Vbscript will run every 5 minutes, every day &amp;lt;br&amp;gt;&lt;br /&gt;
A log file is created in the same folder as the script, this hold a log of all processed changes.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Add a new view to MS SQL Server===&lt;br /&gt;
----&lt;br /&gt;
#Open SQL Server Management Studio&lt;br /&gt;
#Use the Object Explorer window to browse to the database and the folder called ‘Views’.&lt;br /&gt;
#*[Server]\[Instance] -&amp;gt; Database -&amp;gt; sims -&amp;gt; Views&lt;br /&gt;
#Right-click the ‘Views’ folder and select ‘New View’.&lt;br /&gt;
#Close the Add Table dialog box – Copy and Paste the query below into the Query box &lt;br /&gt;
#Save the View via File, Save [the temporary name of the view] .&lt;br /&gt;
#Enter the above name for the new ‘View’ and click ‘OK’.&lt;br /&gt;
#If you refresh the list of views by right-clicking the ‘Views’ folder you will see the new view near the top of the list.&lt;br /&gt;
#Close SQL Server management Studio.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MS SQL 2005 Server View===&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: vbs_admanager&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Query to paste in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELECT     TOP (100) PERCENT sims.stud_via_student_browse.unique_pupil_no, sims.stud_via_student_browse.forename, &lt;br /&gt;
                      sims.stud_via_student_browse.surname, sims.udf_field.description AS type, sims.udf_lookup_value.description&lt;br /&gt;
FROM         sims.udf_value INNER JOIN&lt;br /&gt;
                      sims.udf_field ON sims.udf_value.field_id = sims.udf_field.field_id INNER JOIN&lt;br /&gt;
                      sims.stud_via_student_browse ON sims.udf_value.entity_id = sims.stud_via_student_browse.person_id INNER JOIN&lt;br /&gt;
                      sims.udf_lookup_value ON sims.udf_value.lookup_value_id = sims.udf_lookup_value.lookup_value_id&lt;br /&gt;
WHERE     (sims.udf_field.active = &#039;T&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Script&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
The [https://docs.moodle.org/en/SIMS2AD_access_manager.vbs SIMS2AD Access Manager] script needs to copied to D:\SIMS2AD on the SIMS Server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the script is available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
https://docs.moodle.org/en/SIMS2AD_access_manager.vbs&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Setting Up a Scheduled Task===&lt;br /&gt;
----&lt;br /&gt;
A scheduled task needs to be created to run the SIMS2AD Access Manager Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This Task will need to run every 5 minutes from 08:00 AM to 20:00 PM &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Open Control Panel&lt;br /&gt;
#Open Scheduled Tasks&lt;br /&gt;
#*This will open the Schedule Task Windows&lt;br /&gt;
#Add Scheduled Task&lt;br /&gt;
#*This will open the Schedule Task Wizard&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Browse and Navigate to D:\SIMS2AD Folder&lt;br /&gt;
#Select SIMS2AD_Access_Manager.vbs&lt;br /&gt;
#Give the the name &amp;quot;SIMS2AD Access Manager&amp;quot;&lt;br /&gt;
#Select Daily&lt;br /&gt;
#Click Next&lt;br /&gt;
#Click Next as these Settings will be modified later.&lt;br /&gt;
#Enter the user account details that will be used to run the script&lt;br /&gt;
#Click Next &lt;br /&gt;
#Tick the box&lt;br /&gt;
#*This will open Advance Properties Window&lt;br /&gt;
#Click Finish&lt;br /&gt;
#Click the Schedule Tab&lt;br /&gt;
#Set the Start Time 08:00 AM&lt;br /&gt;
#Click the Advance Button&lt;br /&gt;
#*This will open an Advance Settings Window&lt;br /&gt;
#Set a Start date&lt;br /&gt;
#Tick Repeat Task&lt;br /&gt;
#Set it to repeat every 5 minutes&lt;br /&gt;
#Select Duration and set at 12 hours&lt;br /&gt;
#Click OK&lt;br /&gt;
#Click Apply&lt;br /&gt;
#Click OK&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
===Required Logon Script Changes===&lt;br /&gt;
----&lt;br /&gt;
The below code needs to be added to the beginning of the Kixtart Logon Script.&amp;lt;br&amp;gt;&lt;br /&gt;
This will check the current time and see if the user belongs to a group that has restricted computer access.&amp;lt;br&amp;gt;&lt;br /&gt;
If the user has logged on during a restricted time a message box will be displayed informing of this and then forcefully log them off.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;20:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;08:50:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;11:15:00&amp;quot;) AND (@time &amp;lt; &amp;quot;11:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;,&lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;12:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;13:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;)  or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
                MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
                $RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;13:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;14:35:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;16:35:00&amp;quot;) AND (@time &amp;lt; &amp;quot;18:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_E4&amp;quot;) &lt;br /&gt;
        or InGroup(&amp;quot;SIMS2AD_Lesson_Evening_Only_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
IF ((@time &amp;gt; &amp;quot;18:00:00&amp;quot;) AND (@time &amp;lt; &amp;quot;20:00:00&amp;quot;))&lt;br /&gt;
	If InGroup(&amp;quot;SIMS2AD_LessonOnly_E4&amp;quot;) or InGroup(&amp;quot;SIMS2AD_LessonOnly_L4&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		MESSAGEBOX (&amp;quot;Your Computer Access Been Restricted, For More Information Please Speak To Your Director Of Year&amp;quot;, &lt;br /&gt;
                &amp;quot;IT SERVICES&amp;quot;, 16, 15)&lt;br /&gt;
		$RC = LogOff(0)&lt;br /&gt;
	endif&lt;br /&gt;
endif&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and LDAP (MOODLE2LDAP)=&lt;br /&gt;
==Introduction==&lt;br /&gt;
MOODLE2LDAP is the process of linking moodle to LDAP, this will allow users to authenticate and underpin SIMS2AD - Account Creator Moodle Block.&lt;br /&gt;
==Setting up LDAP Authentication==&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Users - &amp;gt; Authentication -&amp;gt; LDAP Server&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;LDAP server settings&#039;&#039;&#039;&lt;br /&gt;
#**Host Url = ldap://server.domain.com/ &lt;br /&gt;
#**Version = 3&lt;br /&gt;
#**LDAP encoding = utf-8&lt;br /&gt;
#*&#039;&#039;&#039;Bind settings&#039;&#039;&#039; &lt;br /&gt;
#**Hide passwords = Yes&lt;br /&gt;
#**Distinguished Name = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Password = Password of LDAP Guest Account&lt;br /&gt;
#*&#039;&#039;&#039;User lookup settings&#039;&#039;&#039;&lt;br /&gt;
#**User type = MS Active Directory&lt;br /&gt;
#**Contexts = cn=LDAP Guest,cn=Users,dc=domain,dc=com&lt;br /&gt;
#**Search subcontexts = Yes&lt;br /&gt;
#**Dereference aliases = Yes&lt;br /&gt;
#**User attribute = sAMAccountName&lt;br /&gt;
#**Member attribute = member&lt;br /&gt;
#*&#039;&#039;&#039;Force change password&#039;&#039;&#039;&lt;br /&gt;
#**Force change password = No&lt;br /&gt;
#**Use standard Change Password Page = No&lt;br /&gt;
#*&#039;&#039;&#039;LDAP password expiration settings&#039;&#039;&#039;&lt;br /&gt;
#**Expiration = No&lt;br /&gt;
#*&#039;&#039;&#039;Enable user creation&#039;&#039;&#039;&lt;br /&gt;
#**Create users externally = No&lt;br /&gt;
#*&#039;&#039;&#039;Data Mapping&#039;&#039;&#039;&lt;br /&gt;
#**First Name = givenName&lt;br /&gt;
#**Surname = sn&lt;br /&gt;
#**Email address = mail&lt;br /&gt;
#**Description = description&lt;br /&gt;
#**ID number = employeeID&lt;br /&gt;
#**Department = department&lt;br /&gt;
#Click Save&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Integrate Moodle and SIMS.net (SIMS2MOODLE)=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
Moodle requires FreeTDS to be installed for it to work with MS SQL 2005. &lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Unix Install FreeTDS on Linux]&lt;br /&gt;
#[https://docs.moodle.org/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows Install FreeTDS on Windows]&lt;br /&gt;
&lt;br /&gt;
==SIMS2Moodle - Enrolment Plug-in==&lt;br /&gt;
===Introduction===&lt;br /&gt;
SIMS2Moodle - Enrolment Plug-in is a part preconfigured version of moodle&#039;s external database plug-in tailored for use with SIMS.net.&lt;br /&gt;
&lt;br /&gt;
===Create Moodle SIMS.net Course Template===&lt;br /&gt;
----&lt;br /&gt;
Before the plug-in is installed it is best to create a template from which moodle will create any new SIMS.net courses &lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Miscellaneous&lt;br /&gt;
#Click New Course Button&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;General&#039;&#039;&#039;&lt;br /&gt;
#**Full name = SIMS Template Course&lt;br /&gt;
#**Short name = simstemplate&lt;br /&gt;
#**Course ID number = simstemplate&lt;br /&gt;
#**Format = Topics Format&lt;br /&gt;
#**Number of weeks/topics = 10&lt;br /&gt;
#**Course Start Date = 1st Sept&lt;br /&gt;
#**Hidden sections = Hidden sections are shown in collapsed form&lt;br /&gt;
#**News Items to show = 5&lt;br /&gt;
#**Show gradebook to students = Yes&lt;br /&gt;
#**Show activity reports = No&lt;br /&gt;
#**Maximum upload size = [Maximum Size Allowed]&lt;br /&gt;
#**Is this a meta course? = No&lt;br /&gt;
#*&#039;&#039;&#039;Enrolments&#039;&#039;&#039;&lt;br /&gt;
#**Enrolment Plugins = Site Default (Internal Enrolment)&lt;br /&gt;
#**Default role = Site Default (Student)&lt;br /&gt;
#**Course enrollable = Yes&lt;br /&gt;
#**Start date = Disabled&lt;br /&gt;
#**End date = Disabled&lt;br /&gt;
#**Enrolment duration = Unlimited&lt;br /&gt;
#*&#039;&#039;&#039;Enrolment expiry notification&#039;&#039;&#039;&lt;br /&gt;
#**Notify = No&lt;br /&gt;
#**Notify Students = No&lt;br /&gt;
#**Threshold = 10 days&lt;br /&gt;
#*&#039;&#039;&#039;Groups&#039;&#039;&#039;&lt;br /&gt;
#**Group mode = No Groups&lt;br /&gt;
#**Force = No&lt;br /&gt;
#**Default grouping = No&lt;br /&gt;
#*&#039;&#039;&#039;Availability&#039;&#039;&#039;&lt;br /&gt;
#**Availability = This course is avaliable to students&lt;br /&gt;
#**Enrolment key = [Blank]&lt;br /&gt;
#**Guest access = Do Not Allow Guest In&lt;br /&gt;
#*&#039;&#039;&#039;Language&#039;&#039;&#039;&lt;br /&gt;
#**Force language = No&lt;br /&gt;
#*&#039;&#039;&#039;Role renaming&#039;&#039;&#039;&lt;br /&gt;
#**[All Fields are Blank]&lt;br /&gt;
&lt;br /&gt;
===Download===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip SIMS.net Enrolment Plug-in] files needs to copied to the &#039;moodle\enrol&#039; folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_enrolment_plugin.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Moodle Settings===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On the plug-in have been downloaded and installed.&lt;br /&gt;
&lt;br /&gt;
#Login to moodle as the admin user.&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Add/Edit Courses&lt;br /&gt;
#Click Add New Category&lt;br /&gt;
#*Parent Category  = Top&lt;br /&gt;
#*Category Name  = SIMS Courses&lt;br /&gt;
#Click Save&lt;br /&gt;
#Under Site Administration&lt;br /&gt;
#*Courses - &amp;gt; Enrolments&lt;br /&gt;
#Enable External Database&lt;br /&gt;
#Click Edit&lt;br /&gt;
#Set the Following Fields as follows&lt;br /&gt;
#*&#039;&#039;&#039;SIMS.net Server Settings&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbtype = mssql&lt;br /&gt;
#**enrol_dbhost = sims.school.lan &lt;br /&gt;
#**enrol_dbport = 1427 (1427 is default for MS SQL 2005)&lt;br /&gt;
#**enrol_dbuser = sa&lt;br /&gt;
#**enrol_dbpass = [SA Password]&lt;br /&gt;
&lt;br /&gt;
#*&#039;&#039;&#039;Academic Setting&#039;&#039;&#039;&lt;br /&gt;
#**enrol_dbacyear = 2008 (or current academic year)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==SIMS2MOODLE - SIMS.net Timetable Block ==&lt;br /&gt;
===Introduction===&lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - SIMS.net Timetable Block V1.2 now has ability  to auto install, upgrade and remove views on Microsoft SQL Server 2005.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Prerequisite=== &lt;br /&gt;
----&lt;br /&gt;
SIMS2MOODLE - Timetable block requires SIMS2MOODLE - Enrolment Plug-in to be installed and configured.  SIMS2MOODLE - Enrolment Plug-in does not have to be enabled if auto enrolment is not needed.&lt;br /&gt;
====IMPORTANT: IF UPGRADING====&lt;br /&gt;
----&lt;br /&gt;
If you are upgrading from a version before the release of 1.0, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Uninstall the SIMS.net Timetable block from moodle.&lt;br /&gt;
#Delete the folders \blocks\simstimetable and \mod\simstimtable&lt;br /&gt;
#Delete the view mdl_student_timetable from SQL Server Management Studio&lt;br /&gt;
&lt;br /&gt;
If you are upgrading from release of 1.1, please do the following:-&lt;br /&gt;
&lt;br /&gt;
#Please install SIMS.net Enrolment Plug-in.&lt;br /&gt;
&lt;br /&gt;
===Download the Block===&lt;br /&gt;
----&lt;br /&gt;
The [http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip SIMS.net Timetable Block] files needs to copied to the html folder on the Moodle server.&amp;lt;br&amp;gt;&lt;br /&gt;
The latest version of the files are available from:-&lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
http://www.uctc.e-sussex.sch.uk/moodle_sims.net_timetable_block.zip&lt;br /&gt;
&amp;lt;/Pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
#Copy simstimetable folder to the blocks folder in moodle&lt;br /&gt;
#Login to moodle as the admin account&lt;br /&gt;
#Click on Notifications&lt;br /&gt;
#*A message should state that the block has been successfully installed.&lt;br /&gt;
#Click Modules -&amp;gt; Blocks -&amp;gt; SIMS.net Timetable to configure the block.&lt;br /&gt;
&lt;br /&gt;
===Configure SIMS.net Timetable Block for Moodle===&lt;br /&gt;
----&lt;br /&gt;
Every schools timetable is slightly different, so the block will need to be configured. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Block Title:&amp;lt;/b&amp;gt; This text will be displayed as the block title.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Link Text:&amp;lt;/b&amp;gt; This is the text of the timetable url.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;No. Weeks:&amp;lt;/b&amp;gt; Number of weeks timetabled in SIMS.net. (Only 1 or 2 supported)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Seperator:&amp;lt;/b&amp;gt; The separator is the character using in the SIMS.net to separate the day from the period name eg Fri:1, so the separator will be &amp;quot;:&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Lesson Labels:&amp;lt;/b&amp;gt; These are the names all there periods that are timetabled in SIMS.net seperated with a &amp;quot;,&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category: Administrator]]&lt;/div&gt;</summary>
		<author><name>Minkus</name></author>
	</entry>
</feed>