Archive

Author Archive

Using User Principal Name to Authenticate in SharePoint

December 10th, 2010 Richard No comments

I’ve recently set some parent accounts up for a school and they were concerned that some parents would be unhappy that their names in their account name would be truncated. The reason for this is that the standard User logon name is limited to 20 characters. When you start getting double-barrelled names and want to use forename and surname in the account name you run out of characters very quickly.

Fortunately in Active Directory there’s 2 logon names you can use:

accountNames

Pre-Windows 2000 user logon name: The is the "normal" logon name we all love and use daily and is of the format DOMAIN\UserName. The underlying attribute is sAMAccountName and is limited to 20 characters for the user name part. The sAMAccountName must be unique within the domain and Active Directory prevents you from creating duplicates.

User logon name. This is of the format UserName@domainpart and is referred to as the UPN – User Principal Name (not to be confused with a student’s UPN – Unique Pupil Number). The underlying attribute is userPrincipalName and has no practical restrictions on its length (it’s over 1000 characters). By default the userPrincipalName is sAMAccountName@<fully qualified domain name>, however you can have whatever you want as both the UserName and domainpart parts of the UPN. The UPN must be unique within the forest to be used to successfully log in with, however although Active Directory Users and Computers won’t allow you to create a user with a duplicate UPN, you can do so programmatically so there’s a potential gotcha there. Note this is not the same as the user’s email address, although it is a similar format, but could be the same if you wanted it to be.

From the names it’s obvious that Microsoft considers the UPN the recommended logon name, and the DOMAIN\UserName to be deprecated, but I’ve never come across an organisation using UPNs, so the Pre-Windows 2000 user logon name is still the most popular way of logging in.

Heading back to the original problem with the parent names, Salamander Active Directory is able to create users with whatever sAMAccountName and userPrincipalNames you want. So I created the parents with UPNs of the format Forename.Surname@parent.school.domain. This allows the school to provide account names without any truncated names in and makes it clear that they are parental accounts. Since SharePoint is using Active Directory as its authentication provider in this case, the parents now have nice log ins to SharePoint.

SharePoint Learning Kit Drop Box Documentation

October 22nd, 2010 Richard No comments

SLK Drop Box I haven’t had any time to write up anything about how the Drop Box works since I released. However, I have just realised that I created a presentation for Microsoft about it which does go into some detail. Rather than make everyone wait even longer for me to extract into written format here is the presentation. The detail is in the notes pages so make sure that you look at those.

 

I don’t know if SlideShare supports notes so I’ll link directly to the PowerPoint presentation itself.

DropBoxPresentation

Categories: SLK Tags: , ,

SharePoint Learning Kit 1.5 Beta 3 Released

October 22nd, 2010 Richard 2 comments

I’ve just uploaded SLK 1.5 Beta 3 to CodePlex at http://slk.codeplex.com/releases/view/49988.

Changes over Beta 2 are:

Removal of Microsoft.LearningComponents.Compression.MRCI.dll

This was an unmanaged code (C++) dll used for decompressing parts of Class Server content. It’s platform version (x86 or x64) was causing problems installing on the other platform.

I’ve rewritten this in managed code and merged it into Microsoft.LearningComponents.Compression.dll.

I don’t know why it was in unmanaged code originally. Presumably the original developers had the code handy from Class Server and included it as was.

Central Administration Configure SharePoint Learning Kit page sets database permissions

The configure SharePoint Learning Kit page in Central Administration wasn’t setting the database permissions correctly. It was setting the permissions to the application pool identity of central administration rather than the identity of the Web Application it was configuring for. Presumably it wasn’t a bigger problem before as people were using the same user for central admin and their web applications. Best practise is to use different identities for these, and this seems to be more prevalent now.

Error Logging

There were multiple places which errors were logged into the event log. Only one of which I’d found before and updated for SharePoint 2010. I think I’ve got them all now, and am only using one function to log errors which is compatible with SharePoint 2007 & 2010.

Configure SharePoint Learning Kit Link in Central Admin

Done some more tweaking to try to get to display more consistently. You do need to deploy to one web application before it appears. Have fixed a permissions issue and added an icon for SharePoint 2010. Basic, but better than a broken link. Needs internationalizing though. Any volunteers?

Minor bug fixes

