Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/available-comm-template.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/available-comm-template.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/datamanager.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/datamanager.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/datamanager.css 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,23 @@ +/* CSS DATAMANGER PACKAGE - UVEG - fransola@uv.es */ +p, div, h4, h3 {margin:0px; padding:0px;} + +div.w100 {width:100%; margin-bottom:1em} +div.container { width:auto; text-align:left;} +div.spacer { clear: both; font: 0.4em arial; border:0px solid red } +div.big_spacer { clear: both; font: 1.2em arial; border:0px solid red } +div.float { float: left; padding:0.5em; border:0px solid green} +div.float p { text-align: center; } +div.objects { padding-bottom: 1em } +div.head {width:80%;background:#6C9A83; color:#ffffff; padding-left:0.5em} +div.content {width:80%;background:#E0EFE7; padding-left:0.5em; padding-top:0.5em; border:0px solid red} + + +h3.black {display:block; width: 100%; color:#000000; font:1.2em Arial; text-align:left;font-weight:bold} +h4.black {display:block; width: 100%; margin:0px; padding:0px} + +ul {display:block; background:inherit} + +div.content li {float: left; padding-right:2.5em;} +div.content li a {text-decoration:underline} +li.float {float: left; padding-right:2.5em;} + Index: openacs-4/packages/datamanager/www/error.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/error.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/error.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,12 @@ + + +

+
+#datamanager.error#: @error@ +
+
+

+ + +
#datamanager.return_to_index#
+ Index: openacs-4/packages/datamanager/www/error.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/error.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/error.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,11 @@ +ad_page_contract { + + @author Agustin.Lopez@uv.es + + @creation-date 2003-12-12 + @cvs-id $Id: error.tcl,v 1.1 2006/06/22 14:38:27 darior Exp $ +} -query { + error +} -properties { +} + Index: openacs-4/packages/datamanager/www/file_dump.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/file_dump.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/file_dump.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,29 @@ +ad_page_contract { + Show the list of communities where an object can be copied + @author Jose Agustin Lopez Bueno (Agustin.Lopez@uv.es) + @creation_date 2005-07-05 +} -query { + fn:notnull + mtype:notnull + msubtype:notnull +} -properties { +} + +regsub -all {[\.\.]} $fn {} fn +set pos [string first "/tmp/" $fn] + +if {$pos == -1} { + set text "Invalid filename" +} else { + if {[file exists $fn] == 0} { + set text "Invalid filename" + } else { + set fd [open $fn "r"] ; set text [read $fd] ; close $fd + } +} + +ReturnHeaders "$mtype/$msubtype" +ns_write $text + + + Index: openacs-4/packages/datamanager/www/import.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/import.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/import.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,14 @@ + +#datamanager.pretty_name#: #datamanager.import# +@context;noquote@ + +
+ #datamanager.file_to_import# +
+ #datamanager.sufix# +
+ +
+ +
+
#datamanager.return_to_index#
Index: openacs-4/packages/datamanager/www/import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/import.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/import.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,36 @@ +ad_page_contract { +} -query { + {mode:optional ""} +} -properties { +} +set context [list] +set community_id [dotlrn_community::get_community_id] +#only administrator or professor must be allowed to enter this page +dotlrn::require_user_admin_community -community_id $community_id + +# prevent this page from being called when not in a community +# (i.e. the main dotlrn instance +if {[empty_string_p $community_id]} { + ad_returnredirect "[dotlrn::get_url]" +} + +set user_id [ad_conn user_id] +set is_admin [acs_user::site_wide_admin_p -user_id $user_id ] + +set next_url "import2" +set return_url "index" + +if {$is_admin == 1} { + if {$mode eq "user"} { + set next_url "admin/import-users" + set return_url "admin/index" + } elseif {$mode eq "comm"} { + set next_url "admin/import-communities" + set return_url "admin/index" + } else { + set return_url "admin/index" + } +} + + + Index: openacs-4/packages/datamanager/www/import2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/import2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/import2.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,16 @@ + + +#datamanager.import_selected_objects# + +

#datamanager.results#

+ +
+<% +foreach linea $results { + adp_puts "$linea
" +} +%> + +
+
#datamanager.return_to_index#
+ Index: openacs-4/packages/datamanager/www/import2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/import2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/import2.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,253 @@ +ad_page_contract { +} { + upload_file:notnull + upload_file.tmpfile:tmpfile + {sufix:optional ""} +} -validate { +} + +set this_comm_id [dotlrn_community::get_community_id] +set portal_id [dotlrn_community::get_portal_id -community_id $this_comm_id] +set package_id $this_comm_id + +set xml_filename ${upload_file.tmpfile} +set fd [open $xml_filename r] ; set xml [read $fd] ; close $fd +#set doc [dom parse $xml] +dom parse [::tDOM::xmlReadFile $xml_filename] doc +set root [$doc documentElement] + +# check variables +set conttotal 0 +set contbien 0 +set contmal 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +################################# +# FAQS # +################################# +set faqNodes [$root selectNodes /items/faq] +set countfaqs [llength $faqNodes] +foreach faqNode $faqNodes { + set faq_name "[$faqNode selectNodes {string(name)}]$sufix" + set faq_separate_p [$faqNode selectNodes {string(separate_p)}] + set faq_username [$faqNode selectNodes {string(creation_user)}] + set faq_creation_ip [$faqNode selectNodes {string(creation_ip)}] + set faq_disabled_p [$faqNode selectNodes {string(disabled_p)}] + set faq_context_id [$faqNode selectNodes {string(context_id)}] + + # obtenemos el user_id del creation_user + set faq_creation_user [db_string get_user_id "select user_id from users where username = :faq_username"] + # Obtenemos el context_id seg�n la conexi�n. + # Para el caso de una comunidad habr� que psarle el community_id + set faq_context_id [datamanager::get_faq_package_id -community_id $this_comm_id] + set new_faq_id [db_exec_plsql create_faq { + select faq__new_faq ( + null, + :faq_name, + :faq_separate_p, + 'faq', + now(), + :faq_creation_user, + :faq_creation_ip, + :faq_context_id + ); + }] + set faq_q_aNodes [$faqNode selectNodes faq_q_a] + foreach faq_q_aNode $faq_q_aNodes { + set question [$faq_q_aNode selectNodes {string(question)}] + set answer [$faq_q_aNode selectNodes {string(answer)}] + set entry_id [db_nextval acs_object_id_seq] + set sort_key $entry_id + set q_and_a_id [db_exec_plsql create_q_and_a { + select faq__new_q_and_a ( + :entry_id, + :new_faq_id, + :question, + :answer, + :sort_key, + 'faq_q_and_a', + now(), + :faq_creation_user, + :faq_creation_ip, + :new_faq_id + ); + }] + } +} +lappend results [format " Total faqs imported=%s" $countfaqs] + +################################# +# STATIC PORTLETS # +################################# +set staticNodes [$root selectNodes /items/static] +set countstatics [llength $staticNodes] +foreach staticNode $staticNodes { + set pretty_name "[$staticNode selectNodes {string(pretty_name)}]$sufix" + set body [$staticNode selectNodes {string(body)}] + set format [$staticNode selectNodes {string(format)}] + + db_transaction { + set item_id [static_portal_content::new \ + -package_id $package_id \ + -content $body \ + -pretty_name $pretty_name \ + -format $format] + set old_element_id [static_portal_content::add_to_portal \ + -portal_id $portal_id \ + -package_id $package_id \ + -content_id $item_id] + } +} +lappend results [format " Total static portlets imported=%s" $countstatics] + +################################# +# FORUM # +################################# +set forumNodes [$root selectNodes /items/forum] +set countforums [llength $forumNodes] +set fpackage_id [datamanager::get_forum_package_id -community_id $this_comm_id] + +if {$fpackage_id > 0} { + +foreach forumNode $forumNodes { + set forum_name "[$forumNode selectNodes {string(name)}]$sufix" + set forum_charter [$forumNode selectNodes {string(charter)}] + set forum_presentation_type [$forumNode selectNodes {string(presentation_type)}] + set forum_posting_policy [$forumNode selectNodes {string(posting_policy)}] + + # modified to not creating lost of testing forums + set forum_exist [db_string get_forum_num "select max(forum_id) from forums_forums where name=:forum_name and package_id=:fpackage_id" -default 0] + + if {$forum_exist > 0} { + set forum_id $forum_exist + } else { + #NEW FORUM + set forum_id [forum::new \ + -name $forum_name \ + -charter $forum_charter \ + -presentation_type $forum_presentation_type \ + -posting_policy $forum_posting_policy \ + -package_id $fpackage_id ] + } + #end modified + + set forum_msgs [$forumNode selectNodes forum_msg] + + set l_msg [list] + foreach forum_msg $forum_msgs { + + set message_id [$forum_msg selectNodes {string(message_id)}] + set parent_id [$forum_msg selectNodes {string(parent_id)}] + set subject "[$forum_msg selectNodes {string(subject)}]" + set content "[$forum_msg selectNodes {string(content)}]" + set username [$forum_msg selectNodes {string(username)}] + set user_id [datamanager::get_username_id -username $username] + set posting_date [$forum_msg selectNodes {string(posting_date)}] + set last_child_post [$forum_msg selectNodes {string(last_child_post)}] + set format "[$forum_msg selectNodes {string(format)}]" + set l_item [list] + lappend l_item $message_id $parent_id $forum_id + lappend l_item $subject $content $user_id + lappend l_item $posting_date $last_child_post $format + lappend l_msg $l_item + + } + + ############################ + # UPDATE PROCESS --> message_id and parent_id + set l_msg2 $l_msg + set c 0 + foreach msg $l_msg2 { + set index [lindex $msg 0] + set parent [lindex $msg 1] + #cogemos todos los datos y creamos el nuevo mensaje + set new_idx [forum::message::new \ + -forum_id [lindex [lindex $l_msg2 $c] 2] \ + -parent_id [lindex [lindex $l_msg2 $c] 1] \ + -subject [lindex [lindex $l_msg2 $c] 3] \ + -content [lindex [lindex $l_msg2 $c] 4] \ + -format [lindex [lindex $l_msg2 $c] 8] \ + -user_id [lindex [lindex $l_msg2 $c] 5]] + + # Update posting data and last_child_post + set p_date [lindex [lindex $l_msg2 $c] 6] + set lc_post [lindex [lindex $l_msg2 $c] 7] + db_dml update_pdates "update forums_messages set posting_date = :p_date , last_child_post = :lc_post where message_id = :new_idx" + + set cont 0 + foreach orig $l_msg { + if {[lindex $orig 1] == $index} { + set aux [lreplace $orig 1 1 $new_idx] + set l_msg2 [lreplace $l_msg2 $cont $cont $aux] + + } + incr cont +1 + } + set kk [lindex $l_msg2 $c] + set kk [lreplace $kk 0 0 $new_idx] + set l_msg2 [lreplace $l_msg2 $c $c $kk] + + incr c +1 + } + ################### + + lappend results [format " Total forums imported=%s" $countforums] + } +} else { + lappend results [format " Total forums imported=%s -> 0: ERROR" $countforums] +} + + +################################# +# NEWS # +################################# +################################# +set newsNodes [$root selectNodes /items/new] +set countnews [llength $newsNodes] + +#set npackage_id [news_get_package_id -community_id $this_comm_id] +set npackage_id [datamanager::get_new_package_id -community_id $this_comm_id] + +if {$fpackage_id > 0} { + +foreach newsNode $newsNodes { + set publish_title [$newsNode selectNodes {string(publish_title)}] + set publish_body [$newsNode selectNodes {string(publish_body)}] + set publish_date_ansi [$newsNode selectNodes {string(publish_date)}] + set mime_type [$newsNode selectNodes {string(mime_type)}] + set archive_date_ansi [$newsNode selectNodes {string(archive_date_ansi)}] + set approval_user [$newsNode selectNodes {string(approval_user)}] + set approval_user_id [datamanager::get_username_id -username $approval_user] + set approval_date [$newsNode selectNodes {string(approval_date)}] + set approval_ip [$newsNode selectNodes {string(approval_ip)}] + set creation_ip [$newsNode selectNodes {string(creation_ip)}] + set creation_user [$newsNode selectNodes {string(creation_user)}] + #set live_revision_p [$newsNode selectNodes {string(live_revision_p)}] + set creation_user_id [datamanager::get_username_id -username $creation_user] + + + + set live_revision_p "t" + append publish_title $sufix + +#create the new + set news_id [news_create_new -publish_body $publish_body \ + -publish_title $publish_title \ + -publish_date_ansi $publish_date_ansi \ + -mime_type $mime_type \ + -package_id $npackage_id \ + -archive_date_ansi $archive_date_ansi \ + -approval_user $approval_user_id \ + -approval_date $approval_date \ + -approval_ip $approval_ip \ + -creation_ip $creation_ip \ + -user_id $creation_user_id \ + -live_revision_p $live_revision_p ] + + + } +lappend results [format " Total news imported=%s" $countnews] +} Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/index.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/index.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/index.xql 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,6 @@ + + + +postgresql7.1 + + Index: openacs-4/packages/datamanager/www/manage-object.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/manage-object.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/manage-object.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,17 @@ + + +#datamanager.pretty_name#: #datamanager.Select_Objects# + + + +

#datamanager.folders_list#

+ +

#datamanager.albums_list#

+ +
+ + + +
#datamanager.return_to_index#
+ + Index: openacs-4/packages/datamanager/www/manage-object.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/manage-object.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/manage-object.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,94 @@ +ad_page_contract { +} -query { + object_type +} -properties { +} + +set community_id [dotlrn_community::get_community_id] +set query_name [join [list select $object_type] "_"] + +switch $object_type { + + "folder" { + # CASO FILE_STORAGE + set display_template {
@usable_objects.object_name@
} + db_1row select_folder_package_id {} + set root_folder_id [fs::get_root_folder -package_id $package_id] + } + + "pa_album" { + # CASO PHOTO_ALBUM + # creamos un multirow para evitar una super consulta posterior + template::multirow create pa_folders object_id object_name creation_user creation_date level_num item_url + set display_template_pa_folder {
@pa_folders.object_name@
} + set display_template {
@usable_objects.object_name@
} + db_1row select_photo_album_package_id {} + set pa_root_folder [pa_get_root_folder $package_id] + # Get a list of object_id folders + set l_photo_folders [db_list select_photo_folders { * SQL *}] + foreach folder $l_photo_folders { + db_1row get_folder_info "select object_id, label as object_name, creation_user , creation_date, tree_level(tree_sortkey) as level_num from acs_objects a, cr_folders f where object_id = folder_id and object_id = :folder" + template::multirow append pa_folders $object_id $object_name $creation_user $creation_date $level_num + set num [template::multirow size grades] + set item_url [export_vars -base "item" { object_id }] + template::multirow set pa_folders $num item_url $item_url + } + + # this case is for the pa_folders + template::list::create\ + -name usable_objects2 \ + -multirow pa_folders\ + -key object_id\ + -bulk_actions { Copy one-object-copy {#datamanager.Copy_checked_items#} \ + Export one-object-export {#datamanager.Export_checked_items#} \ + } \ + -elements { + object_name { + label "#datamanager.name#" + display_template $display_template_pa_folder + } + creation_user { + label "#datamanager.creation_user#" + } + creation_date { + label "#datamanager.creation_date#" + } + } + } + + "dotlrn_club" { + set display_template {
@usable_objects.object_name@
} + } + + "users" { + set display_template {
@usable_objects.object_name@
} + } + + # RESTO DE CASOS + default { + set display_template {} + } +} + +template::list::create\ + -name usable_objects \ + -multirow usable_objects\ + -key object_id\ + -bulk_actions { Copy one-object-copy {#datamanager.Copy_checked_items#} Export one-object-export {#datamanager.Export_checked_items#} }\ + -elements { + object_name { + label "#datamanager.name#" + display_template $display_template + } + creation_user { + label "#datamanager.creation_user#" + } + creation_date { + label "#datamanager.creation_date#" + } +} + +db_multirow -extend { item_url } usable_objects $query_name {} { + set item_url [export_vars -base "item" { object_id }] +} + Index: openacs-4/packages/datamanager/www/manage-object.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/manage-object.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/manage-object.xql 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,183 @@ + + + + + + SELECT f.faq_name as object_name, + ao.object_id, + us1.username as creation_user, + to_char(ao.creation_date, 'YYYY-MM-DD HH:MM:SS') as creation_date + FROM acs_objects as ao, + faqs as f, + users as us1 + WHERE + us1.user_id = ao.creation_user and + f.faq_id = ao.object_id and + ao.context_id in (select package_id + from dotlrn_community_applets + where applet_id = (select applet_id + from dotlrn_applets + where applet_key='dotlrn_faq') and + community_id=:community_id) + + + + + + SELECT spc.pretty_name as object_name,ao.object_id, + to_char(ao.creation_date,'YYYY-MM-DD HH:MM:SS') as creation_date, + 'Unknown' as creation_user + FROM acs_objects as ao, + static_portal_content as spc + WHERE + ao.object_id in (select content_id + from static_portal_content + where body <> '' and package_id=:community_id) and + spc.content_id=ao.object_id and + not (spc.pretty_name like '#dotlrn-static%_info_%#') + + + + + + SELECT fo.name as object_name, + ao.object_id, + us1.username as creation_user, + to_char(ao.creation_date,'YYYY-MM-DD HH:MM:SS') as creation_date, + fo.charter, + fo.presentation_type, + fo.posting_policy, + fo.enabled_p, + fo.thread_count, + fo.approved_thread_count, + fo.forums_forums, + fo.last_post, + fo.autosubscribe_p + FROM acs_objects as ao, + users as us1, + forums_forums as fo + WHERE + us1.user_id = ao.creation_user + and fo.forum_id = ao.object_id + and ao.context_id in (select package_id + from dotlrn_community_applets as dca, + dotlrn_applets as da + where dca.applet_id=da.applet_id and + da.applet_key='dotlrn_forums' and + dca.community_id = :community_id) + ORDER BY object_name, ao.creation_date + + + + + + select + item_id, + news_id as object_id, + content_item__get_best_revision(item_id) as revision_id, + content_revision__get_number(news_id) as revision_no, + publish_title as object_name, + html_p, + creation_date, + to_char(publish_date, 'YYYY-MM-DD HH24:MI:SS') as publish_date_ansi, + to_char(archive_date, 'YYYY-MM-DD HH24:MI:SS') as archive_date_ansi, + username as creation_user, + item_creator, + package_id, + status + from + news_items_live_or_submitted, + users + where + user_id = creation_user and + package_id = ( + select object_id as package_id from acs_objects o, apm_packages p where o.object_id = p.package_id and p.package_key = 'news' and o.context_id = (select package_id from dotlrn_communities_all where community_id = :community_id)) + order by item_id desc + + + + + + SELECT cf.label as object_name, + cf.folder_id as object_id, + us1.username as creation_user, + ao.creation_date, + tree_level(ci1.tree_sortkey) as level_num + FROM cr_folders cf, + cr_items ci1, + cr_items ci2, + acs_objects ao, + users us1 + WHERE ci1.tree_sortkey between ci2.tree_sortkey and tree_right(ci2.tree_sortkey) + and ci2.item_id=:root_folder_id + and ci1.item_id=cf.folder_id + and ao.object_id=cf.folder_id + and ao.creation_user=us1.user_id + ORDER BY ci1.tree_sortkey + + + + + + select package_id + from dotlrn_community_applets + where applet_id=(select applet_id from dotlrn_applets where applet_key='dotlrn_fs') and community_id=:community_id + + + + + + select package_id + from dotlrn_community_applets + where applet_id=(select applet_id from dotlrn_applets where applet_key='dotlrn_photo_album') and community_id=:community_id + + + + + +SELECT folder_id as object_id from cr_folders where folder_id = :pa_root_folder UNION SELECT cf.folder_id as object_id FROM cr_folders cf, cr_items ci1, cr_items ci2, acs_objects ao, users us1 WHERE ci1.tree_sortkey between ci2.tree_sortkey and tree_right(ci2.tree_sortkey) and ci2.item_id= :pa_root_folder and ci1.item_id=cf.folder_id and ao.object_id=cf.folder_id and ao.creation_user=us1.user_id + + + + + + +select distinct + a.object_id as parent, + b.object_id as object_id, + i.name as object_name, + a.creation_user, + a.creation_date, + tree_level(a.tree_sortkey) as level_num +from acs_objects a, acs_objects b, cr_items i +where a.object_id = i.item_id and a.context_id in + (SELECT folder_id as object_id from cr_folders where folder_id = :pa_root_folder UNION SELECT cf.folder_id as object_id FROM cr_folders cf, cr_items ci1, cr_items ci2, acs_objects ao, users us1 WHERE ci1.tree_sortkey between ci2.tree_sortkey and tree_right(ci2.tree_sortkey) and ci2.item_id= :pa_root_folder and ci1.item_id=cf.folder_id and ao.object_id=cf.folder_id and ao.creation_user=us1.user_id) and + a.object_type = 'content_item' and + a.object_id = b.context_id and + b.object_type = 'pa_album' + + + + + + + +SELECT folder_id as object_id from cr_folders where folder_id = :pa_root_folder UNION SELECT cf.folder_id as object_id FROM cr_folders cf, cr_items ci1, cr_items ci2, acs_objects ao, users us1 WHERE ci1.tree_sortkey between ci2.tree_sortkey and tree_right(ci2.tree_sortkey) and ci2.item_id= :pa_root_folder and ci1.item_id=cf.folder_id and ao.object_id=cf.folder_id and ao.creation_user=us1.user_id + + + + + + + + SELECT community_id as object_id, + pretty_name as object_name, + active_start_date as creation_date, + 'root' as creation_user + FROM dotlrn_communities_all + WHERE community_type = 'dotlrn_club' + ORDER BY pretty_name + + + + Index: openacs-4/packages/datamanager/www/ok.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/ok.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/ok.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,12 @@ + + +

