Index: openacs-4/packages/evaluation/evaluation.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/evaluation.info,v
diff -u -r1.40 -r1.41
--- openacs-4/packages/evaluation/evaluation.info 5 Apr 2018 14:44:09 -0000 1.40
+++ openacs-4/packages/evaluation/evaluation.info 9 Jul 2018 16:13:37 -0000 1.41
@@ -7,7 +7,7 @@
f
f
-
+
Jose Pablo Escobedo Del Cid
This package allows the users (professors and students) to use the system to submit and grade the tasks.
2017-08-06
@@ -16,7 +16,7 @@
2
#evaluation.Evaluations#
-
+
Index: openacs-4/packages/evaluation/sql/oracle/evaluation-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/oracle/evaluation-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/evaluation/sql/oracle/evaluation-create.sql 17 Apr 2018 14:47:02 -0000 1.7
+++ openacs-4/packages/evaluation/sql/oracle/evaluation-create.sql 9 Jul 2018 16:13:37 -0000 1.8
@@ -155,23 +155,26 @@
values
('evaluation_task_groups', 'evaluation_task_groups', 'group_id');
-declare
- attr_id acs_attributes.attribute_id%TYPE;
-begin
- attr_id := acs_attribute.create_attribute
- (
- object_type => 'evaluation_task_groups',
- attribute_name => 'task_id',
- datatype => 'integer',
- pretty_name => 'Task id',
- pretty_plural => 'Task ids',
- table_name => 'evaluation_task_groups',
- column_name => 'task_id',
- min_n_values => 1,
- max_n_values => 1,
- storage => 'type_specific'
- );
-end;
+-- task_id used to be a column in evaluation_task_groups and was then
+-- renamed to task_item_id. Attribute was not updated accordingly and
+-- is most likely useless now. Left here for documentation.
+-- declare
+-- attr_id acs_attributes.attribute_id%TYPE;
+-- begin
+-- attr_id := acs_attribute.create_attribute
+-- (
+-- object_type => 'evaluation_task_groups',
+-- attribute_name => 'task_id',
+-- datatype => 'integer',
+-- pretty_name => 'Task id',
+-- pretty_plural => 'Task ids',
+-- table_name => 'evaluation_task_groups',
+-- column_name => 'task_id',
+-- min_n_values => 1,
+-- max_n_values => 1,
+-- storage => 'type_specific'
+-- );
+-- end;
/
create table evaluation_user_profile_rels
Index: openacs-4/packages/evaluation/sql/oracle/upgrade/upgrade-2.10.0d0-2.10.0d1.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/oracle/upgrade/upgrade-2.10.0d0-2.10.0d1.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/evaluation/sql/oracle/upgrade/upgrade-2.10.0d0-2.10.0d1.sql 9 Jul 2018 16:13:37 -0000 1.1
@@ -0,0 +1,25 @@
+
+DO $$
+BEGIN
+
+ update acs_attributes set
+ datatype = 'boolean'
+ where object_type = 'evaluation_student_evals'
+ and attribute_name = 'show_student_p';
+
+ update acs_attributes set
+ datatype = 'boolean'
+ where object_type = 'evaluation_tasks'
+ and attribute_name in ('online_p', 'late_submit_p', 'requires_grade_p', 'forums_related_p');
+
+ update acs_attributes set
+ datatype = 'number'
+ where object_type = 'evaluation_tasks'
+ and attribute_name = 'number_of_members';
+
+ update acs_attributes set
+ datatype = 'string'
+ where object_type = 'evaluation_tasks'
+ and attribute_name = 'task_name';
+
+END$$;
Index: openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql,v
diff -u -r1.28 -r1.29
--- openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 17 Apr 2018 14:47:02 -0000 1.28
+++ openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 9 Jul 2018 16:13:37 -0000 1.29
@@ -174,21 +174,24 @@
values
('evaluation_task_groups', 'evaluation_task_groups', 'group_id');
-select acs_attribute__create_attribute (
- 'evaluation_task_groups', --object_type
- 'task_id', --oattribute_name
- 'integer', --datatype
- 'Task id', --pretty_name
- 'Task ids', --pretty_plural
- 'evaluation_task_groups', --table_name
- 'task_id', --column_name
- null, --default_value
- 1, --min_n_values
- 1, --max_n_values
- null, --sort_order
- 'type_specific', --storage
- 'f' --static_p
-);
+-- task_id used to be a column in evaluation_task_groups and was then
+-- renamed to task_item_id. Attribute was not updated accordingly and
+-- is most likely useless now. Left here for documentation.
+-- select acs_attribute__create_attribute (
+-- 'evaluation_task_groups', --object_type
+-- 'task_id', --oattribute_name
+-- 'integer', --datatype
+-- 'Task id', --pretty_name
+-- 'Task ids', --pretty_plural
+-- 'evaluation_task_groups', --table_name
+-- 'task_id', --column_name
+-- null, --default_value
+-- 1, --min_n_values
+-- 1, --max_n_values
+-- null, --sort_order
+-- 'type_specific', --storage
+-- 'f' --static_p
+-- );
create table evaluation_user_profile_rels (
rel_id integer
Index: openacs-4/packages/evaluation/sql/postgresql/upgrade/upgrade-2.10.0d0-2.10.0d1.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/postgresql/upgrade/upgrade-2.10.0d0-2.10.0d1.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/evaluation/sql/postgresql/upgrade/upgrade-2.10.0d0-2.10.0d1.sql 9 Jul 2018 16:13:37 -0000 1.1
@@ -0,0 +1,25 @@
+
+DO $$
+BEGIN
+
+ update acs_attributes set
+ datatype = 'boolean'
+ where object_type = 'evaluation_student_evals'
+ and attribute_name = 'show_student_p';
+
+ update acs_attributes set
+ datatype = 'boolean'
+ where object_type = 'evaluation_tasks'
+ and attribute_name in ('online_p', 'late_submit_p', 'requires_grade_p', 'forums_related_p');
+
+ update acs_attributes set
+ datatype = 'number'
+ where object_type = 'evaluation_tasks'
+ and attribute_name = 'number_of_members';
+
+ update acs_attributes set
+ datatype = 'string'
+ where object_type = 'evaluation_tasks'
+ and attribute_name = 'task_name';
+
+END$$;
Index: openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl,v
diff -u -r1.27 -r1.28
--- openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl 17 Apr 2018 14:47:02 -0000 1.27
+++ openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl 9 Jul 2018 16:13:37 -0000 1.28
@@ -67,18 +67,18 @@
#Create content type attributes for content type evaluation_tasks
content::type::attribute::new -content_type evaluation_tasks -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer
- content::type::attribute::new -content_type evaluation_tasks -attribute_name task_name -datatype number -pretty_name task_name -column_spec integer
- content::type::attribute::new -content_type evaluation_tasks -attribute_name number_of_members -datatype string -pretty_name number_of_members -column_spec varchar
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name task_name -datatype string -pretty_name task_name -column_spec varchar
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name number_of_members -datatype number -pretty_name number_of_members -column_spec integer
content::type::attribute::new -content_type evaluation_tasks -attribute_name due_date -datatype timestamp -pretty_name due_date -column_spec timestamptz
content::type::attribute::new -content_type evaluation_tasks -attribute_name grade_item_id -datatype number -pretty_name grade_item_id -column_spec integer
content::type::attribute::new -content_type evaluation_tasks -attribute_name weight -datatype number -pretty_name weight -column_spec numeric
- content::type::attribute::new -content_type evaluation_tasks -attribute_name online_p -datatype string -pretty_name online_p -column_spec "varchar(1)"
- content::type::attribute::new -content_type evaluation_tasks -attribute_name late_submit_p -datatype string -pretty_name late_submit_p -column_spec "varchar(1)"
- content::type::attribute::new -content_type evaluation_tasks -attribute_name requires_grade_p -datatype string -pretty_name requires_grade_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name online_p -datatype boolean -pretty_name online_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name late_submit_p -datatype boolean -pretty_name late_submit_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name requires_grade_p -datatype boolean -pretty_name requires_grade_p -column_spec "varchar(1)"
content::type::attribute::new -content_type evaluation_tasks -attribute_name points -datatype number -pretty_name points -column_spec "numeric"
content::type::attribute::new -content_type evaluation_tasks -attribute_name perfect_score -datatype number -pretty_name perfect_score -column_spec "numeric"
content::type::attribute::new -content_type evaluation_tasks -attribute_name relative_weight -datatype number -pretty_name relative_weight -column_spec "numeric"
- content::type::attribute::new -content_type evaluation_tasks -attribute_name forums_related_p -datatype string -pretty_name forums_related_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name forums_related_p -datatype boolean -pretty_name forums_related_p -column_spec "varchar(1)"
@@ -100,7 +100,7 @@
content::type::attribute::new -content_type evaluation_student_evals -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer
content::type::attribute::new -content_type evaluation_student_evals -attribute_name party_id -datatype number -pretty_name party_id -column_spec integer
content::type::attribute::new -content_type evaluation_student_evals -attribute_name grade -datatype number -pretty_name grade -column_spec numeric
- content::type::attribute::new -content_type evaluation_student_evals -attribute_name show_student_p -datatype string -pretty_name show_student_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_student_evals -attribute_name show_student_p -datatype boolean -pretty_name show_student_p -column_spec "varchar(1)"
#Create content type attributes for content type evaluation_grades_sheets
content::type::attribute::new -content_type evaluation_grades_sheets -attribute_name grades_sheet_item_id -datatype number -pretty_name grades_sheet_item_id -column_spec integer
@@ -130,14 +130,14 @@
#Create content type attributes for content type evaluation_tasks
content::type::attribute::new -content_type evaluation_tasks -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer
- content::type::attribute::new -content_type evaluation_tasks -attribute_name task_name -datatype number -pretty_name task_name -column_spec integer
- content::type::attribute::new -content_type evaluation_tasks -attribute_name number_of_members -datatype string -pretty_name number_of_members -column_spec varchar
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name task_name -datatype string -pretty_name task_name -column_spec varchar
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name number_of_members -datatype number -pretty_name number_of_members -column_spec integer
content::type::attribute::new -content_type evaluation_tasks -attribute_name due_date -datatype timestamp -pretty_name due_date -column_spec timestamptz
content::type::attribute::new -content_type evaluation_tasks -attribute_name grade_item_id -datatype number -pretty_name grade_item_id -column_spec integer
content::type::attribute::new -content_type evaluation_tasks -attribute_name weight -datatype number -pretty_name weight -column_spec numeric
- content::type::attribute::new -content_type evaluation_tasks -attribute_name online_p -datatype string -pretty_name online_p -column_spec "varchar(1)"
- content::type::attribute::new -content_type evaluation_tasks -attribute_name late_submit_p -datatype string -pretty_name late_submit_p -column_spec "varchar(1)"
- content::type::attribute::new -content_type evaluation_tasks -attribute_name requires_grade_p -datatype string -pretty_name requires_grade_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name online_p -datatype boolean -pretty_name online_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name late_submit_p -datatype boolean -pretty_name late_submit_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_tasks -attribute_name requires_grade_p -datatype boolean -pretty_name requires_grade_p -column_spec "varchar(1)"
#Create content type attributes for content type evaluation_tasks_sols
content::type::attribute::new -content_type evaluation_tasks_sols -attribute_name solution_item_id -datatype number -pretty_name solution_item_id -column_spec integer
@@ -154,7 +154,7 @@
content::type::attribute::new -content_type evaluation_student_evals -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer
content::type::attribute::new -content_type evaluation_student_evals -attribute_name party_id -datatype number -pretty_name party_id -column_spec integer
content::type::attribute::new -content_type evaluation_student_evals -attribute_name grade -datatype number -pretty_name grade -column_spec numeric
- content::type::attribute::new -content_type evaluation_student_evals -attribute_name show_student_p -datatype string -pretty_name show_student_p -column_spec "varchar(1)"
+ content::type::attribute::new -content_type evaluation_student_evals -attribute_name show_student_p -datatype boolean -pretty_name show_student_p -column_spec "varchar(1)"
#Create content type attributes for content type evaluation_grades_sheets
content::type::attribute::new -content_type evaluation_grades_sheets -attribute_name grades_sheet_item_id -datatype number -pretty_name grades_sheet_item_id -column_spec integer
@@ -507,8 +507,15 @@
evaluation::set_relative_weight
evaluation::set_forums_related
}
-
-
+ 2.10.0d0 2.10.0d1 {
+ set attribute_id [db_string get_attribute {
+ select attribute_id from acs_attributes
+ where object_type = 'evaluation_task_groups'
+ and attribute_name = 'task_id'} -default ""]
+ if {$attribute_id ne ""} {
+ attribute::delete $attribute_id
+ }
+ }
}
}