Index: openacs-4/packages/dotlrn-ecommerce/www/admin/setup.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/Attic/setup.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-ecommerce/www/admin/setup.tcl 22 Jun 2005 05:40:33 -0000 1.1 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/setup.tcl 23 Jun 2005 08:21:45 -0000 1.2 @@ -7,7 +7,12 @@ # set the default template parameter::set_value -parameter "DefaultMaster" -value "/www/mos-master" -package_id [subsite::main_site_id] -# create instructor and assitant community +# enable member pricing +parameter::set_value -package_id $package_id -parameter "MemberPriceP" -value "1" + +# *** COMMUNITIES **** + +# create instructor and assistant community # and set the parameters set community_id [dotlrn_community::new \ @@ -24,14 +29,37 @@ -pretty_name "Assistants Community"] parameter::set_value -package_id $package_id -parameter "AssistantCommunityId" -value $community_id -# create category and set parameter +# *** CATEGORIES **** + +# create categories, set parameters and populate + set tree_id [category_tree::add -name "Grade"] category_tree::map -tree_id $tree_id -object_id $package_id parameter::set_value -package_id $package_id -parameter "GradeCategoryTree" -value $tree_id -# populate categories with data +set grades_list { "K" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "Pre-K" "Adult"} +foreach grade $grades_list { + category::add -tree_id $tree_id -parent_id "" -name $grade +} -# populate courses +set tree_id [category_tree::add -name "Patron Relationships"] +category_tree::map -tree_id $tree_id -object_id $package_id +parameter::set_value -package_id $package_id -parameter "PatronRelationshipCategoryTree" -value $tree_id +set relationship_list { "Father" "Mother" "Son" "Daughter" "Brother" "Sister" "Aunt" "Uncle" "Grandmother" "Grandfather" "Other" } + +foreach relation $relationship_list { + category::add -tree_id $tree_id -parent_id "" -name $relation +} + +set tree_id [db_string "get_catalog_id" "select object_id from acs_objects where title = 'dotlrn-course-catalog'"] + +set course_type_list { "Family Course Today" "Technology" "Life Science" "Chemistry" "Exhibit Related" "Elder Hospital Program"} + +foreach relation $course_type_list { + category::add -tree_id $tree_id -parent_id "" -name $relation +} + + ad_returnredirect "/" \ No newline at end of file