+
+@msg@ +
+
+

+ + +
#datamanager.return_to_index#
+ Index: openacs-4/packages/datamanager/www/ok.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/ok.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/ok.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,11 @@ +ad_page_contract { + + @author Agustin.Lopez@uv.es + + @creation-date 2003-12-12 + @cvs-id $Id: ok.tcl,v 1.1 2006/06/22 14:38:27 darior Exp $ +} -query { + msg +} -properties { +} + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/one-object-copy.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/one-object-copy.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/one-object-copy.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/one-object-export.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/one-object-export.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/one-object-export.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,25 @@ + + +#datamanager.export_selected_objects# +@context;noquote@ + + +

#datamanager.results#

+ +
+#datamanager.view# / +#datamanager.dump# +#datamanager.exported_file# +
+<% +foreach linea $results { + adp_puts "$linea
" +} +%> + +
+
#datamanager.return_to_index#
+ + + + Index: openacs-4/packages/datamanager/www/one-object-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/one-object-export.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/one-object-export.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,130 @@ +ad_page_contract { +} -query { + {mode:optional ""} + {all_users:optional} + {several_users:optional} + {one_user:optional ""} + {object_id:multiple,optional ""} +} -properties { +} + +set context [list [_ datamanager.Export_Objects]] +set comm_id [dotlrn_community::get_community_id] + +#only administrator or professor must be allowed to enter this page +dotlrn::require_user_admin_community -community_id $comm_id + +set object_data [list] +set object_name [list] + +if {[llength $object_id] == 1} { + if {[llength [lindex $object_id 0]] > 1} { + set object_id [lindex $object_id 0] + } +} + +# Recuperamos Object_ids para varios / todos los usuarios +if {$mode eq "one_user"} { + set object_id [db_list get_user_list "select user_id from users where username = '$one_user'"] + set num [llength $object_id] +} + +if {$mode eq "several_users"} { + set object_id [db_list get_user_list "select user_id from users where username like '$several_users%'"] + set num [llength $object_id] + + +} elseif {$mode eq "all_users"} { + set object_id [db_list get_all_user_list "select user_id from users"] + +} + + + + +set action "export" +set n_exported 0 +set fn_xml_output [datamanager::tmpfn] +set XML_OUTPUT [open $fn_xml_output w] +puts $XML_OUTPUT "" +puts $XML_OUTPUT "" + +set l_time [ns_localtime] +set l_time2 [list [lindex $l_time 2] [lindex $l_time 1] [lindex $l_time 0]] +set time [join $l_time2 ":"] +ns_log Notice "START TIME: $time" + +############# BEGIN +foreach object_id $object_id { + + set object_type [datamanager::get_object_type -object_id $object_id] + + ########### FAQ + if {$object_type eq "faq"} { + set lines [callback datamanager::export_faq -object_id $object_id] + foreach line $lines { + set line [join $line "\n"] + puts -nonewline $XML_OUTPUT $line + } + incr n_exported + ########### STATIC PORTLET + } elseif { $object_type eq "static_portal_content"} { + set lines [callback datamanager::export_static -object_id $object_id] + foreach line $lines { + set line [join $line "\n"] + puts -nonewline $XML_OUTPUT $line + } + incr n_exported + ########### FORUMS + } elseif { $object_type eq "forums_forum"} { + set lines [callback datamanager::export_forums -object_id $object_id] + foreach line $lines { + set line [join $line "\n"] + puts -nonewline $XML_OUTPUT $line + } + incr n_exported + ########### NEWS + } elseif { $object_type eq "news"} { + set lines [callback datamanager::export_new -object_id $object_id] + foreach line $lines { + set line [join $line "\n"] + puts -nonewline $XML_OUTPUT $line + } + incr n_exported + + ########### COMMUNITY + } elseif { $object_type eq "dotlrn_club"} { + + set lines [callback datamanager::export_dotlrn_club -object_id $object_id] + foreach line $lines { + set line [join $line "\n"] + puts -nonewline $XML_OUTPUT $line + } + incr n_exported + ########### + } elseif { $object_type eq "user"} { + + #set lines [datamanager::export_acs_user -object_id $object_id] + set lines [callback datamanager::export_acs_user -object_id $object_id] + foreach line $lines { + set line [join $line "\n"] + puts -nonewline $XML_OUTPUT $line + } + incr n_exported + ########### + } else { + } + +} + +puts $XML_OUTPUT "\n" +lappend results "" +lappend results [format " Total objects exported=%s" $n_exported] +if {[catch {close $XML_OUTPUT} err]} { + lappend results [format "Error closing xml file=%s" $err] +} + +set l_time [ns_localtime] +set l_time2 [list [lindex $l_time 2] [lindex $l_time 1] [lindex $l_time 0]] +set time [join $l_time2 ":"] +ns_log Notice "END TIME: $time" Index: openacs-4/packages/datamanager/www/select_users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/select_users.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/select_users.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,30 @@ +ad_page_contract { +} -query { + {mode:optional ""} + {all_users:optional} + {several_users:optional} + {one_user:optional} + {object_id:multiple optional} + +} -properties { +} + + +if {$mode eq "one_user"} { + set ctrl [db_0or1row get_one_user "select user_id from users where username ='$one_user' "] + set object_id $user_id + ad_returnredirect "one-object-export?object_id=$object_id" + +} elseif {$mode eq "several_users"} { + set object_id [db_list get_user_list "select user_id from users where username like '$several_users%'"] + set num [llength $object_id] + ad_returnredirect "one-object-export?object_id=$object_id" + +} elseif {$mode eq "all_users"} { + set object_id [db_list get_all_user_list "select user_id from users"] + ad_returnredirect "one-object-export?object_id=$object_id" +} else { +set mode "view" +} + + Index: openacs-4/packages/datamanager/www/select_users.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/select_users.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/select_users.xql 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,6 @@ + + + +postgresql7.1 + + Index: openacs-4/packages/datamanager/www/use-dotlrn_club.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_club.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_club.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,50 @@ +ad_page_contract { +} -query { + object_id:multiple,notnull + action:notnull + dest_community_id:notnull + {sufix:optional ""} +} -properties { +} + +dotlrn::require_user_admin_community -community_id [dotlrn_community::get_community_id] + +set context [list []] +set title "[_ datamanager.Confirmation]" +set error_url "error.tcl" +set ok_url "ok.tcl" +set items_ok 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +regsub -all {\{} $object_id "" object_id +regsub -all {\}} $object_id "" object_id +regsub -all {\{} $dest_community_id "" dest_community_id +regsub -all {\}} $dest_community_id "" dest_community_id + +switch $action { + "copy" { + + } + "export" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {datamanager::export_dotlrn_club -object_id $object} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + default { + } +} + +set okmsg "Action performed on total items: $items_ok" +ad_returnredirect [append tmp $ok_url "?msg=" $okmsg] + Index: openacs-4/packages/datamanager/www/use-dotlrn_faq.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_faq.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_faq.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,18 @@ + + +#datamanager.pretty_name# + +

#datamanager.optional_sufix#:


+ +
+#datamanager.sufix# + + + + + +
+ +
#datamanager.return_to_index#
+ + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/use-dotlrn_faq.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/use-dotlrn_faq2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_faq2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_faq2.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,60 @@ +ad_page_contract { +} -query { + object_id:multiple,notnull + action:notnull + dest_community_id:notnull + {sufix:optional ""} +} -properties { +} + +dotlrn::require_user_admin_community -community_id [dotlrn_community::get_community_id] + +set context [list []] +set title "[_ datamanager.Confirmation]" +set error_url "error.tcl" +set ok_url "ok.tcl" +set items_ok 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +regsub -all {\{} $object_id "" object_id +regsub -all {\}} $object_id "" object_id +regsub -all {\{} $dest_community_id "" dest_community_id +regsub -all {\}} $dest_community_id "" dest_community_id + +switch $action { + "copy" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::copy_faq -object_id $object -selected_community $community -sufix $sufix} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + "export" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::export_faq -object_id $object} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + default { + } +} + +set okmsg "#datamanager.items_performed#: $items_ok" +ad_returnredirect [append tmp $ok_url "?msg=" $okmsg] + Index: openacs-4/packages/datamanager/www/use-dotlrn_forums.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_forums.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_forums.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,17 @@ + +#datamanager.pretty_name# + +

