DNN Course Gradebook 1.3.1 - Edit Grade Bug 

I have been notified of an error with the Course Gradebook Module version 1.3.1 where if you try to edit a users grade that you will end up putting a duplicate grade in the system.  I will provide a fix below that can be ran via the "SQL" option from the host account for anyone that is using the current version of the module.  Also in the next release of this module I will be including this fix as well as data integrity constraint code that will prevent this issue from occuring.

To perform the temporary fix simply run the below script from the "SQL" menu under the host menu.  Be sure to check the box next to "Run as Script".

ALTER PROCEDURE dbo.ICG_GetUserGradebook
    @PortalId 
int,
    @CourseId 
int,
    @UserId 
int
AS
--Doing a left outer join to ensure that all assignments will show,
-- joining to username in the join clase this ensures we always have all records.
SELECT a.AssignmentId,
        a.AssignmentName,
        a.PointsPossible,
        a.DueDate,
        
ISNULL(ua.UserAssignmentId, -1AS "UserAssignmentId",
        ua.Score 
AS "ScoreReceived",
        ua.DateEntered 
AS "DateGraded"
FROM ICG_Assignments a
    
LEFT OUTER JOIN ICG_UserAssignments ua
        
ON (a.assignmentId ua.AssignmentId
            
AND ua.UserId @UserId)
WHERE a.PortalId @PortalId
      
AND a.CourseId @CourseId
ORDER BY a.DueDate, a.AssignmentName

Sorry for the troubles, if anyone needs assistance implementing this fix, or cleaning up any incorrect data please e-mail me!

Posted by Mitchel on Thursday, July 19, 2007
 

Comments

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Friend of RedGate

www.datasprings.com - DotNetNuke ModulesICG

Click here for advertising information.

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.