[DG: Spanish Sakai] Necesito ayuda

DAVID ROLDAN MARTINEZ darolmar at upvnet.upv.es
Thu Jun 18 00:27:38 PDT 2009


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"


More information about the spanish-sakai mailing list