« Return to Thread: [Building Sakai] Auto-adding a tool to all existing users
Nope, the files will still be there. The link in the Resources tool
is based on the Site Id, and when the new My Workspace is recreated,
it will have the same Site Id (i.e. "~{userid}")
-Bryan
On Mon, Apr 16, 2012 at 1:39 PM, Liu, Peter <peter.liu@...> wrote:I am wondering Whether the files or /data in the Resource tool at the existing 'My Workspace' will get lost or not, when you drop My Workspace site first and then recreate it by loging-in?-Peter-----Original Message-----From: sakai-dev-bounces@... [mailto:sakai-dev-bounces@...] On Behalf Of Stephen MarquardSent: Monday, April 16, 2012 9:57 AMTo: David WafulaCc: Sakai DevelopersSubject: Re: [Building Sakai] Auto-adding a tool to all existing usersYou can also drop the My Workspace sites for all existing users (in the database), and they'll get recreated on login from the templates.You shouldn't do that when any users are logged in though.RegardsStephenStephen Marquard, Acting DirectorCentre for Educational Technology, University of Cape Town http://www.cet.uct.ac.zaEmail/IM/XMPP: stephen.marquard@...Phone: +27-21-650-5037 Cell: +27-83-500-5290Bryan Holladay <holladay@...> 4/16/2012 3:52 PM >>>You can use a DB script like so:This is a simple script that will backfill a tool into every site selected. This example goes over how to add the Search Tool and insert it alphabetically.Ensure that you do a find and replace for both the registration(sakai.search) and the tool Title ('Search'). There are multiple places where these show up in the script.create table TOOL_TMP(PAGE_ID VARCHAR(99),SITE_ID VARCHAR(99))Gocreate table TOOL_TMP2(PAGE_ID VARCHAR(99),SITE_ID VARCHAR(99),TITLE VARCHAR(99),LAYOUT char(1),SITE_ORDER int(11),POPUP char(1))Goinsert into TOOL_TMP(select uuid() as PAGE_ID, SITE_ID as SITE_IDfrom SAKAI_SITEwhere SITE_ID not in (select SITE_ID from SAKAI_SITE_TOOL where REGISTRATION = 'sakai.search')and SITE_ID not like '!%'and SITE_ID not like '~%')Go--This adds the site page in alphabetical order insert into TOOL_TMP2 (select PAGE_ID, SITE_ID, "Search", 0, (select SITE_ORDER + 1 from SAKAI_SITE_PAGE ssp where ssp.SITE_ID = tt.SITE_ID and ucase(TITLE) < 'SEARCH' Order By Title DESC Limit 1) as toolOrder, 0from TOOL_TMP tt)Go--now update any null values since there could be some, just make it the last tool in the site update TOOL_TMP2 tt Set SITE_ORDER = (select count(*) + 1 from SAKAI_SITE_PAGE ssp where ssp.SITE_ID = tt.SITE_ID) where SITE_ORDER is null Goinsert into SAKAI_SITE_PAGE(select * from TOOL_TMP2)Goinsert into SAKAI_SITE_TOOL(select uuid(), PAGE_ID, SITE_ID, 'sakai.search', 1, 'Search', null from TOOL_TMP2) GoDrop Table TOOL_TMP2GoDrop Table TOOL_TMPGoOn Mon, Apr 16, 2012 at 9:50 AM, David Wafula <davidwaf@...>wrote:Forgot to mention that is there a way to do it without coding ?thanks.On Mon, Apr 16, 2012 at 3:49 PM, David Wafula <davidwaf@...>wrote:Dear all,I can make a tool auto-appear on workspace for new users once theylog in. How do it for existing ones?Thanks.--David Wafula--David Wafula_______________________________________________sakai-dev mailing listsakai-dev@...http://collab.sakaiproject.org/mailman/listinfo/sakai-devTO UNSUBSCRIBE: send email tosakai-dev-unsubscribe@... with a subject of "unsubscribe"_______________________________________________sakai-dev mailing listsakai-dev@...http://collab.sakaiproject.org/mailman/listinfo/sakai-devTO UNSUBSCRIBE: send email tosakai-dev-unsubscribe@... with a subject of "unsubscribe"###UNIVERSITY OF CAPE TOWNThis e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from+27 21 650 9111. This e-mail is intended only for the person(s) to whomit is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.###_______________________________________________sakai-dev mailing listsakai-dev@...http://collab.sakaiproject.org/mailman/listinfo/sakai-devTO UNSUBSCRIBE: send email to sakai-dev-unsubscribe@... with a subject of "unsubscribe"_______________________________________________sakai-dev mailing listsakai-dev@...http://collab.sakaiproject.org/mailman/listinfo/sakai-devTO UNSUBSCRIBE: send email to sakai-dev-unsubscribe@... with a subject of "unsubscribe"_______________________________________________
sakai-dev mailing list
sakai-dev@...
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe@... with a subject of "unsubscribe"
« Return to Thread: [Building Sakai] Auto-adding a tool to all existing users
| Free embeddable forum powered by Nabble | Forum Help |