Index: openacs-4/packages/assessment/assessment.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/assessment.info,v
diff -u -r1.36.2.6 -r1.36.2.7
--- openacs-4/packages/assessment/assessment.info 28 Jul 2005 04:23:18 -0000 1.36.2.6
+++ openacs-4/packages/assessment/assessment.info 1 Aug 2005 18:07:55 -0000 1.36.2.7
@@ -7,34 +7,34 @@
f
f
-
+
Eduardo Perez Ureta
- Assessment package that will replace the survey,
- quizz, complex survey, poll and other data collection packages
+ Assessment package that will replace the survey,
+ quizz, complex survey, poll and other data collection packages
that OpenACS currently supports.
- 2005-07-08
+ 2005-08-01
E-LANE
Create assessments and evaluate.
0
-
+
-
-
-
-
-
+
+
+
+
+
-
+
Index: openacs-4/packages/assessment/lib/section-items.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/section-items.tcl,v
diff -u -r1.9.2.2 -r1.9.2.3
--- openacs-4/packages/assessment/lib/section-items.tcl 19 Jul 2005 15:57:12 -0000 1.9.2.2
+++ openacs-4/packages/assessment/lib/section-items.tcl 1 Aug 2005 18:07:55 -0000 1.9.2.3
@@ -31,8 +31,8 @@
ns_log notice "[llength $checks]"
foreach check_sql $checks {
set cond_list [split $check_sql "="]
- set item_id [lindex [split [lindex $cond_list 2] " "] 0]
- if {$item_id == $as_item_id} {
+ set item_id [lindex [split [lindex $cond_list 2] ")"] 0]
+ if {$item_id == $as_item_id_i} {
incr checks_related
}
Index: openacs-4/packages/assessment/lib/section-items.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/section-items.xql,v
diff -u -r1.9 -r1.9.2.1
--- openacs-4/packages/assessment/lib/section-items.xql 18 Apr 2005 10:20:40 -0000 1.9
+++ openacs-4/packages/assessment/lib/section-items.xql 1 Aug 2005 18:07:55 -0000 1.9.2.1
@@ -4,14 +4,15 @@
- select i.as_item_id, i.subtext, cr.title, cr.description, i.field_name,
+ select i.as_item_id, i.subtext, cr.title, cr.description, i.field_name,asr.item_id as as_item_id_i,
ism.required_p, ism.section_id, ism.sort_order,
ism.max_time_to_complete, ism.points
- from as_items i, cr_revisions cr, cr_items ci, as_item_section_map ism
+ from as_items i, cr_revisions cr, cr_items ci, as_item_section_map ism, cr_revisions asr
where ci.item_id = cr.item_id
and cr.revision_id = i.as_item_id
and i.as_item_id = ism.as_item_id
and ism.section_id = :section_id
+ and asr.revision_id = i.as_item_id
order by ism.sort_order
Index: openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl,v
diff -u -r1.7.2.1 -r1.7.2.2
--- openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl 1 Aug 2005 15:54:46 -0000 1.7.2.1
+++ openacs-4/packages/assessment/tcl/as-apm-action-procs.tcl 1 Aug 2005 18:07:55 -0000 1.7.2.2
@@ -44,7 +44,7 @@
set check_sql [lindex $check 1]
set cond_list [split $check_sql "="]
set item_id [lindex [split [lindex $cond_list 2] " "] 0]
- set condition [lindex [split [lindex $cond_list 1] ")"] 0]
+ set condition [lindex [split [lindex $cond_list 1] " "] 0]
set append_sql " and id.item_data_id = (select max(item_data_id) from as_item_data where as_item_id=$item_id and session_id=:session_id)"
append check_sql $append_sql
Index: openacs-4/packages/assessment/tcl/as-checks-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.tcl,v
diff -u -r1.24.2.6 -r1.24.2.7
--- openacs-4/packages/assessment/tcl/as-checks-procs.tcl 1 Aug 2005 15:54:46 -0000 1.24.2.6
+++ openacs-4/packages/assessment/tcl/as-checks-procs.tcl 1 Aug 2005 18:07:55 -0000 1.24.2.7
@@ -142,8 +142,10 @@
} {
} {
- set check_sql "select (case when idc.choice_id in (select revision_id from cr_revisions where item_id=$condition) then \'1\' else \'0\' end) as perform_p from as_item_data id, as_item_data_choices idc where id.as_item_id=$item_id and id.item_data_id=idc.item_data_id and id.session_id=:session_id"
+ set as_item_id [db_string get_item_id {select item_id from cr_revisions where revision_id=:item_id}]
+ set check_sql "select (case when idc.choice_id in (select revision_id from cr_revisions where item_id=$condition) then \'1\' else \'0\' end) as perform_p from as_item_data id, as_item_data_choices idc where id.as_item_id in (select revision_id from cr_revisions where item_id=$as_item_id) and id.item_data_id=idc.item_data_id and id.session_id=:session_id"
+
return $check_sql
}
@@ -590,7 +592,7 @@
set checks [db_list_of_lists related_checks {}]
foreach check $checks {
set cond_list [split [lindex $check 1] "="]
- set item_id [lindex [split [lindex $cond_list 2] " "] 0]
+ set item_id [lindex [split [lindex $cond_list 2] ")"] 0]
if {$item_id == $as_item_id} {
set check_id [lindex $check 0]
db_exec_plsql delete_check {}
@@ -613,7 +615,7 @@
set cond_list [split [lindex $check 1] "="]
- set item_id [lindex [split [lindex $cond_list 2] " "] 0]
+ set item_id [lindex [split [lindex $cond_list 2] ")"] 0]
set condition [lindex [split [lindex $cond_list 1] ")"] 0]
if {$item_id == $as_item_id} {
Index: openacs-4/packages/assessment/tcl/as-install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-install-procs.tcl,v
diff -u -r1.30.2.10 -r1.30.2.11
--- openacs-4/packages/assessment/tcl/as-install-procs.tcl 27 Jul 2005 21:53:56 -0000 1.30.2.10
+++ openacs-4/packages/assessment/tcl/as-install-procs.tcl 1 Aug 2005 18:07:55 -0000 1.30.2.11
@@ -406,8 +406,23 @@
}
}
+ 0.14 0.15 {
+ # update as_inter_item_check_id table to set the check_sql condition using the item_id of a choice instead of using the revision_id
+
+ db_foreach check { select inter_item_check_id, check_sql from as_inter_item_checks } {
+ set cond_list [split $check_sql "="]
+ set item_id [lindex [split [lindex $cond_list 2] " "] 0]
+ set choice_id [lindex [split [lindex $cond_list 1] " "] 0]
+ set condition [db_string get_item_id {select item_id from cr_revisions where revision_id=:choice_id} -default -1]
+ set check_sql_updated [as::assessment::check::get_sql -item_id $item_id -condition $condition]
+ if { $condition != -1 } {
+ db_dml update_check_sql { update as_inter_item_checks set check_sql = :check_sql_updated where inter_item_check_id=:inter_item_check_id}
+ }
+ }
+
+ }
- }
+ }
}
Index: openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl,v
diff -u -r1.6.2.1 -r1.6.2.2
--- openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl 1 Aug 2005 15:54:46 -0000 1.6.2.1
+++ openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl 1 Aug 2005 18:07:55 -0000 1.6.2.2
@@ -39,8 +39,10 @@
set condition_sql [db_string get_item_id {}]
#parse condition_sql to get item_id
set cond_list [split $condition_sql "="]
- set item_id [lindex [split [lindex $cond_list 2] " "] 0]
-
+ set item_id [lindex [split [lindex $cond_list 2] ")"] 0]
+ set item_id [content::item::get_latest_revision -item_id $item_id]
+
+
} else {
set item_id $as_item_id
}
@@ -49,6 +51,7 @@
set section_id_from $section_id
}
+
set as_item_id $item_id
set as_item_type_id [db_string item_type_id {}]
Index: openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl,v
diff -u -r1.8.2.2 -r1.8.2.3
--- openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl 26 Jul 2005 13:41:25 -0000 1.8.2.2
+++ openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl 1 Aug 2005 18:07:55 -0000 1.8.2.3
@@ -26,15 +26,16 @@
set show_p 0
set by_item_p 1
set item_p "&item_id=$item_id"
- set item_id_check $item_id
+ set item_id_check $item_id
+ set as_item_id_i [db_string get_item_id { select item_id from cr_revisions where revision_id = :item_id}]
set check_list "and c.inter_item_check_id in ("
set checks [db_list_of_lists get_all_checks { }]
set count 0
foreach check $checks {
set cond_list [split [lindex $check 1] "="]
- set as_item_id [lindex [split [lindex $cond_list 2] " "] 0]
- if { $item_id == $as_item_id} {
+ set as_item_id [lindex [split [lindex $cond_list 2] ")"] 0]
+ if { $as_item_id_i == $as_item_id} {
incr count
append check_list "[lindex $check 0],"
}
@@ -173,7 +174,7 @@
name {
label "[_ assessment.Name]"
display_template {
- @aa_checks.name@
+ @aa_checks.name@
}
}
action_name {
@@ -219,7 +220,7 @@
name {
label "[_ assessment.Name]"
display_template {
- @i_checks.name@
+ @i_checks.name@
}
}
action_name {
@@ -264,7 +265,7 @@
name {
label "[_ assessment.Name]"
display_template {
- @m_checks.name@
+ @m_checks.name@
}
}
action_name {
@@ -299,7 +300,7 @@
name {
label "[_ assessment.Name]"
display_template {
- @branches.name@
+ @branches.name@
}
}
section_id_to {