I have managed to update SLK 1.4 code to
1. send out email notifications to learners and instructors when a course is assigned.
files i modified:
AssignmentProperties.Learner and AssignmentProperties.Instructor collections contains slkUser objects. in slkUser class, the member variables are
1. userid (which is actually some slk id useless for me till now)
2. SPUser object (very useful but is always null)
3. name (which is also null in most of the cases, and since is the full name of the user so its not unique enough to go in AD and query for email address)
What i did:
Modified the SlkUser.cs class to have another string member called email.
updated the code throughout to maintain emails as SPUser objects are traversed during the initialization phase of the code.
store them as 'tooltip' text on the assignmentproperties.aspx page's checkboxes, so that i can pick them up again when i am creating a new assignment.
as the new assignment is created, i am using smtp objects to pick outgoing email settings of sharepoint and simply send the email notification containing other important data from the Assignment Properties object.
I am not able to package the code yet. Just replacing the Microsoft.SharePoint.LearningKit.dll file and doing an iisreset works for me for the time being.
Should I upload the code here? .... it will clash with the versioning
Let me know if there is a better approach.
I think I can further modify the code to notify users in case of:
- Deletion of assignment
- Collection of assignment
- Submission of assignment
- Returning of assignment