+
Index: openacs-4/packages/evaluation/www/task-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/task-view.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation/www/task-view.tcl 19 May 2004 17:33:08 -0000 1.2
+++ openacs-4/packages/evaluation/www/task-view.tcl 22 May 2004 01:20:24 -0000 1.3
@@ -10,7 +10,7 @@
grade_id:integer,notnull
task_id:integer,notnull,optional
item_id:integer,notnull,optional
- {return_url "/"}
+ {return_url ""}
}
set package_id [ad_conn package_id]
@@ -52,7 +52,7 @@
set solution_url "$solution_data"
} else {
# we assume it's a file
- set solution_url "$solution_title"
+ set solution_url "$solution_title"
}
ad_return_template
Index: openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.tcl 19 May 2004 17:33:09 -0000 1.3
+++ openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.tcl 22 May 2004 01:20:25 -0000 1.4
@@ -126,7 +126,7 @@
}
if { ![empty_string_p $tmp_filename] } {
-
+
set tmp_filename "${tmp_filename}_grades_sheet"
db_transaction {
@@ -141,17 +141,11 @@
evaluation::set_live -revision_id $revision_id
# create the new item
- db_dml lob_content " update cr_revisions
- set lob = [set __lob_id [db_string get_lob_id "select empty_lob()"]]
- where revision_id = :revision_id
- " -blob_files [list $tmp_filename]
+ db_dml lob_content { *SQL* } -blob_files [list $tmp_filename]
set content_length [file size $tmp_filename]
# Unfortunately, we can only calculate the file size after the lob is uploaded
- db_dml lob_size { update cr_revisions
- set content_length = :content_length
- where revision_id = :revision_id
- }
+ db_dml lob_size { *SQL* }
foreach party_id [array names grades_gs] {
if { ![info exists comments_gs($party_id)] } {
Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl 19 May 2004 17:33:09 -0000 1.2
+++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl 22 May 2004 01:20:25 -0000 1.3
@@ -97,11 +97,11 @@
set comments [string trim [lindex $evaluation 3]]
# removing the first and last " that comes from the csv format
- regsub ^\" $comments "" see_comments
- regsub \"\$ $comments "" see_comments
+ regsub ^\" $comments "" comments
+ regsub \"\$ $comments "" comments
if { [empty_string_p $party_id] && [empty_string_p $grade] && [empty_string_p $comments] } {
- # "blank" line, jump it
+ # "blank" line, skip it
continue
}
@@ -123,9 +123,9 @@
}
# editing without reason
- if { [string compare [db_string check_evaluated { *SQL* } -default $grade] $grade] && [empty_string_p $comments] } {
+ if { ![string eq [format %.2f [db_string check_evaluated { *SQL* } -default $grade]] [format %.2f $grade]] && [empty_string_p $comments] } {
incr errors
- append errors_text "
There must be an edit reason if you want to edit the grade on party_id ${party_id}.
"
+ append errors_text "
(ahora $grade, antes [db_string check_evaluated { *SQL* } -default $grade] There must be an edit reason if you want to edit the grade on party_id ${party_id}.
"
}
if { $errors } {
Index: openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql 28 Apr 2004 11:06:41 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql 22 May 2004 01:20:25 -0000 1.2
@@ -37,6 +37,17 @@
+
+
+
+ select count(*)
+ from evaluation_student_evals
+ where task_id = :task_id
+ and content_revision__is_live(evaluation_id) = true
+
+
+
+
@@ -49,7 +60,7 @@
select evaluation__party_name(ea.party_id, ea.task_id) as party_name,
- ea.party_id,
+ ea.party_id,
ea.data as answer_data,
ea.title as answer_title,
ea.revision_id,
@@ -59,10 +70,10 @@
from evaluation_answersi ea,
evaluation_tasks et
where ea.task_id = et.task_id
- and et.task_id = :task_id
- and ea.data is not null
+ and et.task_id = :task_id
+ and ea.data is not null
and content_revision__is_live(ea.answer_id) = true
- $processed_clause
+ $processed_clause
Index: openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl 19 May 2004 17:33:09 -0000 1.3
+++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl 22 May 2004 01:20:25 -0000 1.4
@@ -239,15 +239,25 @@
set not_in_clause ""
}
set not_evaluated_with_no_answer [db_string count_not_eval_na { *SQL* }]
- set sql_query [db_map sql_query_one]
+ set sql_query [db_map sql_query_groups]
} else {
+ set community_id [dotlrn_community::get_community_id]
if { [llength $done_students] > 0 } {
set not_in_clause [db_map not_yet_in_clause]
} else {
- set not_in_clause ""
+ set not_in_clause "where p.member_state = 'approved'"
}
- set not_evaluated_with_no_answer [db_string get_not_evaluated_left { *SQL* }]
- set sql_query [db_map sql_query_two]
+
+ # if this page is called from within a community (dotlrn) we have to show only the students
+
+ if { [empty_string_p $community_id] } {
+ set not_evaluated_with_no_answer [db_string get_not_evaluated_left { *SQL* }]
+ set sql_query [db_map sql_query_individual]
+ } else {
+ set not_evaluated_with_no_answer [db_string get_community_not_evaluated_left { *SQL* }]
+ set sql_query [db_map sql_query_community_individual]
+ }
+
}
db_multirow not_evaluated_na get_not_evaluated_na_students { *SQL* } {
Index: openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 28 Apr 2004 11:06:41 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 22 May 2004 01:20:25 -0000 1.2
@@ -21,14 +21,6 @@
-
-
-
- select count(*) from evaluation_student_evals where task_id = :task_id
-
-
-
-
@@ -67,7 +59,23 @@
-
+
+
+
+ select count(*)
+ from cc_users p,
+ registered_users ru,
+ dotlrn_member_rels_approved app
+ $not_in_clause
+ and app.community_id = :community_id
+ and app.user_id = ru.user_id
+ and app.user_id = p.person_id
+ and app.role = 'student'
+
+
+
+
+
select acs_group__name(etg.group_id) as party_name,
etg.group_id as party_id
@@ -78,7 +86,7 @@
-
+
select p.person_id as party_id,
p.last_name||', '||p.first_names as party_name
@@ -88,6 +96,22 @@
+
+
+ select app.user_id as party_id,
+ p.last_name||', '||p.first_names as party_name
+ from registered_users ru,
+ dotlrn_member_rels_approved app,
+ cc_users p
+ $not_in_clause
+ and app.community_id = :community_id
+ and app.user_id = ru.user_id
+ and app.user_id = p.person_id
+ and app.role = 'student'
+ $orderby_na
+
+
+
Index: openacs-4/packages/evaluation/www/admin/groups/group-member-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-member-add.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/groups/group-member-add.xql 28 Apr 2004 11:06:42 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/groups/group-member-add.xql 22 May 2004 01:20:25 -0000 1.2
@@ -1,7 +1,6 @@
- postgresql7.4
Index: openacs-4/packages/evaluation/www/admin/groups/one-task.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/one-task.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/groups/one-task.adp 28 Apr 2004 11:09:54 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/groups/one-task.adp 22 May 2004 01:20:25 -0000 1.2
@@ -2,7 +2,7 @@
@page_title;noquote@@context;noquote@
-
+
@reuse_link;noquote@
Index: openacs-4/packages/evaluation/www/admin/groups/one-task.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/one-task.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/groups/one-task.tcl 28 Apr 2004 11:09:54 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/groups/one-task.tcl 22 May 2004 01:20:25 -0000 1.2
@@ -24,9 +24,20 @@
set page_title "Groups for task $task_name"
set context [list "Task Groups"]
+# we have to decide if we are going to show all the users in the system
+# or only the students of a given class (community in dotrln)
+# in order to create the groups
+
+set community_id [dotlrn_community::get_community_id]
+if { [empty_string_p $community_id] } {
+ set query_name students_without_group
+} else {
+ set query_name community_students_without_group
+}
+
set elements [list associate \
[list label "" \
- display_template { } \
+ display_template { } \
] \
student_name \
[list label "Name" \
@@ -38,13 +49,12 @@
link_html { title "Associate to group..." }] \
]
-
template::list::create \
-name students_without_group \
- -multirow students_without_group \
- -key student_id \
- -pass_properties { return_url student_id } \
- -filters { task_id {} } \
+ -multirow $query_name \
+ -key student_id \
+ -pass_properties { return_url student_id query_name } \
+ -filters { task_id {} } \
-elements $elements
@@ -54,7 +64,7 @@
set orderby " order by student_name asc"
}
-db_multirow -extend { associate_to_group_url associate_to_group } students_without_group get_students_without_group { *SQL* } {
+db_multirow -extend { associate_to_group_url associate_to_group } $query_name get_$query_name { *SQL* } {
set associate_to_group_url [export_vars -base "group-member-add" -url { task_id student_id }]
set associate_to_group "Associate to group..."
}
Index: openacs-4/packages/evaluation/www/admin/groups/one-task.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/one-task.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/groups/one-task.xql 28 Apr 2004 11:09:54 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/groups/one-task.xql 22 May 2004 01:20:25 -0000 1.2
@@ -35,6 +35,28 @@
+
+
+
+ select p.last_name ||', '|| p.first_names as student_name,
+ p.person_id as student_id
+ from cc_users p,
+ registered_users ru,
+ dotlrn_member_rels_approved app
+ where p.person_id not in (select map.object_id_two from acs_rels map, evaluation_task_groups etg
+ where map.object_id_two = p.person_id
+ and map.object_id_one = etg.group_id
+ and etg.task_id = :task_id
+ and map.rel_type = 'evaluation_task_group_rel')
+ and app.community_id = :community_id
+ and app.user_id = ru.user_id
+ and app.user_id = p.person_id
+ and app.role = 'student'
+ $orderby
+
+
+
+
@@ -65,7 +87,8 @@
- select count(*) from evaluation_task_groups where task_id = :task_id
+ select count(*) from evaluation_task_groups
+ where task_id = :task_id
Index: openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit-postgresql.xql 28 Apr 2004 11:09:54 -0000 1.1
+++ openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit-postgresql.xql 22 May 2004 01:20:25 -0000 1.2
@@ -9,7 +9,8 @@
select content_revision__get_content(ets.solution_id) as content,
crr.title,
crr.item_id,
- cri.storage_type
+ cri.storage_type,
+ crr.revision_id
from evaluation_tasks_sols ets, cr_items cri, cr_revisions crr
where ets.solution_id = :solution_id
and ets.solution_id = crr.revision_id
Index: openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl 19 May 2004 17:33:09 -0000 1.2
+++ openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl 22 May 2004 01:20:25 -0000 1.3
@@ -65,7 +65,7 @@
{label "File"}
{html "size 30"}
{value "[return $title]"}
- {after_html "$title"}
+ {after_html "$title"}
}
{unattach_p:text(hidden)
}
Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 19 May 2004 17:33:09 -0000 1.3
+++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 22 May 2004 01:20:25 -0000 1.4
@@ -7,13 +7,13 @@
@creation-date Mar 2004
@cvs-id $Id$
} {
- grade_id:integer,notnull
- task_id:integer,notnull,optional
- item_id:integer,notnull,optional
+ grade_id:integer,notnull
+ task_id:integer,notnull,optional
+ item_id:integer,notnull,optional
upload_file:trim,optional
upload_file.tmpfile:tmpfile,optional
- {mode "edit"}
- return_url
+ {mode "edit"}
+ return_url
}
set package_id [ad_conn package_id]
@@ -268,7 +268,7 @@
if { [ad_form_new_p -key task_id] } {
set item_id $task_id
}
-
+
set revision_id [evaluation::new_task -new_item_p [ad_form_new_p -key grade_id] -item_id $item_id -content_type evaluation_tasks \
-content_table evaluation_tasks -content_id task_id -name $task_name -description $description -weight $weight \
-grade_id $grade_id -number_of_members $number_of_members -online_p $online_p -storage_type $storage_type \
Index: openacs-4/packages/evaluation/www/view/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/view/index.vuh,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/evaluation/www/view/index.vuh 28 Apr 2004 11:09:54 -0000 1.1
+++ openacs-4/packages/evaluation/www/view/index.vuh 22 May 2004 01:20:26 -0000 1.2
@@ -15,14 +15,9 @@
set package_id [ad_conn package_id]
# Get the IDs
-set content_type [db_string get_content_type "select cri.content_type
- from cr_items cri, cr_revisions crr
- where cri.item_id = crr.item_id
- and crr.revision_id = :revision_id"]
+set content_type [db_string get_content_type { *SQL* }]
-set content_root [db_string get_folder_id "select crf.folder_id
- from cr_folders crf
- where crf.label = :content_type||'_'||:package_id"]
+set content_root [db_string get_folder_id { *SQL* }]
set template_root ""