SharePoint Learning Kit 1.7 Localization Changes for SlkSettings.xml

Prior to SLK 1.7, localizing the Assignment List Web Part (ALWP) was difficult in a multi-lingual environment. The query and column titles are stored in the SlkSettings.xml configuration file and can hence be translated and set to whatever you want. In fact the language packs for SLK include localized SlkSettings. However, these would be global across the site collections sharing the same configuration. So although the rest of SLK, the application pages etc, will pick up the language of the site you are on, the ALWP just picks up the string from SlkSettings file which would be just whatever language it is written in. You can change it by naming the query set to use in the ALWP properties, but you need to do that on a web part instance by web part instance basis, and you lose the functionality where it automatically chooses the query set based on your permissions on the site.  Unlike the rest of the localization, it was not transparent and doesn’t just work as you expect.

In SLK 1.7 I’ve added the ability to localize the SlkSettings.xml file. It’s certainly not perfect, and can do with more work on it, but it’s a decent start. Now you can add placeholders for strings and at run-time SLK will replace them with locale appropriate strings which are in the resource files. As an example here is the old version of a query:

  <Query Name="OverdueLearner" Title="Overdue" ViewName="LearnerAssignmentListForLearners" CountViewColumnName="IsFinal">

    <Column Title="Site" RenderAs="SPWebName" ViewColumnName="AssignmentSPWebGuid" ViewColumnName2="AssignmentSPSiteGuid" />

    <Column Title="Assignment" RenderAs="Link" ViewColumnName="AssignmentTitle" ViewColumnName2="LearnerAssignmentId" NullDisplayString="Untitled" />

    <Column Title="Due" RenderAs="UtcAsLocalDateTime" ViewColumnName="AssignmentDueDate" CellFormat="d" NullDisplayString="–" ToolTipFormat="Due: {0:D}, {0:t}" Wrap="false" />

    <Column Title="File Submission" ViewColumnName="FileSubmissionState"/>

    <Column Title="Status" RenderAs="LearnerAssignmentStatus" ViewColumnName="LearnerAssignmentState" Wrap="false" />

    <Column Title="Score" RenderAs="ScoreAndPossible" ViewColumnName="FinalPoints" ViewColumnName2="AssignmentPointsPossible" ToolTipFormat="Score: {0}" Wrap="false" />

    <Condition ViewColumnName="AssignmentSPWebGuid" Operator="Equal" MacroName="SPWebScope" NoConditionOnNull="true" />

    <Condition ViewColumnName="AssignmentStartDate" Operator="LessThanEqual" MacroName="Now"/>

    <Condition ViewColumnName="AssignmentDueDate" Operator="IsNotNull" />

    <Condition ViewColumnName="AssignmentDueDate" Operator="LessThan" MacroName="Now"/>

    <Condition ViewColumnName="IsFinal" Operator="NotEqual" Value="1" /><!– helps SQL perf? –>

    <Condition ViewColumnName="LearnerAssignmentState" Operator="LessThan" Value="2"/><!– i.e. unsubmitted –>

    <Sort ViewColumnName="AssignmentDueDate" Ascending="true"/>

    <Sort ViewColumnName="LearnerAssignmentState" Ascending="true"/>

  </Query>

