Microsoft Education Labs Logo

 

Getting Started with
Microsoft Live Services Plug-in for Moodle

Published July 2009

Last updated: December 17th, 2009

 


Contents

1     Overview    2

2     General Procedure   2

3     Download Contents  2

4     Get Windows Live Application ID.. 3

5     Outlook Live Preparation. 4

5.1     Enroll your school 5

5.2     Setup impersonation account. 5

6     Environment Setup   6

7     Installation   7

8     Configuration   7

8.1     Enable Windows Live ID authentication. 8

8.2     Configure Microsoft Live Services block. 9

8.2.1     Microsoft Live Services Plug-in for Moodle Settings. 9

8.2.2     Email and Calendar  9

8.2.3     Windows Live Messenger. 10

8.2.4     Windows Live Alerts  10

8.2.5     Powerset and Bing Search. 10

8.3     Make Live Services block appear on all Course Pages. 11

8.4     Configure Moodle User Accounts. 11

8.4.1     Administrator updates the record. 11

8.4.2     User updates own account record. 12

8.5     Additional Configuration Options. 12

8.5.1     Update the Login Page. 12

8.5.2     Make Teacher E-mail Addresses Less Visible. 12

9     Contact Information   12

 


Overview

Microsoft Live Services Plug-in for Moodle extends Windows Live™ Services to provide Moodle users with quick access to some of their favorite online services, like Windows Live Hotmail®, Windows Live Messenger, Bing™ search and more. Microsoft Education Labs researched the types of plug-ins supported by Moodle, and then created a plug-in that allows users to log into Moodle with a Windows Live ID and display Live Services on a Moodle site.

General Procedure

1.       Create a Live Services account and get a Windows Live Application ID at live.azure.com.

2.       Install PHP extensions required by the plug-in.

3.       Download the latest version of MS4M.zip from Education Labs.

4.       Unzip MS4M.zip to your Moodle installation folder.

5.       In the Moodle admin panel, activate Windows Live ID authentication .

6.       Configure Windows Live Services block with your application id.

7.       Add Live Services block to your pages so that user can access it.

8.       Set the right authentication option for Moodle users.

To use the Outlook Live service,

1.       Enroll your school and register a Live@edu account.

2.       Setup impersonation account.

3.       Configure outlook live block.

4.       Set up users and their authentication options.

Download Contents

The Microsoft Live Services Plug-in includes two components and related documentation:

·          Live ID authentication module
This module allows users to log into Moodle using their Windows Live ID. They can use the same credentials that they use for their Hotmail or Live Messenger account to log into Moodle sites, so that they don't have to remember a new set of credentials, and can maintain their own password and other account information at live.com instead of having to contact the school's IT staff for password resets or other account issues.

·         Microsoft Live Services block
This module provides a dashboard inside Moodle that presents information from Live Services such as Hotmail, Exchange, and Windows Live Messenger. Once this module is installed and configured, students can chat and send e-mail using their Windows Live ID without leaving your Moodle site.

Note: The Live Services block uses the Windows Live ID authentication module and will not work unless that module is installed.

In addition, the Docs folder includes the following documents:

·         Getting Started
A step-by-step walkthrough of how to install and configure both components of the plug-in. It includes information on how to get a Windows Live Site ID for your Moodle server, how to deploy the code, and how to configure the various features of the Live Services block.

·         Frequently Asked Questions
Answers common questions on how to enable or use various features in Microsoft Services block. This content is also available in the block from the Help link.

·         Developer’s Guide
A comprehensive document for developers who want to understand how the code works or how to extend the block's functionality. We encourage all developers and Moodle administrators to look under the hood and think of ways to make this code even better.

Get Windows Live Application ID

Microsoft Live Services Plug-in for Moodle requires your Moodle site to have a unique Windows Live Application ID (AppID). This AppID allows Microsoft to recognize where a user initiated the Live Services login, so that upon successful authentication Microsoft can return the user to the correct Web site.

Important:  You will need the AppID and Secret Key values later when configuring the Microsoft Services block in Moodle.

To get a Windows Live Application ID,

1.        Visit live.azure.com.

2.       Sign in with your Windows Live ID. If you do not have a Windows Live ID, visit windows.live.com to get one  free.

3.       After signing in, you need to create a new Azure account if you don’t have one yet. The Azure account will be associated to your Windows Live ID.

a.       Read the Privacy Statement and then click I Agree.

b.      After your account is created, click Continue.

c.       You do not need an invitation Token. Click Cancel to skip this step.

