Forum OpenACS Development: Evaluation correction

Collapse
Posted by Mauricio Ramírez on
Hi everybody, a few days ago, one of my superiors ask me if I can correct a problem that when they edits a evaluation the evaluation type is the original type. I check the code and I change somethings that it could be changed in a new evaluation version.
The changes I made are in task-add-edit.tcl and task-add-edit.xql (evaluation/www/admin/tasks)

In task-add-edit.tcl in line 73 I change the name from grade_item_id, the use of this name in a variable may bring some problems so I name it ident. The second change I made it was on line 438, I add the next code:

if { !$new_p } {
db_1row select_grade_items { *SQL* }
set grade_item_id $ident2
}

In task-add-edit.xql I change the select_grade_types query. I change eg.grade_item_id to eg.grade_id as ident. The second change I did it was to add a new query, the code is:

fullquery name="select_grade_items"
querytext

select eg.grade_item_id as ident2
from evaluation_grades eg, acs_objects ao, cr_items cri
where cri.live_revision = eg.grade_id
and eg.grade_item_id = ao.object_id
and eg.grade_id = :grade_item_type

/querytext
/fullquery

I hope it could be useful.

Thanks everybody
Mauricio Ramírez