And now the new version

  <Query Name="OverdueLearner" Title="$Resources:SlkDll,QueryTitleOverdue" ViewName="LearnerAssignmentListForLearners" CountViewColumnName="IsFinal">

    <Column Title="$Resources:SlkDll,QueryColumnTitleSite" RenderAs="SPWebName" ViewColumnName="AssignmentSPWebGuid" ViewColumnName2="AssignmentSPSiteGuid" />

    <Column Title="$Resources:SlkDll,QueryColumnTitleAssignment" RenderAs="Link" ViewColumnName="AssignmentTitle" ViewColumnName2="LearnerAssignmentId" NullDisplayString="$Resources:SlkDll,QueryColumnNullDisplayUntitled" />

    <Column Title="$Resources:SlkDll,QueryColumnTitleDue" RenderAs="UtcAsLocalDateTime" ViewColumnName="AssignmentDueDate" CellFormat="d" NullDisplayString="$Resources:SlkDll,QueryColumnNullDisplayDash" ToolTipFormat="$Resources:SlkDll,QueryColumnToolTipDue" Wrap="false" />

    <Column Title="$Resources:SlkDll,QueryColumnTitleFileSubmission" ViewColumnName="FileSubmissionState"/>

    <Column Title="$Resources:SlkDll,QueryColumnTitleStatus" RenderAs="LearnerAssignmentStatus" ViewColumnName="LearnerAssignmentState" Wrap="false" />

    <Column Title="$Resources:SlkDll,QueryColumnTitleScore" RenderAs="ScoreAndPossible" ViewColumnName="FinalPoints" ViewColumnName2="AssignmentPointsPossible" ToolTipFormat="$Resources:SlkDll,QueryColumnToolTipScore" Wrap="false" />

    <Condition ViewColumnName="AssignmentSPWebGuid" Operator="Equal" MacroName="SPWebScope" NoConditionOnNull="true" />

    <Condition ViewColumnName="AssignmentStartDate" Operator="LessThanEqual" MacroName="Now"/>

    <Condition ViewColumnName="AssignmentDueDate" Operator="IsNotNull" />

    <Condition ViewColumnName="AssignmentDueDate" Operator="LessThan" MacroName="Now"/>

    <Condition ViewColumnName="IsFinal" Operator="NotEqual" Value="1" /><!– helps SQL perf? –>

    <Condition ViewColumnName="LearnerAssignmentState" Operator="LessThan" Value="2"/><!– i.e. unsubmitted –>

    <Sort ViewColumnName="AssignmentDueDate" Ascending="true"/>

    <Sort ViewColumnName="LearnerAssignmentState" Ascending="true"/>

  </Query>

You can see that the values attributes Title, NullDisplayString and ToolTipFormat have been replaced by strings of the format

$Resources:SlkDll,QueryColumnTitleScore

You may recognise this as a standard resource string usage from SharePoint features and pages. It does work like that, but also has an extension that if the source is SlkDll, is then the  resource string QueryColumnTitleScore from the standard SLK resource file. As it’s loading the string from a resource file, then the standard localization process will take place. If you don’t want to use a resource, or to use a different string, you can just replace it with a text string as before e.g.

    <Column Title="Your Score" RenderAs="ScoreAndPossible" ViewColumnName="FinalPoints" ViewColumnName2="AssignmentPointsPossible" ToolTipFormat="Our own tool tip." Wrap="false" />

What this means is that you can have a common SlkSettings file across all your languages, and the ALWP will be translated automatically as long as the language pack you are using has the resource strings in. Currently I’ve only updated 2 of them, English and Welsh, so we will need some language maintainers to add them to the other languages.

Read More

SharePoint Learning Kit 1.8 Released

SLK 1.8 is now officially released We’ve got customers who have been running on it for over a year so the earlier functionality is pretty stable. The beta was released in April, and I’ve fixed a couple of bugs since then, and one new piece of functionality – markdown syntax for urls.

Download from CodePlex.

SLK 1.8 is supported on SharePoint 2010 and 2013, both Foundation and Server. There’s install documentation in the release zip file, but other than that all documentation is on this blog:

http://blog.salamandersoft.co.uk/index.php/tag/1-8/.

In addition to a load of bug fixes, the main changes are:

Read More

Markdown link syntax supported in SharePoint Learning Kit assignment descriptions

Following on from enabling links in an assignment’s description in SLK, we had a request to turn urls to OneNote pages more readable. A typical link to a OneNote page is

https://tenancy.sharepoint.com/_layouts/15/WopiFrame.aspx?sourcedoc={e2ea84dc-5bef-4d1d-9788-35f30cc8f4c5}&action=edit&wd=target%28%2F%2FSLK.one%7C17b5d14c-d903-4a96-8137-904b2c1ddb22%2F1.8%7Cd72c4f32-9f99-4a5e-a4f0-286bab08b1e1%2F%29