I’ve slotted in a couple of minor bug fixes

Categories: SLK Tags: ,

How To Stop Home Folders Being Renamed Documents in the Network Share

September 24th, 2010 Richard 20 comments

I’ve recently had a number of queries about why everyone’s home folders have been renamed to Documents in the network share they reside in.

documents

This obviously makes finding a particular users home folder difficult, especially in schools where administrators and teachers regularly look in the home folders.

This is a feature of Windows Vista, Windows 7 & Server 2008. A desktop.ini file is created when the user first accesses their home folder to give it a friendly display name of Documents and a custom icon. This is to make it look pretty and stand out when viewed under your profile in Windows Explorer.

However, the side effect is as above. Whenever anyone else views the folder, and this will normally be in the context of the network location it is stored, their Explorer will also read the desktop.ini file to get display information and give the impression that there are multiple folders called Documents.

As it’s only the display name which is changed you can still navigate into the folder by typing in the name in the address bar, which will auto-complete properly, but it’s not ideal.

The desktop.ini file is a hidden system file so you won’t see it unless you have your setting set up to view system files so unless you know what’s happening it can seem very mysterious.

Microsoft have a knowledge base article about this at http://support.microsoft.com/kb/947222.

In it, it suggests 3 options for stopping this behaviour.

1.    Put the home folder in a wrapper folder which is called the user’s username, but point the Active Directory attribute to the folder within it.

2.    Give the user exclusive rights to the folder.

3.    Deny read permission to the desktop.ini file in the home folder to other users. Then they won’t be able to read the display information and the name won’t change.

In a school environment, where there are legitimate reasons for other users to go into the students’ home folders option, 2 isn’t an option. Both 1 & 3 work nicely, but 3 seems cleaner to me as it doesn’t require any extra folders creating just to get round a display issue.

I’ve knocked up a quick PowerShell script to automate setting the permissions on the desktop.ini files. Note the groupName below should be changed to the name of an Active Directory group you want to be able to view the real folder names. Be careful that this group doesn’t include any back up process opoerators or backups could fail.

$folders = Get-ChildItem | where-object {$_.psiscontainer};

