SlkUser class

Jun 26, 2014 at 12:24 PM
Edited Jun 26, 2014 at 12:24 PM
Hello!
Can i create the exemplar of SlkUser class by this construction:
SPUser spUser = SPContext.Current.Web.EnsureUser("domain\logonname");
SlkUser slkUser = new SlkUser(spUser);

Could SLK 1.5. set all of necessary attributes (UserId, Key, Name) for slkUser?
Jun 27, 2014 at 7:13 AM
Edited Jun 27, 2014 at 7:13 AM
Could we modify method FindAllSlkMembers to FindOneSlkMember or use AddSPUsersAsMember in slkMembersships.cs for add only one learners that was selected by instructor? In case with 6000 learners AssignmentProperties.aspx and void SubmitAssignment are loading to slow.
Coordinator
Jul 2, 2014 at 12:36 AM
You could, but the learner check boxes are using the SLK user item ID as their identifier which is set in FindAllSlkMembers. I've just noticed that SlkStore.AssignUserItemIdentifier is sub-optimal. Can you try commenting out the call to that to see if it makes much difference to page load time. The page won't work, but if it's a big difference it would be worthwhile optimizing.

Richard
SLK Coordinator
http://blog.salamandersoft.co.uk
Jul 2, 2014 at 5:41 AM
Hello, Richard!
Without FindAllSlkMembers in void PopulateSlkMembers and void SubmitAssignment load time exelent!
Also a long time takes this code:
foreach (SlkUser slkUser in AssignmentProperties.*)
{
//...
}
where * - Learners or Instructors.

Please tell me expected time for optimization,
Coordinator
Jul 2, 2014 at 12:41 PM
What happens if you include FindAllSlkMembers, but comment out the call to store.AssignUserItemIdentifier?
Jul 2, 2014 at 1:37 PM
if comment store.AssignUserItemIdentifier(users.Values) in FindAllSlkMembersin i got System.NullReferenceException but very quick.
Nov 24, 2014 at 5:28 AM
Hello, Richard! Tell me please, this problem resolved in the new version of SLK 1.7?
Coordinator
Nov 24, 2014 at 12:49 PM
No I've not made any changes in this area.