4.       Select the Live Services tab on the left.

5.       Click New Service on the upper right. You will be redirected to “Create a new service component” page.

6.       Click Live Services: Existing APIs.

7.       Read the terms of use, and then click I Accept.

8.       Provide the following information:

a.       Project Label:  Enter a descriptive name foryour Moodle site. For example, Biology Department Moodle.

b.      Project Description (optional):  Enter a longer description for your Moodle site.

c.       Domain:  Enter the domain of your Moodle. For example: www.contoso.edu.

                                                               i.      The domain name should contain no slashes (“/”). Domain names such as “http://www.contoso.edu” or ” www.contoso.edu/mymoodle” are invalid.

                                                             ii.      You cannot create two Application IDs with the same domain name. As a work around, you can set up two sub-domains for the same domain. For example, “moodle1.contoso.edu” and “moodle2.contoso.edu” are considered different and can be used to apply for two different Application IDs.

                                                            iii.      Domain names with and without "www" are considered different: for example, www.contoso.edu and contoso.edu.  Check your Moodle configuration (“$CFG->wwwroot”) to see which form should be applied.

d.      Return URL:  Enter the Web address of your Moodle site followed by "/auth/liveid/webauth-handler.php". For example, http://www.contoso.edu/bio-moodle/auth/liveid/webauth-handler.php.

9.       Click Create.

10.   After this step you will get your application ID and Secret key. You can edit or delete this service at any time.

Outlook Live Preparation

Outlook Live is a free e-mail service available to schools enrolled with Microsoft Live@edu. With Microsoft Live Services Plug-in for Moodle you can easily access the Outlook Live service. In this section you will find steps to set up your Live@edu account and create an impersonation account. For instructions to setup and access this service in Moodle, please see Email and Calendar.

To use Outlook Live with the Microsoft Live Services Plug-in for Moodle, you will need to perform the following configuration steps. If you are not using Outlook Live, skip to the Environment Setup section.

1.       Enroll your school in the Live@edu program.

2.       Set up an Impersonation Account.

Enroll your school

Register your school’s domain with Live@edu. You can enroll your school in the Live@edu program at http://www.microsoft.com/liveatedu/ . After you have enrolled your domain, Live@edu will provide instructions to update your domain mail records to use Outlook Live services as your e-mail service provider.

After you complete the Live@edu enrollment process, you need to create an impersonation account in Outlook Live.

 

Note:  To use the plug-in with Outlook Live, the Live@edu Organization feature set is required. Schools that enrolled at Live@edu prior to August 4, 2009, may not have this feature set enabled. For information about how to move your domain to Live@edu Organization, see the troubleshooting guide at http://www.educationlabs.com/Pages/Microsoft_Services_for-Moodle_-_TroubleshootingGuide.htm.

Set up impersonation account

Microsoft Live Services Plug-in for Moodle communicates with Outlook live through Exchange Web Services (EWS). Exchange Impersonation is an authorization mechanism designed for use within EWS. An impersonation account can only be created by the administrator. By verifying the impersonation information, the Exchange server knows whether a user is authorized by the administrator.

https://pod51004.outlook.com

To set up an impersonation account,

