This project has moved and is read-only. For the latest updates, please go here.

Email notifications

Topics: Developer Forum, User Forum
Oct 25, 2010 at 3:37 PM


I would like to send email notifications to the learners when a course is assigned to them.

What are your thoughts, how would you implement that?

(Sharepoint 2010 SLK 1.5 B3)





Nov 9, 2010 at 9:01 AM
Edited Nov 9, 2010 at 9:03 AM

At the moment you would have to add that to the code for the Assignment Properties page.

It's on my to do list.


SLK Coordinator

Dec 22, 2010 at 3:24 PM

hi pakko,

any luck with that ? ... i am also working on it. will update in case am able to grasp the assignmentproperties object properties correctly...

Dec 22, 2010 at 9:46 PM

Hi fastian,

I created a commandline app which runs every five minutes as a scheduled task and sends out the invitaions and/or the completed notifications for an assigned course. Additionally it logs it's activities into a Sharepoint list.

Let me know in case you are interested.



Dec 23, 2010 at 4:02 AM

Hi Pakko,

Yes i am interested. Please help me out. Also, let me know a little description about how did you manage to locate learners (their login id and email address) and instructors for each assignment. mail all relevant data to my email address .


adnan shamim.

Dec 23, 2010 at 11:26 AM


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:

  1. Grading.aspx.cs
  2. FilesUploadPage.aspx.cs
  3. SlkUser.cs
  4. SlkStore.cs
  5. assignmentproperties.cs
  6. assignmentproperties.aspx.cs

Problem was:

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:

  1. Deletion of assignment
  2. Collection of assignment
  3. Submission of assignment
  4. Returning of assignment


Adnan Shamim.

Jan 19, 2011 at 9:58 AM

Any reason why we couldn't also acheive email notification functionailty at the databse level by adding triggers to the LearnerAssignmentItem and AttemptItem tables?

Jan 20, 2011 at 4:10 AM

hi david,

this is becuase i wanted the solution to be easily manageable.... also, i do not see any email address nor user ids being maintained in the database for learner, instructor and observer users. SIDs are maintained, which are then 'translated' in the SLK code using sharepoint object model. same is the case for site and web application urls, we do not have urls in the database, but GUIDs.


adnan shamim.