#datamanager.optional_sufix#:


+ +
+#datamanager.sufix# + + + + + +
+ +
#datamanager.return_to_index#
+ + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/use-dotlrn_forums.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/use-dotlrn_forums2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_forums2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_forums2.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,60 @@ +ad_page_contract { +} -query { + object_id:multiple,notnull + action:notnull + dest_community_id:notnull + {sufix:optional ""} +} -properties { +} + +dotlrn::require_user_admin_community -community_id [dotlrn_community::get_community_id] + +set context [list []] +set title "[_ datamanager.Confirmation]" +set error_url "error.tcl" +set ok_url "ok.tcl" +set items_ok 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +regsub -all {\{} $object_id "" object_id +regsub -all {\}} $object_id "" object_id +regsub -all {\{} $dest_community_id "" dest_community_id +regsub -all {\}} $dest_community_id "" dest_community_id + +switch $action { + "copy" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::copy_forums -object_id $object -selected_community $community -sufix $sufix} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + "export" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::export_forum -object_id $object} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + default { + } +} + +set okmsg "Action performed on total items: $items_ok" +ad_returnredirect [append tmp $ok_url "?msg=" $okmsg] + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/use-dotlrn_fs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/use-dotlrn_news.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_news.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_news.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,16 @@ + + +#datamanager.pretty_name# + +

