Index: openacs-4/packages/imsld/lib/activity-resource.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/activity-resource.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/lib/activity-resource.adp 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/activity-resource.adp 5 Mar 2009 16:22:59 -0000 1.2 @@ -32,7 +32,6 @@ - Index: openacs-4/packages/imsld/lib/activity-resource.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/activity-resource.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/lib/activity-resource.tcl 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/activity-resource.tcl 5 Mar 2009 16:22:59 -0000 1.2 @@ -2,6 +2,10 @@ set user_id [ad_conn user_id] } +if {![info exists monitor_p]} { + set monitor_p 0 +} + if {![info exists community_id]} { set community_id [dotlrn_community::get_community_id] } Index: openacs-4/packages/imsld/lib/activity-resources-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/activity-resources-list.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/lib/activity-resources-list.tcl 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/activity-resources-list.tcl 5 Mar 2009 16:22:59 -0000 1.2 @@ -1,6 +1,9 @@ set dom_doc [dom createDocument root] -set monitor_p 0 +if { ![info exists monitor_p] } { + set monitor_p 0 +} + set linear_item_list [db_list item_linear_list { *SQL* }] set has_items 0 Index: openacs-4/packages/imsld/lib/activity-resources-list.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/activity-resources-list.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/imsld/lib/activity-resources-list.xql 27 Feb 2009 11:20:01 -0000 1.2 +++ openacs-4/packages/imsld/lib/activity-resources-list.xql 5 Mar 2009 16:22:59 -0000 1.3 @@ -16,6 +16,7 @@ cr_items cr1, cr_items cr2, acs_rels ar where la.item_id = :activity_item_id + and content_revision__is_live(la.activity_id) and la.activity_description_id = cr1.item_id and cr1.live_revision = lad.description_id and ar.object_id_one = la.activity_description_id Index: openacs-4/packages/imsld/lib/activity.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/activity.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/lib/activity.xql 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/activity.xql 5 Mar 2009 16:22:59 -0000 1.2 @@ -87,6 +87,7 @@ select ar.object_id_two, ar.rel_type, ar.rel_id, + ir.sort_order, case ar.rel_type when 'imsld_as_la_rel' then 'learning' @@ -96,11 +97,14 @@ then 'structure' else 'none' end as activity_type - from acs_rels ar, imsld_activity_structuresi ias + from acs_rels ar, imsld_activity_structuresi ias, + (select * from imsld_as_la_rels union select * from imsld_as_sa_rels union + select * from imsld_as_as_rels) as ir where ar.object_id_one = ias.item_id + and ar.rel_id = ir.rel_id and ias.structure_id = :activity_id and content_item__get_live_revision(ar.object_id_two) is not null - order by ar.object_id_two + order by ir.sort_order, ar.object_id_two Index: openacs-4/packages/imsld/lib/monitor/activity-tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/monitor/activity-tree.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/lib/monitor/activity-tree.tcl 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/monitor/activity-tree.tcl 5 Mar 2009 16:22:59 -0000 1.2 @@ -19,8 +19,7 @@ set activity_id [lindex $role_part_list 1] set role_part_id [lindex $role_part_list 2] set act_id [lindex $role_part_list 3] - set act_item_id [lindex $role_part_list 4] - set play_id [lindex $role_part_list 5] + set play_id [lindex $role_part_list 4] multirow append activities $activity_id $type $play_id $act_id $role_part_id } Index: openacs-4/packages/imsld/lib/monitor/activity.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/monitor/activity.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/imsld/lib/monitor/activity.adp 20 Feb 2009 12:34:11 -0000 1.2 +++ openacs-4/packages/imsld/lib/monitor/activity.adp 5 Mar 2009 16:22:59 -0000 1.3 @@ -20,7 +20,7 @@ run_id="@run_id@" sort_order="@sort_order@" title="@activity_title@" number_elements="@siblings_number@" /> + run_id="@run_id@" user_id="@user_id@" monitor_p="1" />