Index: openacs-4/packages/dotlrn/dotlrn.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v
diff -u -r1.123.2.9 -r1.123.2.10
--- openacs-4/packages/dotlrn/dotlrn.info 7 Feb 2006 11:22:51 -0000 1.123.2.9
+++ openacs-4/packages/dotlrn/dotlrn.info 13 Mar 2006 00:46:51 -0000 1.123.2.10
@@ -15,7 +15,7 @@
Course Management
-
+
Index: openacs-4/packages/dotlrn/sql/postgresql/upgrade/upgrade-2.1.3-2.2.0a1.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/upgrade/Attic/upgrade-2.1.3-2.2.0a1.sql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/dotlrn/sql/postgresql/upgrade/upgrade-2.1.3-2.2.0a1.sql 13 Dec 2005 15:32:35 -0000 1.1.2.1
+++ openacs-4/packages/dotlrn/sql/postgresql/upgrade/upgrade-2.1.3-2.2.0a1.sql 13 Mar 2006 00:46:52 -0000 1.1.2.2
@@ -117,3 +117,19 @@
select inline_0();
drop function inline_0();
+
+-- Create auxiliary tables
+
+create table apm_parameter_values_copy (
+ value_id integer,
+ package_id integer,
+ parameter_id integer,
+ attr_value text
+);
+
+insert into apm_parameter_values_copy (
+ value_id,
+ package_id,
+ parameter_id,
+ attr_value
+) select * from apm_parameter_values;
Index: openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl,v
diff -u -r1.3.2.5 -r1.3.2.6
--- openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl 6 Feb 2006 20:47:12 -0000 1.3.2.5
+++ openacs-4/packages/dotlrn/tcl/apm-callback-procs.tcl 13 Mar 2006 00:46:52 -0000 1.3.2.6
@@ -172,8 +172,62 @@
parameter::set_from_package_key -package_key "acs-subsite" \
-parameter "DefaultMaster" \
-value "/packages/dotlrn/www/dotlrn-master-custom"
+
+ # This fixes parameter reseting from dotlrn
+ set community_level_p_param_id [db_string select_clevel_id {
+ select parameter_id
+ from apm_parameters
+ where package_key='dotlrn' and
+ parameter_name='community_level_p'}]
+
+ set community_type_level_p_param_id [db_string select_ctlevel_id {
+ select parameter_id
+ from apm_parameters
+ where package_key='dotlrn' and
+ parameter_name='community_type_level_p'}]
+
+ set dotlrn_level_p_param_id [db_string select_dlevel_id {
+ select parameter_id
+ from apm_parameters
+ where package_key='dotlrn' and
+ parameter_name='dotlrn_level_p'}]
+
+ db_foreach select_attr_values {
+ select community_id from dotlrn_communities_all
+ } {
+ set package_id [dotlrn_community::get_package_id $community_id]
+ ns_log Notice "upgrade: $package_id parameter_id:
+ $community_level_p_param_id"
+
+ db_dml community_level_p_update {
+ update apm_parameter_values set
+ attr_value=(select attr_value from
+ apm_parameter_values_copy where package_id=:package_id
+ and parameter_id=:community_level_p_param_id)
+ where package_id=:package_id and
+ parameter_id=:community_level_p_param_id
+ }
+
+ db_dml community_type_level_p_update {
+ update apm_parameter_values set
+ attr_value=(select attr_value from
+ apm_parameter_values_copy where package_id=:package_id
+ and parameter_id=:community_type_level_p_param_id)
+ where package_id=:package_id and
+ parameter_id=:community_type_level_p_param_id
+ }
+
+ db_dml dotlrn_level_p_update {
+ update apm_parameter_values set
+ attr_value=(select attr_value from
+ apm_parameter_values_copy where package_id=:package_id
+ and parameter_id=:dotlrn_level_p_param_id)
+ where package_id=:package_id and
+ parameter_id=:dotlrn_level_p_param_id
+ }
+
+ }
-
}
2.2.0a2 2.2.0a3 {
# This fixes a security hole opened up when cloning
@@ -186,9 +240,7 @@
} {
permission::set_not_inherit -object_id $community_id
}
- }
+
+ }
}
}
-
-
-