[Building Sakai] Site Title editing by users - titleEditableSiteType

JOSE MARIANO LUJAN GONZALEZ jmariano at um.es
Mon Jul 9 06:04:06 PDT 2012


Hi all,
After doing some more testing, i´m still a bit confused with the 
functionality of the property "titleEditableSiteType".

What we need is to disable the title editing for  our custom site types 
(not course, project or portfolio). We´ve added the following lines on 
sakai properties:

    #para que no se pueda editar el nombre del sitio
    titleEditableSiteType.count=2
    titleEditableSiteType.1=project
    titleEditableSiteType.2=sitioColaborativo

Now, we expected all other sites (even the ones created by us) to be 
non-editable by default but after doing some debug, it seems that the 
only site that would be non-editable would be "Course" type sites.

CODE ON SiteAction.java on sakai/site-manage

*    /**
      * Check to see whether the site's title is editable or not
      * @param state
      * @param site_type
      * @return
      */
     private boolean siteTitleEditable(SessionState state, String 
site_type) {
         return site_type != null
&& (!site_type.equals((String) state.getAttribute(STATE_COURSE_SITE_TYPE))
                 ||  (state.getAttribute(TITLE_EDITABLE_SITE_TYPE) != null
&& ((List) 
state.getAttribute(TITLE_EDITABLE_SITE_TYPE)).contains(site_type)));
     }*

We would need to modify that code to remove the "course" site check, in 
order to avoid always returning *true*.

     /**
      * Check to see whether the site's title is editable or not
      * @param state
      * @param site_type
      * @return
      */
     private boolean siteTitleEditable(SessionState state, String 
site_type) {
         return site_type != null
&& (state.getAttribute(TITLE_EDITABLE_SITE_TYPE) != null
&& ((List) 
state.getAttribute(TITLE_EDITABLE_SITE_TYPE)).contains(site_type));
     }


Anyone has faced the same problem?
thanks!
mariano



El 04/07/2012 11:07, JOSE MARIANO LUJAN GONZALEZ escribió:
> Hi all,
> we create our course via provider connected with our SIS (sakai 
> 2.7.1). I´ve noticed that users with site.upd could edit the site 
> Title on SITE INFO TOOL and we do not want that. Doing some research 
> I´ve found that the property titleEditableSiteType should control that 
> behavior. We actually dont use that property at all so its supposed 
> that by default, none site name (from any site tipe) could be modified.
>
> I think that i´m missing something. any suggestions?
> thanks!
> -- 
> ******************************************
> José Mariano Luján González - Aula Virtual
> Area de Tecnologías de la Información
> y las Comunicaciones Aplicadas (ATICA)
> UNIVERSIDAD DE MURCIA -http://www.um.es
>
>
> _______________________________________________
> 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"


-- 
******************************************
José Mariano Luján González - Aula Virtual
Area de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
UNIVERSIDAD DE MURCIA - http://www.um.es

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120709/5d58229e/attachment.html 


More information about the sakai-dev mailing list