<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Richard Willis &#187; SLK</title>
	<atom:link href="http://blog.salamandersoft.co.uk/index.php/category/slk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.salamandersoft.co.uk</link>
	<description>SalamanderSoft, SharePoint Learning Kit, Microsoft Learning Gateway &#38; SharePoint Development</description>
	<lastBuildDate>Thu, 29 Jul 2010 00:13:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Localize E-Learning Actions in SharePoint Learning Kit 1.5</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2010/07/how-to-localize-e-learning-actions-in-sharepoint-learning-kit-1-5/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2010/07/how-to-localize-e-learning-actions-in-sharepoint-learning-kit-1-5/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 00:13:51 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[SLK]]></category>
		<category><![CDATA[1.5]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/index.php/2010/07/how-to-localize-e-learning-actions-in-sharepoint-learning-kit-1-5/</guid>
		<description><![CDATA[In previous versions of SLK, pretty much the only text you couldn&#8217;t localise was the phrase &#8216;E-Learning Actions&#8217;. 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&#8217;s always seemed a poor turn of [...]]]></description>
			<content:encoded><![CDATA[<p>In previous versions of SLK, pretty much the only text you couldn&#8217;t localise was the phrase &#8216;E-Learning Actions&#8217;. 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&#8217;s always seemed a poor turn of phrase, especially in schools, as it&#8217;s not immediately obvious what it does.</p>
<p>For version 1.5 I&#8217;ve moved the text, in addition to all strings associated with features into it&#8217;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&#8217;t like the out of the box phrase.</p>
<h2>How to change the text</h2>
<p>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</p>
<p>C<font face="Arial">:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources</font></p>
<p>For SharePoint 2007, just replace the 14 with 12 (it&#8217;s the product number). For non-English OS installations the path will vary as some of it is localised, but it&#8217;s the standard SharePoint location for files.</p>
<p>Within that folder, in addition to a large number of standard SharePoint resource files, you will find SLK.resx.</p>
<p><a href="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/slk.resx.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="slk.resx" border="0" alt="slk.resx" src="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/slk.resx_thumb.png" width="244" height="121" /></a> </p>
<p>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&#8217;ll only confuse your users, and they may get overwritten on the next SharePoint upgrade.</p>
<p>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.</p>
<p><a href="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/ELearningResource.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ELearningResource" border="0" alt="ELearningResource" src="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/ELearningResource_thumb.png" width="510" height="55" /></a> </p>
<p>Make sure that you only change the value element&#8217;s text. The name of the data item is how it&#8217;s referenced, so if you change that SharePoint won&#8217;t be able to find the value, and the menu item will be blank.</p>
<p>Here I&#8217;ve changed the test to Assign Work.</p>
<p><a href="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/changedELearningText.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="changedELearningText" border="0" alt="changedELearningText" src="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/changedELearningText_thumb.png" width="516" height="60" /></a> </p>
<p>Once you have made your changes you will need to recycle the SharePoint application pool or restart IIS. Once that&#8217;s completed you can navigate back to your document library to verify that the text has changed</p>
<p><a href="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/modifiedDropDown.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="modifiedDropDown" border="0" alt="modifiedDropDown" src="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/modifiedDropDown_thumb.png" width="369" height="226" /></a> </p>
<p>SLK.resx also contains the strings for all the features i.e. the text displayed when activating or deactivating features.</p>
<p>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.</p>
<h2>Localisation</h2>
<p>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.</p>
<p><a href="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/resourceFiles.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="resourceFiles" border="0" alt="resourceFiles" src="http://blog.salamandersoft.co.uk/images/HowtoLocalizeELearningActionsinSharePo.5_EC85/resourceFiles_thumb.png" width="205" height="140" /></a> </p>
<p>Eventually I hope to included localised versions of this in the language packs.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2010/07/how-to-localize-e-learning-actions-in-sharepoint-learning-kit-1-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Learning Kit 1.5 Features You Can Activate</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2010/07/sharepoint-learning-kit-1-5-features-you-can-activate/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2010/07/sharepoint-learning-kit-1-5-features-you-can-activate/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 15:15:51 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[SLK]]></category>
		<category><![CDATA[1.5]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/index.php/2010/07/sharepoint-learning-kit-1-5-features-you-can-activate/</guid>
		<description><![CDATA[SLK 1.5 has the following SharePoint features you can activate. 
Site Collection Level
    
&#160;
SharePoint Learning Kit Web Parts
When activated this feature automatically adds the Assignment List Web Part to the web part gallery for a site collection. 
Site Level

 
&#160;
SharePoint Learning Kit
This is the same feature as present in previous versions of [...]]]></description>
			<content:encoded><![CDATA[<p>SLK 1.5 has the following SharePoint features you can activate. </p>
<h2>Site Collection Level</h2>
<p><a href="http://blog.salamandersoft.co.uk/images/SharePointLearni.5FeaturesYouCanActivate_E337/feature.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="feature" border="0" alt="feature" src="http://blog.salamandersoft.co.uk/images/SharePointLearni.5FeaturesYouCanActivate_E337/feature_thumb.png" width="554" height="51" /></a>    </p>
<h3>&#160;</h3>
<h3>SharePoint Learning Kit Web Parts</h3>
<p>When activated this feature automatically adds the Assignment List Web Part to the web part gallery for a site collection. </p>
<h2>Site Level</h2>
<p></p>
<h3><a href="http://blog.salamandersoft.co.uk/images/SharePointLearni.5FeaturesYouCanActivate_E337/siteFeatures.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="siteFeatures" border="0" alt="siteFeatures" src="http://blog.salamandersoft.co.uk/images/SharePointLearni.5FeaturesYouCanActivate_E337/siteFeatures_thumb.png" width="504" height="170" /></a> </h3>
<h3>&#160;</h3>
<h3>SharePoint Learning Kit</h3>
<p>This is the same feature as present in previous versions of SLK. When this is activated in a site the &quot;E-Learning Actions&quot; menu item is added to document libraries. </p>
<h3>SharePoint Learning Kit &#8211; Assign Self</h3>
<p>This feature add the &quot;Assign To Self&quot; menu item to document libraries. This allows the user to immediately assign an item to themselves and run it. </p>
<h3>SharePoint Learning Kit &#8211; Assign Site</h3>
<p>This feature add the &quot;Assign To Site&quot; menu item to document libraries. This allows the user to start assigning an item to the current site without having to choose the site to assign to. In effect it jumps straight to the Assignment Properties page for the current site.</p>
<h2>Web Application Level</h2>
<p> <br />
<h3>SharePoint Learning Kit Admin</h3>
<p>This feature adds the Configure SharePoint Learning Kit functionality to Central Administration. This is just here for completeness as it&#8217;s actually a hidden feature which is activated automatically so you should never see it or need to activate it.
</p>
<p><a href="http://blog.salamandersoft.co.uk/images/SharePointLearni.5FeaturesYouCanActivate_E337/centralAdmin.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="centralAdmin" border="0" alt="centralAdmin" src="http://blog.salamandersoft.co.uk/images/SharePointLearni.5FeaturesYouCanActivate_E337/centralAdmin_thumb.png" width="487" height="327" /></a> </p>
<p>As you can see I still need a image for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2010/07/sharepoint-learning-kit-1-5-features-you-can-activate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s new in SharePoint Learning Kit 1.5?</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2010/07/whats-new-in-sharepoint-learning-kit-1-5/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2010/07/whats-new-in-sharepoint-learning-kit-1-5/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 15:01:15 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[SLK]]></category>
		<category><![CDATA[1.5]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/index.php/2010/07/whats-new-in-sharepoint-learning-kit-1-5/</guid>
		<description><![CDATA[With the imminent release of SLK 1.5 I thought that I would run through its new features 
Support for SharePoint 2010
     
This has to be the highlight of the release. SLK now natively supports SharePoint 2007 and SharePoint 2010. The functionality is exactly the same, but there are separate installers for [...]]]></description>
			<content:encoded><![CDATA[<p>With the imminent release of SLK 1.5 I thought that I would run through its new features </p>
<h2>Support for SharePoint 2010</h2>
<p> <a href="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/SP2010_logo.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="SP2010_logo" border="0" alt="SP2010_logo" src="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/SP2010_logo_thumb.png" width="300" height="64" /></a>   <br /> 
<p>This has to be the highlight of the release. SLK now natively supports SharePoint 2007 and SharePoint 2010. The functionality is exactly the same, but there are separate installers for the two versions. I&#8217;ve updated it so that the core components are the same, it&#8217;s only the installation scripts and a few references in aspx pages are different. </p>
<h2>E-Learning Actions can be localised</h2>
<p><a href="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/ELearning.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="E-Learning" border="0" alt="E-Learning" align="left" src="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/ELearning_thumb.png" width="155" height="174" /></a> </p>
<p>Since the beginning of the project the phrase &quot;E-Learning Actions&quot;, which appears in the document library drop down menu, has not been able to be changed or localisable. I have now moved this out to a resource file and this can now be localised for other languages, or even just changed on a farm by farm basis. So if you wanted your instance to say &quot;Assign Work&quot;, you can just edit the text based resource file to change it. </p>
<h2 style="clear: both">Two New Document Library Edit Options</h2>
<p><a href="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/CustomActions.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="Custom Actions" border="0" alt="Custom Actions" align="left" src="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/CustomActions_thumb.png" width="137" height="169" /></a> There&#8217;s 2 new options for document library edit menu. These are shortcuts for assigning work to yourself or to the site the resource is stored in. They are called &quot;Assign to Self&quot; and &quot;Assign to Site&quot;. Just like &quot;E-Learning Actions&quot; these can also be localized. It is completely up to you which of these 3 actions you have in any site.</p>
<h2 style="clear: both">Automatically add the Assignment List Web Part to the Web Part Gallery</h2>
<p>&#160;<a href="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/feature.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="feature" border="0" alt="feature" src="http://blog.salamandersoft.co.uk/images/WhatsnewinSharePointLearningKit1.5_DB57/feature_thumb.png" width="554" height="51" /></a> </p>
<p>SLK now includes a feature to automatically add the ALWP to the web part gallery. This has been a big miss in my opinion in the releases so far and just made it annoying to install. </p>
<h2 style="clear: both">Various Bug Fixes for the Drop Box</h2>
<p>This release rolls up all the fixes for all the bugs I&#8217;m aware of in the Drop Box.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2010/07/whats-new-in-sharepoint-learning-kit-1-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SharePoint Learning Kit 1.4 Released</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2010/01/sharepoint-learning-kit-1-4-released/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2010/01/sharepoint-learning-kit-1-4-released/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 09:50:32 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[SLK]]></category>
		<category><![CDATA[1.4]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/index.php/2010/01/sharepoint-learning-kit-1-4-released/</guid>
		<description><![CDATA[I&#8217;ve finally released SLK 1.4 to Beta. Sorry about the delay, but in the end I&#8217;ve rewritten the drop box functionality to hopefully work seamlessly within SharePoint. To do this I knew I needed to make changes to how the drop box library was created which would be incompatible and so decided to hold back [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally released SLK 1.4 to Beta. Sorry about the delay, but in the end I&#8217;ve rewritten the drop box functionality to hopefully work seamlessly within SharePoint. To do this I knew I needed to make changes to how the drop box library was created which would be incompatible and so decided to hold back on officially releasing it.</p>
<p>You can download from the <a href="http://slk.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=38555">release page on CodePlex</a>.</p>
<p>It is not backwards compatible with the version uploaded to the patches folder, so any documents returned by that will not be available via this version. The documents will still be present though.</p>
<p>The major changes compared to the version in the patches folder are:</p>
<ol>
<li>Students can open office documents and save them straight back to SharePoint without having to save to disk first.</li>
<li>Teachers can open and comment on office documents without having to save to disk first.</li>
<li>The drop box library is created as required. You do not have to enable the SLK feature on the site to create it.</li>
<li>Although folders are still used as containers to hold student&#8217;s work (as the document names are likely to be the same), they are not used to navigate the assignments. You either use the default view which is grouped by assignment or use assignment specific views which are created when an assignment is created.</li>
<li>You can use the drop box in a locale which doesn&#8217;t use US style dates.</li>
<li>I&#8217;ve currently removed the download all and upload all files options for teachers so that I can get the release out. I just haven&#8217;t had time to complete this.</li>
<li>I&#8217;ve removed Course Manager from the install. This will again be available as a separate release. The reason is that the quality is still not there for it to be bundled.</li>
</ol>
<p>I will consider this version to be in beta until 24 Jan at the latest. At which point there will be another beta version with at a minimum the download all and upload all functionality in, or a final release. Please download and report any bugs, which I will attempt to resolve quickly. I am keen to get 1.4 RTM so we can move on to the next version and get the project moving again.</p>
<p>Note, I still need to update the documentation to cover this release, this may take some time. If anyone would like to volunteer to do this it would be really helpful. I&#8217;m also considering moving it to the wiki pages on CodePlex rather than just having the getting started pdf as it will be easier to maintain and distribute. Does anyone have any thoughts on this?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2010/01/sharepoint-learning-kit-1-4-released/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>SharePoint bug in SPWeb.AllRolesForCurrentUser</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-bug-in-spweb-allrolesforcurrentuser/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-bug-in-spweb-allrolesforcurrentuser/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:43:07 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[SLK]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-bug-in-spweb-allrolesforcurrentuser/</guid>
		<description><![CDATA[I&#8217;ve finally tracked down the bug in SPWeb.AllRolesForCurrentUser. This has been mysteriously failing for some users in some set ups when using the SharePoint Learning Kit as discussed on the CodePlex forums. 
When this happened to a customer, I was able to debug it and found out the problem. I can now re-produce it at [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally tracked down the bug in SPWeb.AllRolesForCurrentUser. This has been mysteriously failing for some users in some set ups when using the SharePoint Learning Kit as discussed on the <a href="http://slk.codeplex.com/Thread/View.aspx?ThreadId=34441">CodePlex forums</a>. </p>
<p>When this happened to a customer, I was able to debug it and found out the problem. I can now re-produce it at will and it&#8217;s definitely a bug in SharePoint. </p>
<p>The problem occurs when the user is a member of a large number of SharePoint groups. To retrieve all the roles, SharePoint makes a call to the database. In normal circumstances this call is along the lines of    </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:0757b460-ed30-414a-a11a-38a059cb1b05" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">SELECT</span><span style="color: #000000;"> </span><span style="color: #0000FF;">DISTINCT</span><span style="color: #000000;"> ra.RoleId </span><span style="color: #0000FF;">FROM</span><span style="color: #000000;"> RoleAssignment </span><span style="color: #0000FF;">AS</span><span style="color: #000000;"> ra
</span><span style="color: #0000FF;">WHERE</span><span style="color: #000000;"> ra.ScopeId </span><span style="color: #808080;">=</span><span style="color: #000000;"> </span><span style="color: #FF0000;">'</span><span style="color: #FF0000;">67FD4879-2097-4B98-9771-5A6E9D11F0E9</span><span style="color: #FF0000;">'</span><span style="color: #000000;"> </span><span style="color: #808080;">AND</span><span style="color: #000000;"> ra.PrincipalId </span><span style="color: #808080;">IN</span><span style="color: #000000;"> (</span><span style="color: #800000; font-weight: bold;">3</span><span style="color: #000000;">,</span><span style="color: #800000; font-weight: bold;">1</span><span style="color: #000000;"> )</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>where 3 and 1 are the IDs of the groups and the guid (67FD4879-2097-4B98-9771-5A6E9D11F0E9) is the ID of the site. This call is retrieving all the role assignments on this site for all the groups that the user is a member of. </p>
<p>Now when the user is a member of a large number of groups the SQL generated is: </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:7e62909a-80ef-4b96-ba7a-01ec97fd82ea" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">SELECT</span><span style="color: #000000;"> </span><span style="color: #0000FF;">DISTINCT</span><span style="color: #000000;"> ra.RoleId </span><span style="color: #0000FF;">FROM</span><span style="color: #000000;"> RoleAssignment </span><span style="color: #0000FF;">AS</span><span style="color: #000000;"> ra
</span><span style="color: #0000FF;">WHERE</span><span style="color: #000000;"> ra.ScopeId </span><span style="color: #808080;">=</span><span style="color: #000000;"> </span><span style="color: #FF0000;">'</span><span style="color: #FF0000;">67FD4879-2097-4B98-9771-5A6E9D11F0E9</span><span style="color: #FF0000;">'</span><span style="color: #000000;"> </span><span style="color: #808080;">AND</span><span style="color: #000000;"> ra.PrincipalId
</span><span style="color: #808080;">IN</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">SELECT</span><span style="color: #000000;"> </span><span style="color: #0000FF;">DISTINCT</span><span style="color: #000000;"> ra.RoleId </span><span style="color: #0000FF;">FROM</span><span style="color: #000000;"> RoleAssignment </span><span style="color: #0000FF;">AS</span><span style="color: #000000;"> ra </span><span style="color: #0000FF;">WHERE</span><span style="color: #000000;"> ra.ScopeId </span><span style="color: #808080;">=</span><span style="color: #000000;"> </span><span style="color: #FF0000;">'</span><span style="color: #FF0000;">67FD4879-2097-4B98-9771-5A6E9D11F0E9</span><span style="color: #FF0000;">'</span><span style="color: #000000;"> </span><span style="color: #808080;">AND</span><span style="color: #000000;"> ra.PrincipalId </span><span style="color: #808080;">IN</span><span style="color: #000000;"> (</span><span style="color: #800000; font-weight: bold;">839</span><span style="color: #000000;">,</span><span style="color: #800000; font-weight: bold;">1840</span><span style="color: #000000;">,</span><span style="color: #800000; font-weight: bold;">1841</span><span style="color: #000000;">,.......,</span><span style="color: #800000; font-weight: bold;">2611</span><span style="color: #000000;">,</span><span style="color: #800000; font-weight: bold;">2612</span><span style="color: #000000;">,</span><span style="color: #800000; font-weight: bold;">1</span><span style="color: #000000;"> ) </span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The &#8230;&#8230;.. is where I&#8217;ve removed about 740 group IDs. </p>
<p>I&#8217;m not sure what&#8217;s happening here in the SQL generation, but the &quot;SELECT .. FROM .. WHERE .. IN(&quot; bit is repeated twice leading to invalid SQL. Apart from being a nonsense statement there are 2 opening braces and only 1 closing brace. The code is obviously getting confused by so many groups. My initial thought was that it allocated a buffer for the string generation, but it wasn&#8217;t big enough, but that doesn&#8217;t explain the 2 sets of SELECT &#8230; . </p>
<p>This is easy to reproduce. All you need to do is create a large number of groups with the current user in, and then call AllRolesForCurrentUser, not forgetting to delete them all afterwards or you&#8217;ll quickly clutter up your server. I found 800 is enough to make it fail for me, different environment may need more. A sample test class is shown at then end. </p>
<p>In normal use, no user is going to be a member of this many groups &#8211; for a start membership of this many is going to need to be automated. However, the best use of SLK requires a site per class and in a reasonably sized Secondary school, this can easily be over 1000 members. Then it&#8217;s generally only the administrator who is affected if his account has been used to create the sites, and only if you have a group per site for membership purposes. </p>
<p>I don&#8217;t normally create groups for class sites anyway. The maintenance screens for groups are just not very user friendly &#8211; you have to manually page through the lists to find a group &#8211; and it makes the year roll-over a pain. My preference is to give the users explicit permissions on the class sites rather than through groups, something I&#8217;ve discussed before. </p>
</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:57277acc-d94e-4a0b-80d2-c7fc1eeee2b1" class="wlWriterEditableSmartContent">
<pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #0000FF;">using</span><span style="color: #000000;"> System;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Collections.Generic;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Globalization;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.IO;
</span><span style="color: #0000FF;">using</span><span style="color: #000000;"> Microsoft.SharePoint; 

</span><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> SharePointTest
{
  </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> AllRolesTest
  {
    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Main()
    {
      </span><span style="color: #008000;">//</span><span style="color: #008000;">Url to a SharePoint site. Any site but don't do it on a live server. </span><span style="color: #008000;">
</span><span style="color: #000000;">      </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> url </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">http://salamanderdemo/sites/mis</span><span style="color: #800000;">"</span><span style="color: #000000;">;
      </span><span style="color: #008000;">//</span><span style="color: #008000;">The username of the user you are running as. I could have programmatically found this out, but it
      </span><span style="color: #008000;">//</span><span style="color: #008000;">wouldn't have added anything to the example </span><span style="color: #008000;">
</span><span style="color: #000000;">      </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> userName </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">DEMO\\Administrator</span><span style="color: #800000;">"</span><span style="color: #000000;">; 

      </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
      {
        </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> (SPSite site </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SPSite(url))
        {
          </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> (SPWeb web </span><span style="color: #000000;">=</span><span style="color: #000000;"> site.OpenWeb())
          {
            SPUser user </span><span style="color: #000000;">=</span><span style="color: #000000;"> web.SiteUsers[userName]; 

            </span><span style="color: #008000;">//</span><span style="color: #008000;"> This call should succeed </span><span style="color: #008000;">
</span><span style="color: #000000;">            SPRoleDefinitionBindingCollection allRoles </span><span style="color: #000000;">=</span><span style="color: #000000;"> web.AllRolesForCurrentUser;
            Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">First AllRolesForCurrentUser worked.</span><span style="color: #800000;">"</span><span style="color: #000000;">); 

            List</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">string</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> names </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> List</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">string</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">();
            </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
            {
              </span><span style="color: #008000;">//</span><span style="color: #008000;">Create all the groups </span><span style="color: #008000;">
</span><span style="color: #000000;">              </span><span style="color: #0000FF;">for</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">; i </span><span style="color: #000000;">&lt;</span><span style="color: #000000;"> </span><span style="color: #800080;">800</span><span style="color: #000000;">; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)
              {
                </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (i</span><span style="color: #000000;">%</span><span style="color: #800080;">100</span><span style="color: #000000;"> </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">)
                {
                  Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">Added {0} groups.</span><span style="color: #800000;">"</span><span style="color: #000000;">, i);
                }
                </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> name </span><span style="color: #000000;">=</span><span style="color: #000000;"> Guid.NewGuid().ToString();
                names.Add(name);
                web.SiteGroups.Add(name, user, user, name);
              } 

              </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
              {
                </span><span style="color: #008000;">//</span><span style="color: #008000;"> This call should fail </span><span style="color: #008000;">
</span><span style="color: #000000;">                allRoles </span><span style="color: #000000;">=</span><span style="color: #000000;"> web.AllRolesForCurrentUser;
                Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">AllRolesForCurrentUser succeeded, try adding more groups.</span><span style="color: #800000;">"</span><span style="color: #000000;">);
              }
              </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (SPException e)
              {
                Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">AllRolesForCurrentUser failed.</span><span style="color: #800000;">"</span><span style="color: #000000;">);
                Console.WriteLine(e.Message);
              }
            }
            </span><span style="color: #0000FF;">finally</span><span style="color: #000000;">
            {
              </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> i</span><span style="color: #000000;">=</span><span style="color: #800080;">0</span><span style="color: #000000;">;
              </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">string</span><span style="color: #000000;"> name </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> names)
              {
                </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (i</span><span style="color: #000000;">%</span><span style="color: #800080;">100</span><span style="color: #000000;"> </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">)
                {
                  Console.WriteLine(</span><span style="color: #800000;">"</span><span style="color: #800000;">Deleted {0} groups.</span><span style="color: #800000;">"</span><span style="color: #000000;">, i);
                }
                i</span><span style="color: #000000;">++</span><span style="color: #000000;">;
                web.SiteGroups.Remove(name);
              }
            }
          }
        }
      }
      </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception e)
      {
        Console.WriteLine(e);
      }
    }
  }
}

</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-bug-in-spweb-allrolesforcurrentuser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SharePoint Learning Kit : Limit Assignments Shown to This Year&#8217;s Assignments</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-learning-kit-limit-assignments-shown-to-this-years-assignments/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-learning-kit-limit-assignments-shown-to-this-years-assignments/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 23:34:07 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[SLK]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-learning-kit-limit-assignments-shown-to-this-years-assignments/</guid>
		<description><![CDATA[By default the SLK Assignment List Web Part shows all assignments ever associated with a learner or instructor. Now that schools are starting to get to the point where they will have been using it for more than one academic year, they do not want the previous year’s assignments showing.
Fortunately there is a built in [...]]]></description>
			<content:encoded><![CDATA[<p>By default the SLK Assignment List Web Part shows all assignments ever associated with a learner or instructor. Now that schools are starting to get to the point where they will have been using it for more than one academic year, they do not want the previous year’s assignments showing.</p>
<p>Fortunately there is a built in way in SLK to handle this. The items shown in the web part are completely configurable and are described in the SlkSettings.xml file associated with a site collection.</p>
<p>As an example let’s view the web part for a test instructor.</p>
<p><a href="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/slkDateBefore.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="slkDateBefore" border="0" alt="slkDateBefore" src="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/slkDateBefore_thumb.png" width="604" height="243" /></a> </p>
<p>As you can see he has 8 active assignments. Now we decide that we want to only display assignments which have a start date greater than 01 June 2009. </p>
<p>So first of all we download the SlkSettings.xml through the &quot;Configure SharePoint Learning Kit&quot; page in central administration, change it and then upload it again (click for a larger view).</p>
<p><a href="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/configureSlk.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="configureSlk" border="0" alt="configureSlk" src="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/configureSlk_thumb.png" width="604" height="372" /></a> </p>
<p>The change you need to make is to add the following line to the ActiveInstructor query.</p>
<p align="left">&lt;Condition ViewColumnName=&quot;AssignmentStartDate&quot; Operator=&quot;GreaterThan&quot; Value=&quot;2009-06-01&quot; /&gt; </p>
<p align="left">The image shows where it should go (click for a larger view).</p>
<p align="left"><a href="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/slkDateSettings.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="slkDateSettings" border="0" alt="slkDateSettings" src="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/slkDateSettings_thumb.png" width="604" height="119" /></a> </p>
<p>What this does is add a new condition to the query so that it only brings back assignments whose start date is greater than the Value. You need to use the start date rather than the due date because I haven&#8217;t found a way to bring back assignments with due dates greater than the value, and ones without a due date. If I add a condition for due date in, none of the assignments without a due date are returned. As the start date is a mandatory field this is not a problem.</p>
<p>Once you&#8217;ve made the change and uploaded the new settings file back up, this is what the web part looks like.</p>
<p><a href="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/slkDateAfter.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="slkDateAfter" border="0" alt="slkDateAfter" src="http://blog.salamandersoft.co.uk/wp-content/uploads/SharePointLearningKitLimitAssignmentsSho_4D6/slkDateAfter_thumb.png" width="244" height="106" /></a> </p>
<p>As you can see the four assignments whose start date were less than 02 June 2009 are not returned. They are still present in the other queries though as so far we have only altered the active query for instructors. To complete the job you will need to add the condition to all the queries for instructors, learners and observers.</p>
<p>Finally, if you would like to display assignments outside of those dates somewhere in your portal, you can have different instances of the web part display different queries by defining custom query sets in the settings file. I&#8217;ll leave that until another time if there&#8217;s a demand for it though.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2009/06/sharepoint-learning-kit-limit-assignments-shown-to-this-years-assignments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding Disabled Users in Active Directory Groups on the SLK Assignment Properties Page</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2009/05/hiding-disabled-users-in-active-directory-groups-on-the-slk-assignment-properties-page/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2009/05/hiding-disabled-users-in-active-directory-groups-on-the-slk-assignment-properties-page/#comments</comments>
		<pubDate>Fri, 29 May 2009 09:51:35 +0000</pubDate>
		<dc:creator>RichardWillis</dc:creator>
				<category><![CDATA[SLG]]></category>
		<category><![CDATA[SLK]]></category>
		<category><![CDATA[Sims]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/2009/05/29/HidingDisabledUsersInActiveDirectoryGroupsOnTheSLKAssignmentPropertiesPage.aspx</guid>
		<description><![CDATA[I&#8217;ve just finished updating SLK for a UK school who had problems with learners disabled in Active Directory showing when they were assigning work through SLK. Firstly, I must say that this is a solution for a particular problem that they had and isn&#8217;t really a general purpose solution. If a learner is disabled, you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished updating SLK for a UK school who had problems with learners disabled in Active Directory showing when they were assigning work through SLK. Firstly, I must say that this is a solution for a particular problem that they had and isn&#8217;t really a general purpose solution. If a learner is disabled, you should really be displaying them so you can assign then work. They may only be disabled temporarily, e.g. as puishment for computer misuse, but will still need to do the work when they are re-enabled.</p>
<p>The situation this school was in, is that they are running the Sims Learning Gateway (SLG). Part of how that works is that there is a component to create AD users and class groups based on the data in Sims. However, the users created by SLG are then &#8216;consolidated&#8217; with the &#8216;real&#8217; AD users, so these can then use the Sims web parts. As part of the consolidation process, the SLG users are disabled and the real users are added to the class groups, however the disabled SLG users are not removed from the AD groups.</p>
<p>Now the school were using these AD groups to assign SLK Learner permisssion to in order to assign work. So when the teachers came to assign work and selected their class group, each pupil was represented twice in the list which was a bit confusing.</p>
<p>The solution was to update the SLK code so that there is now a setting to hide disabled users. This will mean that when SLK goes to get the list of all Learners on a site it will ignore users in Active Directory groups who are disabled.</p>
<p>To get this set up you will first of all need to download and upgrade to the version with the setting in on the <a href="http://slk.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=23487">1.3.2 build page</a> . Then set the setting by:</p>
<ol>
<li>Go to the Configure SharePoint Learning Kit page in SharePoint Central Administration.</li>
<li>Make sure that the correct site collection is selected and then click &#8216;Click here to download the current SLK Settings file&#8217; near the bottom of the page.</li>
<li>This will open up the SlkSettings.xml file in a new browser window. Save this to disk.</li>
<li>Open the saved file in a text editor e.g. notepad (do not use Word or similar)</li>
<li>Add the attribute HideDisabledUsers=&#8221;true&#8221; to the file as indicated in the screen-shot</li>
</ol>
<p><img src="http://blog.salamandersoft.co.uk/content/binary/hideDisabledUsers.png" border="0" alt="" /></p>
<p>6.  Then upload the modified SlkSettings.xml file by adding it the page to &#8220;New SlkSettings  file:&#8221; and clicking OK.</p>
<p>This will work for schools using Sims Learning Gateway with the same issues, but I wouldn&#8217;t necessarily recommend it for anyone else. My personal preference is to give the individual users the appropriate permissions on the class sites rather than using groups. Groups will always cause issues when it comes to rollover and I just think it&#8217;s cleaner and more intuitive to have the direct permissions. I would also have removed the disabled users from the groups. Of course I&#8217;ve got the toolset to do all of this easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2009/05/hiding-disabled-users-in-active-directory-groups-on-the-slk-assignment-properties-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting SPControls.DateTimeControl to display the local date format</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2009/05/getting-spcontrolsdatetimecontrol-to-display-the-local-date-format/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2009/05/getting-spcontrolsdatetimecontrol-to-display-the-local-date-format/#comments</comments>
		<pubDate>Fri, 29 May 2009 09:35:47 +0000</pubDate>
		<dc:creator>RichardWillis</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SLK]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/2009/05/29/GettingSPControlsDateTimeControlToDisplayTheLocalDateFormat.aspx</guid>
		<description><![CDATA[One of the minor problems with SLK was that on the Assignment Properties page the Start and Due dates were always being shown in US format, no matter what the regional setting were. There was a really simple fix, you just need to set the LocaleId of the DateTimeControl and then it will display the [...]]]></description>
			<content:encoded><![CDATA[<p>One of the minor problems with SLK was that on the Assignment Properties page the Start and Due dates were always being shown in US format, no matter what the regional setting were. There was a really simple fix, you just need to set the LocaleId of the DateTimeControl and then it will display the date in the regional format of the site.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spDateTimeStart.LocaleId = SPWeb.Locale.LCID;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spDateTimeDue.LocaleId = SPWeb.Locale.LCID;</p>
<p>A version with this fix in is now available on the <a href="http://slk.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=23487">1.3.2 build page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2009/05/getting-spcontrolsdatetimecontrol-to-display-the-local-date-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How is e-Learning Content sent to the user in SLK</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2009/05/how-is-e-learning-content-sent-to-the-user-in-slk/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2009/05/how-is-e-learning-content-sent-to-the-user-in-slk/#comments</comments>
		<pubDate>Thu, 28 May 2009 22:09:27 +0000</pubDate>
		<dc:creator>RichardWillis</dc:creator>
				<category><![CDATA[SLK]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/2009/05/28/HowIsELearningContentSentToTheUserInSLK.aspx</guid>
		<description><![CDATA[When an e-Learning package is accessed for the first time, SLK will cache the package on the web front end file system. Caching consists of unpacking the zip file and storing it on the file system. Subsequent requests will use the cached package, as long as they are not outside the cache expiration period. This [...]]]></description>
			<content:encoded><![CDATA[<p>When an e-Learning package is accessed for the first time, SLK will cache the package on the web front end file system. Caching consists of unpacking the zip file and storing it on the file system. Subsequent requests will use the cached package, as long as they are not outside the cache expiration period. This will speed up subsequent showings of the package. Large packages are going to have a delay the first time someone accesses them after a cache expiration as they are unpacked.</p>
<p>Once the package is read from the cache then SLK will read the manifest to determine the navigation of the content and generate the table of contents for the frameset. Once this is generated the frameset is shown to the user who can then use the table of contents to navigate around the content depending on the sequencing rules of the package. </p>
<p>How the content is then sent to the user depends on how the content has been written. Typically each navigation node will be a separate item in the zip file, which will be downloaded when the user navigates to it. This will lead to a slight delay every time the user navigates between activities, the length of which will depend on the size of that activity and the network connection between the browser and SharePoint &#8211; just like any other web content being downloaded. I can also imagine that there are some packages which initially download all the content of all the activities. This will lead to longer start up times again depending on the size of the content, but quicker navigation within the package.</p>
<p><b>Cache Settings</b></p>
<p>The default cache settings are to use a cache on the individual SharePoint server and to keep it for 3 days. After this it will be removed. In a server farm this means that each web front-end server will maintain it&#8217;s own cache, leading to several initial requests as the load balancing passes requests to different servers. The cache location can be set in the SlkSettings file allowing the farm servers to share a cache. This should allow more hits on the cache and hence less unpacking.</p>
<p>Cache settings are set in the SlkSettings file and hence are on a per site collection basis, allowing you to have different settings for different site collections. The 2 settings are PackageCacheExpirationMinutes and PackageCacheLocation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2009/05/how-is-e-learning-content-sent-to-the-user-in-slk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First thoughts on Course Manager code</title>
		<link>http://blog.salamandersoft.co.uk/index.php/2009/03/first-thoughts-on-course-manager-code/</link>
		<comments>http://blog.salamandersoft.co.uk/index.php/2009/03/first-thoughts-on-course-manager-code/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 14:51:46 +0000</pubDate>
		<dc:creator>RichardWillis</dc:creator>
				<category><![CDATA[SLK]]></category>

		<guid isPermaLink="false">http://blog.salamandersoft.co.uk/2009/03/30/FirstThoughtsOnCourseManagerCode.aspx</guid>
		<description><![CDATA[Now I&#8217;ve updated Course Manager to reference SLK 1.3.1, had a dig around the code and fixed some issues reported by the community it&#8217;s time to discuss my first thoughts on it.
Firstly this is about the Course Manger source code and not its functionality. Andrew Woodward has done a great review of that on his [...]]]></description>
			<content:encoded><![CDATA[<p>Now I&#8217;ve updated Course Manager to reference SLK 1.3.1, had a dig around the code and fixed some issues reported by the community it&#8217;s time to discuss my first thoughts on it.</p>
<p>Firstly this is about the Course Manger source code and not its functionality. <a href="http://www.21apps.com/blog/">Andrew Woodward</a> has done a <a href="http://www.21apps.com/education/slk-course-manager-10-released/">great review of that on his blog</a>.</p>
<p>First thing to realize is that Course Manager is basically 3 web parts:
<ol>
<li>Course Manager Pages : 2 links to pages with the other web parts on</li>
<li>Plan &amp; Assign : Where you create the courses and assign them to students</li>
<li>Monitor &amp; Assess : Where you grade the assignments</li>
</ol>
<p>To implement these Course Manager consists of 5 dlls. Yes that&#8217;s right, 5 dlls for 3 web parts, 1 of which is just 2 html links with no business logic in it. Looking closer the 5 dlls are
<ol>
<li>Axelerate.DataAccessApplicationBlock.dll</li>
<li>Axelerate.BusinessLayerFrameWork.dll</li>
<li>Axelerate.BusinessLayerUITools.dll</li>
<li>Axelerate.SharedBusinessLogic.dll</li>
<li>Axelerate.SlkCourseManagerLogicalLayer.dll</li>
</ol>
<p>Looking at the code only the last one, SlkCourseManagerLogicalLayer actually contains any SLK/Course Manager functionality, the rest are all plumbing. In fact the first 2 projects are written in VB.net while the rest are in C#. It&#8217;s fairly obvious that the first 4 components are are supposed to be a generic framework, which has been used to build the course manager and contains a lot of code which isn&#8217;t used by Course Manager &#8211; more on this later. Digging deeper on the framework and googling Axelerate leads to aXelerate Solutions, who Microsoft must have commissioned to create the Course Manager. My guess is, and it is a guess as the Course Manager code is way before my time as project co-ordinator, is that aXelerate created Course Manager the way they create all their applications, using their custom framework. Whether or not they realized that they were going to have to release the framework code as open source is another matter. I suspect not as that sort of thing tends to be considered a commercial advantage and secret. Fact is Course Manager is unusable without it, and couldn&#8217;t be considered open source without it. Trawling around I have found out that the framework has itself been released as open source at <a href="http://www.codeplex.com/AxelerateLibraries">http://www.codeplex.com/AxelerateLibraries</a> with a <a href="http://www.axelerate.com/news_sharepoint_components.aspx">press release</a> (dated 15 Oct 2007 but released 30 Oct 2008) and an <a href="http://www.axelerate.com/SharePoint-Customization.aspx">overview</a>.</p>
<p>Now the point of a good framework is that it should enable you to add more functionality easily and maintain it. I&#8217;m actually finding that it&#8217;s getting in the way and causing more work. For example I&#8217;ve spent several hours figuring out why Course Manager just wasn&#8217;t working and giving the informative error &#8220;No data found&#8221;. I eventually tracked it down to mismatched versions of AzMan. The first problem with that is that the error handling was atrocious, it threw away the original error and just displayed a generic error, which it displays if any of the data access had failed. There was no way of finding out what the problem was without modifying the code to not catch the error, this is not maintainable is anything but a development environment. Secondly, as far as I can make out AzMan is not even used in the Course Manager web parts. AzMan is a role-based access control framework from Microsoft which uses an MMC snap-in to manage security. Course Manager just relies on the SharePoint security model, so the AzMan access checking, which is embedded all through the code is superfluous. However, the fact that Course Manager breaks without the correct version is really annoyying. The worst part is that the installation routine checks for the correct version of SLK and .Net, before letting you install, and those checks were broken so no one could install. Please, either check for all requirements, or none, not just a couple that you feel like checking for, It&#8217;s either a fully robust installation, or a requirement for the installer to manually check for everything first.</p>
<p>I&#8217;m not convinced that anyone apart from the authors of the framework is going to be able to add easily any functionality to Course Manager using the framework, or maintain what is there. Why couldn&#8217;t they have used a mature, robust, full featured framework like NHibernate is beyond me. Granted NHibernate doesn&#8217;t handle the UI stuff, but thousands of successful projects use it rather than just one. </p>
<p>Finally the two biggest problems of the framework are:
<ol>
<li>Many, many warning on building the projects. There should be 0.</li>
<li>There are many places where all exceptions are caught and ignored. This is fundamentally wrong.</li>
</ol>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salamandersoft.co.uk/index.php/2009/03/first-thoughts-on-course-manager-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
