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.1 -r1.2 --- openacs-4/packages/imsld/lib/monitor/activity.adp 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/monitor/activity.adp 20 Feb 2009 12:34:11 -0000 1.2 @@ -39,7 +39,7 @@ type="@referenced_activities.activity_type@" activity_id="@referenced_activities.r_activity_id@" imsld_id="@imsld_id@" play_id="@play_id@" act_id="@act_id@" - structure_item_id="@structure_item_id@" + structure_item_id="@activity_item_id@" sort_order="@referenced_activities.sort_order@" siblings_number="@referenced_activities:rowcount@" /> Index: openacs-4/packages/imsld/lib/monitor/activity.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/monitor/activity.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/lib/monitor/activity.tcl 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/monitor/activity.tcl 20 Feb 2009 12:34:12 -0000 1.2 @@ -22,62 +22,17 @@ db_1row get_learning_activity_info { *SQL* } - set user_choice_p [db_string user_choice_p { - select user_choice_p - from imsld_complete_actsi - where item_id = :complete_act_id - and content_revision__is_live(complete_act_id) = 't' - } -default "f"] - - set href [export_vars -base "activity-frame" -url {activity_id run_id type}] + set href [export_vars -base "activity-frame" -url {activity_item_id run_id type}] set div $href } support { # add the support activity to the tree db_1row get_support_activity_info { *SQL* } - set started_activity_p [db_0or1row already_started { - select 1 from imsld_status_user - where related_id = :activity_id - and user_id = :user_id - and run_id = :run_id - and status = 'started' - }] - set completed_activity_p [db_0or1row already_completed { - select 1 from imsld_status_user - where related_id = :activity_id - and user_id = :user_id - and run_id = :run_id - and status = 'finished' - }] - - set user_choice_p [db_string user_choice_p {select user_choice_p from imsld_complete_actsi where item_id = :complete_act_id and content_revision__is_live(complete_act_id) = 't'} -default "f"] - - if { $completed_activity_p - || ($structure_type eq "selection") - || (!$completion_restriction) - || ([lsearch -exact $next_activity_id_list $activity_id] != -1) - || ([string eq $complete_act_id ""] && [string eq $is_visible_p "t"] - && [lsearch -exact $active_acts_list $act_item_id] != -1) } { - - set activity_node [$dom_doc createElement li] - $activity_node setAttribute class "liOpen" - if { !$started_activity_p && [string eq $is_visible_p "t"] } { - # bold letters - set href [imsld::activity_url -activity_id $activity_id -run_id $run_id -user_id $user_id] - set div [imsld::activity_url -div -activity_id $activity_id -run_id $run_id -user_id $user_id] - - set class "liOpen has_focus" - } else { - set href [imsld::activity_url -activity_id $activity_id -run_id $run_id -user_id $user_id] - set div [imsld::activity_url -div -activity_id $activity_id -run_id $run_id -user_id $user_id] - - set class "liOpen" - } - - set finish_href "finish-component-element-${imsld_id}-${run_id}-${play_id}-${act_id}-${role_part_id}-${activity_id}-support.imsld" - - } + + set href [export_vars -base "activity-frame" -url {activity_item_id run_id type}] + set div $href + } structure { # this is a special case since there are some conditions to check @@ -92,7 +47,7 @@ # in the "structure_next_activity" function. which is the case when structure-type is "sequence") db_1row get_activity_structure_info { *SQL* } - set href [export_vars -base "activity-frame" -url {activity_id run_id type}] + set href [export_vars -base "activity-frame" -url {activity_item_id run_id type}] set div $href db_multirow -extend {r_activity_id} referenced_activities struct_referenced_activities { *SQL* } { Index: openacs-4/packages/imsld/lib/monitor/activity.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/monitor/activity.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/lib/monitor/activity.xql 18 Feb 2009 19:01:13 -0000 1.1 +++ openacs-4/packages/imsld/lib/monitor/activity.xql 20 Feb 2009 12:34:12 -0000 1.2 @@ -30,12 +30,8 @@ sa.activity_id, attr.is_visible_p, sa.complete_act_id - from imsld_support_activitiesi sa, imsld_attribute_instances attr + from imsld_support_activitiesi sa where sa.activity_id = :activity_id - and attr.owner_id = sa.activity_id - and attr.run_id = :run_id - and attr.user_id = :user_id - and attr.type = 'isvisible' @@ -44,7 +40,7 @@ select title as activity_title, - item_id as structure_item_id, + item_id as activity_item_id, structure_id, structure_type from imsld_activity_structuresi Index: openacs-4/packages/imsld/sql/postgresql/imsld-level-a-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/sql/postgresql/imsld-level-a-create.sql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/imsld/sql/postgresql/imsld-level-a-create.sql 4 Jul 2008 15:31:27 -0000 1.10 +++ openacs-4/packages/imsld/sql/postgresql/imsld-level-a-create.sql 20 Feb 2009 12:34:12 -0000 1.11 @@ -69,7 +69,9 @@ references cr_items, --imsld_learning_objectives prerequisite_id integer constraint imsld_prereq_id_fk - references cr_items --imsld_prerequisites + references cr_items, --imsld_prerequisites + resource_handler varchar(100) + not null ); create index imsld_imsld_orgid_idx on imsld_imslds(organization_id); @@ -88,6 +90,9 @@ comment on column imsld_imslds.sequence_used_p is ' If the value is true, IMS Simple Sequencing is included at the appropriate places in the document instance, default is false.'; +comment on column imsld_imslds.resource_handler is ' +Indicates which package is used to handle the resource objects for the UoL (file-storage or xowiki).'; + create table imsld_learning_objectives ( learning_objective_id integer constraint imsld_leo_fk @@ -736,6 +741,17 @@ comment on table imsld_as_as_rels is ' This table stores the information of the relationship between the activity structures (between them).'; +create table imsld_res_xowiki_rels ( + rel_id integer + constraint imsld_res_xowiki_rels_fk + references acs_rels + constraint imsld_res_xowiki_rels_pk + primary key +); + +comment on table imsld_res_xowiki_rels is ' +This table stores the relationships between resources and xowiki Pages.'; + create table imsld_res_files_rels ( rel_id integer constraint imsld_res_files_rels_fk Index: openacs-4/packages/imsld/www/admin/monitor/activity-frame.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/monitor/activity-frame.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/imsld/www/admin/monitor/activity-frame.tcl 5 Feb 2009 17:36:54 -0000 1.8 +++ openacs-4/packages/imsld/www/admin/monitor/activity-frame.tcl 20 Feb 2009 12:34:12 -0000 1.9 @@ -8,7 +8,7 @@ @creation-date Nov 2006 } -query { run_id:integer,notnull - {activity_id:integer ""} + {activity_item_id:integer ""} {learning_object_id:integer ""} {service_id:integer ""} type:notnull @@ -23,7 +23,7 @@ {option ""} } -validate { non_empty_id { - if { [string eq "" $activity_id] && [string eq "" $learning_object_id] && [string eq "" $service_id] } { + if { [string eq "" $activity_item_id] && [string eq "" $learning_object_id] && [string eq "" $service_id] } { ad_complain "[_ imsld.lt_You_must_provide_an_a]" } } @@ -32,6 +32,11 @@ set page_title "[_ imsld.lt_Monitoring_One_Activi]" set context [list] +set activity_id "" +if { $activity_item_id ne "" } { + set activity_id [content::item::get_live_revision -item_id $activity_item_id] +} + set elements [list portrait \ [list label "" \ display_template {