[DG: Spanish Sakai] Necesito ayuda

Alex Ballesté alex at asic.udl.cat
Thu Jun 18 02:45:17 PDT 2009


La forma String siteId = ToolManager.getCurrentPlacement().getContext(); 
és correcta.
Lo que no estoy 100% seguro es que lo puedas llamar desde otro servicio 
(componente). No se si el servicio puede tener accesso a las Sessiones 
de sakai.  Si estas línias de codigo están en la parte de aplicación 
tendría que funcionar.

Saludos.




Al 18/06/09 09:27, En/na DAVID ROLDAN MARTINEZ ha escrit:
> Diego,
>
> ¿El problema es que el toolManager.getCurrentPlacement().getContext() te un NPE? Si es así, el SiteService.getSite(null) es NPE también. Además, en realidad, es lo mismo puesto que el toolManager.getCurrentPlacement().getContext() te devuelve el site_id  y el SiteService.getSite(xxx) te devuelve el site si le pasas el site_id que previamente le has pedido al toolManager.
>
> Por otra parte, es lógico que si el agenid es null no te deje importar el examen porque no sabe en qué site hacerlo. A mí se me ocurren dos cosas:
>
> a) Revisa la configuración de tu herramienta. Quizá el problema esté ahí y por eso te devuelva null el toolManager. Desconozco en qué parte de la información de estado se guarda el tool placement, pero yo empezaría por ahí.
>
> b) Mira a ver si se puede obtener el site_id de otra manera. A mí me suena el PortalService.getSiteId() o algo así pero deben ser equivalentes, así que no sé si te valdrá.
>
> Salu2,
>         David
> ________________________________________
> De: spanish-sakai-bounces at collab.sakaiproject.org [spanish-sakai-bounces at collab.sakaiproject.org] En nombre de Daniel Merino [daniel.merino at unavarra.es]
> Enviado el: jueves, 18 de junio de 2009 8:52
> Para: spanish-sakai at collab.sakaiproject.org
> Asunto: Re: [DG: Spanish Sakai] Necesito ayuda
>
> Hola, Diego. Aunque no tengo mucha idea, creo que en esta página:
> http://bugs.sakaiproject.org/confluence/display/BOOT/Using+the+SiteService
> sacan el site de otra manera distinta a la que lo haces tú:
>
> Site site = null;
> try {
>          site = siteService.getSite(toolManager.getCurrentPlacement().getContext());
> } catch (Exception e) {
>          // assume we are not in a site then and do something about it
> }
>
>
> Salu2
>
> Diego del Blanco Orobitg escribió:
>    
>> Bueno, lo dejo en Inglés:
>>
>>
>>
>> Dear all,
>>
>>
>>
>> We are developing a new tool able to integrate a homemade software
>> with Sakai. Our software produces IMS QTI 1.2 xml files and we are
>> trying this XML files being imported by Samigo. However, we have found
>> a issue at AgentHelperImpl.getCurrentSiteId returns null and thus
>> AssessmentFacadeQueries.registerWithCurrentSite can import assessment
>> in the site.
>>
>>
>>
>> Browsing in the code I've found that AgentHelperImpl.getCurrentSiteId
>> is null because the invokation to
>> ToolManager.getCurrentPlacement().getContext() is also null but what
>> we don't know is what Placement is null if the integration is done
>> from another Sakai tool (and also developed by my team). I have
>> followed instructions and recommendations given at
>> http://bugs.sakaiproject.org/confluence/display/BOOT/Using+the+ToolManager+Service,
>> but I'm always  getting a NullPointerException when trying to access
>> site_id (sam_assessment_base_t.agentid). Does anybody know why?
>>
>>
>>
>> I don't know if there is any other way of importing an assessment in
>> Samigo provind an IMS QTI 1.2 xml file, but I would appreciate any
>> help you can give us.
>>
>>
>>
>> Thank you very much.
>>
>>
>>
>> <http://www.samoo.es/>
>>
>>     Diego del Blanco Orobitg
>>
>>    diego.delblanco at setival.com<mailto:diego.delblanco at setival.com>
>>
>>     Tlf: 653683489
>>
>>     www.samoo.es<http://www.samoo.es>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> spanish-sakai mailing list
>> spanish-sakai at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/spanish-sakai
>>
>> TO UNSUBSCRIBE: send email to spanish-sakai-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>      
>
> --
> Daniel Merino
> daniel.merino at unavarra.es
> Gestor de teleformación - Centro Superior de Innovación Educativa.
> Tfno: 948-168489 - Universidad Pública de Navarra.
> --
> No hay que atacar al poder si no tienes la seguridad de destruirlo.
> (Niccolo Maquiavelo)
> _______________________________________________
> spanish-sakai mailing list
> spanish-sakai at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/spanish-sakai
>
> TO UNSUBSCRIBE: send email to spanish-sakai-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> _______________________________________________
> spanish-sakai mailing list
> spanish-sakai at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/spanish-sakai
>
> TO UNSUBSCRIBE: send email to spanish-sakai-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>    


-- 
Alexandre Ballesté Crevillén    alex at asic.udl.cat
===================================================
Àrea de sistemes  d'Informació i Comunicacions
Universitat de Lleida

Information and Communications Systems Service
University of Lleida

Pça. Víctor Siurana,1   25003 Lleida SPAIN
Tlfn: 34 973 702148
===================================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/spanish-sakai/attachments/20090618/4163a5db/attachment-0001.html 


More information about the spanish-sakai mailing list