[Building Sakai] MSGCNTR-691
David Horwitz
david.horwitz at uct.ac.za
Thu Oct 11 00:28:40 PDT 2012
Hi Zhen,
Im attaching the patch from the fix I made in our msub. What I did in
the end was:
public boolean isRead(DiscussionTopic topic, DiscussionForum forum,
String userId){
- return isRead(topic, forum, userId, forum.getArea().getContextId());
+
+ return isRead(topic, forum, userId,
forumManager.getContextForForumById(forum.getId()));
}
D
On 10/10/2012 09:41 PM, Matthew Jones wrote:
> It looks like context is only stored directly for private topics
> (private messages)? I'm not seeing a context stored on either topic or
> forum.
>
> My guess is you'd have to go through the area some how off the forum.
> I think I'd know how to do this on the database, but not sure about
> through the api's. I think the surrogateKey on the Forum relates to
> the Area.
>
> Forum->getAreaindex()->Get the Area by Index somehow->getContextId()
>
> Sounds like the better idea, I had to do this for a few things in
> assignments recently to get them to work outside of the UI.:)
>
> On Wed, Oct 10, 2012 at 2:55 PM, Zhen Qian <zqian at umich.edu
> <mailto:zqian at umich.edu>> wrote:
>
> Hi, all:
>
> I have question about MSGCNTR-691: NPE caused Forum messages not
> searchable under server-client search config
>
> Stacktrace is included inside the ticket, and here is the related
> code:
>
>
> public boolean isRead(DiscussionTopic topic, DiscussionForum
> forum, String userId){
> return isRead(topic, forum, userId, getContextId());
> }
>
> ....
> private String getContextId()
> {
> LOG.debug("getContextId()");
> if (TestUtil.isRunningTests())
> {
> return "test-context";
> }
> Placement placement = toolManager.getCurrentPlacement();
> String presentSiteId = placement.getContext();
> return presentSiteId;
> }
>
> Notice when user did search inside Search tool,
> toolManager.getCurrentPlacement() returns null value inside
> getContextId() call.
>
> I would suggest a change in the isRead() function: get the site id
> value from DiscussionTopic object or Forum object, instead of
> calling getContextId(). Can anyone show me the right way to do this?
>
> Thanks,
>
> - Zhen
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> <mailto: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
> <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a
> subject of "unsubscribe"
>
>
>
>
> _______________________________________________
> 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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121011/d1e82a49/attachment.html
More information about the sakai-dev
mailing list