#datamanager.optional_sufix#:


+ +
+#datamanager.sufix# + + + + + +
+ +
#datamanager.return_to_index#
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/use-dotlrn_news.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/use-dotlrn_news2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_news2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_news2.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,60 @@ +ad_page_contract { +} -query { + object_id:multiple,notnull + action:notnull + dest_community_id:optional + {sufix:optional ""} +} -properties { +} + +dotlrn::require_user_admin_community -community_id [dotlrn_community::get_community_id] + +set context [list []] +set title "[_ datamanager.Confirmation]" +set error_url "error.tcl" +set ok_url "ok.tcl" +set items_ok 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +regsub -all {\{} $object_id "" object_id +regsub -all {\}} $object_id "" object_id +regsub -all {\{} $dest_community_id "" dest_community_id +regsub -all {\}} $dest_community_id "" dest_community_id + +switch $action { + "copy" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::copy_new -object_id $object -selected_community $community -sufix $sufix} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + "export" { + #foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::export_new -object_id $object} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + #} + } + default { + } +} + +set okmsg "Action performed on total items: $items_ok" +ad_returnredirect [append tmp $ok_url "?msg=" $okmsg] + Index: openacs-4/packages/datamanager/www/use-dotlrn_photo_album.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_photo_album.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_photo_album.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,54 @@ +ad_page_contract { + Just call the callback implemented in file-storage package + @author Paco Soler (paco.soler@uv.es) + @creation_date 2006-06-21 + +} -query { + object_id:notnull + action:notnull + dest_community_id:multiple + {mode: "both"} +} -properties { +} + + +set source_community [dotlrn_community::get_community_id] +set selected_community $dest_community_id +dotlrn::require_user_admin_community -community_id [dotlrn_community::get_community_id] +set context [list []] +set title "[_ datamanager.Confirmation]" +set error_url "error.tcl" +set ok_url "ok.tcl" +set items_ok 0 + +regsub -all {\{} $object_id "" object_id +regsub -all {\}} $object_id "" object_id +regsub -all {\{} $dest_community_id "" dest_community_id +regsub -all {\}} $dest_community_id "" dest_community_id + +switch $action { + "copy" { + foreach community $selected_community { + foreach object $object_id { + #only administrator or professor must be allowed to enter this page + dotlrn::require_user_admin_community -community_id $community + + + if { [catch {callback datamanager::copy_album -object_id $object -selected_community $community -mode $mode + } errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + set aux 0 + } + } + } + default { + } + +} + +set okmsg "Action performed on total items: $items_ok" +ad_returnredirect [append tmp $ok_url "?msg=" $okmsg] Index: openacs-4/packages/datamanager/www/use-dotlrn_static.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_static.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_static.adp 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,17 @@ + +#datamanager.pretty_name# + +

#datamanager.optional_sufix#:


+ +
+#datamanager.sufix# + + + + + +
+ +
#datamanager.return_to_index#
+ + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/use-dotlrn_static.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/datamanager/www/use-dotlrn_static2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/use-dotlrn_static2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/use-dotlrn_static2.tcl 22 Jun 2006 14:38:27 -0000 1.1 @@ -0,0 +1,60 @@ +ad_page_contract { +} -query { + object_id:multiple,notnull + action:notnull + dest_community_id:notnull + {sufix:optional ""} +} -properties { +} + +dotlrn::require_user_admin_community -community_id [dotlrn_community::get_community_id] + +set context [list []] +set title "[_ datamanager.Confirmation]" +set error_url "error.tcl" +set ok_url "ok.tcl" +set items_ok 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +regsub -all {\{} $object_id "" object_id +regsub -all {\}} $object_id "" object_id +regsub -all {\{} $dest_community_id "" dest_community_id +regsub -all {\}} $dest_community_id "" dest_community_id + +switch $action { + "copy" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::copy_static -object_id $object -selected_community $community -sufix $sufix} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + "export" { + foreach community $dest_community_id { + foreach object $object_id { + dotlrn::require_user_admin_community -community_id $community + if { [catch {callback datamanager::export_static -object_id $object -selected_community $community -sufix $sufix} errmsg] } { + ad_returnredirect [append tmp $error_url "?error=" $errmsg] + ad_script_abort + } else { + set items_ok [expr $items_ok + 1] + } + } + } + } + default { + } +} + +set okmsg "Action performed on total items: $items_ok" +ad_returnredirect [append tmp $ok_url "?msg=" $okmsg] + Index: openacs-4/packages/datamanager/www/admin/import-communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/import-communities.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/import-communities.adp 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,18 @@ + + +#datamanager.import_selected_users# + +

