[Building Sakai] Assignment2: Getting userid associated with an attachment
David Wafula
davidwaf at gmail.com
Sun Nov 11 06:56:34 PST 2012
Hello all,
I couldn't figure out how to find a user who submitted an attachment, when
all i have is an assignmentId.
Assignment2 assign = assignmentLogic.getAssignmentById(assignmentId);
Using assign.getSubmissionsSet() returns Set<SubmissionAttachment>,
SubmissionAttachment doesn't seem to have any reference to userid.
In the end, i went direct into DB:
"SELECT ATTACHMENT_REFERENCE,USER_ID "
+ "from A2_SUBMISSION_T
subm,A2_SUBMISSION_ATTACH_T attach "
+ "where
subm.SUBMISSION_ID=attach.SUBMISSION_ATTACH_ID and ASSIGNMENT_ID="+assignId;
Would have preferred to use API .
This is assignment2 1.1-SNAPSHOT in Sakai 2.8.0.
Thanks
--
David Wafula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121111/72cddc86/attachment.html
More information about the sakai-dev
mailing list