Index: openacs-4/packages/lors-central/www/one-course-associations.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lors-central/www/one-course-associations.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/lors-central/www/one-course-associations.tcl 17 May 2005 16:21:19 -0000 1.1 +++ openacs-4/packages/lors-central/www/one-course-associations.tcl 13 Jun 2005 15:10:42 -0000 1.1.2.1 @@ -11,8 +11,9 @@ } +set user_id [ad_conn user_id] +lors_central::check_permissions - # Get the item_id that the manifest_id has associated if { ![info exist item_id] } { set item_id [lors_central::get_item_id -revision_id $man_id] @@ -202,3 +203,78 @@ } +############################################ Communities ############################################### + + +template::list::create \ + -name dotlrn_communities \ + -multirow com_list \ + -key com_id \ + -has_checkboxes \ + -bulk_actions { #lors-central.update_versions# "change-one-version" #lors-central.update_course_ver# }\ + -bulk_action_method post \ + -bulk_action_export_vars { + item_id + } \ + -row_pretty_plural "[_ lors-central.dotlrn_classes]" \ + -elements { + community { + label "[_ lors-central.community_name]" + display_template { + @com_list.pretty_name@   + + [_ lors-central.views] + + } + } + current { + label "[_ lors-central.current]" + display_template { + @com_list.ver_num@ [_ lors-central.of] @com_list.ver_count@ + } + } + set_to { + label "[_ lors-central.set_to]" + display_template { + + + + } + } + tracking { + label "[_ lors-central.tracking]" + display_template { +
+ + + [_ lors-central.enabled] + + + [_ lors-central.disabled] + + +
+ } + } + } + +db_multirow -extend { ver_num ver_count manifest_id options tracking } com_list get_dotlrn_communities { } { + set manifest_id [lors_central::get_man_id -community_id $com_id -item_id $item_id] + set ver_count [lors_central::count_versions -man_id $manifest_id] + set ver_num [lors_central::get_version_num -revision_id $manifest_id] + set tracking [db_string get_tracking { }] + # Create the options for the select menu + set options "" + for { set i 1 } { $i < [expr $ver_count + 1] } { incr i } { + if { [string equal $i $ver_num] } { + append options "