#datamanager.results#

+ +
+<% +foreach linea $results { + adp_puts "$linea
" +} +%> + +
+
#datamanager.return_to_index#
+ + + Index: openacs-4/packages/datamanager/www/admin/import-communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/import-communities.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/import-communities.tcl 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,384 @@ +ad_page_contract { +} { + upload_file:notnull + upload_file.tmpfile:tmpfile + {sufix:optional ""} +} -validate { +} + +set this_comm_id [dotlrn_community::get_community_id] +set portal_id [dotlrn_community::get_portal_id -community_id $this_comm_id] +set package_id $this_comm_id +set l_results [list] +lappend l_results {"COMUNIDAD" "ID" "NAME"} {"USERS" "NUM" "ADDED" "EXIST" "BAD" "LISTA"} {"STATIC" "NUM" "ADDES" "BAD"} {"NEWS" "NUM" "ADDES" "BAD"} {"FAQS" "NUM"} {"FORUMS" "NUM" "ADDED" "EXIST" "BAD"} + +set xml_filename ${upload_file.tmpfile} +set fd [open $xml_filename r] ; set xml [read $fd] ; close $fd +#set doc [dom parse $xml] +dom parse [::tDOM::xmlReadFile $xml_filename] doc +set root [$doc documentElement] + +# check variables +set conttotal 0 +set contbien 0 +set contmal 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +################################# +# COMMUNITIES # +################################# +set ClubNodes [$root selectNodes /items/club] +set countclub [llength $ClubNodes] +set join_policy closed +# Iteremos... +# set l_time [ns_localtime] +# set l_time2 [list [lindex $l_time 2] [lindex $l_time 1] [lindex $l_time 0]] +# set time [join $l_time2 ":"] + +foreach ClubNode $ClubNodes { + set name "[$ClubNode selectNodes {string(name)}]$sufix" + set description "[$ClubNode selectNodes {string(description)}]$sufix" + + # Check if community already exists + set ctrl [db_string get_n_comm "select count(*) from dotlrn_communities_all where pretty_name = :name"] + if {$ctrl > 0} { + set community_id [db_string get_comm "select min(community_id) from dotlrn_communities_all where pretty_name = :name"] + } else { + set community_id [dotlrn_club::new \ + -description $description \ + -pretty_name $name \ + -join_policy $join_policy] + } + + set l_comm [list] + lappend l_comm $community_id $name + + ################# + # USERS # + ################# + set num 1 + set users_added 0 + set users_exist 0 + set users_bad 0 + set l_baduser [list] + + set UserNodes [$ClubNodes selectNodes member] + # recorremos los usuarios + foreach UserNode $UserNodes { + # start importing users + set username [$UserNode selectNodes {string(username)}] + set auth [$UserNode selectNodes {string(auth)}] + set rel_type [$UserNode selectNodes {string(rel_type)}] + set num [expr $num + 1] + set authority_id "0" + #BUSCO LA AUTORIDAD LDAP + if {[catch {db_1row lautoridad "select authority_id from auth_authorities where short_name = :auth"} results]} { + } else { + } + + set user_id [db_string user_id "select user_id from users where username = :username and authority_id = :authority_id" -default "-300"] + if {$user_id ne -300} { + # A�adimos el usuario $user_id a la comunidad + #dotlrn_community::member_p comm user + if {![dotlrn_community::member_p $community_id $user_id]} { + dotlrn_community::add_user -rel_type $rel_type $community_id $user_id + incr users_added +1 + } else { + incr users_exist +1 + } + } else { + # Contamos uno mal + lappend l_baduser $username + incr users_bad +1 + } + # fin users + } + + ########################## + # STATIC PORTLET # + ########################## + set static_num 0 + set static_added 0 + set static_exist 0 + set static_bad 0 + + set StaticNodes [$ClubNodes selectNodes static] + + set portal_id [dotlrn_community::get_portal_id -community_id $community_id] + + + # recorremos los static portlets + foreach StaticNode $StaticNodes { + incr static_num + # start importing users + set pretty_name [$StaticNode selectNodes {string(pretty_name)}] + set body [$StaticNode selectNodes {string(body)}] + set format [$StaticNode selectNodes {string(format)}] + + set exists_static [db_string get_static "select 1 from static_portal_content where package_id = :community_id and pretty_name = :pretty_name" -default 0] + # comprobamos que no existe + if {$exists_static ne 1} { + db_transaction { + + set item_id [static_portal_content::new \ + -package_id $community_id \ + -content $body \ + -pretty_name "$pretty_name$sufix" \ + -format $format + ] + + set old_element_id [static_portal_content::add_to_portal \ + -portal_id $portal_id \ + -package_id $community_id \ + -content_id $item_id] + incr static_added + } on_error { + incr static_bad + } + + } + } + + ################# + # NEWS # + ################# + set news_num 0 + set news_added 0 + set news_bad 0 + + set NewsNodes [$ClubNodes selectNodes new] + + + set pid [datamanager::get_new_package_id -community_id $community_id] + set live_revision_p "t" + # HAY QUE TITARLO TRAS LAS PRUEBAS + append publish_title $sufix + + # recorremos los static portlets + foreach NewsNode $NewsNodes { + incr news_num + # start importing users + set publish_title [$NewsNode selectNodes {string(publish_title)}] + set publish_body [$NewsNode selectNodes {string(publish_body)}] + set publish_date [$NewsNode selectNodes {string(publish_date)}] + set mime_type [$NewsNode selectNodes {string(mime_type)}] + set archive_date_ansi [$NewsNode selectNodes {string(archive_date_ansi)}] + set approval_user [$NewsNode selectNodes {string(approval_user)}] + set approval_date [$NewsNode selectNodes {string(approval_date)}] + set approval_ip [$NewsNode selectNodes {string(approval_ip)}] + set creation_ip [$NewsNode selectNodes {string(creation_ip)}] + set creation_user [$NewsNode selectNodes {string(creation_user)}] + + + + #USER DE DOT: necesito el id numerico del usuario. Roles en DOTLRN: student, professor, external, admin + set approval_user_id [db_string user_id "select user_id from users where username = :approval_user" -default "-300"] + set creation_user_id [db_string user_id "select user_id from users where username = :creation_user" -default "-301"] + + #create the new + set news_id [news_create_new -publish_body $publish_body \ + -publish_title $publish_title \ + -publish_date_ansi $publish_date \ + -mime_type $mime_type \ + -package_id $pid \ + -archive_date_ansi $archive_date_ansi \ + -approval_user $approval_user_id \ + -approval_date $approval_date \ + -approval_ip $approval_ip \ + -creation_ip $creation_ip \ + -user_id $creation_user_id \ + -live_revision_p $live_revision_p ] + + + } + + if {$news_id > 0} { + incr news_added + } else { + incr news_bad + } + + ################# + # FAQS # + ################# + + set faqNodes [$ClubNodes selectNodes faq] + set countfaqs [llength $faqNodes] + + foreach faqNode $faqNodes { + set faq_name "[$faqNode selectNodes {string(name)}]$sufix" + set faq_separate_p [$faqNode selectNodes {string(separate_p)}] + set faq_username [$faqNode selectNodes {string(creation_user)}] + set faq_creation_ip [$faqNode selectNodes {string(creation_ip)}] + set faq_disabled_p [$faqNode selectNodes {string(disabled_p)}] + set faq_context_id [$faqNode selectNodes {string(context_id)}] + + # obtenemos el user_id del creation_user + set faq_creation_user [db_string get_user_id "select user_id from users where username = :faq_username"] + # Obtenemos el context_id seg�n la conexi�n. + # Para el caso de una comunidad habr� que psarle el community_id + set faq_context_id [datamanager::get_faq_package_id -community_id $community_id] + if {$faq_context_id > 0} { + set new_faq_id [db_exec_plsql create_faq { + select faq__new_faq ( + null, + :faq_name, + :faq_separate_p, + 'faq', + now(), + :faq_creation_user, + :faq_creation_ip, + :faq_context_id + ); + }] + set faq_q_aNodes [$faqNode selectNodes faq_q_a] + foreach faq_q_aNode $faq_q_aNodes { + set question [$faq_q_aNode selectNodes {string(question)}] + set answer [$faq_q_aNode selectNodes {string(answer)}] + set entry_id [db_nextval acs_object_id_seq] + set sort_key $entry_id + set q_and_a_id [db_exec_plsql create_q_and_a { + select faq__new_q_and_a ( + :entry_id, + :new_faq_id, + :question, + :answer, + :sort_key, + 'faq_q_and_a', + now(), + :faq_creation_user, + :faq_creation_ip, + :new_faq_id + ); + }] + } + } + } + # fi FAQ_IMPORT + + ################# + # FORUMS # + ################# +set forums_added 0 +set forums_bad 0 +set forumNodes [$ClubNodes selectNodes forum] +set countforums [llength $forumNodes] +set forums_num $countforums +set fpackage_id [datamanager::get_forum_package_id -community_id $community_id] + +if {$fpackage_id > 0} { + +foreach forumNode $forumNodes { + set forum_name "[$forumNode selectNodes {string(name)}]$sufix" + set forum_charter [$forumNode selectNodes {string(charter)}] + set forum_presentation_type [$forumNode selectNodes {string(presentation_type)}] + set forum_posting_policy [$forumNode selectNodes {string(posting_policy)}] + + # modified to not creating lost of testing forums + set forum_exist [db_string get_forum_num "select max(forum_id) from forums_forums where name=:forum_name and package_id=:fpackage_id" -default 0] + + if {$forum_exist > 0} { + set forum_id $forum_exist + incr forums_bad + } else { + #NEW FORUM + set forum_id [forum::new \ + -name $forum_name \ + -charter $forum_charter \ + -presentation_type $forum_presentation_type \ + -posting_policy $forum_posting_policy \ + -package_id $fpackage_id ] + } + + set forum_msgs [$forumNode selectNodes forum_msg] + set num_f [llength $forum_msgs] + set l_msg [list] + foreach forum_msg $forum_msgs { + + set message_id [$forum_msg selectNodes {string(message_id)}] + set parent_id [$forum_msg selectNodes {string(parent_id)}] + set subject "[$forum_msg selectNodes {string(subject)}]" + set content "[$forum_msg selectNodes {string(content)}]" + set username [$forum_msg selectNodes {string(username)}] + set user_id [datamanager::get_username_id -username $username] + set posting_date [$forum_msg selectNodes {string(posting_date)}] + set last_child_post [$forum_msg selectNodes {string(last_child_post)}] + set format "[$forum_msg selectNodes {string(format)}]" + set l_item [list] + lappend l_item $message_id $parent_id $forum_id + lappend l_item $subject $content $user_id + lappend l_item $posting_date $last_child_post $format + lappend l_msg $l_item + + } + + ############################ + # UPDATE PROCESS --> message_id and parent_id + set l_msg2 $l_msg + set c 0 + foreach msg $l_msg2 { + set index [lindex $msg 0] + set parent [lindex $msg 1] + set new_idx [forum::message::new \ + -forum_id [lindex [lindex $l_msg2 $c] 2] \ + -parent_id [lindex [lindex $l_msg2 $c] 1] \ + -subject [lindex [lindex $l_msg2 $c] 3] \ + -content [lindex [lindex $l_msg2 $c] 4] \ + -format [lindex [lindex $l_msg2 $c] 8] \ + -user_id [lindex [lindex $l_msg2 $c] 5]] + + # Update posting data and last_child_post + set p_date [lindex [lindex $l_msg2 $c] 6] + set lc_post [lindex [lindex $l_msg2 $c] 7] + db_dml update_pdates "update forums_messages set posting_date = :p_date , last_child_post = :lc_post where message_id = :new_idx" + + set cont 0 + foreach orig $l_msg { + if {[lindex $orig 1] == $index} { + set aux [lreplace $orig 1 1 $new_idx] + set l_msg2 [lreplace $l_msg2 $cont $cont $aux] + + } + incr cont +1 + } + set kk [lindex $l_msg2 $c] + set kk [lreplace $kk 0 0 $new_idx] + set l_msg2 [lreplace $l_msg2 $c $c $kk] + + incr c +1 + + } + + # fi ELSE control forum existe + } + } + # fi FORUM + + + ################ + # INFO # + ################ + set l_comm [list] + set l_users [list] + set l_static [list] + set l_news [list] + set l_faqs [list] + set l_forums [list] + + lappend l_comm "COMUNITY" $community_id $pretty_name + lappend l_users "USERS" $num $users_added $users_exist $users_bad $l_baduser + lappend l_static "STATIC" $static_num $static_added $static_bad + lappend l_news "NEWS" $news_num $news_added $news_bad + lappend l_faqs "FAQS" $countfaqs + lappend l_forums "FORUMS" $forums_num $forums_added $forums_bad + + lappend l_results $l_comm $l_users $l_static $l_news $l_faqs $l_forums + + +# fin community +} + +lappend web_results [format "$l_results"] Index: openacs-4/packages/datamanager/www/admin/import-users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/import-users.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/import-users.adp 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,18 @@ + + +#datamanager.import_selected_users# + +

#datamanager.results#

+ +
+<% +foreach linea $results { + adp_puts "$linea
" +} +%> + +
+
#datamanager.return_to_index#
+ + + Index: openacs-4/packages/datamanager/www/admin/import-users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/import-users.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/import-users.tcl 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,216 @@ +ad_page_contract { +} { + upload_file:notnull + upload_file.tmpfile:tmpfile + {sufix:optional ""} +} -validate { +} + +set this_comm_id [dotlrn_community::get_community_id] +set portal_id [dotlrn_community::get_portal_id -community_id $this_comm_id] +set package_id $this_comm_id + +set xml_filename ${upload_file.tmpfile} +set fd [open $xml_filename r] ; set xml [read $fd] ; close $fd +#set doc [dom parse $xml] +dom parse [::tDOM::xmlReadFile $xml_filename] doc +set root [$doc documentElement] + +# check variables +set conttotal 0 +set contbien 0 +set contmal 0 + +if {[info exist sufix] eq 0} { + set sufix "" +} + +set l_time [ns_localtime] +set l_time2 [list [lindex $l_time 2] [lindex $l_time 1] [lindex $l_time 0]] +set time [join $l_time2 ":"] +ns_log Notice "START TIME: $time" + +################################# +# USERS # +################################# +set userNodes [$root selectNodes /items/user] +set countusers [llength $userNodes] +ns_log Notice "Num USERS: $countusers -- $userNodes" +# Iteremos... +set aux 0 +foreach userNode $userNodes { + set aux [expr $aux + 1] + + set username "[$userNode selectNodes {string(username)}]$sufix" + set email "[$userNode selectNodes {string(email)}]$sufix" + set first_names [$userNode selectNodes {string(first_names)}] + set last_name [$userNode selectNodes {string(last_name)}] + set password [$userNode selectNodes {string(password)}] + set salt [$userNode selectNodes {string(salt)}] + set screen_name "[$userNode selectNodes {string(screen_name)}]$sufix" + set url [$userNode selectNodes {string(url)}] + set auth [$userNode selectNodes {string(auth)}] + set tipouser [$userNode selectNodes {string(usr_type)}] + set bio [$userNode selectNodes {string(bio)}] + set photo [$userNode selectNodes {string(photo)}] + set mime_type [$userNode selectNodes {string(mime_type)}] + # Otras cosas que hacen falta + #0 NO limitado, 1 SI limitado + set limitado 0 + set email_verified_p 0 + set read_private_data_p read_private_data + + #BUSCO LA AUTORIDAD LDAP + if {[catch {db_1row lautoridad "select authority_id from auth_authorities where short_name = :auth"} results]} { + } else { + } + + # OPENACS USER + set user_info(username) $username + set user_info(email) $email + set user_info(last_name) $last_name + set user_info(first_names) $first_names + set user_info(authority_id) $authority_id + set user_info(screen_name) $screen_name + set user_info(url) $url + + # Check if the user already exists + set user_id [db_string user_id "select user_id from users where username = :username and authority_id = :authority_id" -default "-300"] + if {$user_id != -300} { + #YA EXISTE EL USUARIO + ns_log Notice [format "The user already exists: %s (user_id=%d)" $username $user_id] + set contmal [expr $contmal + 1] + } else { + array set xresult [auth::create_local_account -authority_id $authority_id -username $username -array user_info] + switch $xresult(creation_status) { + ok { + #USER DE DOT: necesito el id numerico del usuario. Roles en DOTLRN: student, professor, external, admin + set user_id [db_string user_id "select user_id from users where username = :username and authority_id = :authority_id" -default "-300"] + #AJUSTO LA PW + # + if {$auth ne "ldap"} { + db_dml update_pass "update users set password = :password, salt = :salt where user_id = :user_id" + } else { + if {[string equal $password ""] != 1} { + ad_change_password $user_id $password + } + } + + + + acs_privacy::set_user_read_private_data -user_id $user_id -object_id [dotlrn::get_package_id] -value $read_private_data_p + if {$tipouser eq "student"} { + if {$limitado == 0} { + set result [dotlrn::user_add -type student -can_browse -user_id $user_id] + } else { + set result [dotlrn::user_add -type student -user_id $user_id] + } + } elseif {$tipouser eq "professor"} { + if {$limitado == 0} { + set result [dotlrn::user_add -type professor -can_browse -user_id $user_id] + } else { + set result [dotlrn::user_add -type professor -user_id $user_id] + } + } elseif {$tipouser eq "admin"} { + if {$limitado == 0} { + set result [dotlrn::user_add -type admin -can_browse -user_id $user_id] + } else { + set result [dotlrn::user_add -type admin -user_id $user_id] + } + } elseif {$tipouser eq "external"} { + if {$limitado == 0} { + set result [dotlrn::user_add -type external -can_browse -user_id $user_id] + } else { + set result [dotlrn::user_add -type external -user_id $user_id] + } + } + + set guest_p "f" + dotlrn_privacy::set_user_guest_p -user_id $user_id -value $guest_p + ns_log Notice [format "OK dotlrn::user_add: %d, '%s' '%s' '%s' '%s' '%s'" $conttotal $username $email $last_name $first_names $limitado] + + # SUBIR LA FOTO + if {[string length $photo] ne 0} { + set photo_decoded [base64::decode $photo] + set tmp_photo "/tmp/dm_$username" + set fd2 [open $tmp_photo w] ; fconfigure $fd2 -encoding binary -translation lf; puts -nonewline $fd2 $photo_decoded; close $fd2 + + + ###############################################################3333 + + set n_bytes [file size $tmp_photo] + + if { ![db_0or1row get_item_id "select object_id_two as item_id from acs_rels where object_id_one = :user_id and rel_type = 'user_portrait_rel'"]} { + # The user doesn't have a portrait relation yet + db_transaction { + set var_list [list \ + [list content_type image] \ + [list name portrait-of-user-$user_id]] + set item_id [package_instantiate_object -var_list $var_list content_item] + + # DRB: this is done via manual SQL because acs rel types are a bit messed + # up on the PostgreSQL side, which should be fixed someday. + db_exec_plsql create_rel { + select acs_rel__new ( + null, + 'user_portrait_rel', + :user_id, + :item_id, + null, + null, + null + ) + } + } + } + set revision_id [cr_import_content \ + -image_only \ + -item_id $item_id \ + -storage_type lob \ + -creation_user [ad_conn user_id] \ + -creation_ip [ad_conn peeraddr] \ + [ad_conn package_id] \ + $tmp_photo \ + $n_bytes \ + $mime_type \ + portrait-of-user-$user_id] + + cr_set_imported_content_live $mime_type $revision_id + + ############################################# + file delete $tmp_photo + } + + if {[string length $bio] > 0} { + set exist_bio [db_string get_bio "select attr_value as bio from acs_attribute_values where object_id = :user_id and attribute_id = (select attribute_id from acs_attributes where object_type = 'person'and attribute_name = 'bio') " -default 0] + if {!$exist_bio} { + db_dml insert_bio "insert into acs_attribute_values (object_id, attribute_id, attr_value) values (:user_id, (select attribute_id from acs_attributes where object_type = 'person' and attribute_name = 'bio'), :bio)" + } else { + db_dml update_bio "update acs_attribute_values set attr_value = :bio where object_id = :user_id and attribute_id = (select attribute_id from acs_attributes where object_type = 'person'and attribute_name = 'bio')" + } + } + + set contbien [expr $contbien + 1] + } + default { + ns_log Notice [format "ERROR dotlrn::user_add: %d, %s, %s, %s, %s. %s" $conttotal $username $email $limitado $xresult(creation_status) $xresult(creation_message)] + set contmal [expr $contmal + 1] + foreach { elm_name elm_error } $xresult(element_messages) { + ns_log Notice $elm_name $elm_error + } + } + } + } + set conttotal [expr $conttotal + 1] + +} + #fin importaci�n usuarios + +lappend results [format " Total users =%s" $conttotal] +lappend results [format " Total users imported =%s" $contbien] +lappend results [format " Total users NOT imported =%s" $contmal] + +set l_time [ns_localtime] +set l_time2 [list [lindex $l_time 2] [lindex $l_time 1] [lindex $l_time 0]] +set time [join $l_time2 ":"] +ns_log Notice "END TIME: $time" Index: openacs-4/packages/datamanager/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/index.adp 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,58 @@ + + +#datamanager.pretty_name# +@context;noquote@ + +
+

#datamanager.site_admin#

+
+ + +

#datamanager.content_admin#

+ +
 
+ + +

#datamanager.users_administration#

+
+

#datamanager.users_administration_info#

+ +
 
+
+
 
+ +

#datamanager.communities_administration#

+
+

#datamanager.communities_administration_info#

+ +
 
+
+
 
+ + + +

#datamanager.site_admin_content_import#

+
+

#datamanager.site_admin_content_import_info# +

+
 
+
+
 
+ +
Index: openacs-4/packages/datamanager/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/index.tcl 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,22 @@ +ad_page_contract { +} -query { +} -properties { +} +set context [list] +set community_id [dotlrn_community::get_community_id] + +#dotlrn::require_user_admin_community -community_id $community_id + +#only dotlrn administrator must be allowed to enter this page +dotlrn::require_admin + + +# prevent this page from being called when not in a community +# (i.e. the main dotlrn instance) +if {[empty_string_p $community_id]} { + ad_returnredirect "[dotlrn::get_url]" +} + +set supported_types_list {Assessments Faqs Forums Folders News Static-Portlet} +set next_url "../manage-object" + Index: openacs-4/packages/datamanager/www/admin/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/index.xql 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,6 @@ + + + +postgresql7.1 + + Index: openacs-4/packages/datamanager/www/admin/select_users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/select_users.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/select_users.adp 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,31 @@ + + +
+

#datamanager.users_selection_to_export#

+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+
#datamanager.return_to_index#
Index: openacs-4/packages/datamanager/www/admin/select_users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/select_users.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/select_users.tcl 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,30 @@ +ad_page_contract { +} -query { + {mode:optional ""} + {all_users:optional} + {several_users:optional} + {one_user:optional} + {object_id:multiple optional} + +} -properties { +} + + +if {$mode eq "one_user"} { + set ctrl [db_0or1row get_one_user "select user_id from users where username ='$one_user' "] + set object_id $user_id + ad_returnredirect "one-object-export?object_id=$object_id" + +} elseif {$mode eq "several_users"} { + set object_id [db_list get_user_list "select user_id from users where username like '$several_users%'"] + set num [llength $object_id] + ad_returnredirect "one-object-export?object_id=$object_id" + +} elseif {$mode eq "all_users"} { + set object_id [db_list get_all_user_list "select user_id from users"] + ad_returnredirect "one-object-export?object_id=$object_id" +} else { +set mode "view" +} + + Index: openacs-4/packages/datamanager/www/admin/select_users.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/www/admin/select_users.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/datamanager/www/admin/select_users.xql 22 Jun 2006 14:41:18 -0000 1.1 @@ -0,0 +1,6 @@ + + + +postgresql7.1 + + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/datamanager/www/doc/index.html'. Fisheye: No comparison available. Pass `N' to diff?