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 Language Packs

I’ve now rebuilt the language packs for SharePoint Learning Kit for use with 1.7 & 1.8. This has involved rewriting the extract and build process so that it’s repeatable.

Most of the languages haven’t been updated since 1.3.1 so any new strings added since then won’t be translated.

To install:

  1. Download the language packs from https://slk.codeplex.com/releases/view/612596 and unzip onto your SharePoint server.
  2. Open a PowerShell command prompt and navigate into the folder for your language.
  3. Run InstallSolution.ps1. This should add the localized package and deploy it.

The supported languages are:

  • ar-EG
  • ar-SA
  • bg-BG
  • cs-CZ
  • cy-GB
  • da-DK
  • de-DE
  • en-GB
  • en-US
  • es-ES
  • fa-IR
  • fi-FI
  • fr-FR
  • hr-HR
  • hu-HU
  • it-IT
  • ja-JP
  • lt-LT
  • lv-LV
  • nb-NO
  • nl-NL
  • pl-PL
  • pt-PT
  • ro-RO
  • ru-RU
  • sk-SK
  • sl-SL
  • sr-latn-cs
  • sv-SE
  • tr-TR
  • uk-UA
  •  

     

Read More

Send Reminder Emails with SLK 1.6 and above

SLK has the built in ability to send reminder emails to learners for assignments, but, there is no built in a way to run this. However, there is a sample project in SLK\Samples\ReminderEmails which will run the functionality. The usage of this is

ReminderEmails.exe <site collection url>

This will then send reminder emails for a site collection using the email settings in slksettings.xml. This is implemented as a console project so needs to run on one of your SharePoint servers and you’ll need to schedule it using Task Scheduler or similar.

I have compiled this for SharePoint 2007, 2010 and 2013 at http://www.salamandersoft.co.uk/downloads/SlkReminderEmails.zip.

The default emails settings of SlkSettings are:

  <EmailSettings ReminderDays="1,7" EmailOnSubmitOff="true">
      <NewAssignment Subject="New Assignment: %title%">
          <slk:Body xmlns=""><p>You have been assigned a new piece of work: <strong>%title%</strong>.</p>
<p>%description%</p>
<p><a href=’%url%’>%url%</a></p></slk:Body>
      </NewAssignment>
      <CancelAssignment Subject="Assignment Cancelled: %title%">
          <slk:Body xmlns=""><p>Assignment <strong>%title%</strong> has been cancelled.</p></slk:Body>
      </CancelAssignment>
  </EmailSettings>

The ReminderDays attribute controls when the reminders are sent. They are sent those number of days before the assignment is due. So if you wanted an email on every day for the 3 days preceding the assignment it would be ReminderDays="1,2,3".

You can also have a AssignmentReminder section to set the subject and body of the email as in NewAssignment and CancelAssignment above. Otherwise the default email settings will be used which are

Subject
    Assignment Reminder : %title%
Body
  <p>Assignment <strong>%title%</strong> is due on %due%.</p>
<p><a href=’%url%’>%url%</a></p>

For anyone interested the code in the console application is very simple, it literally just calls the ReminderEmails object within the SLK project.

        public static void Main(string[] arguments)
        {
            if (arguments == null || arguments.Length == 0 || string.IsNullOrEmpty(arguments[0]))
            {
                Console.WriteLine("You must pass a url of a site collection.");
            }
            else
            {
                try
                {
                    ReminderEmails reminder = new ReminderEmails();
                    reminder.Process(arguments[0]);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
        }

It would be pretty easy to convert this to a SharePoint timer job.

Read More

SLK 1.7.1 Released

A bug fix release for SLK 1.7. The zip file contains versions for SharePoint 2007, 2010 and 2013.

Changes include:

  • Handle @ in a user name for drop boxes
  • Handle css for SCORM packages in SharePoint 2013
  • Fix for SharePoint 2007 solution package containing incorrect element files
  • Added and fixed some mime-types in slksettings.xml
  • Allow frameset to run in non-compatibility view in Internet Explorer
  • Prevent script injection in ALWP frameset

This is a recommended upgrade, especially if using SCORM packages in SharePoint 2013.

You can download from https://slk.codeplex.com/releases/view/137537.

This is intended to be the last release for 1.7. All future functionality will go into SLK 1.8. I already have customers running on that, so it’s just a case of deciding when to call it a day adding features to it.

Read More

SLK 1.7 Finally Released

I’ve finally got round to releasing SharePoint Learning Kit 1.7. There’s lots of changes, but the biggest, and most anticipated one is support for SharePoint 2013. This release support SharePoint 2007, 2010 and 2013, for both the free and server versions.

You can download from CodePlex.

Install documentation includes instructions for all 3 versions above, but in general documentation is lacking. Best source of information for new features is my blog
http://blog.salamandersoft.co.uk/index.php/tag/1-7/.

The main changes are:

Support for SharePoint 2013
Many bug fixes
Web Part to play resources directly
Quick Assign – Allow upload resource as part of creating assignment
Allow use of multi-lingual interface
Localization of queries
Welsh translation and new localization build process
Instructors have read access to non-elearning assignment documents before submission
Pluggable architecture for Domain Group Enumerator (for programmers extending SLK)
SLK Members web part
Support for claims based authentication for observer and drop box
Office Web Apps support
Self assign web part
Tool tip on learner on assignment properties page
Site column in ALWP is clickable link
Setting option to automatically version document libraries
Add delegate controls to application pages
SLK stsadm commands instead of slkadm
Configure at web application level as well as site collection

Ribbon Controls

iPad support for Assignment List Web Part

Option to automatically select all instructors and/or learners when creating and assignment

I’ll try to blog some more information on each of these as time allows.

In addition it’s got the functionality of 1.6 in, which never made it out of beta.

Better handling of not quite fully compliant SCORM content
Textual grading as well as numeric (optional) e.g. ABC type grades
Quick assignment type. That is assignments not based on a document. This should make it much easier to use for a homework diary, especially if the assignment is along the lines of “Read chapters 1 & 2 of book y.”
Email alerts

Read More

SLK 1.7 – Option to automatically select all instructors and/or learners when creating and assignment

I’ve just added 2 options to SLK settings to enable automatically selecting all instructors or learners when creating a new assignment. The options are:

  • SelectAllInstructors
  • SelectAllLearners
  • The valid values are true, false or not present e.g.

    selectSettings

would automatically select all instructors, but not learners to give you

assignmentPropertiesSelectAllInstructors

 

This is a global setting, so will affect all new assignments linked to the SLK database.

To enable this on an existing installation, you will need to upgrade SLK, then in Central Admin, go to Application Management | Configure SharePoint Learning Kit. Then choose your site collection, download the current SlkSettings file, modify it to put the new attributes in, and then upload the new (modified) file.

Read More