Index: openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql 7 Jul 2004 17:27:27 -0000 1.2
+++ openacs-4/packages/evaluation-portlet/lib/evaluations-chunk-postgresql.xql 30 Jul 2004 22:51:49 -0000 1.3
@@ -9,7 +9,7 @@
select et.task_name, et.weight as task_weight,
et.task_id
from evaluation_tasksi et
- where grade_id = :grade_id
+ where grade_item_id = :grade_item_id
and content_revision__is_live(et.task_id) = true
$evaluations_orderby
@@ -31,12 +31,12 @@
ea.title as answer_title,
ea.answer_id
from evaluation_grades eg,
- evaluation_tasks et2 left outer join evaluation_student_evalsi ese on (ese.task_id = et2.task_id and content_revision__is_live(ese.evaluation_id) = true
+ evaluation_tasks et2 left outer join evaluation_student_evalsi ese on (ese.task_item_id = et2.task_item_id and content_revision__is_live(ese.evaluation_id) = true
and ese.party_id = evaluation__party_id(:user_id,et2.task_id)),
- evaluation_tasks et left outer join evaluation_answersi ea on (ea.task_id = et.task_id and content_revision__is_live(ea.answer_id) = true
+ evaluation_tasks et left outer join evaluation_answersi ea on (ea.task_item_id = et.task_item_id and content_revision__is_live(ea.answer_id) = true
and ea.party_id = evaluation__party_id(:user_id,et.task_id))
- where eg.grade_id = :grade_id
- and eg.grade_id = et.grade_id
+ where eg.grade_item_id = :grade_item_id
+ and eg.grade_item_id = et.grade_item_id
and et.task_id = et2.task_id
and content_revision__is_live(et.task_id) = true
and content_revision__is_live(eg.grade_id) = true
Index: openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl 7 Jul 2004 17:27:27 -0000 1.4
+++ openacs-4/packages/evaluation-portlet/lib/evaluations-chunk.tcl 30 Jul 2004 22:51:49 -0000 1.5
@@ -8,7 +8,7 @@
set user_id [ad_verify_and_get_user_id]
set admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege admin]
-set base_url [ad_conn package_url]
+set base_url "[ad_conn package_url][evaluation::package_key]/"
db_1row get_grade_info { *SQL* }
@@ -26,7 +26,7 @@
orderby_asc {task_weight asc} \
orderby_desc {task_weight desc}]
set multirow_name grade_tasks_admin
- set actions [list "[_ evaluation-portlet.lt_Edit_grades_distribut]" [export_vars -base "${base_url}evaluation/admin/grades/distribution-edit" { grade_id }]]
+ set actions [list "[_ evaluation-portlet.lt_Edit_grades_distribut]" [export_vars -base "${base_url}admin/grades/distribution-edit" { grade_id }]]
} else {
#student
lappend elements grade \
@@ -75,7 +75,7 @@
if { $admin_p } {
#admin
db_multirow -extend { task_url } grade_tasks_admin get_tasks_admin { *SQL* } {
- set task_url [export_vars -base "${base_url}evaluation/admin/evaluations/student-list" { task_id grade_id }]
+ set task_url [export_vars -base "${base_url}admin/evaluations/student-list" { task_id grade_id }]
set category_weight [expr $category_weight + $task_weight]
set task_weight [format %.2f [lc_numeric $task_weight]]
}
@@ -107,11 +107,12 @@
set task_weight "[_ evaluation-portlet.Not_available_]"
}
+ ns_log notice "el answer data es ($answer_data ([db_string content_length "select content_length from cr_revisions where revision_id = :answer_id" -default nada])) y el title es -$answer_title-! \n"
# working with answer stuff (if it has a file/url attached)
if { [empty_string_p $answer_data] } {
set answer_url ""
set answer ""
- } elseif { [empty_string_p [db_string content_length "select content_length from cr_revisions where revision_id = :answer_id"]] } {
+ } elseif { [string eq $answer_title "link"] } {
# there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute,
# so we have to deal with this case
array set community_info [site_node::get -url "[dotlrn_community::get_community_url [dotlrn_community::get_community_id]][evaluation::package_key]"]
@@ -122,7 +123,7 @@
set answer "[_ evaluation-portlet.View_my_answer_]"
} else {
# we assume it's a file
- set answer_url "[export_vars -base "${base_url}evaluation/view/$answer_title" { {revision_id $answer_id} }]"
+ set answer_url "[export_vars -base "${base_url}view/$answer_title" { {revision_id $answer_id} }]"
set answer "[_ evaluation-portlet.View_my_answer_]"
}
Index: openacs-4/packages/evaluation-portlet/lib/tasks-chunk-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/lib/tasks-chunk-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/evaluation-portlet/lib/tasks-chunk-postgresql.xql 14 Jul 2004 17:52:59 -0000 1.4
+++ openacs-4/packages/evaluation-portlet/lib/tasks-chunk-postgresql.xql 30 Jul 2004 22:51:49 -0000 1.5
@@ -11,16 +11,16 @@
et.online_p,
et.late_submit_p,
et.item_id,
- et.requires_grade_p, et.description, et.grade_id,
+ et.requires_grade_p, et.description, et.grade_item_id,
cr.content_length,
et.data as task_data,
cr.title as task_title,
et.task_id as revision_id,
ets.solution_id as solution_id
from cr_revisions cr,
- evaluation_tasksi et left outer join evaluation_tasks_solsi ets on (ets.task_id = et.task_id and content_revision__is_live(ets.solution_id) = true)
+ evaluation_tasksi et left outer join evaluation_tasks_solsi ets on (ets.task_item_id = et.task_item_id and content_revision__is_live(ets.solution_id) = true)
where cr.revision_id = et.revision_id
- and grade_id = :grade_id
+ and et.grade_item_id = :grade_item_id
and content_revision__is_live(et.task_id) = true
$assignments_orderby
@@ -36,17 +36,17 @@
et.late_submit_p,
et.item_id,
et.due_date,
- et.requires_grade_p, et.description, et.grade_id,
+ et.requires_grade_p, et.description, et.grade_item_id,
cr.title as task_title,
et.data as task_data,
et.task_id as revision_id,
cr.content_length,
ea.answer_id as answer_id
from cr_revisions cr,
- evaluation_tasksi et left outer join evaluation_answersi ea on (ea.task_id = et.task_id and content_revision__is_live(ea.answer_id) = true
+ evaluation_tasksi et left outer join evaluation_answersi ea on (ea.task_item_id = et.task_item_id and content_revision__is_live(ea.answer_id) = true
and ea.party_id = evaluation__party_id(:user_id,et.task_id))
where cr.revision_id = et.revision_id
- and grade_id = :grade_id
+ and grade_item_id = :grade_item_id
and content_revision__is_live(et.task_id) = true
$assignments_orderby
@@ -64,7 +64,9 @@
- select grade_name, grade_plural_name from evaluation_grades where grade_id = :grade_id
+ select grade_name, grade_plural_name
+ from evaluation_grades
+ where grade_item_id = :grade_item_id and content_revision__is_live(grade_id) = true
Index: openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl 7 Jul 2004 17:27:27 -0000 1.4
+++ openacs-4/packages/evaluation-portlet/lib/tasks-chunk.tcl 30 Jul 2004 22:51:49 -0000 1.5
@@ -9,10 +9,10 @@
set admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege admin]
db_1row grade_names { *SQL* }
-set base_url [ad_conn package_url]
+set base_url "[ad_conn package_url][evaluation::package_key]/"
set mode display
-set return_url "[ad_conn url]?[export_vars { grade_id }]"
+set return_url "[ad_conn url]?[ns_conn query]&[export_vars { grade_id }]"
set elements [list task_name \
[list label "[_ evaluation-portlet.Name_]" \
@@ -43,23 +43,23 @@
[list label "" \
sub_class narrow \
display_template {
} \
- link_url_eval {[export_vars -base "${base_url}evaluation/admin/tasks/task-add-edit" { grade_id task_id return_url mode }]} \
+ link_url_eval {[export_vars -base "${base_url}admin/tasks/task-add-edit" { grade_id task_id mode return_url }]} \
link_html { title "[_ evaluation-portlet.View_task_]" }]
lappend elements edit \
[list label "" \
sub_class narrow \
display_template {
} \
- link_url_eval {[export_vars -base "${base_url}evaluation/admin/tasks/task-add-edit" { return_url item_id grade_id task_id }]} \
+ link_url_eval {[export_vars -base "${base_url}admin/tasks/task-add-edit" { grade_id return_url item_id task_id }]} \
link_html { title "[_ evaluation-portlet.Edit_task_]" }]
lappend elements delete \
[list label "" \
sub_class narrow \
display_template {
} \
- link_url_eval {[export_vars -base "${base_url}evaluation/admin/tasks/task-delete" { grade_id task_id return_url }]} \
+ link_url_eval {[export_vars -base "${base_url}admin/tasks/task-delete" { grade_id task_id return_url }]} \
link_html { title "[_ evaluation-portlet.Delete_task_]" }]
set multirow_name tasks_admin
- set actions [list "[_ evaluation-portlet.Add_grade_name_]" [export_vars -base "${base_url}evaluation/admin/tasks/task-add-edit" { return_url grade_id }] ]
+ set actions [list "[_ evaluation-portlet.Add_grade_name_]" [export_vars -base "${base_url}admin/tasks/task-add-edit" { return_url grade_id }] ]
} else {
#student
lappend elements answer \
@@ -70,7 +70,7 @@
[list label "" \
sub_class narrow \
display_template {
} \
- link_url_eval {[export_vars -base "${base_url}evaluation/task-view" { grade_id task_id return_url }]} \
+ link_url_eval {[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]} \
link_html { title "[_ evaluation-portlet.View_task_]" }]
set multirow_name tasks
set actions ""
@@ -81,7 +81,7 @@
-multirow $multirow_name \
-actions $actions \
-key task_id \
- -pass_properties { return_url mode base_url } \
+ -pass_properties { return_url mode base_url grade_id } \
-filters { grade_id {} } \
-orderby_name assignments_orderby \
-elements $elements \
@@ -100,9 +100,9 @@
set due_date_pretty [lc_time_fmt $due_date_ansi "%q"]
# working with task stuff (if it has a file/url attached)
if { [empty_string_p $task_data] } {
- set task_url "[export_vars -base "${base_url}evaluation/task-view" { grade_id task_id return_url }]"
+ set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]"
set task_name "[_ evaluation-portlet.task_name_No_data_]"
- } elseif { [empty_string_p $content_length] } {
+ } elseif { [string eq $task_title "link"] } {
# there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute,
# so we have to deal with this case
@@ -115,25 +115,25 @@
} else {
# we assume it's a file
- set task_url "[export_vars -base "${base_url}evaluation/view/$task_title" { revision_id }]"
+ set task_url "[export_vars -base "${base_url}view/$task_title" { revision_id }]"
set task_name "$task_name ([format %.0f [lc_numeric [expr ($content_length/1024)]]] Kb)"
}
if { ![empty_string_p $solution_id] } {
set solution_mode display
- set solution_url "[export_vars -base "${base_url}evaluation/admin/tasks/solution-add-edit" { grade_id task_id solution_id return_url solution_mode }]"
+ set solution_url "[export_vars -base "${base_url}admin/tasks/solution-add-edit" { grade_id task_id solution_id return_url solution_mode }]"
set solution "[_ evaluation-portlet.ViewEdit_Solution_]"
} else {
set solution_mode edit
- set solution_url "[export_vars -base "${base_url}evaluation/admin/tasks/solution-add-edit" { grade_id task_id return_url solution_mode }]"
+ set solution_url "[export_vars -base "${base_url}admin/tasks/solution-add-edit" { grade_id task_id return_url solution_mode }]"
set solution "[_ evaluation-portlet.Upload_Solution_]"
}
- set audit_info_url "[export_vars -base "${base_url}evaluation/admin/evaluations/audit-info" { grade_id task_id }]"
+ set audit_info_url "[export_vars -base "${base_url}admin/evaluations/audit-info" { grade_id task_id }]"
set audit_info "[_ evaluation-portlet.Audit_Info_]"
if { ![string eq $number_of_members 1] } {
- set groups_admin_url "[export_vars -base "${base_url}evaluation/admin/groups/one-task" { grade_id task_id }]"
+ set groups_admin_url "[export_vars -base "${base_url}admin/groups/one-task" { grade_id task_id }]"
set groups_admin "[_ evaluation-portlet.Groups_Admin_]"
}
@@ -144,10 +144,10 @@
set answer_mode display
set due_date_pretty [lc_time_fmt $due_date_ansi "%q"]
# working with task stuff (if it has a file/url attached)
- if { [empty_string_p $task_data] } {
- set task_url "[export_vars -base "${base_url}evaluation/task-view" { grade_id task_id return_url }]"
+ if { [string eq $task_title "link"] } {
+ set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]"
set task_name "[_ evaluation-portlet.task_name_No_data_]"
- } elseif { [empty_string_p $content_length] } {
+ } elseif { [string eq $task_title "link"] } {
# there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute,
# so we have to deal with this case
@@ -160,7 +160,7 @@
} else {
# we assume it's a file
- set task_url "[export_vars -base "${base_url}evaluation/view/$task_title" { revision_id }]"
+ set task_url "[export_vars -base "${base_url}view/$task_title" { revision_id }]"
set task_name "$task_name ([format %.0f [lc_numeric [expr ($content_length/1024)]]] Kb)"
}
@@ -169,21 +169,21 @@
if { [empty_string_p $answer_id] } {
set answer "[_ evaluation-portlet.submit_answer_]"
set answer_mode edit
- set answer_url "[export_vars -base "${base_url}evaluation/answer-add-edit" { grade_id task_id return_url answer_mode }]"
+ set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id return_url answer_mode }]"
} else {
set answer "[_ evaluation-portlet.submit_answer_again_]"
set answer_mode display
- set answer_url "[export_vars -base "${base_url}evaluation/answer-add-edit" { grade_id task_id answer_id return_url answer_mode }]"
+ set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id answer_id return_url answer_mode }]"
}
} elseif { [string eq $turn_in_late_p "t"] } {
if { [empty_string_p $answer_id] } {
set answer "[_ evaluation-portlet.lt_submit_answer_style_f]"
set answer_mode edit
- set answer_url "[export_vars -base "${base_url}evaluation/answer-add-edit" { grade_id task_id return_url answer_mode }]"
+ set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id return_url answer_mode }]"
} else {
set answer "[_ evaluation-portlet.lt_submit_answer_style_f_1]"
set answer_mode display
- set answer_url "[export_vars -base "${base_url}evaluation/admin/tasks/solution-add-edit" { grade_id task_id answer_id return_url solution_mode }]"
+ set answer_url "[export_vars -base "${base_url}admin/tasks/solution-add-edit" { grade_id task_id answer_id return_url solution_mode }]"
}
}
if { $number_of_members > 1 && [string eq [db_string get_group_id { *SQL* }] 0] } {
Index: openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet-postgresql.xql 31 May 2004 23:43:10 -0000 1.1
+++ openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet-postgresql.xql 30 Jul 2004 22:51:50 -0000 1.2
@@ -7,7 +7,8 @@
select eg.grade_plural_name,
- eg.grade_id
+ eg.grade_id,
+ eg.grade_item_id
from evaluation_gradesx eg, acs_objects ao
where content_revision__is_live(eg.grade_id) = true
and eg.item_id = ao.object_id
Index: openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.adp 10 Jun 2004 22:00:23 -0000 1.2
+++ openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.adp 30 Jul 2004 22:51:50 -0000 1.3
@@ -7,7 +7,7 @@
@grades.grade_plural_name@
-
+
Index: openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.tcl 10 Jun 2004 22:00:23 -0000 1.2
+++ openacs-4/packages/evaluation-portlet/www/evaluation-assignments-portlet.tcl 30 Jul 2004 22:51:50 -0000 1.3
@@ -33,9 +33,9 @@
}
set notification_chunk [notification::display::request_widget \
- -type one_assignment_notif \
- -object_id $package_id \
- -pretty_name "[_ evaluation-portlet.Assignments_]" \
- -url [ad_conn url] \
- ]
+ -type one_assignment_notif \
+ -object_id $package_id \
+ -pretty_name "[_ evaluation-portlet.Assignments_]" \
+ -url "[ad_conn url]?[ns_conn query]" \
+ ]
Index: openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet-postgresql.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet-postgresql.xql 7 Jul 2004 17:27:27 -0000 1.3
+++ openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet-postgresql.xql 30 Jul 2004 22:51:50 -0000 1.4
@@ -7,7 +7,8 @@
select eg.grade_plural_name,
- eg.grade_id
+ eg.grade_id,
+ eg.grade_item_id
from evaluation_gradesx eg, acs_objects ao
where content_revision__is_live(eg.grade_id) = true
and eg.item_id = ao.object_id
Index: openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.adp 10 Jun 2004 22:00:23 -0000 1.2
+++ openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.adp 30 Jul 2004 22:51:50 -0000 1.3
@@ -11,7 +11,7 @@
@grades.grade_plural_name@
-
+
Index: openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.tcl 10 Jun 2004 22:00:23 -0000 1.2
+++ openacs-4/packages/evaluation-portlet/www/evaluation-evaluations-portlet.tcl 30 Jul 2004 22:51:50 -0000 1.3
@@ -39,9 +39,9 @@
set notification_chunk [notification::display::request_widget \
- -type one_evaluation_notif \
- -object_id $package_id \
- -pretty_name "[_ evaluation-portlet.Evaluations_]" \
- -url [ad_conn url] \
- ]
+ -type one_evaluation_notif \
+ -object_id $package_id \
+ -pretty_name "[_ evaluation-portlet.Evaluations_]" \
+ -url "[ad_conn url]?[ns_conn query]" \
+ ]