Forum OpenACS Development: Bugs on Assessment for oacs-5-2

Collapse
Posted by Eduardo Santos on
I'm trying to use Assessment in version 0.20 and oacs-core 5.2.3 and I found some bugs wich are making me loose a lot of time. the first one is this bug:

Error: Error in include template "/var/lib/aolserver/catir/packages/assessment/lib/assessment": Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")

SQL:
select a.tcl_code,am.user_message,a.name as action_name from as_actions a,as_action_map am where am.action_id = a.action_id and am.inter_item_check_id = '1056994'

Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")

SQL:
select a.tcl_code,am.user_message,a.name as action_name from as_actions a,as_action_map am where am.action_id = a.action_id and am.inter_item_check_id = '1056994'

while executing
"ns_pg_bind 0or1row nsdb0 {
select a.tcl_code,am.user_message,a.name as action_name from as_actions a,as_action_map am where am.action_id = a.act..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
invoked from within
"set selection [db_exec 0or1row $db $full_statement_name $sql]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_statement_name $sql]
}"
(procedure "db_0or1row" line 23)
invoked from within
"db_0or1row select_tcl {}"
("uplevel" body line 1)
invoked from within
"uplevel db_0or1row $args"
(procedure "db_1row" line 2)
invoked from within
"db_1row select_tcl {}"
(procedure "as::assessment::check::action_exec" line 42)
invoked from within
"as::assessment::check::action_exec -inter_item_check_id [lindex $check 0] -session_id $session_id"
(procedure "as::assessment::check::eval_or_checks" line 11)
invoked from within
"as::assessment::check::eval_or_checks -session_id $session_id -section_id $section_id "
("uplevel" body line 2)
invoked from within
"uplevel #6 {
as::assessment::check::eval_or_checks -session_id $session_id -section_id $section_id
}"
("uplevel" body line 1)
invoked from within
"uplevel 1 $args"
(procedure "ad_page_contract_eval" line 2)
invoked from within
"ad_page_contract_eval uplevel #$level $on_request"
(procedure "ad_form" line 387)
invoked from within
"ad_form -extend -name show_item_form -on_request {
as::assessment::check::eval_or_checks -session_id $session_id -section_id $section_id
}"
("uplevel" body line 456)
invoked from within
"uplevel {
ad_page_contract {

This page allows to display an assessment with sections and items

@author Eduardo Pérez Ureta (mailto:eperez@it.uc3m....";
(procedure "code::tcl::/var/lib/aolserver/catir/packages/assessment/lib/..." line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare "
(procedure "template::adp_parse" line 30)
invoked from within
"template::adp_parse [template::util::url_to_file "/packages/assessment/lib/assessment" "$__adp_stub"] [list]"

This one seems to be related to the file assessment/tcl/as-checks-procs.xql. I don't know why, but when I click on the assessment and try to answer it, this error appears. This query and some other ones are returning more than one row, and it shouldn't happen, I guess.

The other one is more like a forgotten issue. when you try to request notification for the assessment, the following error appears:

We had um problema with your input:

You must specify something for type_id

Checking the line 23 of the file assessment/www/asm-admin/request-notification.tcl I found the following query:

set type_id [notification::type::get_type_id -short_name $type]

When I looked for the definition to the var type I found the query:

set type "inter_item_check_notif"

Well, it seems like someone forgot to put the notif_type in the notifications package, so when you try to request notification you can't because the type isn't registered in the package. So, can somebody tell me if this bug is fixed?