[Building Sakai] Samigo NPE on group assessment

Paul Lukasewych plukasew at uwo.ca
Wed Jun 4 09:17:27 PDT 2014


It is a little complicated, but this is what we do:

SELECT p.id AS publishedAssessment_id, p.assessmentid AS workingAssessment_id, 
p.title, c.releaseTo, c.startDate, c.dueDate, c.retractDate, 
p.lastModifiedDate, p.lastModifiedBy
FROM sam_publishedassessment_t p, sam_publishedaccesscontrol_t c, 
sam_authzdata_t z
WHERE c.assessmentid = p.id
AND p.status = 1
AND p.id = z.qualifierId
AND z.functionId = 'OWN_PUBLISHED_ASSESSMENT'
AND z.agentId = '##site id goes here##'
and c.releaseTo = 'Selected Groups';

Take the publishedAssessment_ids from the above results and:

select * from SAM_AUTHZDATA_T where FUNCTIONID='TAKE_PUBLISHED_ASSESSMENT'
and
(
QUALIFIERID = ## first publishedassessment_id goes here ##
OR qualifierid = ## second publishedassessment_id goes here ##
OR qualifierid = ## third publishedassessment_id goes here ##
);

Finally, take the AgentId from the above results and:

select * from sakai_site_group where group_id = '## Agentid goes here ##';

Paul Lukasewych
Applications Development Team
Information Technology Services
Support Services Building
Western University
(519) 661-2111 x80513
plukasew at uwo.ca

On June 4, 2014 12:05:28 Curtis Van-Osch wrote:
> Well, I guess I spoke too soon!  The instructor managed to produce the
> same problem again this morning by trying to do the same thing (publish
> a quiz to a group of 3 students).  As soon as she published, Samigo
> crashes with a NPE in her site whenever anyone tries to access it.
> 
> I fixed it manually in the database again by changing "Selected Groups"
> to the site name in SAM_PUBLISHEDACESSCONTROL_T, like yesterday.  Oddly
> enough, when we looked at the quiz settings in Pending Assessments, no
> group was selected (it definitely was before the publication).  Then,
> when she selected the same group again, the quiz refused to publish,
> instructing her to select a group!
> 
> Can anyone tell me in the database where the selected groups for a quiz
> are stored?  Has anyone seen this problem consistently in one course
> site?  We've never seen it before at all!
> 
> I'm worried that even adding the null check will not fix the underlying
> issue of the groups no longer working despite still being visible in the
> interface.
> 
> <http://www.hec.ca>
> 
> Curtis Van Osch
> Analyste-Programmeur
> Service de développement de systèmes d'information
> hec.ca <http://www.hec.ca>
> Agréments
> 3000, chemin de la Côte-Sainte-Catherine, Montréal (Québec) H3T 2A7
> Téléphone : 514 340-6000, poste 2029
> 
> 
> recyclez
> Pensons à l'environnement
> avant d'imprimer
> 
> Curtis Van-Osch a écrit :
> > It worked!  Thanks so much!
> > 
> > Although I tried deleting a group that had an assessment published to
> > it and didn't have the same issue.  Must be a little more to it than
> > that.  Anyway, we'll be testing that patch and probably deploying it
> > this week to avoid this in the future, regardless of whatever the
> > cause was.
> > 
> > <http://www.hec.ca>
> > 
> > Curtis Van Osch
> > Analyste-Programmeur
> > Service de développement de systèmes d'information
> > hec.ca <http://www.hec.ca>
> > Agréments
> > 3000, chemin de la Côte-Sainte-Catherine, Montréal (Québec) H3T 2A7
> > Téléphone : 514 340-6000, poste 2029
> > 
> > 
> > recyclez
> > Pensons à l'environnement
> > avant d'imprimer
> > 
> > -------- Message original --------
> > Sujet: Re: [Building Sakai] Samigo NPE on group assessment
> > De : Paul Lukasewych <plukasew at uwo.ca>
> > Pour : sakai-dev at collab.sakaiproject.org
> > Copie à : Curtis Van-Osch <curtis.van-osch at hec.ca>
> > Date : 2014-06-03 14:04
> > 
> >> Something like this can happen when a group is deleted and therefore the
> >> test has no valid groups assigned to it. Usually the remedy is to switch
> >> the test to be released to the whole site, with something like this:
> >> 
> >> UPDATE sam_publishedaccesscontrol_t SET releaseto = '##site name##' WHERE
> >> assessmentid = ##publishedassessment_id##
> >> 
> >> Paul Lukasewych
> >> Applications Development Team
> >> Information Technology Services
> >> Support Services Building
> >> Western University
> >> (519) 661-2111 x80513
> >> plukasew at uwo.ca
> >> 
> >> On June 3, 2014 13:52:14 Curtis Van-Osch wrote:
> >>> Hi,
> >>> One of our sites' Samigo data appears to have become corrupted somehow.
> >>> The user says this occured after she tried to publish a quiz to a group
> >>> of one student to retake the assessment.
> >>> In the logs I see a NullPointerException whenever the site is accessed
> >>> (stack trace below).  It looks like SAM-2283
> >>> <https://jira.sakaiproject.org/browse/SAM-2283>  would fix the issue
> >>> (check PublishedAssessmentSettingsBean.getGroupsAuthorized() for null
> >>> before trying to find it's length for the loop).
> >>> 
> >>> Does anyone know how it could have gotten to this state, and whether I
> >>> could fix it manually in the database?  It looks like there are no
> >>> groups authorized to take the quiz.  I tried adding a line to
> >>> SAM_AUTHZDATA_T with FUNCTIONID = 'TAKE_PUBLISHED_ASSESSMENT' and
> >>> QUALIFIERID = <the quiz id> and AGENTID = <id of a group in the site> to
> >>> no avail.
> >>> 
> >>> Thanks,
> >>> Curtis.
> > 
> > _______________________________________________
> > sakai-dev mailing list
> > sakai-dev at collab.sakaiproject.org
> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> > 
> > TO UNSUBSCRIBE: send email to
> > sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> > "unsubscribe"



More information about the sakai-dev mailing list