Took me long enough to get this post up, but it's finally done (hopefully – please let me know if you come across any errors in the walkthrough).
Refer to the previous two articles in this series for additional customizations necessary to make this template function correctly.
Employee Training and Scheduling Template – a couple fixes Part 1
Employee Training and Scheduling Template – a couple fixes Part 2
In this walkthrough, we'll be covering how to set permissions and make additional customizations to the "Employee Training Scheduling and Materials" template that allows users to register (and unregister) for courses without the (perceived) ability of being able to create their own "Courses" or "muck-up" anything else in site that we wouldn't want them to.
One of the major problems with how this template was designed is that in order to make it so a user can register and unregister from a course, they must have what's roughly equal to "Contribute" permissions on each of the lists associated with the "Course". This, of course, opens up the possibility of users being able to do more than they should, and could lead to the entire process breaking down at some point if an errant user were to add in their own Courses on the calendar, or remove existing ones (not that anyone at your company would ever do such a thing).
So, to get the environment setup better to limit what a user can do (or more realistically, the "perception" of what they can do), the steps are as follows:
Step 1: Create the site:
Once created, break inheritance on the site. It's important to begin with a unique site that doesn't have any fall-through from permissions at its parent (we're creating a new "custom" permission level to use for the users of this site).
Step 2: Modify site to make it custom (part I):
- Go into the permissions area of the site and break inheritance on the permission levels (the "definition" of these levels will now exist locally instead of being defined at the parent).
- Once broken, remove any and all permissions except for defaults ("Full Control", "Design", "Contribute", "Read", "Limited" – this resets the permissions-available back to an "Out of the box" list if you had other custom definitions).
- Create a new custom permission level by starting with the definition of the default "Contribute" level.
- To do this, click on "Contribute" to edit, scroll to the bottom of the permissions page after it opens and click "Copy Permission Level" (this creates a new unnamed level that has all the options the "Contribute" level has as a starting point).
- Name the new level "Employee Regs" (or similar that fits your environment), add in a simple description to remind you that this level is for employee registrants, then modify the list of permissions to be set as follows:
- List Permissions
- Add Items
- Edit Items
- Delete Items
- View Items
- Open Items
- Site Permissions
- Browse Directories
- View Pages
- Open
- Personal Permissions
- Uncheck all
- List Permissions
These are the minimum permissions needed in order for users to be able to register for a course and unregister if needed. The problem again, is that with these permissions, a user could in theory, create a new "Course", delete an existing "Course", delete another user who is registered for a course, or modify anything existing. None of this is really acceptable, so what we need to do is now go through the site and first limit their access to areas not associated with the workflows for registration, then limit the manner in which they can gain direct access to areas they do have permission to.
First though, let's finish up the permissions part by creating a new group that this custom level will be applied to.
- Go to "People and Groups" and create a new group and name it in a manner that fits in with your naming convention for the rest of the site, but for good practice make sure to name it in a manner that makes it indicative of being for "Registrants" (e.g. your site is named "ACME Training" – an appropriate name for this group might be "ACME Employee Registrants" or similar).
- Once created, set this new group's permission level to the new custom permission level we previously created (in my case, "Employee Regs").
At this point since the group has been created, you can add in your users that will be registering (or wait until all the customizations are completed – either way, don't forget to add in your users).
Now we need to start limiting what our users can see (the idea is that "If we hide it, they won't find it!!").
Modify site through SharePoint Designer (Part I)
- In SharePoint Designer, connect to your site.
- If you haven't done this already, modify the site as per (…a couple fixes Part 2)
- Modify web parts visibility
- Open default.master
- In "Design" view, locate "View All Site Content" on the left-hand-site navigation bar and click on it.
- Go to "Code" view. You will see the following code highlighted:
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ViewFormPages"><div class="ms-quicklaunchheader"><SharePoint:SPLinkButton id="idNavLinkViewAll" runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent%>" AccessKey="<%$Resources:wss,quiklnch_allcontent_AK%>"/></div></SharePoint:SPSecurityTrimmedControl> - Change the "PermissionString" attribute value of the "Sharepoint:SPSecurityTrimmedControl" element from "ViewFormPages" to "DeleteVersions".
- Save the default.master.
If you login as a member of the "ACME Employee Registrants" group, you will not see the "View All Site Content" link (this is important because it will not let unauthorized users see the listing of site "lists"). However, when authenticated as a member of the site owners or contributors group, you will see this option.
NOTE: The "DeleteVersions" permission is common to both the "Members" and "Owners" group permission levels, but is not set for the "Limited Access" (anonymous users), "Read", or "Employee Regs" permission levels.
- Modify dispform.aspx to hide "Course Registration List" (lists/courses/dispform.aspx)
- Add in new "<tr><td></td></tr>" tags after "Main" web part zone table row closes, and add in: <Sharepoint:SPSecurityTrimmedControl PermissionsString="DeleteVersions" runat="server"><WebPartPages:WebPartZone runat="server" FrameType="None" ID="Bottom" Title="loc:Bottom"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone></Sharepoint:SPSecurityTrimmedControl>
(this adds a second zone under top one) - Save and close file (ignoring any errors displayed in the designer).
- Add in new "<tr><td></td></tr>" tags after "Main" web part zone table row closes, and add in: <Sharepoint:SPSecurityTrimmedControl PermissionsString="DeleteVersions" runat="server"><WebPartPages:WebPartZone runat="server" FrameType="None" ID="Bottom" Title="loc:Bottom"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone></Sharepoint:SPSecurityTrimmedControl>
Step 4: Modify site to make it custom (part II):
- In the browser, go to the site homepage
- In edit mode (Site Actions > Edit Page) remove each of the following webparts:
- Courses I have taught
- Courses I am teaching
- Courses I have attended
- Content Editor Web Part
- Links
- On left zone add Courses web part (and drag to bottom of zone)
- Click "View all site content
- Go to "Course Materials"
- Edit permissions
- Change permissions of "ACME Employee Registrants" group to "read"
- Edit permissions
- Go to "Announcements"
- Delete "Announcements" list (the guy that built this template for Microsoft left some errant information in the list which will cause some errors if you use it so we need to recreate it)
- Go to the "Create" screen and select "Announcements"
- name it "Announcements"
- leave rest as default and click create
- Go back into the settings for the "Announcements" list and edit Permissions
- Change permissions of "ACME Employee Registrants" group to "read"
- Delete "Course Surveys"
- Courses
- Leave Permissions as is
- Modify webpart toolbar to "Summary Toolbar"
- Links
- Edit Permissions
- Change permissions of "ACME Employee Registrants" group to "read"
- Edit Permissions
- Past Registrations
- Leave permissions as is
- Registrations
- Leave permissions as is
- Modify webpart toolbar to "No toolbar"
- Tasks
- Leave all as is
- Go to "Course Materials"
- Quick launch
- Delete Add new course
- Delete upload materials
- Delete Course Surveys (this will also delete "add new feedback")
- Delete Announcements (will add back later)
- Go back to home page
- Quick launch
- Go to announcements list
- Edit Permissions
- Change permissions of "ACME Employee Registrants" group to "read"
- Edit Permissions
- Go to announcements list
- Go back to home page
- In edit mode, add the Announcements webpart to the right zone.
- Change view of "Courses" webpart to "calendar"
- Exit edit mode
- Quick Launch
- Copy URL from "Announcements" listing under list heading
- Replace URL on lists with Announcements URL
- Rename lists to "Announcements"
- Delete announcements sub-heading (list item under main heading)
- Modify "Courses I am attending" webpart XSL to function correctly when un-registering (see Previous post)
- On home page, go into edit mode and open the "XSL Editor" for the webpart
- Find:
"You are not scheduled to attend any courses."
and:
"Choose "Upcoming courses" from the Quick Launch bar to select an available course to register for." - Replace with:
"You are not scheduled to attend any Sessions."
and:
"Choose "Upcoming Sessions" from the Quick Launch bar to select an available Session to register for." - Find:
<td class="ms-vb"><a href="Lists/Registrations/Unregister.aspx?ID={../../../Registrations/Rows/Row/@ID}" mce_href="Lists/Registrations/Unregister.aspx?ID={../../../Registrations/Rows/Row/@ID}">Remove</a></td> - Replace with:
<td class="ms-vb"><xsl:variable name="CourseID" select="@ID"/><a href="Lists/Registrations/Unregister.aspx?ID={../../../Registrations/Rows/Row[@Course_x0020_ID=$CourseID and contains(@Author, $UserID)]/@ID}">Remove</a></td
- Find:
- On home page, go into edit mode and open the "XSL Editor" for the webpart
Step 5: Modify site through SP Designer (Part II)
- Modify default.aspx
- Open default.aspx in SP Designer (at root of site)
- Click to select the "Left" webpart zone.
- Scroll to the bottom of the webpart zone in the html view
- Immediately after "</ZoneTemplate></WebPartPages:WebPartZone>"
add in:
<Sharepoint:SPSecurityTrimmedControl PermissionsString="DeleteVersions" runat="server"><WebPartPages:WebPartZone runat="server" FrameType="TitleBarOnly" ID="Bottom" Title="loc:Bottom"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone></Sharepoint:SPSecurityTrimmedControl> - Save page
Step 6: Modify site to make custom (Part III)
- In the site (on any event details page), go into "edit page" mode and drag the "Course Registration List" web part to the new bottom zone from the top zone.
When a user visits the page, the list of currently signed up users will now only display to the members of the site owners and contributors groups (registered employees will not be able to see the list).
(8/7/08) EDIT – ADDED STEP I FORGOT ABOUT IN ORIGINAL POST (Thanks to Sara for pointing this out in a comment)- While in "Edit" mode, open the toolpane for the "Courses" list (edit > Modify Shared Web Part).
- Open the "XSL" editor and locate the following:
<SharePoint:FormToolBar runat="server" ControlMode="Display"/>
Comment out this line to remove the toolbar from display
(add in <!– –> around the tag to hide it)
This is neccessary in order to prevent users from being able to create/edit/delete/etc., the items on the "Courses" list.
- Open the "XSL" editor and locate the following:
- While in "Edit" mode, open the toolpane for the "Courses" list (edit > Modify Shared Web Part).
- Back on Home Page
- Add a content editor webpart to the new "bottom" zone
- Add in the following html:
<A href="/<the new site URL>/Lists/Courses/AllItems.aspx">Click here to add new Calendar Events</A> - This will give access to the screen where admins of the site can enter in new calendar events.
- Add in the following html:
- Add a content editor webpart to the new "bottom" zone
Conclusion:
Using the above, you can definitely see that it can take quite a bit to customize this template to make it a "workable" platform for managing training sessions and user registrations.
To give you an example of what my organization has gotten out of this template:
We have a number of "Assessment Sessions" scheduled each week that we use for placement into various classes (part of a "Student" entry system to make sure they can succeed in the classes they sign up for later). The problem we had in the past is that in order to register for one of the sessions, a user had to submit the request by email, phone, or physically come to the campus and fill out a paper registration form (add their name to the list for the day). This worked, but human-nature reared its ugly head numerous times causing emails to get overlooked, phone messages not collected correctly, and registration forms to simply go missing.
Enter the "ETSM" template.
After playing around with the template and working up the above steps to customize it, we were finally able to get a system up and running that could not only give users the ability to register themselves, but from a single place (online).
There's still obviously some extra functionality that needs to be added in to make things work better (ability for an administrator to register someone else, for one), but over time I think the community that has taken a shine to this template will definitely figure out ways to accommodate these "wish-list" items and make the template "fully-functional".
Till next time…
- Dink
For more information on this template, how is was created [and by who], and a general view at why it does what it does, check out the series of posts by the "Microsoft SharePoint Designer" team on the MSDN blog site:
http://blogs.msdn.com/sharepointdesigner/archive/2007/03/10/training-site-template-part-1-introduction.aspx
http://blogs.msdn.com/sharepointdesigner/archive/2007/03/23/training-site-template-part-2-workflows.aspx
http://blogs.msdn.com/sharepointdesigner/archive/2008/07/04/training-site-template-part-3-custom-views-and-forms.aspx