Course Manager

Topics: Developer Forum, Project Management Forum, User Forum
Oct 21, 2009 at 12:16 AM
Edited Oct 21, 2009 at 2:30 PM

Hi

I have a 64bit server with SLK installed.  SLK works fine with no problems.  I have installed course manager and when I make a a user an instructor it gives me an error.  It works perfectly fine if a user is not an instructor but displays the message YOu are not an instruction on this site.

 I have checked the SQL database and all tables are there and entries in the registry.

 I have checked the error logs and this is what I get

Failed to determine definition for Feature with ID '6d19703c-f590-46b0-99ae-5755103e43ab'.

 

I would be grateful if someone could help.

Oct 22, 2009 at 10:29 PM

Farook,

I believe this was what I remeber as the “admin bug” issue.

 This is a bug in the original SLK “IsInRole” routine… I believe it was the case that if the instructor is also an administrator then the test to check if they are an Instructor fails within the SLK and the error condition occurs…

 FIX: Run the “spWeb.AllRosesForCurrentUser” with Elevated Privileges… OR – take the Instructor out of the Admin class…

 private bool IsInRole(SPWeb spWeb, string roleDefinitionName)
    {
        // Security checks: Fails if the user doesn't have Reader access (implemented
        // by SharePoint)
        // Check parameters
        if (spWeb == null)
            throw new ArgumentNullException("spWeb");

        // Verify that the web is in the site
        if (spWeb.Site.ID != m_anonymousSlkStore.SPSiteGuid)
            throw new InvalidOperationException(AppResources.SPWebDoesNotMatchSlkSPSite);
        bool isInRole = false;
        SPRoleDefinitionBindingCollection roleDefinitionCollection = null;
       try
       {
            //HPGMODS - Try runwithelevatedprivileges
            SPSecurity.RunWithElevatedPrivileges(delegate
            {
                // In some cases this fails and we must take an alternate approach. HPG - not if run with Elevated Privileges...
                roleDefinitionCollection = spWeb.AllRolesForCurrentUser;
            });
        }

 

 

Harold Gray

 

Oct 22, 2009 at 10:49 PM

Hi

 

Thanks for the info.

I had made further changes to web config file as follows and it worked

<SafeControl Assembly="Microsoft.SharePointLearningKit, Version=1.3.1.0, Culture=neutral, PublicKeyToken=24e5ae139825747e" Namespace="Microsoft.SharePointLearningKit.WebParts" TypeName="*" Safe="True" />
      <SafeControl Assembly="Microsoft.SharePointLearningKit, Version=1.3.0.2, Culture=neutral, PublicKeyToken=24e5ae139825747e" Namespace="Microsoft.SharePointLearningKit.WebParts" TypeName="*" Safe="True" />

I inserted an addtional line for the SLK 1.3.1.0 and it worked.  For some reason the Version 1.3.0.2 does not work on its own.

 

DO I need both lines or shall I delete one.