diff -crNB dotlrn-2.4.1/packages/evaluation/tcl/evaluation-callback-procs.tcl evaluation/tcl/evaluation-callback-procs.tcl
*** dotlrn-2.4.1/packages/evaluation/tcl/evaluation-callback-procs.tcl Sun Jul 5 21:02:58 2009
--- evaluation/tcl/evaluation-callback-procs.tcl Mon Jul 6 17:40:54 2009
***************
*** 71,74 ****
}
! }
\ No newline at end of file
--- 71,114 ----
}
! }
!
! ad_proc -public -callback search::url -impl evaluation_tasks {} {
! returns a url for an evaluation to the search package
! } {
! set evaluation_id $object_id
! set package_id [acs_object::package_id -object_id $evaluation_id]
! set grade_id [lindex [db_list get_grade_id { *SQL* }] 0]
! set package_url [apm_package_url_from_id $package_id]
! set community_url [site_node::get_url -node_id \
! [site_node::get_parent_id -node_id \
! [site_node::get_node_id_from_object_id \
! -object_id $package_id]]]
!
! return "${package_url}task-view?task_id=$evaluation_id&grade_id=$grade_id&return_url=${community_url}"
! }
!
! ad_proc -public -callback planner::edit_url -impl evaluation_tasks {} {
! returns a url for the edit action of an evaluation to the dotlrn planner
! } {
! set item_id [content::revision::item_id -revision_id $object_id]
! set evaluation_id $object_id
! set package_id [acs_object::package_id -object_id $evaluation_id]
! set grade_id [lindex [db_list get_grade_id { *SQL* }] 0]
! set package_url [apm_package_url_from_id $package_id]
!
! return "${package_url}admin/tasks/task-add-edit?task_id=$evaluation_id&item_id=$item_id&grade_id=$grade_id"
! }
!
! ad_proc -public -callback planner::delete_url -impl evaluation_tasks {} {
! returns a url for the delete action of an evaluation to the dotlrn planner
! } {
! set item_id [content::revision::item_id -revision_id $object_id]
! set evaluation_id $object_id
! set package_id [acs_object::package_id -object_id $evaluation_id]
! set grade_id [lindex [db_list get_grade_id { *SQL* }] 0]
! set package_url [apm_package_url_from_id $package_id]
! set msg "[_ evaluation.lt_Yes_I_really_want_to__3]"
!
! return "${package_url}admin/tasks/task-delete-2?task_id=$evaluation_id&grade_id=$grade_id&operation=$msg&return_url="
! }
diff -crNB dotlrn-2.4.1/packages/evaluation/tcl/evaluation-callback-procs.xql evaluation/tcl/evaluation-callback-procs.xql
*** dotlrn-2.4.1/packages/evaluation/tcl/evaluation-callback-procs.xql Sun Jul 5 21:02:58 2009
--- evaluation/tcl/evaluation-callback-procs.xql Sun Jul 5 21:11:02 2009
***************
*** 33,37 ****
--- 33,73 ----
where party_id = :from_user_id
+
+
+
+ select grade_id
+ from evaluation_grades
+ where grade_item_id = (
+ select grade_item_id
+ from evaluation_tasks
+ where task_id = :evaluation_id
+ )
+
+
+
+
+
+ select grade_id
+ from evaluation_grades
+ where grade_item_id = (
+ select grade_item_id
+ from evaluation_tasks
+ where task_id = :evaluation_id
+ )
+
+
+
+
+
+ select grade_id
+ from evaluation_grades
+ where grade_item_id = (
+ select grade_item_id
+ from evaluation_tasks
+ where task_id = :evaluation_id
+ )
+
+
diff -crNB dotlrn-2.4.1/packages/evaluation/www/admin/tasks/task-add-edit.tcl evaluation/www/admin/tasks/task-add-edit.tcl
*** dotlrn-2.4.1/packages/evaluation/www/admin/tasks/task-add-edit.tcl Sun Jul 5 21:02:58 2009
--- evaluation/www/admin/tasks/task-add-edit.tcl Sun Jul 5 21:38:31 2009
***************
*** 20,25 ****
--- 20,26 ----
{enable 1}
{return_p ""}
{simple_p ""}
+ {block_id 0}
}
***************
*** 314,319 ****
--- 315,324 ----
}
}
+ ## Planner View -> Extend Form
+ callback -catch -impl planner planner::extend_form -block_id $block_id -form_name "task"
+ ###
+
ad_form -extend -name task -form {
} -edit_request {
***************
*** 461,466 ****
--- 466,474 ----
set content_length 0
db_dml lob_size { *SQL* }
+ ## Planner View
+ callback -catch -impl planner planner::insert_object -block_id $block_id -object_id $task_id
+ ###
if { ![empty_string_p $upload_file] } {
set tmp_file [template::util::file::get_property tmp_filename $upload_file]
***************
*** 545,550 ****
--- 553,559 ----
}
if { ![empty_string_p $add_to_more_classes_p] } {
ad_returnredirect [export_vars -base "task-add-to-communities" { redirect_to_groups_p {task_id $revision_id} return_url }]
+ ad_script_abort
} elseif { $redirect_to_groups_p } {
ad_returnredirect [export_vars -base "../groups/one-task" { {task_id $revision_id} }]
ad_script_abort
***************
*** 555,560 ****
--- 564,570 ----
ad_script_abort
} else {
ad_returnredirect $return_url
+ ad_script_abort
}
}
diff -crNB dotlrn-2.4.1/packages/evaluation/www/task-view.adp evaluation/www/task-view.adp
*** dotlrn-2.4.1/packages/evaluation/www/task-view.adp Sun Jul 5 21:02:58 2009
--- evaluation/www/task-view.adp Sun Jul 5 21:12:26 2009
***************
*** 1,6 ****
--- 1,7 ----
@page_title;noquote@
@context;noquote@
+ @task_item_id;noquote@
diff -crNB dotlrn-2.4.1/packages/evaluation/www/task-view-postgresql.xql evaluation/www/task-view-postgresql.xql
*** dotlrn-2.4.1/packages/evaluation/www/task-view-postgresql.xql 2005-04-07 05:26:58.000000000 -0600
--- evaluation/www/task-view-postgresql.xql 2009-11-25 08:29:25.000000000 -0600
***************
*** 12,17 ****
--- 12,18 ----
et.description,
et.title as task_title,
et.data as task_data,
+ et.task_item_id as task_item_id,
et.revision_id as task_revision_id,
ets.title as solution_title,
ets.data as solution_data,