Forum .LRN Q&A: changing site node names

Collapse
Posted by Nagita Karunaratne on
Has anybody had any experience in changing the names of dotLRN site nodes for dotlrn, classes, clubs etc.

So that

http://localhost:8100/dotlrn/clubs/communitya/one-community?page_num=0

is changed to:

http://localhost:8100/OFFICE/AREA/communitya/one-community?page_num=0

ie. dotlrn --> OFFICE
clubs --> AREA

I tried changing the package_key proc in dotlrn-procs.tcl but this does not allow me to register.

Collapse
Posted by Torben Brosten on
Not sure if it's different for dotLRN, but with OpenACS one can change the site-node url from the site-map.
Collapse
Posted by Nagita Karunaratne on
Thanks for the hint.

In OpenACS I can rename an 'instance' but to change the url I have to unmount the instance, delete the node, recreate the node under new name, then mount the instance under new name.

For dotLRN, I changed the 'package_key' proc in dotlrn-procs.tcl and then selected 'Applications' in 'Main Site Administration' and changed the 'url' parameter for the dotLRN application.

I don't know how to change the 'clubs' url part but I think I will have to do that in code.

Any assistance appreciated.

Collapse
Posted by Nagita Karunaratne on
Just change the 'name' in site_nodes table and modify the proc that retrieves the url part.
Collapse
Posted by Torben Brosten on
Oh, I see, right. The sitemap doesn't let you *change* the location, only the name with "rename". I think there is a suggestion in the bugtracker somewhere to add that.

I'm glad you found a programmatic solution. What seems to work from a UI perspective with /admin/sitemap (back-up first, in case this does't work!):

1. unmount application (subsite "dotlrn" or "clubs" using your example)

2. add folder with new location to base subsite (do not mount a new application, call it "OFFICE" or "AREA" using your example).

3. click "mount" cooresponding to new folder. a list of unmounted packages will be listed.

4. click on the application you want mounted in the new location.

done!

cheers,

Torben

Collapse
Posted by Nagita Karunaratne on
The simplest solution is to modify the site_nodes table directly and then change the value returned by the proc that retrieves the url part.

Amazing that that works! DotLRN is seems to be built with more than educational uses in mind.

Collapse
Posted by Harish Krishnan on
This is simple case where you need to rename a folder which doesnt have subfolders. A name change directly at the db level would need you to update the global shared variable (nsvs) using update_cache. Now if the folder has subfolders you need to do it recursively for every child else the cache will not be updated and the request processor will not be able to resolve the urls properly. I had written a functionality to move communities around in dotlrn to enable restructuring the community tree by the admin. I can share the code if anybody is interested.
Collapse
Posted by Malte Sussdorff on
Please do so Harish (share the code).
Collapse
Posted by Harish Krishnan on
I am cleaning up the code as it was client specific and would provide it soon..
Collapse
Posted by Harish Krishnan on
The code is available here [1] and it works only for oracle though adapting to postgres would be easy. I welcome feedback on it.
[1] http://azri.biz/foobar/files/view/move-community.tar
Collapse
Posted by Orzenil Silva Junior on
Great discussion here! I am having this need now in final phase for launching an intranet website for brazilian federal government at Secretaria da Reforma Agrária with openacs and dotlrn.

Please, Harish, could you change permissions on your tarball or move to a folder with public permissions so we could download it without need for register?

As the website i am building uses postgresql as backend i could adapt your code.

Thanks

Collapse
Posted by Harish Krishnan on
Sorry about that .. I didnot realise that you had to register. The permissions have been corrected.
Collapse
Posted by Orzenil Silva Junior on
Thank you for sharing, Harish. I'll take a look and try the code with postgresql.