Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql 21 Jul 2005 09:35:26 -0000 1.4 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-oracle.xql 22 Jul 2005 00:29:44 -0000 1.5 @@ -30,7 +30,8 @@ where ci.item_id = dec.course_id(+) and dec.product_id = v.product_id(+) and - dc.course_id = ci.live_revision + dc.course_id = ci.live_revision and + dc.display_p [template::list::filter_where_clauses -and -name course_list] Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql 21 Jul 2005 09:35:26 -0000 1.4 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk-postgresql.xql 22 Jul 2005 00:29:44 -0000 1.5 @@ -29,6 +29,7 @@ on (dec.product_id = v.product_id) where dc.course_id = ci.live_revision + and dc.display_p [template::list::filter_where_clauses -and -name course_list] order by lower(dc.course_name), lower(dec.section_name) Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 21 Jul 2005 22:09:39 -0000 1.25 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 22 Jul 2005 00:29:44 -0000 1.26 @@ -95,26 +95,30 @@ #set category_trees [category_tree::get_mapped_trees $cc_package_id] # Display only categories with associated courses/sections -set used_categories [db_list used_categories { - select distinct category_id - from ( +set show_used_categories_only_p [parameter::get -parameter ShowUsedCategoriesOnlyP] - select category_id - from categories c - where exists (select 1 - from category_object_map - where category_id in (select category_id - from categories - where left_ind > c.left_ind - and right_ind < c.right_ind)) - union +if { $show_used_categories_only_p } { + set used_categories [db_list used_categories { + select distinct category_id + from ( - select category_id - from category_object_map + select category_id + from categories c + where exists (select 1 + from category_object_map + where category_id in (select category_id + from categories + where left_ind > c.left_ind + and right_ind < c.right_ind)) + union - ) c -}] + select category_id + from category_object_map + ) c + }] +} + foreach tree_id $category_trees { set tree_id [lindex $tree_id 0] @@ -128,7 +132,7 @@ set $name [list] foreach element $tree_list { - if { [lsearch $used_categories [lindex $element 0]] != -1 } { + if { ! $show_used_categories_only_p || [lsearch $used_categories [lindex $element 0]] != -1 } { set ident [lindex $element 3] set spacer "" for { set i 1 } { $i < $ident } { incr i } { @@ -332,6 +336,7 @@ actions { label "" display_template { +
@@ -361,6 +366,7 @@ [_ dotlrn-ecommerce.lt_Continue_Registration]
+ } html { width 40% nowrap } } @@ -374,7 +380,7 @@ values { { { [_ dotlrn-ecommerce.info] [_ dotlrn-ecommerce.edit] [_ dotlrn-ecommerce.add_section]
@course_list.course_grades@ -

+

@course_list.course_info;noquote@

Index: openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl 16 Jul 2005 12:51:06 -0000 1.10 +++ openacs-4/packages/dotlrn-ecommerce/tcl/apm-callback-procs.tcl 22 Jul 2005 00:29:44 -0000 1.11 @@ -53,6 +53,16 @@ -pretty_name "Template Community" \ -sort_order $sort_order \ -column_spec integer + + incr sort_order + + content::type::attribute::new \ + -content_type "dotlrn_catalog" \ + -attribute_name "display_p" \ + -datatype "boolean" \ + -pretty_name "Flag to display or hide course" \ + -sort_order $sort_order \ + -column_spec "boolean default true" } ad_proc -private dotlrn-catalog::package_mount {