1.       Create a new account for the impersonation role at Outlook Live (https://outlook.com/ecp/ ). For example, impersonation@yourliveatedu.com. In order to create an account you need to sign in to Outlook Live with the Administrator account.

2.       Install Powershell 2 ctp3 + WinRM 2 ctp3. Note: WinRM 2ctp3 requires Windows Vista. Windows 7 testing is not complete.

3.       Run Powershell as administrator. You may need to run the following cmdlet to create a remote session. For more information, refer to the Outlook Help document, “Enable scripts to run in Windows PowerShell.”

 

Set-ExecutionPolicy RemoteSigned

 

4.       Run the following cmdlets to complete the setup process:

 

$LiveCred = Get-Credential            # Use your admin account open a new PS session

 

$Session = New-PSSession -ConfigurationName Microsoft.Exchange –ConnectionUri `
https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic `

–AllowRedirection

 

Import-PSSession $Session

 

New-ManagementRoleAssignment -Name:EWSImpersonation -Role:ApplicationImpersonation `

-User:impersonation@yourliveatedu.com

 

 

Note: Please replace impersonation@yourliveatedu.com with the account you set up in step 1. 

More details about the three cmdlets above can be found here. Available cmdlets for Outlook Live management can be found here.  

If you need additional assistance with cmdlets, please contact your Microsoft sales and support representative.

Environment Setup

Microsoft Live Services Plug-in for Moodle requires you to enable some features of PHP that may be disabled in your Web server installation by default. Modules required are:  hash, mhash, mcrypt, curl, soap, and openssl.  

To check your PHP configuration, go to Site Administration panel -> Server -> PHP info. Search for “hash”, “mhash”, “mcrypt”, “curl”, “soap” and “openssl”. If all of them are present and are enabled, then you can skip to the next section.  If any are missing, perform the following steps.

If you’re running Windows:

1.       Open your php.ini file.

Tip: This text file normally can be found in your "\apache\bin\" folder. You can check your PHP info page for the exact location.

2.       Uncomment the following lines by removing the prefix semicolon(;) if there is one (More info can be found at: http://msdn.microsoft.com/en-us/library/cc287663.aspx):

extension=php_mhash.dll

extension=php_mcrypt.dll

extension=php_openssl.dll

extension=php_hash.dll

extension=php_curl.dll

extension=php_soap.dll

3.       Save and close your php.ini file.

4.       Restart Apache for the changes to take effect.

Note: In PHP 5.3.0, modules hash, mhash and mcrypt are compiled in.

If you’re running Linux:

1.       Find out which modules are missing from your PHP info page.

2.       Search for “php5-{module name}” within your package management tool. For example, if you want to install “mhash” in a Linux box with aptitude, search for mhash to get the actual package name and install it. Or if you know the package name you can simply run “sudo apt-get install php5-mhash”. Common setup tools include  YUM, apt-get, dpkg and yast.

3.       After the installation, restart your apache server and ensure the module has been loaded properly.

If you cannot install your missing packages with your package management tool, you can choose to compile the module yourself. Please see the documentation shipped with the source code package for more information.

Installation

 

1.        Download the MS4M.zip file from Education Labs web site.

2.       Unzip Ms4M.zip into the root directory of your Moodle instance. This will copy all of the files into the appropriate directories.

3.       Login to Moodle with an administrator account.

4.       Click Notifications on Administration panel.

5.       Click Continue.

6.       Verify it has been installed successfully at Site Administration panel -> Users -> Authentication -> Manage authentication. If installation is successful, you will find a “Windows Live ID” entry in the list of authentication plug-ins.

Note: Linux users need to grant read-only permissions to all of the installation files before the Moodle system will recognize the plug-in.

Configuration

There are 5 menu entries in the site Administration panel to configure the plug-in:

·         Users -> Authentication -> Manage authentication:  Turn on this option to allow Windows Live ID authentication.

·         Modules -> Manage blocks: Microsoft Live Services must be in “Show” status for users to access its features.

·         Modules -> Blocks -> Microsoft Live Services: Configure Microsoft Live Services block.

·         Modules -> Blocks -> Sticky blocks: Control the presence of Microsoft Live Services block on a certain page type.

·         Users -> Accounts:  Set the authentication options for each user.

Enable Windows Live ID authentication

After installing the plug-in, you must tell Moodle to allow sign in with a Live ID by enabling Windows Live ID authentication:

1.       Go to Site Administration panel -> Users -> Authentication -> Manage authentication.

2.       In the list of Active authentication plug-ins, click the closed-eye icon next to Windows Live ID.

3.       Add contents to the Instructions section. Contents added here will be rendered on the Moodle login page. For example, add a hyperlink to “auth/liveid/login.php” so that users can sign in with their Live ID on the Moodle login page:

·         Add a link to the Live ID Login file:

 <a href='../auth/liveid/login.php'>Sign in</a>

·         Add a link to the help file for the plug-in (a FAQ document is provided):

<a target='_blank' href='../help.php?module=live_services&file=live_services_help.php' >

If self-registration is disabled, you should include an administrator e-mail address so the MSN ID can be set up in the user’s profile. A sample HTML block is included below for your reference.

4.       Click Save Changes.

5.       At the top of the page, click Administration to return to the main administration page.

Sample HTML block:

Here is a sample HTML block including login information. You can use this in your Instructions section by simply updating the site administrator e-mail address at the bottom:

 

<div style="font-size:120%">

<p><span style="font-family: 'Segoe UI Light', Arial, Helvetica, sans-serif;font-size: 1.6em;color: #333333;">Use your <img alt="Windows Live" height="23" longdesc="Windows Live Logo" src="/blocks/live_services/shared/images/WindowsLive.png" width="175"> ID<br />to sign in to Moodle</span><span style="font-family: 'Segoe Script', 'Felt Tip Roman', 'Comic Sans MS';font-size: 1.6em;color: #333333;"> every time!</span></p>

<div style="line-height:32px">

<a href="/auth/liveid/login.php" style="background:transparent url(/blocks/live_services/shared/images/glossybutton88.gif) no-repeat scroll top right;height: 32px;width:88px;display: block;float:left;margin-right: 0px;text-decoration: none;text-align:center;color: #333333;font-family: 'Segoe UI', Arial, Helvetica, sans-serif;font-size:1.2em;font-weight:normal;"><span style="height: 32px;display: block;float:left;margin-right: 0px;text-decoration: none;color: #333333;font-family: 'Segoe UI', Arial, Helvetica, sans-serif;font-size:1.2em;font-weight:normal;line-height:12px;padding:9px 0px 11px 0px;background: transparent url(/blocks/live_services/shared/images/glossybtn32.gif) no-repeat;">Sign in</span></a>

</div>

<br />

<br />

<br />

<p style="font-family: 'Segoe UI', Arial, Helvetica, sans-serif;font-size: .85em;color: #666666;">Using your Windows Live ID also gives you access to your Windows Live e-mail, calendar, messenger, and alerts right from your Moodle site.</p>

<p style="font-family: 'Segoe UI', Arial, Helvetica, sans-serif;font-size: .85em;color: #666666;">To register for access to this Web site, contact the site administrator (<a href="mailto:admin@sample.com">admin@sample.com</a>).</p></div>

 

 

Important:  The Windows Live ID login screen allows a user to save the password on a computer for subsequent sessions. However, saving the password is not an option when logging in to Windows Live ID from Moodle. This is by design and is consistent with Moodle’s login security standards. It also aligns with the security required for shared computer scenarios.

If a user uses a Windows Live ID to sign into another Web application that supports password saving, then that password will also be used when logging into Moodle. For example, if a user logs into Outlook Live with their Windows Live ID and selects the option to save the password, that same saved password can be applied when subsequently logging into Moodle with that Windows Live ID.

 

Configure Microsoft Live Services block

Microsoft Live Services plug-in block hosts several Live services including Hotmail, Messenger and more. You can enable or disable a Live service within the Microsoft Live Services block configuration page. To access the configuration page, go to Site Administration panel -> Modules -> Blocks -> Microsoft Live Services.

The Microsoft Live Services settings page is divided into 5 sections. Each section allows you to set values to enable a service:

·       Microsoft Live Services Plug-in for Moodle Settings

·       Email and Calendar

·       Windows Live Messenger

·       Windows Live Alerts

·       Powerset and Bing Search

Microsoft Live Services Plug-in for Moodle Settings

To use the Microsoft Live Services block, you will need to register an Application ID and Secret Key from Microsoft. Enter the Application ID and Secret Key that you created in the Get Windows Live Application ID  section of this document.

Email and Calendar

There are two e-mail services available in the Microsoft Live Services block—Outlook Live and Hotmail. Click Use Outlook Live if your users have Outlook Live accounts. For this option you will also need to set the Service Account (this is the complete Windows Live ID) and Password of the impersonation account and the Outlook URL of your Outlook Live domain.  See Setup impersonation account for more information about setting up impersonation account.

In order to obtain your Outlook URL:

1.       Open a browser window and go to http://www.outlook.com.

2.       Log in using your Windows Live ID credentials.

3.       Copy the URL from your address bar omitting "/owa". For example: https://pod51004.outlook.com

For more information about configuring and deploying Outlook Live, see http://help.outlook.com/en-us/140/dd277852.aspx. If you do not have Outlook Live deployed, leave Use Outlook Live unchecked and the block will default to Hotmail.

You can also optionally show or hide the user's calendar. When Use Outlook Live is checked, your users will see their Outlook Live calendars. If you leave the Use Outlook Live box unchecked, the block will default to Windows Live Calendar.

Windows Live Messenger

Check Show Messenger if you want your users to be able to chat via Windows Live Messenger. No other configuration is needed.

Windows Live messenger is available only at course level. In other word, if you add Microsoft Live Services block to a page other than course page, Messenger would not appear. The followings are some other prerequisites to see a contact when you enter a course.

·         Roles can be assigned at system level or at course level. A contact must be assigned the role "teacher" or "student" at course level to appear in your contact list. The messenger will filters out non-student and non-teacher contacts.

·         Student contact must also be in your Windows Live Messenger contact list to appear in your contact list.

In addition, you must sign in to Windows Live Messenger to appear online in Moodle. You can change your online status in Outlook Live without signing in to Windows Live Messenger.

Windows Live Alerts

The Windows Live Alerts feature requires that you register a Pin ID and Pin Password from Microsoft.  To get your Live Alerts account, send a request to alertsdk (at) microsoft.com.  For more information see the document at http://msdn.microsoft.com/en-us/library/bb259769.aspx.

Powerset and Bing Search

You can enable or disable these two search engines. No other configuration is needed.

Make Live Services block appear on all Course Pages

There are two ways to add Microsoft Live Services to course pages. One is to add the block by editing a course page. In this way you must manually add the block to all desired course pages. Instead you can add a sticky block to one course page, and it will appear on all course pages:

1.       From the Site Administration panel, choose Modules -> Blocks -> Sticky blocks.

2.       Choose Course Page from the drop-down list.

3.       In the Blocks panel, select Microsoft Live Services from the drop-down list.

4.       At the top of the page, click Administration to return to the main administration page.

Configure Moodle User Accounts

In order for users to log into Moodle with their Windows Live IDs, each user's Moodle account needs to be linked to their Windows Live ID. There are two methods to update user accounts:

·         The administrator updates the record for each user.

·         Users update their own account records.

Administrator updates the record

You must know each user’s Windows Live ID to change his Moodle account record. This can be done manually one at a time, or by processing a batch update.

Manual Update

·         From the Site Administration panel, click Users -> Accounts -> Browse list of users.

·         Click on the name of the user you want to update.

·         Click Edit Profile.

·         Click Show Advanced.

·         From the Choose an Authentication method dropdown, Choose Windows Live ID.  This value tells Moodle that the account will be authenticated by Live Services instead of Moodle's internal mechanism.

·         Update the MSN ID to be the user's Windows Live ID.

·         Click Update Profile.

Batch Update

·         You can add “msn” and “auth” fields to the CSV file when you bulk upload users into Moodle. A sample csv file look like this:

username, password, firstname, lastname, email, auth, msn

moodleuser,Password,John,Doe,user@example.com,liveid,user@example.com

‘liveid’ stands for Windows Live ID authentication. The format for the file and other information about uploading users is located at http://moodle.org/help.php?file=uploadusers.html

User updates own account record

Individual users can change their Moodle account records by updating their Moodle profiles:

1.       Log into Moodle.

2.       Click on your name in the upper-right corner to view your account.

3.       Click Edit Profile.

4.       Click Show Advanced.

5.       In the MSN ID field, enter your Windows Live ID.

6.       Click Update Profile.

Additional Configuration Options

Update the Login Page

To make logging into Moodle with a Microsoft Live ID more intuitive, we suggest that you remove the “Is this your first time here?” heading on the login page. This will make it less confusing for users returning to the page.

To remove the heading, you will need to update the moodle.php file, which is typically located at
[moodle root]\lang\[local language]\moodle.php . In that file, change the “firsttime” string from

$string['firsttime'] = 'Is this your first time here?';
to
$string['firsttime'] = '';

Make Teacher E-mail Addresses Less Visible

By default, e-mail addresses for teachers are visible to all students in the class. Administrators can update the code to show teacher e-mail addresses only to students that are in the teacher's contact list. This change requires that you update the messenger_service.php file. This file is typically located at
[moodle root]\blocks\live_services\services\messenger\messenger_service.php.

Contact Information

If you have any questions or feedback about the Microsoft Live Services Plug-in for Moodle, please contact us at moodle (at) microsoft.com.

Information about this Microsoft Education Labs project, including blog posts and a discussion board, is available at http://www.educationlabs.com/projects/moodleproduct/Pages/default.aspx.

Troubleshooting suggestions are documented in the Troubleshooting Guide for the plug-in at http://www.educationlabs.com/Pages/Microsoft_Services_for-Moodle_-_TroubleshootingGuide.htm.

Latest version of this document is available at http://www.educationlabs.com/Pages/Microsoft_Live_Services_for_Moodle_Getting_Started.htm.

 

 

 

 

 

Microsoft, Bing, Hotmail, and Windows Live are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners.

 

This documentation is licensed under the Creative Commons Attribution License. To view a copy of this license,
(a) visit http://creativecommons.org/licenses/by/3.0/legalcode; or,
(b) send a letter to Creative Commons, 171 2nd Street, Suite 300, San Francisco, California, 94105, USA.