foreach ($folder in $folders)
{
    $ErrorActionPreference = "SilentlyContinue"
    $desktopIni = Get-ChildItem $folder -Filter desktop.ini -Force

    if ($desktopIni -ne $null)
    {
         $Acl = (Get-Item $desktopIni.FullName -Force).GetAccessControl("Access")
         $Ar = New-Object system.security.accesscontrol.filesystemaccessrule `
                   ("groupName","Read","Deny")
         $Acl.SetAccessRule($Ar)
         Set-Acl $desktopIni.FullName $Acl
    }
}

All you need to do is save this script as a .ps1 file in the directory containing your home folders. If they are split for example along intake years, you’ll need to do this in each containing folder. So in the example above, you would save in \\fileserver\Intake2008. Then change groupName to the name of an Active Directory group containing the users you want to see the real names. Open up PowerShell and navigate to the directory containing the script file and then run it.

If you haven’t run PowerShell scripts before you’ll need to set the execution policy to allow it, I normally use RemoteSigned. Run

help set-executionpolicy

and

help about_execution_policies

in your PowerShell prompt for more information.

Update 05 April 2011

Removed the use of Get-Acl as Set-Acl then tries to set the owner. Talked about back up operators. Thanks to Jay Hutter for both of those.
Update 16 September 2011

Added $ErrorActionPreference = “SilentlyContinue” at the start. Otherwise an error is thrown when re-running as you don’t have access to the desktop.ini files you modified last time.

Updated Free Photo Export From Sims

August 26th, 2010 Richard No comments

I’ve uploaded a updated version of the free photo export from Sims utility. There are 2 changes:

  1. Option to save the photos named as the internal sims ID rather than Admission Number and Staff Code. Run PhotoExport /? for help on how to do this.
  2. It now handles the cases where the Staff Code contains characters which are not valid characters for a file name. It replaces these characters with –.

You can download the utility from http://www.salamandersoft.co.uk/utilities.html.

Categories: Sims Tags: ,

Learning Gateway Conference 2010 Slide Decks

August 3rd, 2010 Richard No comments

We had another great set of speakers and sessions at the Learning Gateway Conference 2010. We had a fantastic set of speakers and couldn’t have held the event without them.

Here is a linked list of all the presentations given on the day. It’s not complete yet, but I’ll add them as I get them.

Keynote

Portals and Gateways for all : Simon Shaw

Building the Learning Gateway

Understanding SharePoint 2010 : Steve Smith

Branding : Chris McKinley

Patching SharePoint and Preparing your SharePoint 2007 for 2010 : Neil Hodgkinson

A look at live@edu : Chris Rothwell

Virtualisation : Alan Richards & Dave Coleman

User Adoption

2010 Social Networking Features : Alex Pearce

Encouraging user adoption &amp; quick wins : Steve Smith

SharePoint 2010 for Education : Alex Pearce

Integrating InfoPath Forms : Paul Baker

SharePoint Learning Kit : Richard Willis

School Stories

Parental Engagement : Simon Thompson

Hosted Overview : David White

In School Overview : Mark Leighton

Replacement of the File Server : Alan Richards & Dave Coleman

SharePoint Learning Kit 1.5 Beta Released

August 3rd, 2010 Richard No comments

I’ve just put up version 1.5 beta at http://slk.codeplex.com/releases/view/49988.

There are now separate releases for SharePoint 2007 & SharePoint 2010.

The source code is also available. This still needs some work to build cleanly and build the 2 releases automatically, but I thought it would be better up so you can start looking at it.

Categories: SLK Tags: ,

SharePoint Learning Kit Installation Documentation for Version 1.5

August 3rd, 2010 Richard 3 comments

This is the new installation documentation I have just completed. It is distributed with version 1.5.

Installing SLK

This document contains the installation and configuration instructions for SLK version 1.5. It has the following sections:

1.  Introduction – About SharePoint Learning Kit
2.  Requirements
3.  Contents of the installation package
4.  Installing SLK
5.  Configuring SLK
6.  Upgrading from 1.4

1.  Introduction – About SharePoint Learning Kit

SharePoint Learning Kit (SLK) is a SCORM 2004-conformant e-learning delivery and tracking application built as a SharePoint solution. It works with either SharePoint 2010 or SharePoint 2007 and has the following core features:

    a. Supports SCORM 1.2, SCORM 2004, and Class Server content, allowing users to store and manage this content in SharePoint document libraries.
    b. Supports a learner-centric or instructor-led (assigned) workflow.
    c. Allows assignment, tracking and grading of both e-learning and non-e-learning content.

The current version is 1.5.

SharePoint Learning Kit is a community source project. This means that it is made available to you for free, and that you can use it as-is or modify it to suit your needs as long as you comply with the conditions that are described in the accompanying License.txt file. You are responsible for reading and complying with this license. SharePoint Learning Kit is supported by a community of users and developers through discussion forums at http://www.codeplex.com/slk. You are invited to participate in this community, to help others, to report issues, and to contribute your ideas to carry SLK forward. For the most up to date information about SLK, please refer to http://www.codeplex.com/slk.

2.  Requirements

    a.  You must have a SharePoint 2007 or SharePoint 2010 environment already set up.
        i.  For SharePoint 2007, SLK will run on either Windows SharePoint Services 3 or Microsoft Office SharePoint Server 2007
        ii. For SharePoint 2010, SLK will run on SharePoint Foundation or SharePoint Server.
    b.  SLK stores its results in a SQL Server database so you need to know which SQL Server instance you want to create the database in.

3.  Contents of the installation package

    a.  SharePointLearningKit.wsp:  The solution package
    b.  Installation.txt: This help file
    c.  slkadm.exe: Command line configuration tool
    d.  AddSolution.ps1 or AddSolution.cmd (depending on whether for SharePoint 2007 or SharePoint 2010)
    e.  UpdateSolutionNavigation.cmd (if for SharePoint 2007)
    f.  license.txt: The license for use of SLK

4.  Installing SLK

    3.a.    For SharePoint 2010

        i.      Unzip the installation package on a web front end server.
        ii.     Add the solution to SharePoint by running AddSolution.ps1. This will add the solution to the solution gallery.
        iii.    Open SharePoint 2010 Central Administration
        iv.     Click on System Settings
        v.      Under Farm Management click on Manage farm solutions
        vi.     Click on sharepointlearningkit.wsp
        vii.    You now need to deploy to solution so click on Deploy Solution.
        viii.   Choose when you want to deploy the solution and which web application to deploy the solution to. This needs to be the web application which hosts the web pages/sites where your users will be using SLK for teaching & learning. Then click OK.
        ix.     This will add the deploy job to the SharePoint job queue and return you to the list of installed solutions. Even if you selected to deploy immediately it will take a bit of time to deploy.

    3.b.    For SharePoint 2007
        i.      Unzip the installation package on a web front end server.
        ii.     Add the solution to SharePoint by running AddSolution.cmd. This will add the solution to the solution gallery.
        iii.    Run UpdateSolutionNavigation.cmd
        iv.     Open SharePoint 3.0 Central Administration
        v.      Click on Operations
        vi.     Under Global Configuration click on Solution Management
        vii.    Click on sharepointlearningkit.wsp
        viii.   You now need to deploy to solution so click on Deploy Solution.
        ix.     Choose when you want to deploy the solution and which web application to deploy the solution to. This needs to be the web application which hosts the web pages/sites where your users will be using SLK for teaching & learning. Then click OK.
        x.      This will add the deploy job to the SharePoint job queue and return you to the list of installed solutions. Even if you selected to deploy immediately it will take a bit of time to deploy.

5.  Configuring SLK
    Once SLK is installed and deployed in SharePoint you need to configure it .

    SLK is configured on a site collection basis and so you must configure SLK for each site collection in which you wish to use SLK for e-learning. Multiple site collections can share the same database. When viewing all assignments in SLK it will show them across the SLK database configured for that site collection. So if you have multiple site collections sharing an SLK database, it will show all assignments across those site collections. When you use multiple site collections in your SharePoint set up, you will need to decide if each site collection should have its own siloed SLK database or share the database depending on how you want to partition the views of assignments. There is no right or wrong way, it depends on how you have set your SharePoint portal up and your business processes.

    The same page is used to initially set the configuration for a site collection and to update it later. The process is exactly the same.

    When configuring SLK through central administration, the identity the application pool is running as must have appropriate permissions on the SQL Server instance being used.

    a.  Open SharePoint Central Adminstation.
    b.  Open the SharePoint Learning Kit Configuration page which is under Application Management | SharePoint Learning Kit Configuration | Configure SharePoint Learning Kit
    c.  Choose the site collection to configure.
    d.  Choose the SQL server to use and the database name. If you are using a named instance of SQL Server remember to include the the instance name as part of the server name. You can either create a new SLK database or use an existing one.
    e.  Choose the names of the permissions used by SLK. You can use names of existing permissions, but it is likely to be easier and less confusing to use new ones. Check the Create Permissions check box if these permissions need creating in the site collection.
    f.  If you want to use non-standard setting then choose the SLK Settings file to use. It’s safe to say that if you don’t know what the SLK Settings file is, then you should be using the standard onw.
    h.  Click OK. SharePoint will then configure SLK for the chosen site collection and report back any errors.
    i.  Navigate to the root of the site collection you have just configured.
    j.  Activate the "SharePoint Learning Kit – Assignment List Web Part". This will add the Assignment List Web Part to the web part gallery.
        i.      Select Site Actions | Site Settings to get to the site setting page.
        ii.     Under Site Collection Administration select Site Collection Features.
        iii.    Activate the feature.
    h.  On sites containing your learning resources select Site Actions | Site Settings | Mange Site Features. Activate the appropriate features chosen from:
        i.      SharePoint Learning Kit. Allowing assigning of resources to any site in the site collection.
        ii.     SharePoint Learning Kit – Assign Self. Allowing quick assigning to the logged in user.
        iii.    SharePoint Learning Kit – Assign To Site. Allowing quick assigning to learners in the current site.

6.  Upgrading SLK

To upgrade from 1.4 you need to:
    a.  Retract the SharePoint Learning Kit solution
    b.  Once retraction has finished then remove the solution
    c.  Then add solution as in installing SLK and then deploy it to the appropriate web applications

There are no database changes required.

Categories: SLK Tags: ,

What is SharePoint Learning Kit?

August 2nd, 2010 Richard No comments

SLK is a simple but powerful SharePoint tool that gives instructors the flexibility to deliver almost any computer document as an eLearning resource. In a nutshell it allows the assignment, tracking and grading of work.

Type of Learning Resource

SharePoint Learning Kit has 2 main types of resources which can be assigned:

Rich Resource

This is a SCORM or Class Server package.

These are self-contained packages containing contents defined by the SCORM (Sharable Content Object Reference Model)  standard or Class Server for web based e-learning. This can include sequencing and automatic marking of tests. SLK is a SCORM certified product.

SCORM (Sharable Content Object Reference Model) is a generic standard while Class Server is the Microsoft Virtual Learning Environment from the SharePoint 2003 era. It was not updated for SharePoint 2007 and SLK is it’s successor. It was a key requirement for SLK to support Class Server content.

Any other electronic document

A teacher can assign any document within a SharePoint learning resource library to learners. The learners can then upload the completed assignment and any supporting files back to SharePoint when they have completed it.

Licensing

SLK is an open source product hosted on CodePlex (http://www.codeplex.com/slk). It has a very permissive license which allows anyone to take the code and extend it with no restrictions.

Background

SLK was originally developed in house at Microsoft for SharePoint 2007 as a replacement for some of the Class Server functionality. It is the upgrade path for organisations using Class Server when they upgrade to SharePoint 2007 and SharePoint 2010.

Once the first release was completed, Microsoft released it under on open source license on CodePlex, but initially Microsoft employees remained as the project coordinator.

In January 2009 I took over as project coordinator and it is now fully a community product. Microsoft have occasionally funded some work since then such as the initial work for version 1.4, but in general progress is down to time freely committed by myself and other potential contributors.

Requirements

SLK requires SharePoint 2007 (WSS3 or MOSS 2007) or SharePoint 2010 to run. However, there is a sample distributed in the source code called Basic Web Player which allows the SCORM player to be used in a standard asp.net application.

All provisioning for assigning instructors and learners is implemented using standard SharePoint features

Categories: SLK Tags:

How to Localize E-Learning Actions in SharePoint Learning Kit 1.5

July 29th, 2010 Richard No comments

In previous versions of SLK, pretty much the only text you couldn’t localise was the phrase ‘E-Learning Actions’. This is how teachers/instructors start the assignment process and is added to document library edit menus when you active the SharePoint Learning Kit feature. In addition to not being localisable, it’s always seemed a poor turn of phrase, especially in schools, as it’s not immediately obvious what it does.

For version 1.5 I’ve moved the text, in addition to all strings associated with features into it’s own resource file which gets deployed when you install 1.5. This now allows localised versions to be added for other language support, but also you can change it on a farm by farm basis if you don’t like the out of the box phrase.

How to change the text

Once you have installed version 1.5, you will need to navigate to the Resources folder where the SLK resource file is located. On a default install of SharePoint 2010 this is

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources

For SharePoint 2007, just replace the 14 with 12 (it’s the product number). For non-English OS installations the path will vary as some of it is localised, but it’s the standard SharePoint location for files.

Within that folder, in addition to a large number of standard SharePoint resource files, you will find SLK.resx.

slk.resx

While you are in the Resources folder do not modify any of the other resource files. If you change any of the strings in there you’ll only confuse your users, and they may get overwritten on the next SharePoint upgrade.

Once you have found SLK.resx, open it in your favourite text editor, find the E-Learning Actions resource and change the value to whatever you want it to be.

ELearningResource

Make sure that you only change the value element’s text. The name of the data item is how it’s referenced, so if you change that SharePoint won’t be able to find the value, and the menu item will be blank.

Here I’ve changed the test to Assign Work.

changedELearningText

Once you have made your changes you will need to recycle the SharePoint application pool or restart IIS. Once that’s completed you can navigate back to your document library to verify that the text has changed

modifiedDropDown

SLK.resx also contains the strings for all the features i.e. the text displayed when activating or deactivating features.

One thing to note is that any changes you make could get overwritten in any upgrade of SLK, so please keep a copy of your changes.

Localisation

To localise the text for another language, you make a copy of the resource file and save it in the same folder, but include the language code in the file name. You can see this from the standard files in the folder of which the following screenshot is a small selection.

resourceFiles

Eventually I hope to included localised versions of this in the language packs.

Categories: SLK Tags: ,