Index: openacs-4/packages/imsld/lib/activity-tree.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/activity-tree.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/imsld/lib/activity-tree.tcl 19 Oct 2009 16:19:54 -0000 1.3 +++ openacs-4/packages/imsld/lib/activity-tree.tcl 29 Oct 2009 11:09:59 -0000 1.4 @@ -34,6 +34,14 @@ set act_item_id [lindex $role_part_list 4] set play_id [lindex $role_part_list 5] + set completed_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' + }] + if {$type ne {structure}} { set visible_p [db_string get_visible { select attr.is_visible_p @@ -44,7 +52,7 @@ and attr.type = 'isvisible' }] - if { $visible_p } { + if { $visible_p && ($completed_p || [lsearch -exact $next_activity_id_list $activity_id] != -1)} { multirow append activities $activity_id $type $play_id $act_id $role_part_id } Index: openacs-4/packages/imsld/lib/activity.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/activity.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/imsld/lib/activity.tcl 19 Oct 2009 16:19:54 -0000 1.6 +++ openacs-4/packages/imsld/lib/activity.tcl 29 Oct 2009 11:09:59 -0000 1.7 @@ -32,7 +32,7 @@ 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 @@ -143,6 +143,14 @@ set activity_id [content::item::get_live_revision -item_id $object_id_two] + 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' + }] + if { $activity_type ne "imsld_as_as_rel" } { set visible_p [db_string get_visible { select attr.is_visible_p @@ -156,7 +164,10 @@ set visible_p t } - if { $visible_p } { + if { $visible_p && (($structure_type eq "selection") + || ([lsearch -exact $next_activity_id_list $activity_id] != -1) + || $completed_activity_p) + || !$completion_restriction} { multirow append referenced_activities $object_id_two $rel_type $rel_id $sort_order $activity_type $activity_id } Index: openacs-4/packages/imsld/lib/imsld-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/lib/imsld-chunk.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/imsld/lib/imsld-chunk.tcl 16 Jul 2009 18:21:53 -0000 1.17 +++ openacs-4/packages/imsld/lib/imsld-chunk.tcl 29 Oct 2009 11:09:59 -0000 1.18 @@ -3,12 +3,12 @@ set user_id [ad_conn user_id] set elements [list imsld_title \ - [list label "[_ imsld.IMS_LD_Name]" \ + [list label "[_ imsld.Course]" \ orderby_asc {imsld_title asc} \ orderby_desc {imsld_title desc} \ display_template {@imsld_runs.imsld_title@}] \ user_roles \ - [list label "[_ imsld.Roles_in_Run]" \ + [list label "[_ imsld.Roles_in_Course]" \ display_template {@imsld_runs.user_roles;noquote@}] \ status \ [list label "[_ imsld.Status]" \ Index: openacs-4/packages/imsld/tcl/imsld-condition-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-condition-procs.tcl,v diff -u -r1.26 -r1.27 --- openacs-4/packages/imsld/tcl/imsld-condition-procs.tcl 17 Jun 2009 08:00:01 -0000 1.26 +++ openacs-4/packages/imsld/tcl/imsld-condition-procs.tcl 29 Oct 2009 11:09:59 -0000 1.27 @@ -646,12 +646,11 @@ set user_id [ad_conn user_id] } ns_log Notice "statement::execute with user_id: $user_id" - foreach executeNode $statement { switch -- [$executeNode localName] { {show} { foreach refNodes [$executeNode childNodes] { - switch -- [$refNodes localName] { + switch -- [$refNodes localName] { {class} { set class [$refNodes getAttribute class ""] set title [$refNodes getAttribute title ""] @@ -668,8 +667,8 @@ {environment-ref} { # the environments doesn't have any isvisible attribute, # so we have to 'show' all the referenced elements - imsld::runtime::environment::show_hide -run_id $run_id -identifier [$refNodes getAttribute "ref"] \ - -action "show" + imsld::runtime::environment::show_hide -run_id $run_id -identifier [$refNodes getAttribute "ref"] \ + -action "show" -user_id $user_id } {activity-structure-ref} { imsld::runtime::activity_structure::show_hide -run_id $run_id -identifier [$refNodes getAttribute "ref"] \ @@ -718,7 +717,7 @@ # the environments doesn't have any isvisible attribute, # so we have to 'hide' all the referenced elements imsld::runtime::environment::show_hide -run_id $run_id -identifier [$refNodes getAttribute "ref"] \ - -action "hide" + -action "hide" -user_id $user_id } {activity-structure-ref} { imsld::runtime::activity_structure::show_hide -run_id $run_id -identifier [$refNodes getAttribute "ref"] \ Index: openacs-4/packages/imsld/tcl/imsld-export-ld-components-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-export-ld-components-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/imsld/tcl/imsld-export-ld-components-procs.tcl 17 Jun 2009 08:00:01 -0000 1.2 +++ openacs-4/packages/imsld/tcl/imsld-export-ld-components-procs.tcl 29 Oct 2009 11:09:59 -0000 1.3 @@ -190,7 +190,7 @@ set imsld_datatype [$doc createElement "imsld:datatype"] $property appendChild $imsld_datatype #Add attribute datatype - $property setAttribute datatype $datatype + $imsld_datatype setAttribute datatype $datatype #If initial-value exists if {$initial_value != ""} { @@ -548,6 +548,17 @@ #Get on-completion data db_1row get_data {select feedback_title, change_property_value_xml from imsld_on_completion where on_completion_id = cr_items.latest_revision and cr_items.item_id = :on_completion_id} + #Write change-property-values + if {$change_property_value_xml != ""} { + #First, create the new document + set change_prop_val [dom parse $change_property_value_xml] + #Get root element of the document + set root [$change_prop_val documentElement] + #$on_completion appendChild [$root firstChild] + $on_completion appendChild $root + } + + if {$change_property_value_xml == ""} { if {$feedback_title != ""} { @@ -594,13 +605,13 @@ } #Write change-property-values - if {$change_property_value_xml != ""} { - #First, create the new document - set change_prop_val [dom parse $change_property_value_xml] - #Get root element of the document - set root [$change_prop_val documentElement] - $on_completion appendChild [$root firstChild] - } +# if {$change_property_value_xml != ""} { +# #First, create the new document +# set change_prop_val [dom parse $change_property_value_xml] +# #Get root element of the document +# set root [$change_prop_val documentElement] +# $on_completion appendChild [$root firstChild] +# } } #If there is a notification associated Index: openacs-4/packages/imsld/tcl/imsld-export-ld-method-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-export-ld-method-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/tcl/imsld-export-ld-method-procs.tcl 18 Feb 2009 11:10:46 -0000 1.1 +++ openacs-4/packages/imsld/tcl/imsld-export-ld-method-procs.tcl 29 Oct 2009 11:09:59 -0000 1.2 @@ -27,7 +27,11 @@ set condition [dom parse $condition_xml] #Get root element of the document set root [$condition documentElement] - $conditions appendChild [$root firstChild] + #Write if-then-else + set nodeList [$root childNodes] + foreach node $nodeList { + $conditions appendChild $node + } } } Index: openacs-4/packages/imsld/tcl/imsld-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-procs.tcl,v diff -u -r1.118 -r1.119 --- openacs-4/packages/imsld/tcl/imsld-procs.tcl 19 Oct 2009 16:19:54 -0000 1.118 +++ openacs-4/packages/imsld/tcl/imsld-procs.tcl 29 Oct 2009 11:09:59 -0000 1.119 @@ -2289,11 +2289,16 @@ [lindex $one_nested_environment_list 3]] regsub -all "{}" $nested_environment_list "" nested_environment_list } + + set childNodes [$environment_node childNodes] if { [string eq $resource_mode "t"] } { return [list $environment_title $environment_learning_objects_list $environment_services_list $nested_environment_list] } else { - $environment_node_li appendChild $environment_node - $dom_node appendChild $environment_node_li + if { ( [llength $childNodes] == 1 ) && ( [string eq [lindex [$childNodes nodeType] 0] "TEXT_NODE" ] ) && ( [string eq [[lindex $childNodes 0] nodeValue] ""]) } { + } else { + $environment_node_li appendChild $environment_node + $dom_node appendChild $environment_node_li + } } } @@ -2609,7 +2614,7 @@ set associated_files_query "associated_xo_files" } - foreach file_list [db_list_of_lists $associated_files_query { *SQL* }] { + foreach file_list [db_list_of_lists $associated_files_query { *SQL* }] { if { $resource_handler eq "xowiki" } { set page_id [lindex $file_list 0] set file_name [lindex $file_list 1] @@ -2624,6 +2629,7 @@ set fs_file_url [db_1row get_fs_file_url { *SQL* }] set file_url "[apm_package_url_from_id $fs_package_id]view/${file_url}" } + set a_node [$dom_doc createElement a] $a_node setAttribute href "[export_vars -base "[lindex [site_node::get_url_from_object_id -object_id $imsld_package_id] 0]imsld-finish-resource" {file_url $file_url resource_item_id $resource_item_id run_id $run_id}]" $a_node setAttribute target "_blank" @@ -2671,7 +2677,6 @@ set file_node [$dom_doc createElement li] $file_node appendChild $a_node $dom_node appendChild $file_node - $a_node appendChild [$dom_doc createTextNode "$url"] if { $monitor_p } { set choose_node [$dom_doc createElement a] $choose_node appendChild [$dom_doc createTextNode "Choose"] @@ -2716,7 +2721,7 @@ -dom_node $dom_node \ -dom_doc $dom_doc } elseif { [db_0or1row is_learning { - select 1 from imsld_learning_activitiesi where item_id = :activity_item_id + select 1 from imsld_learning_activitiesi where item_id = :activity_item_id and content_revision__is_live(activity_id) }] } { imsld::process_learning_activity_as_ul -activity_item_id $activity_item_id \ -run_id $run_id \ @@ -2770,7 +2775,7 @@ }] } { return "" } elseif { [db_0or1row is_learning { - select 1 from imsld_learning_activitiesi where item_id = :activity_item_id + select 1 from imsld_learning_activitiesi where item_id = :activity_item_id and content_revision__is_live(activity_id) }] } { set rel_type imsld_la_env_rel } elseif { [db_0or1row is_support { @@ -3093,9 +3098,13 @@ } { set user_id [expr { [string eq "" $user_id] ? [ad_conn user_id] : $user_id } ] # get the items associated with the activity - set info_tab_node [$dom_doc createElement li] + set info_tab_node [$dom_doc createElement div] + $info_tab_node setAttribute class "tabbertab" + set info_tab_title [$dom_doc createElement h2] + $info_tab_node appendChild $info_tab_title set text [$dom_doc createTextNode "[_ imsld.Information]"] - $info_tab_node appendChild $text + $info_tab_node setAttribute style "display: none; float:left; " + $info_tab_title appendChild $text set info_node [$dom_doc createElement ul] # FIX-ME: if the ul is empty, the browser show the ul incorrectly set text [$dom_doc createTextNode ""] @@ -3949,10 +3958,12 @@ foreach referenced_activity [db_list_of_lists struct_referenced_activities { select ar.object_id_two, ar.rel_type - from acs_rels ar, imsld_activity_structuresi ias + from acs_rels ar, imsld_activity_structuresi ias, cr_revisions r where ar.object_id_one = ias.item_id and ias.item_id = :structure_item_id and content_revision__is_live(ias.structure_id) = 't' + and ar.object_id_two = r.item_id + and content_revision__is_live(r.revision_id) = 't' order by ar.object_id_two }] { # get all the directly referenced activities (from the activity structure) @@ -4504,8 +4515,8 @@ } ad_proc -public imsld::get_imsld_from_activity { - -activity_id - -activity_type + -activity_id:required + -activity_type:required } { @return The imsld_id from which the activity is being used. } { Index: openacs-4/packages/imsld/tcl/imsld-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-procs.xql,v diff -u -r1.43 -r1.44 --- openacs-4/packages/imsld/tcl/imsld-procs.xql 18 Dec 2008 19:12:17 -0000 1.43 +++ openacs-4/packages/imsld/tcl/imsld-procs.xql 29 Oct 2009 11:09:59 -0000 1.44 @@ -1058,9 +1058,11 @@ select ar.object_id_two, ar.rel_type, ar.rel_id - from acs_rels ar, imsld_activity_structuresi ias + from acs_rels ar, imsld_activity_structuresi ias, cr_revisions r where ar.object_id_one = ias.item_id and ias.structure_id = :activity_structure_id + and r.item_id = ar.object_id_two + and content_revision__is_live(r.revision_id) = 't' order by ar.object_id_two Index: openacs-4/packages/imsld/tcl/imsld-runtime-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-runtime-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/imsld/tcl/imsld-runtime-procs.tcl 17 Apr 2008 17:18:16 -0000 1.18 +++ openacs-4/packages/imsld/tcl/imsld-runtime-procs.tcl 29 Oct 2009 11:09:59 -0000 1.19 @@ -504,7 +504,7 @@ db_foreach learning_object { select lo.learning_object_id, lo.identifier as lo_identifier - from imsld_learning_objects lo, imsld_environmentsi env + from imsld_learning_objects lo where lo.environment_id = :environment_item_id } { imsld::runtime::isvisible::show_hide -run_id $run_id -identifier $lo_identifier -action $action -user_id $user_id Index: openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl 1 Jul 2009 11:05:40 -0000 1.5 +++ openacs-4/packages/imsld/tcl/imsld-xowiki-procs.tcl 29 Oct 2009 11:09:59 -0000 1.6 @@ -156,17 +156,25 @@ # attribute) will be a file in XoWiki, while links (URLs # referenced by the ALT attribute. - # small hack to avoid tDOM to escape the LD tags :( - regsub { - - or - + - #imsld.or# - Index: openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl 19 Oct 2009 16:19:54 -0000 1.10 +++ openacs-4/packages/imsld/www/admin/imsld-admin-roles.tcl 29 Oct 2009 11:09:59 -0000 1.11 @@ -39,7 +39,7 @@ set lista [list] -lappend lista [list "Select a role..." 0] +lappend lista [list "[_ imsld.Select_a_role]..." 0] for {set order 0} {$order < [llength $roles_list] } {incr order} { set lista_item [list [lindex $roles_list_names $order] [lindex [lindex $roles_list $order] 0]] @@ -48,7 +48,7 @@ ad_form -name choose_role -action imsld-admin-roles -export {imsld_id run_id} -show_required_p {0} -form { {role:integer(select) - {label "Select a role"} + {label "[_ imsld.Select_a_role]"} {options "$lista"} {html {onChange confirmValue(this.form)}} } @@ -60,7 +60,7 @@ ad_form -name upload_role -action imsld-import-roles -export {imsld_id run_id} -show_required_p {0} -form { {role_url:text - {label "Import members from a URL"} + {label "[_ imsld.Import_members_from_a_URL]"} } } Index: openacs-4/packages/imsld/www/admin/imsld-groups.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-groups.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/imsld/www/admin/imsld-groups.tcl 17 Apr 2008 17:17:54 -0000 1.7 +++ openacs-4/packages/imsld/www/admin/imsld-groups.tcl 29 Oct 2009 11:09:59 -0000 1.8 @@ -16,7 +16,7 @@ lappend lista $lista_aux -set actions [list "[_ imsld.Create_new]" [export_vars -base imsld-create-instance {imsld_id run_id role lista}] "[_ imsld.Create_a_new_group]"] +set actions [list "[_ imsld.New_group]" [export_vars -base imsld-create-instance {imsld_id run_id role lista}] "[_ imsld.Create_a_new_group]"] template::list::create \ -name role_groups \ Index: openacs-4/packages/imsld/www/admin/imsld-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-new-2.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/imsld/www/admin/imsld-new-2.tcl 17 Jun 2009 08:00:01 -0000 1.12 +++ openacs-4/packages/imsld/www/admin/imsld-new-2.tcl 29 Oct 2009 11:09:59 -0000 1.13 @@ -18,8 +18,8 @@ set package_id [ad_conn package_id] permission::require_permission -object_id $package_id -privilege create -set page_title "[_ imsld.Creating_new_IMS-LD]" -set context [list [list "[_ imsld.New_IMS-LD]" "new-imsld"] [list "[_ imsld.lt_Creating_new_IMS-L]"]] +set page_title "[_ imsld.Processing_new_Packaged_Course]" +set context [list [list "[_ imsld.Creating_new_Packaged_Course]" "new-imsld"] [list "[_ imsld.Processing_new_Packaged_Course]"]] set user_id [ad_conn user_id] @@ -36,11 +36,11 @@ # Display progress bar ad_progress_bar_begin \ - -title "[_ imsld.Uploading_IMS_LD]" \ + -title "[_ imsld.Uploading_Packaged_Course]" \ -message_1 "[_ imsld.lt_Uploading_and_process]" \ -message_2 "[_ imsld.lt_We_will_continue_auto]" -ns_write "[_ imsld.lt_h2Uploading_new_IMS_L]" +ns_write "

[_ imsld.Uploading_new_Packaged_Course]

" set community_id [dotlrn_community::get_community_id] # Atempting to create the new IMS LD. Index: openacs-4/packages/imsld/www/admin/imsld-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-new.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/imsld/www/admin/imsld-new.tcl 19 Oct 2009 16:19:54 -0000 1.12 +++ openacs-4/packages/imsld/www/admin/imsld-new.tcl 29 Oct 2009 11:09:59 -0000 1.13 @@ -19,8 +19,8 @@ set package_id [ad_conn package_id] permission::require_permission -object_id $package_id -privilege create -set page_title "[_ imsld.Confirm_New_IMS-LD]" -set context [list "[_ imsld.Confirm_New_IMS-LD]"] +set page_title "[_ imsld.Creating_new_Packaged_Course]" +set context [list "[_ imsld.Creating_new_Packaged_Course]"] set user_id [ad_conn user_id] @@ -140,8 +140,9 @@ if {[lsearch $applets "dotlrn_xowiki"] > -1} { ad_form -extend -name imsld_upload -form { { resource_handler:integer(select) - {label "Resource manager:"} + {label "[_ imsld.Resource_manager]:"} {options {{XoWiki xowiki} {{File Storage} file-storage}}} + {help_text "[_ imsld.Select_the_application]"} } } } Index: openacs-4/packages/imsld/www/admin/imsld-role-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-role-members.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/imsld/www/admin/imsld-role-members.tcl 17 Apr 2008 17:17:54 -0000 1.11 +++ openacs-4/packages/imsld/www/admin/imsld-role-members.tcl 29 Oct 2009 11:09:59 -0000 1.12 @@ -73,8 +73,8 @@ set bulk_actions_not "{Create new instance} $create_instance_url {[_ imsld.lt_Create_a_new_instance]}" set bulk_action_export_vars "{imsld_id} {role} {run_id}" } else { - set bulk_actions "{<------} {imsld-role-remove-members} {[_ imsld.lt_Remove_selected_membe]}" - set bulk_actions_not "{------->} {imsld-role-add-members} {[_ imsld.lt_Add_selected_members_]}" + set bulk_actions "{[_ imsld.Remove_Members]} {imsld-role-remove-members} {[_ imsld.lt_Remove_selected_membe]}" + set bulk_actions_not "{[_ imsld.Add_Members]} {imsld-role-add-members} {[_ imsld.lt_Add_selected_members_]}" set bulk_action_export_vars "{group_instance} {role} {imsld_id} {run_id} {members_list}" } Index: openacs-4/packages/imsld/www/admin/imsld-view-roles.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/imsld-view-roles.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/imsld/www/admin/imsld-view-roles.tcl 19 Oct 2009 16:19:55 -0000 1.5 +++ openacs-4/packages/imsld/www/admin/imsld-view-roles.tcl 29 Oct 2009 11:09:59 -0000 1.6 @@ -28,7 +28,7 @@ set context [list $page_title] set lista [list] -lappend lista [list "[_ imsld.Select_a_role]" 0] +lappend lista [list "[_ imsld.Select_a_role]..." 0] for {set order 0} {$order < [llength $roles_list] } {incr order} { set lista_item [list [lindex $roles_list_names $order] [lindex [lindex $roles_list $order] 0]] @@ -37,7 +37,7 @@ ad_form -name choose_role -action imsld-view-roles -export {imsld_id run_id} -show_required_p {0} -form { {role:integer(select) - {label "[_ imsld.Select_a_role_1]"} + {label "[_ imsld.Select_a_role]"} {options "$lista"} {html {onChange confirmValue(this.form)}} } Index: openacs-4/packages/imsld/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/index.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/imsld/www/admin/index.adp 19 Oct 2009 16:19:55 -0000 1.6 +++ openacs-4/packages/imsld/www/admin/index.adp 29 Oct 2009 11:09:59 -0000 1.7 @@ -5,9 +5,9 @@
-

#imsld.IMS-LDs_1#

+

#imsld.Packaged_Courses#

-

#imsld.Runs#

+

#imsld.Courses#

Index: openacs-4/packages/imsld/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/index.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/imsld/www/admin/index.tcl 19 Oct 2009 16:19:55 -0000 1.22 +++ openacs-4/packages/imsld/www/admin/index.tcl 29 Oct 2009 11:10:00 -0000 1.23 @@ -43,7 +43,7 @@ # form to upload an IMS LD ZIP file ad_form -name upload_file_form -html {enctype multipart/form-data} -action imsld-new -form { - {upload_file:file {label "[_ imsld.lt_Import_IMS-LD_ZIP_Fil]"}} + {upload_file:file {label "[_ imsld.Import_Packaged_Course]"}} {return_url:text {widget hidden} {value $return_url}} {manifest_id:integer {widget hidden} {value $manifest_id}} } @@ -57,7 +57,7 @@ -orderby { default_value imsld_title } \ -elements { imsld_title { - label "[_ imsld.IMS_LD_Name]" + label "[_ imsld.Packaged_Course_Name]" orderby_asc {imsld_title asc} orderby_desc {imsld_title desc} } @@ -69,14 +69,17 @@ create_run { label {} display_template { - [_ imsld.create_new_run] + [_ imsld.Create_new_Course] } } export { label {} sub_class narrow display_template { - Export + + + Export + } } delete { @@ -110,7 +113,7 @@ -key run_id \ -elements { imsld_title { - label "[_ imsld.Run_IMS-LD_Name]" + label "[_ imsld.Course_Name]" orderby_asc {imsld_title asc} orderby_desc {imsld_title desc} link_url_eval {[export_vars -base "../imsld-divset" {run_id}]} 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.17 -r1.18 --- openacs-4/packages/imsld/www/admin/monitor/activity-frame.tcl 19 Oct 2009 16:19:55 -0000 1.17 +++ openacs-4/packages/imsld/www/admin/monitor/activity-frame.tcl 29 Oct 2009 11:10:00 -0000 1.18 @@ -736,13 +736,21 @@ relation_add -extra_vars $extra_vars imsld_res_files_rel $resource_item_id $resource_file_id relation_add imsld_item_res_rel $res_item_id $resource_item_id + + set complete_act_id [imsld::item_revision_new -attributes [list [list time_in_seconds 0] \ + [list time_string ""] \ + [list user_choice_p "t"] \ + [list when_prop_val_is_set_xml ""]] \ + -content_type imsld_complete_act \ + -parent_id $parent_id] # now the learning activity set identifier "$title-${activity_description_id}" set learning_activity_id [imsld::item_revision_new -attributes [list [list identifier $identifier] \ [list component_id $component_id] \ [list activity_description_id $activity_description_id] \ + [list complete_act_id $complete_act_id] \ [list is_visible_p $is_visible_p] \ ] \ -content_type imsld_learning_activity \ @@ -766,35 +774,34 @@ relation_add -extra_vars $extra_vars imsld_as_la_rel $activity_item_id $learning_activity_id -# set involved_roles \ -# [imsld::roles::get_list_of_roles \ -# -imsld_id [db_string get_imsld_from_run \ -# {select imsld_id from imsld_runs where run_id=:run_id}] ] + set involved_roles \ + [imsld::roles::get_list_of_roles \ + -imsld_id [db_string get_imsld_from_run \ + {select imsld_id from imsld_runs where run_id=:run_id}] ] -# set involved_users [list] -# foreach role $involved_roles { -# set involved_users [concat $involved_users \ -# [imsld::roles::get_users_in_role \ -# -role_id [lindex $role 0] -run_id $run_id]] -# } + set involved_users [list] + foreach role $involved_roles { + + set involved_users [concat $involved_users \ + [imsld::roles::get_users_in_role \ + -role_id [lindex $role 0] -run_id $run_id]] + } -# set involved_users [list] - -# foreach user_id [lsort -unique $involved_users] { + foreach user_id [lsort -unique $involved_users] { -# set instance_id \ -# [package_exec_plsql \ -# -var_list [list [list instance_id ""] \ -# [list owner_id [content::item::get_live_revision -item_id $learning_activity_id]] \ -# [list type "isvisible"] \ -# [list identifier $identifier] \ -# [list run_id $run_id] \ -# [list user_id $user_id] \ -# [list is_visible_p "t"] \ -# [list title ""] \ -# [list with_control_p ""]] \ -# imsld_attribute_instance new] -# } + set instance_id \ + [package_exec_plsql \ + -var_list [list [list instance_id ""] \ + [list owner_id [content::item::get_live_revision -item_id $learning_activity_id]] \ + [list type "isvisible"] \ + [list identifier $identifier] \ + [list run_id $run_id] \ + [list user_id $user_id] \ + [list is_visible_p "t"] \ + [list title ""] \ + [list with_control_p ""]] \ + imsld_attribute_instance new] + } ad_returnredirect [export_vars -base "monitor-tree" {run_id}] Index: openacs-4/packages/imsld/www/admin/monitor/environment-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/monitor/environment-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/imsld/www/admin/monitor/environment-edit.tcl 15 Sep 2008 13:24:10 -0000 1.1 +++ openacs-4/packages/imsld/www/admin/monitor/environment-edit.tcl 29 Oct 2009 11:10:00 -0000 1.2 @@ -24,25 +24,25 @@ if { $url ne "" } { set e_item_id [content::revision::item_id -revision_id $environment_id] - ns_log notice $e_item_id + set parent_id [content::item::get_parent_folder \ -item_id $e_item_id] set r_item_id [db_nextval "acs_object_id_seq"] set identifier "resource-grail-${r_item_id}" set item_name "${r_item_id}_[string tolower $identifier]" set content_type imsld_cp_resource - set type "webcontent" + set type "knowledge_object" set learning_object_id [imsld::item_revision_new -attributes [list [list is_visible_p "t"] \ [list identifier "resource-grail-${r_item_id}"] \ [list environment_id $e_item_id] \ - [list type "webcontent"]] \ + [list type $type]] \ -content_type imsld_learning_object \ -title $title \ -parent_id $parent_id] - set item_id [imsld::item_revision_new -title $url \ + set item_id [imsld::item_revision_new -title $title \ -content_type imsld_item \ -attributes [list [list identifierref $identifier] \ [list is_visible_p "t"]] \ @@ -78,47 +78,35 @@ set users_list [concat $users_list [imsld::roles::get_users_in_role -role_id [lindex $role_id 0] -run_id $run_id]] } - ns_log notice $users_list - - set rev_object_id [content::item::get_live_revision -item_id $learning_object_id] foreach user_id $users_list { # instantiating properties and activity attributes for the run - db_foreach nested_associated_items { - select ii.imsld_item_id, ii.item_id, - coalesce(ii.is_visible_p, 't') as is_visible_p, - ii.identifier - from imsld_itemsi ii - where - (imsld_tree_sortkey between - tree_left((select imsld_tree_sortkey from - imsld_items where imsld_item_id = :rev_object_id)) - and - tree_right((select imsld_tree_sortkey from - imsld_items where imsld_item_id = :rev_object_id)) - or ii.imsld_item_id = :rev_object_id) - } { - if { ![db_0or1row info_as_already_instantiated_p { - select 1 - from imsld_attribute_instances - where owner_id = :imsld_item_id - and run_id = :run_id - and user_id = :user_id - and type = 'isvisible' - }] } { - set instance_id \ - [package_exec_plsql \ - -var_list [list [list instance_id ""] \ - [list owner_id $imsld_item_id] \ - [list type "isvisible"] \ - [list identifier $identifier] \ - [list run_id $run_id] \ - [list user_id $user_id] \ - [list is_visible_p "t"] \ - [list title ""] \ - [list with_control_p ""]] \ - imsld_attribute_instance new] - } - } + ns_log notice "live: [content::item::get_live_revision -item_id $item_id]" + + set instance_id \ + [package_exec_plsql \ + -var_list [list [list instance_id ""] \ + [list owner_id [content::item::get_live_revision -item_id $learning_object_id]] \ + [list type "isvisible"] \ + [list identifier $identifier] \ + [list run_id $run_id] \ + [list user_id $user_id] \ + [list is_visible_p "t"] \ + [list title ""] \ + [list with_control_p ""]] \ + imsld_attribute_instance new] + + set instance_id \ + [package_exec_plsql \ + -var_list [list [list instance_id ""] \ + [list owner_id [content::item::get_live_revision -item_id $item_id]] \ + [list type "isvisible"] \ + [list identifier $identifier] \ + [list run_id $run_id] \ + [list user_id $user_id] \ + [list is_visible_p "t"] \ + [list title ""] \ + [list with_control_p ""]] \ + imsld_attribute_instance new] } } Index: openacs-4/packages/imsld/www/admin/monitor/run-info.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/imsld/www/admin/monitor/run-info.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/imsld/www/admin/monitor/run-info.adp 17 Jun 2009 08:00:02 -0000 1.4 +++ openacs-4/packages/imsld/www/admin/monitor/run-info.adp 29 Oct 2009 11:10:00 -0000 1.5 @@ -1,9 +1,9 @@

- #imsld.Runinfo_Name# + #imsld.Course_Name#: @imsld_title@ #imsld._Assigned_users# @number_of_members@ #imsld._Creation_Date# - @creation_date@ #imsld._Status_The_run_is# + @creation_date@ #imsld._Status_The_course_is# @status@ #imsld.since# @status_date@