Index: openacs-4/packages/lorsm/www/admin/course-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/admin/course-add-3.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/lorsm/www/admin/course-add-3.tcl 17 Nov 2008 13:36:44 -0000 1.10 +++ openacs-4/packages/lorsm/www/admin/course-add-3.tcl 12 Dec 2008 14:25:35 -0000 1.11 @@ -117,10 +117,7 @@ # Set read permissions for community/class dotlrn_member_rel set community_id [dotlrn_community::get_community_id] - set party_id_member [db_string party_id {select segment_id \ - from rel_segments \ - where group_id = :community_id \ - and rel_type = 'dotlrn_member_rel'}] + set party_id_member [db_string party_id_member {}] permission::grant \ -party_id $party_id_member \ @@ -134,11 +131,7 @@ # Set read permissions for community/class dotlrn_admin_rel - set party_id_admin [db_string party_id { - select segment_id - from rel_segments - where group_id = :community_id - and rel_type = 'dotlrn_admin_rel'}] + set party_id_admin [db_string party_id_admin {}] permission::grant \ -party_id $party_id_admin \ @@ -153,10 +146,7 @@ # Set read permissions for *all* other professors within .LRN # (so they can see the content) - set party_id_professor [db_string party_id { - select segment_id - from rel_segments - where rel_type = 'dotlrn_professor_profile_rel'}] + set party_id_professor [db_string party_id_professor {}] permission::grant \ -party_id $party_id_professor \ @@ -171,10 +161,7 @@ # Set read permissions for *all* other admins within .LRN # (so they can see the content) - set party_id_admins [db_string party_id { - select segment_id - from rel_segments - where rel_type = 'dotlrn_admin_profile_rel'}] + set party_id_admins [db_string party_id_admins {}] permission::grant \ -party_id $party_id_admins \ @@ -379,11 +366,7 @@ set community_id [dotlrn_community::get_community_id] - set party_id_member [db_string party_id { - select segment_id - from rel_segments - where group_id = :community_id - and rel_type = 'dotlrn_member_rel'}] + set party_id_member [db_string party_id_member {}] permission::grant \ -party_id $party_id_member \ @@ -392,11 +375,7 @@ # Set read permissions for community/class dotlrn_admin_rel - set party_id_admin [db_string party_id { - select segment_id - from rel_segments - where group_id = :community_id - and rel_type = 'dotlrn_admin_rel'}] + set party_id_admin [db_string party_id_admin {}] permission::grant \ -party_id $party_id_admin \ @@ -406,10 +385,7 @@ # Set read permissions for *all* other professors within .LRN # (so they can see the content) - set party_id_professor [db_string party_id { - select segment_id - from rel_segments - where rel_type = 'dotlrn_professor_profile_rel'}] + set party_id_professor [db_string party_id_professor {}] permission::grant \ -party_id $party_id_professor \ @@ -419,20 +395,15 @@ # Set read permissions for *all* other admins within .LRN # (so they can see the content) - set party_id_admins [db_string party_id { - select segment_id - from rel_segments - where rel_type = 'dotlrn_admin_profile_rel'}] + set party_id_admins [db_string party_id_admins {}] permission::grant \ -party_id $party_id_admins \ -object_id $man_id \ -privilege read - # Done with Manifest and learning object Permissions - ns_write "[_ lorsm.lt_Adding_course_name_Ma]
" if {$man_hasmetadata == 1} { @@ -444,7 +415,6 @@ ns_write "[_ lorsm.lt_Adding_Manifest_Metad]
" } - if { ![empty_string_p $organizations] } { # for multiple organizations set add [list] @@ -599,11 +569,9 @@ #ns_write "[_ lorsm.no_page]" } - # Here's where we link items and resources. Take into # account that a resources can have 1 to many items - # So first, let's create a list of only item_identifierrefs # [lindex $add 1]. Therefore we can do a lsearch -exact instead of # a -regexp @@ -672,7 +640,6 @@ } } - # Delete temporary directory ns_write "[_ lorsm.lt_Deleting_temporary_fo]
" ns_log Debug "Delete temporary folder $tmp_dir"