[Building Sakai] Missing SAM_PUBLISHEDACCESSCONTROL_T record from a published quiz

George Pipkin gpp8p at Virginia.EDU
Mon Sep 17 14:39:06 PDT 2012


Hi -

    We have encountered a samigo quiz that somehow got corrupted in the 
database
in a way that prevents T&Q from showing a list of published 
assessments.  When it
tries to, it crashes with an NPE in PublishedAssessmentFacadeQuesies on 
line 1506
where it is checking to see the releasedTo status of every quiz in the list:

             releaseToGroups = null;
null pointer error---> if 
(p.getReleaseTo().equals(AssessmentAccessControl.RELEASE_TO_SELECTED_GROUPS)) 
{
                 if (groupsForSite == null) {

    I poked around the database to see what I ciould find on this, and I 
noticed that a published assessment's
SAM_PUBLISHEDASSESSMENT_T record in this site did not have an 
associated  SAM_PUBLISHEDACCESSCONTROL_T
record.  The query appearing above this line:


         String query = "select new 
PublishedAssessmentData(p.publishedAssessmentId, p.title, "
                 + " c.releaseTo, c.startDate, c.dueDate, c.retractDate, 
p.status, p.lastModifiedDate, p.lastModifiedBy, "
                 + "c.lateHandling, c.unlimitedSubmissions, 
c.submissionsAllowed) "
                 + " from PublishedAssessmentData p, 
PublishedAccessControl c, AuthorizationData z  "
                 + " where c.assessment.publishedAssessmentId = 
p.publishedAssessmentId "
                 + " and p.publishedAssessmentId=z.qualifierId and 
z.functionId=:functionId "
                 + " and z.agentIdString=:siteId and 
(p.status=:activeStatus or p.status=:editStatus) "
                 + " order by p." + orderBy;

pulls data from three tables SAM_PUBLISHEDACCESSCONTROL_T, 
SAM_PUBLISHEDASSESSMENT_T, SAM_AUTHZDATA_T.

To add to the mystery, I put some code around where the crash was 
happening so I could get into T&Q for this site
without it crashing, and what I saw for the assessments in question is 
shown in the screen grab attached to this
message.  Looking at the events table, I can see somebody trying to 
modify one of these at about the time when the
problem started.

My question to sakai-dev (and the samigo team) - is it always necessary 
for a published assessment to have an associated
SAM_PUBLISHEDACCESSCONTROL_T, record ?  How could the query above 
"succeed" and yet return a null value if that record
is somehow missing ?

                - George Pipkin
                   U.Va.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SAK-2933_screenshot.tiff
Type: image/tiff
Size: 32714 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120917/2f6e2c55/attachment.tiff 


More information about the sakai-dev mailing list