which is really not very pretty. This links to a page 1.8, in section SLK in the Shared Notebook OneNote on SharePoint 2013.

To resolve this I’ve added support for manually adding a title for the link, to hide the link details from view. To use this I’ve used Markdown syntax which is of the form

[link text](url)

So

[Shared Notebook/SLK/1.8](https://tenancy.sharepoint.com/_layouts/15/WopiFrame.aspx?sourcedoc={e2ea84dc-5bef-4d1d-9788-35f30cc8f4c5}&action=edit&wd=target%28%2F%2FSLK.one%7C17b5d14c-d903-4a96-8137-904b2c1ddb22%2F1.8%7Cd72c4f32-9f99-4a5e-a4f0-286bab08b1e1%2F%29)

would be output as

Shared Notebook/SLK/1.8

which is much nicer in a description. The full Markdown link syntax also includes an optional title attribute

[link text[(url “title”)

this is not supported, and neither is any other Markdown syntax.

Standard urls not in Markdown syntax will display at before, so

Update this notebook [Shared Notebook/SLK/1.8](https://tenancy.sharepoint.com/_layouts/15/WopiFrame.aspx?sourcedoc={e2ea84dc-5bef-4d1d-9788-35f30cc8f4c5}&action=edit&wd=target%28%2F%2FSLK.one%7C17b5d14c-d903-4a96-8137-904b2c1ddb22%2F1.8%7Cd72c4f32-9f99-4a5e-a4f0-286bab08b1e1%2F%29)

and another link www.salamandersoft.co.uk
www.microsoft.com.

Will display as

Update this notebook Shared Notebook/SLK/1.8
and another link www.salamandersoft.co.uk
www.microsoft.com.

Read More

SharePoint Learning Kit 1.8 Beta Release

I’ve now release SLK version 1.8 to a beta release. We’ve got customers who have been running on it for over a year so the earlier functionality is pretty stable, but I’ve added functionality in up until last week, so that will be less tested.

Download from CodePlex.

SLK 1.8 is supported on SharePoint 2010 and 2013, both Foundation and Server. There’s install documentation in the release zip file, but other than that all documentation is on this blog:

http://blog.salamandersoft.co.uk/index.php/tag/1-8/.

In addition to a load of bug fixes, the main changes are:

    Any problems just report them on the CodePlex discussion page.

Read More

SharePoint Learning Kit 1.8 supports Office Mix and Sway

SLK 1.8 now supports Office Mix and Sway. In addition to enabling the links in the description field, if it detects that there is a link to an Office Mix or a Sway then it will embed them in the lobby page. This enables the learners to view them directly without having to follow the link.

So for this assignment linking to a Mix:

mixInstructor

then this is what the learner will see on the lobby page:

mixLearner

Similarly when creating an assignment linking to a Sway

swayInstructor

the learner sees

swayLearner

It will even support multiple Mixs and Sways in the description, embedding them all in the page, one above the other.

So, this is a great reason to start using Office Mix and Sway in your assignments, you get the rich functionality of these new Office components with the ability to assign them easily to your learners.

Read More

Enable Urls in Assignment Properties Description field–SharePoint Learning Kit 1.8

SLK 1.8 automatically turns urls in the assignment properties description field into hyperlinks. So if you create this assignment:

slkUrlInstructor

The when it is displayed to the learner, the url www.salamandersoft.co.uk will be turned into a link, giving

slkUrlLearner

This is on by default and automatic, so no configuration is required.

It’s a fairly simple implementation using a regular expression to find the urls, so it won’t work in all cases. The urls which are supported start with:

  • http://
  • https://
  • file://
  • ftp://
  • www.
  • ftp.
  • mix.office.
  • sway.

and the rest of the url is validated as well.

Read More