Index: openacs-4/packages/evaluation/evaluation.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/evaluation.info,v diff -u -r1.7 -r1.8 --- openacs-4/packages/evaluation/evaluation.info 31 May 2004 17:04:57 -0000 1.7 +++ openacs-4/packages/evaluation/evaluation.info 7 Jun 2004 16:04:48 -0000 1.8 @@ -17,10 +17,12 @@ - + + + Index: openacs-4/packages/evaluation/lib/evaluations-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/evaluations-chunk.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/lib/evaluations-chunk.tcl 31 May 2004 17:04:57 -0000 1.2 +++ openacs-4/packages/evaluation/lib/evaluations-chunk.tcl 7 Jun 2004 16:04:53 -0000 1.3 @@ -26,7 +26,7 @@ orderby_asc {task_weight asc} \ orderby_desc {task_weight desc}] set multirow_name grade_tasks_admin - set actions [list "Edit grades distribution of $grade_name" [export_vars -base "${base_url}admin/grades/distribution-edit" { grade_id }]] + set actions [list "Edit grades distribution of $grade_plural_name" [export_vars -base "${base_url}admin/grades/distribution-edit" { grade_id }]] } else { #student lappend elements grade \ @@ -91,7 +91,7 @@ if { ![empty_string_p $grade] } { set grade [format %.2f $grade] - set over_weight "[format %.2f $task_grade] /" + set over_weight "[format %.2f $task_grade]/" set total_grade [expr $total_grade + $task_grade] } else { set grade "Not evaluated" @@ -101,7 +101,7 @@ } else { set grade "Not available" } - set task_weight "$over_weight [format %.2f $task_weight]" + set task_weight "${over_weight}[format %.2f $task_weight]" # working with answer stuff (if it has a file/url attached) if { [empty_string_p $answer_data] } { @@ -126,8 +126,8 @@ } if { $admin_p } { - set bottom_line "Weight used in $grade_name: ${category_weight}% (of 100% of $grade_name) - $grade_name represents ${grade_weight}% of the 100% of the class" + set bottom_line "Weight used in $grade_plural_name: ${category_weight}% (of 100% of $grade_plural_name) + $grade_plural_name represents ${grade_weight}% of the 100% of the class" } else { set bottom_line "Total points in this category: $total_grade / $max_grade This grade category represents the ${grade_weight}% of the 100% of the class" Index: openacs-4/packages/evaluation/lib/evaluations-chunk.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/evaluations-chunk.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/lib/evaluations-chunk.xql 28 Apr 2004 11:06:40 -0000 1.1 +++ openacs-4/packages/evaluation/lib/evaluations-chunk.xql 7 Jun 2004 16:04:53 -0000 1.2 @@ -6,7 +6,7 @@ - select grade_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id + select grade_plural_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id Index: openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/Attic/tasks-chunk-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql 31 May 2004 17:04:57 -0000 1.2 +++ openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql 7 Jun 2004 16:04:53 -0000 1.3 @@ -55,10 +55,10 @@ - + - select grade_name from evaluation_grades where grade_id = :grade_id + select grade_name, grade_plural_name, grade_name from evaluation_grades where grade_id = :grade_id Index: openacs-4/packages/evaluation/lib/tasks-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/tasks-chunk.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/lib/tasks-chunk.tcl 31 May 2004 17:04:57 -0000 1.2 +++ openacs-4/packages/evaluation/lib/tasks-chunk.tcl 7 Jun 2004 16:04:53 -0000 1.3 @@ -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 grade_name [db_string grade_name { *SQL* }] +db_1row grade_names { *SQL* } set base_url [ad_conn package_url] set mode display Index: openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 31 May 2004 17:04:57 -0000 1.4 +++ openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 7 Jun 2004 16:04:53 -0000 1.5 @@ -7,6 +7,7 @@ constraint evaluation_grades_id_fk references cr_revisions(revision_id), grade_name varchar(100), + grade_plural_name varchar(100), comments text, -- percentage of this grade type in the class weight numeric @@ -70,23 +71,6 @@ null -- name_method ); - --- We need a way to group tasks because there may be the case when a professor/TA --- would want to assign a task to more than one class, and the task must be --- associated with the tasks of the other classes. - - -create table evaluation_tasks_class_map ( - package_id integer - constraint evaluations_tasks_cmap_cid_fk - references apm_packages, - revision_id integer - constraint evaluations_tasks_cmap_fid_fk - references cr_revisions, - constraint evaluaition_tasks_cmap_pk - primary key (package_id, revision_id) -); - create table evaluation_tasks_sols ( solution_id integer primary key, @@ -313,22 +297,23 @@ -- GRADES --------------------------------------- -create function evaluation__new_grade (integer, integer, varchar, numeric, varchar, timestamptz, integer, varchar, varchar, varchar, timestamptz, varchar, varchar) +create function evaluation__new_grade (integer, integer, varchar, varchar, numeric, varchar, timestamptz, integer, varchar, varchar, varchar, timestamptz, varchar, varchar) returns integer as ' declare p_item_id alias for $1; p_revision_id alias for $2; p_grade_name alias for $3; - p_weight alias for $4; - p_object_type alias for $5; - p_creation_date alias for $6; - p_creation_user alias for $7; - p_creation_ip alias for $8; - p_title alias for $9; -- default null - p_description alias for $10; -- default null - p_publish_date alias for $11; - p_nls_language alias for $12; -- default null - p_mime_type alias for $13; -- default null + p_grade_plural_name alias for $4; + p_weight alias for $5; + p_object_type alias for $6; + p_creation_date alias for $7; + p_creation_user alias for $8; + p_creation_ip alias for $9; + p_title alias for $10; -- default null + p_description alias for $11; -- default null + p_publish_date alias for $12; + p_nls_language alias for $13; -- default null + p_mime_type alias for $14; -- default null v_revision_id integer; @@ -351,12 +336,14 @@ insert into evaluation_grades (grade_id, - grade_name, + grade_name, + grade_plural_name, comments, weight) values (v_revision_id, p_grade_name, + p_grade_plural_name, p_description, p_weight); Index: openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql 31 May 2004 17:04:57 -0000 1.4 +++ openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql 7 Jun 2004 16:04:54 -0000 1.5 @@ -149,8 +149,6 @@ drop view evaluation_answersx; drop table evaluation_answers; -drop table evaluation_tasks_class_map; - drop table evaluation_task_groups; drop view evaluation_tasksi; @@ -167,7 +165,7 @@ -- GRADES --------------------------------------- -drop function evaluation__new_grade (integer, integer, varchar, numeric, varchar, timestamptz, integer, varchar, varchar, varchar, timestamptz, varchar, varchar); +drop function evaluation__new_grade (integer, integer, varchar, varchar, numeric, varchar, timestamptz, integer, varchar, varchar, varchar, timestamptz, varchar, varchar); drop function evaluation__delete_grade (integer); Index: openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql 31 May 2004 17:04:57 -0000 1.4 +++ openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql 7 Jun 2004 16:05:06 -0000 1.5 @@ -33,6 +33,7 @@ :item_id, :revision_id, :name, + :plural_name, :weight, 'evaluation_grades', now(), --creation date @@ -58,6 +59,96 @@ + + + + select et.task_name, + et.number_of_members, + et.due_date, + et.weight, + et.online_p, + et.late_submit_p, + et.requires_grade_p, + crr.lob, crr.content, + crr.content_length, + crr.title, + crr.description, + crr.mime_type, + cri.storage_type + from evaluation_tasksi et, + cr_revisions crr, + cr_items cri + where task_id = :from_task_id + and et.task_id = crr.revision_id + and cri.item_id = crr.item_id + + + + + + + + select coalesce((select evaluation__new_item ( + :item_id, --item_id + :item_name, + null, --locale + :creation_user, + :to_package_id, + :creation_ip, + :task_name, + :description, + :mime_type, --mime_type + null, --nls_language + null, --text + :storage_type, --storage_type + 'content_item', -- item_subtype + 'evaluation_tasks' -- content_type + ) + where not exists (select 1 from cr_items where item_id = :item_id)),0) + + + + + + + + select evaluation__new_task ( + :item_id, + :revision_id, + :task_name, + :number_of_members, + :to_grade_id, + :description, + :weight, + :due_date, + :late_submit_p, + :online_p, + :requires_grade_p, + 'evaluation_tasks', + now(), --creation date + :creation_user, + :creation_ip, + :item_name, + now(), --publish date + null, -- nls_language + :mime_type --mime_type + ) + + + + + + + + update cr_revisions + set content = :content, + content_length = :content_length, + lob = :lob + where revision_id = :revision_id + + + + @@ -89,6 +180,7 @@ :revision_id, :name, :number_of_members, + :grade_id, :description, :weight, :due_date, @@ -459,6 +551,7 @@ select evaluation__new_grade ( :exams_item_id, :exams_revision_id, + 'Exam', 'Exams', 40, 'evaluation_grades', @@ -513,6 +606,7 @@ select evaluation__new_grade ( :projects_item_id, :projects_revision_id, + 'Project', 'Projects', 20, 'evaluation_grades', @@ -568,7 +662,8 @@ select evaluation__new_grade ( :tasks_item_id, :tasks_revision_id, - 'Tasks', + 'Task', + 'Tasks', 40, 'evaluation_grades', now(), --creation date @@ -668,5 +763,43 @@ + + + + + select evaluation__party_name(ea.party_id, ea.task_id) as party_name, + ea.title as answer_title, + ea.revision_id, + cri.storage_type + from evaluation_answersi ea, + evaluation_tasks et, + cr_items cri + where ea.task_id = et.task_id + and ea.item_id = cri.item_id + and et.task_id = :task_id + and ea.data is not null + and content_revision__is_live(ea.answer_id) = true + and not exists (select 1 from evaluation_student_evals ese where ese.party_id = ea.party_id and ese.task_id = :task_id and content_revision__is_live(ese.evaluation_id) = true) + + + + + + + + select content_revision__get_content(:revision_id) + + + + + + + + select lob + from cr_revisions + where revision_id = :revision_id + + + Index: openacs-4/packages/evaluation/tcl/evaluation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/evaluation-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 31 May 2004 17:04:57 -0000 1.5 +++ openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 7 Jun 2004 16:05:06 -0000 1.6 @@ -114,6 +114,7 @@ -description:required -weight:required -name:required + -plural_name:required } { Build a new content revision of a evaluation subtype. If new_item_p is @@ -190,6 +191,36 @@ return [eval template::util::date::create $now] } +ad_proc -public evaluation::clone_task { + -item_id:required + -from_task_id:required + -to_grade_id:required + -to_package_id:required +} { + Cone a task + + @param item_id The item to create. + @param from_task_id Task to clon. + @param to_grade_id Grade that will "own" the task +} { + + db_1row from_task_info { *SQL* } + + set creation_user [ad_conn user_id] + set creation_ip [ad_conn peeraddr] + + set item_name "${item_id}_${title}" + + set revision_id [db_nextval acs_object_id_seq] + + db_exec_plsql content_item_new { *SQL* } + + db_exec_plsql content_revision_new { *SQL* } + + db_dml clone_content { *SQL* } + return $revision_id +} + ad_proc -public evaluation::new_task { -item_id:required -content_type:required @@ -232,7 +263,7 @@ } { set package_id [ad_conn package_id] - set creation_user [ad_verify_and_get_user_id] + set creation_user [ad_conn user_id] set creation_ip [ad_conn peeraddr] if { [empty_string_p $item_name] } { @@ -243,7 +274,6 @@ if { $new_item_p } { db_exec_plsql content_item_new { *SQL* } - } db_exec_plsql content_revision_new { *SQL* } @@ -721,5 +751,74 @@ } } +ad_proc -public evaluation::get_archive_command { + {-in_file ""} + {-out_file ""} +} { + return the archive command after replacing {in_file} and {out_file} with + their respective values. +} { + set cmd [parameter::get -parameter ArchiveCommand -default "cat `find {in_file} -type f` > {out_file}"] + + regsub -all {(\W)} $in_file {\\\1} in_file + regsub -all {\\/} $in_file {/} in_file + regsub -all {\\\.} $in_file {.} in_file + + regsub -all {(\W)} $out_file {\\\1} out_file + regsub -all {\\/} $out_file {/} out_file + regsub -all {\\\.} $out_file {.} out_file + + regsub -all {{in_file}} $cmd $in_file cmd + regsub -all {{out_file}} $cmd $out_file cmd + + return $cmd +} + +ad_proc -public evaluation::public_answers_to_file_system { + -task_id:required + -path:required + -folder_name:required +} { + Writes all the answers of a given task in the file sytem. +} { + + set dir [file join ${path} ${folder_name}] + file mkdir $dir + + db_foreach get_answers_for_task { *SQL* } { + if { [string eq $storage_type "lob"] } { + # it is a file + + regsub -all {[<>:\"|/@\\\#%&+\\ ,]} $party_name {_} file_name + append file_name [file extension $answer_title] + + db_blob_get_file select_object_content { *SQL* } -file [file join ${dir} ${file_name}] + + } else { + # it is a url + + set url [db_string url { *SQL* }] + + + set file_name "${party_name}.url" + + regsub -all {[<>:\"|/@\\\#%&+\\ ,]} $file_name {_} file_name + set fp [open [file join ${dir} ${file_name}] w] + puts $fp {[InternetShortcut]} + puts $fp URL=$url + close $fp + } + } + + return $dir +} + +ad_proc -public evaluation::get_archive_extension {} { + return the archive extension that should be added to the output file of + an archive command +} { + return [parameter::get -parameter ArchiveExtension -default "txt"] +} + ad_register_proc GET /grades-sheet-csv* evaluation::generate_grades_sheet ad_register_proc POST /grades-sheet-csv* evaluation::generate_grades_sheet Index: openacs-4/packages/evaluation/www/answer-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/answer-add-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/answer-add-edit.tcl 31 May 2004 17:04:57 -0000 1.3 +++ openacs-4/packages/evaluation/www/answer-add-edit.tcl 7 Jun 2004 16:05:06 -0000 1.4 @@ -14,7 +14,13 @@ upload_file:trim,optional upload_file.tmpfile:tmpfile,optional return_url:notnull -} +} -validate { + late_submit { + if { ([template::util::date::compare [db_string due_date "select due_date from evaluation_tasks where task_id = :task_id"] [template::util::date::now]] < 0) } { + ad_complain "tarde manin" + } + } +} set user_id [ad_conn user_id] set party_id [db_string get_party_id { *SQL* }] @@ -56,14 +62,14 @@ db_1row item_data { *SQL* } } -validate { - {url - { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) || (![string eq $url "http://"] && [util_url_valid_p $url]) } - {Upload a file OR a valid url, and not both } - } - {upload_file - { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) } - {Upload a file OR a url, and not both} - } + {url + { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) || (![string eq $url "http://"] && [util_url_valid_p $url]) } + {Upload a file OR a valid url, and not both } + } + {upload_file + { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) } + {Upload a file OR a url, and not both} + } } -on_submit { db_transaction { Index: openacs-4/packages/evaluation/www/evaluation-list-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/evaluation-list-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/evaluation-list-postgresql.xql 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/evaluation-list-postgresql.xql 7 Jun 2004 16:05:07 -0000 1.2 @@ -6,13 +6,13 @@ - select eg.grade_name, + select eg.grade_plural_name, eg.grade_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id - order by grade_name desc + order by grade_plural_name desc Index: openacs-4/packages/evaluation/www/evaluation-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/evaluation-list.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/evaluation-list.adp 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/evaluation-list.adp 7 Jun 2004 16:05:07 -0000 1.2 @@ -5,7 +5,7 @@ - @grades.grade_name@ + @grades.grade_plural_name@ Index: openacs-4/packages/evaluation/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/index-postgresql.xql 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/index-postgresql.xql 7 Jun 2004 16:05:07 -0000 1.2 @@ -6,13 +6,13 @@ - select eg.grade_name, + select eg.grade_plural_name, eg.grade_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id - order by grade_name desc + order by grade_plural_name desc Index: openacs-4/packages/evaluation/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/index.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/evaluation/www/index.adp 31 May 2004 17:04:57 -0000 1.5 +++ openacs-4/packages/evaluation/www/index.adp 7 Jun 2004 16:05:07 -0000 1.6 @@ -13,7 +13,7 @@ There are no tasks for this package. - @grades.grade_name@ + @grades.grade_plural_name@ @@ -26,7 +26,7 @@ There are no tasks to evaluate for this package. - @grades.grade_name@ + @grades.grade_plural_name@ Index: openacs-4/packages/evaluation/www/task-list-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/task-list-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/task-list-postgresql.xql 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/task-list-postgresql.xql 7 Jun 2004 16:05:07 -0000 1.2 @@ -6,13 +6,13 @@ - select eg.grade_name, + select eg.grade_plural_name, eg.grade_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id - order by grade_name desc + order by grade_plural_name desc Index: openacs-4/packages/evaluation/www/task-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/task-list.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/task-list.adp 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/task-list.adp 7 Jun 2004 16:05:07 -0000 1.2 @@ -5,7 +5,7 @@ - @grades.grade_name@ + @grades.grade_plural_name@ Index: openacs-4/packages/evaluation/www/task-view-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/task-view-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/task-view-postgresql.xql 22 May 2004 01:20:24 -0000 1.2 +++ openacs-4/packages/evaluation/www/task-view-postgresql.xql 7 Jun 2004 16:05:07 -0000 1.3 @@ -14,7 +14,7 @@ et.data as task_data, ets.title as solution_title, ets.data as solution_data, - eg.grade_name, eg.weight as grade_weight, + eg.grade_plural_name, eg.weight as grade_weight, ets.revision_id from evaluation_grades eg, 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) Index: openacs-4/packages/evaluation/www/task-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/task-view.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/task-view.adp 22 May 2004 01:20:24 -0000 1.2 +++ openacs-4/packages/evaluation/www/task-view.adp 7 Jun 2004 16:05:07 -0000 1.3 @@ -29,7 +29,7 @@ Grades Category - @grade_name@ - @grade_weight@% + @grade_plural_name@ - @grade_weight@% Will this task be submitted on line? Index: openacs-4/packages/evaluation/www/task-view.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/task-view.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/task-view.xql 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/task-view.xql 7 Jun 2004 16:05:07 -0000 1.2 @@ -1,12 +1,11 @@ - postgresql7.4 - select grade_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id + select grade_plural_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id Index: openacs-4/packages/evaluation/www/admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/index-postgresql.xql 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/index-postgresql.xql 7 Jun 2004 16:05:08 -0000 1.2 @@ -6,13 +6,13 @@ - select eg.grade_name, + select eg.grade_plural_name, eg.grade_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id - order by grade_name desc + order by grade_plural_name desc Index: openacs-4/packages/evaluation/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/index.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/evaluation/www/admin/index.adp 31 May 2004 17:04:57 -0000 1.4 +++ openacs-4/packages/evaluation/www/admin/index.adp 7 Jun 2004 16:05:08 -0000 1.5 @@ -17,7 +17,7 @@ There are no tasks for this package. - @grades.grade_name@ + @grades.grade_plural_name@ @@ -31,7 +31,7 @@ There are no tasks to evaluate for this package. - @grades.grade_name@ + @grades.grade_plural_name@ Index: openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.xql 7 Jun 2004 16:05:09 -0000 1.1 @@ -0,0 +1,26 @@ + + + + + + + + update cr_revisions + set lob = [set __lob_id [db_string get_lob_id "select empty_lob()"]] + where revision_id = :revision_id + + + + + + + + update cr_revisions + set content_length = :content_length + where revision_id = :revision_id + + + + + + \ No newline at end of file Index: openacs-4/packages/evaluation/www/admin/evaluations/student-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/student-list.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list.adp 12 May 2004 02:07:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.adp 7 Jun 2004 16:05:09 -0000 1.3 @@ -23,6 +23,7 @@ Students with answers that have not been evaluated (@not_evaluated_with_answer@) +Click here if you want to download all the answers in one file 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.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 22 May 2004 01:20:25 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 7 Jun 2004 16:05:09 -0000 1.3 @@ -8,7 +8,7 @@ select et.task_name, eg.grade_id, - eg.grade_name, + eg.grade_plural_name, eg.weight as grade_weight, et.weight as task_weight, to_char(et.due_date,'Month DD YYYY') as due_date, Index: openacs-4/packages/evaluation/www/admin/grades/distribution-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/distribution-edit.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/distribution-edit.adp 28 Apr 2004 11:06:41 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/distribution-edit.adp 7 Jun 2004 16:05:11 -0000 1.2 @@ -2,7 +2,7 @@ @page_title@ @context@ -Distribution for grade "@grade_name@" +Distribution for grade "@grade_plural_name@" @grade_comments@ Index: openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql 7 Jun 2004 16:05:11 -0000 1.2 @@ -6,7 +6,7 @@ - select eg.grade_name, + select eg.grade_plural_name, eg.weight as grade_weight, eg.comments as grade_comments from evaluation_gradesi eg Index: openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl 7 Jun 2004 16:05:11 -0000 1.2 @@ -30,8 +30,13 @@ {label "Assignment Type Name"} {html {size 30}} } + + {grade_plural_name:text + {label "Assignment Plural Type Name"} + {html {size 30}} + } - {weight:text + {weight:float {label "Weight"} {html {size 5}} } @@ -48,9 +53,8 @@ set grade_id $item_id } -validate { - {weight - { [ad_var_type_check_number_p $weight] && ($weight >= 0) && ($weight <= 100) } + { ($weight >= 0) && ($weight <= 100) } {Weight must be a real number and between 0 and 100} } @@ -59,7 +63,7 @@ db_transaction { set revision_id [evaluation::new_grade -new_item_p [ad_form_new_p -key grade_id] -item_id $grade_id -content_type evaluation_grades \ - -content_table evaluation_grades -content_id grade_id -name $grade_name -description $comments -weight $weight] + -content_table evaluation_grades -content_id grade_id -name $grade_name -plural_name $grade_plural_name -description $comments -weight $weight] evaluation::set_live -revision_id $revision_id Index: openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql 7 Jun 2004 16:05:11 -0000 1.3 @@ -6,7 +6,7 @@ - select grade_name, comments, weight + select grade_name, grade_plural_name, comments, weight from evaluation_grades where grade_id = :grade_id Index: openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp 7 Jun 2004 16:05:11 -0000 1.2 @@ -2,7 +2,7 @@ @context;noquote@ Remove Grade -Are you sure you want to remove the assignment type "@grade_name@"? (If your answer is yes, all the evaluations, tasks, tasks solutions and answers associated with this assignment type will be deleted too) +Are you sure you want to remove the assignment type "@grade_plural_name@"? (If your answer is yes, all the evaluations, tasks, tasks solutions and answers associated with this assignment type will be deleted too) Index: openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl 7 Jun 2004 16:05:11 -0000 1.2 @@ -21,7 +21,7 @@ db_1row get_grade_info " select item_id, - grade_name + grade_plural_name from evaluation_gradesx where grade_id = :grade_id " Index: openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql 7 Jun 2004 16:05:11 -0000 1.3 @@ -8,7 +8,7 @@ select eg.grade_id, eg.item_id, - eg.grade_name, + eg.grade_plural_name, eg.comments, eg.weight from evaluation_gradesx eg, acs_objects ao Index: openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql 31 May 2004 17:04:58 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql 7 Jun 2004 16:05:11 -0000 1.4 @@ -19,13 +19,13 @@ select eg.grade_id, - eg.grade_name, + eg.grade_plural_name, eg.weight from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id - order by grade_name + order by grade_plural_name Index: openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl 31 May 2004 17:04:58 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl 7 Jun 2004 16:05:12 -0000 1.4 @@ -41,7 +41,7 @@ ] db_foreach grade_type { *SQL* } { - set grade_label_${grade_id} "$grade_name ($weight %) " + set grade_label_${grade_id} "$grade_plural_name ($weight %) " append pass_grades " grade_label_${grade_id} " lappend elements grade_$grade_id \ [list label "@grade_label_${grade_id};noquote@" \ Index: openacs-4/packages/evaluation/www/admin/grades/grades.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades.tcl 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades.tcl 7 Jun 2004 16:05:12 -0000 1.3 @@ -33,10 +33,10 @@ -key grade_id \ -pass_properties { return_url aggregate_label } \ -elements { - grade_name { + grade_plural_name { label "Name" - orderby_asc {grade_name asc} - orderby_desc {grade_name desc} + orderby_asc {grade_plural_name asc} + orderby_desc {grade_plural_name desc} link_url_eval {[export_vars -base "distribution-edit" { grade_id }]} link_html { title "View assignment type distribution" } } @@ -76,7 +76,7 @@ set orderby [template::list::orderby_clause -orderby -name grades] if {[string equal $orderby ""]} { - set orderby " order by grade_name asc" + set orderby " order by grade_plural_name asc" } db_multirow grades get_class_grades { *SQL* } Index: openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql 7 Jun 2004 16:05:12 -0000 1.2 @@ -8,7 +8,7 @@ select et.task_name, et.number_of_members, et.task_id as from_task_id, - eg.grade_name + eg.grade_plural_name from evaluation_tasksi et, evaluation_gradesi eg where content_revision__is_live(et.task_id) = true and et.number_of_members > 1 Index: openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl 13 May 2004 16:29:41 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl 7 Jun 2004 16:05:14 -0000 1.4 @@ -23,10 +23,10 @@ [list label "No. of Members" \ orderby_asc {number_of_members asc} \ orderby_desc {number_of_members desc}] \ - grade_name \ + grade_plural_name \ [list label "Assignment Type" \ - orderby_asc {grade_name asc} \ - orderby_desc {grade_name desc}] \ + orderby_asc {grade_plural_name asc} \ + orderby_desc {grade_plural_name desc}] \ ] template::list::create \ Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql 7 Jun 2004 16:05:15 -0000 1.2 @@ -6,7 +6,7 @@ - select grade_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id + select grade_plural_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp 7 Jun 2004 16:05:15 -0000 1.3 @@ -35,4 +35,9 @@ } + + + To add this assignment to other classes (where you are administrator) please check the last check box at the bottom of the form. + + 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.5 -r1.6 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 31 May 2004 17:04:58 -0000 1.5 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 7 Jun 2004 16:05:15 -0000 1.6 @@ -15,11 +15,14 @@ {mode "edit"} return_url admin_groups_p:optional + {add_to_more_classes_p ""} } set package_id [ad_conn package_id] -if { [ad_form_new_p -key task_id] } { +set community_id [dotlrn_community::get_community_id] +set new_p [ad_form_new_p -key task_id] +if { $new_p } { set page_title "Add Task" } else { set page_title "Edit Task" @@ -35,7 +38,7 @@ db_1row get_grade_info { *SQL* } -set context [list [list [export_vars -base grades { package_id }] "Grades"] $page_title] +set context [list $page_title] set attached_p "f" ad_form -html { enctype multipart/form-data } -name task -cancel_url $return_url -export { return_url item_id storage_type grade_id attached_p } -mode $mode -form { @@ -49,7 +52,7 @@ } -if { ![ad_form_new_p -key task_id] } { +if { !$new_p } { db_1row get_task_info { *SQL* } @@ -184,18 +187,18 @@ {value {[evaluation::now_plus_days -ndays 15]}} } - {number_of_members:text + {number_of_members:naturalnum {label "Number of Members"} {value "1"} {html {size 5 onChange TaskInGroups()}} {help_text "1 = Individual"} {after_html { Check this if you want to go to the groups admin page after submitting the task }} } - {weight:text + {weight:float {label "Weight"} {html {size 5}} - {help_text "over $grade_weight% of $grade_name"} + {help_text "over $grade_weight% of $grade_plural_name"} } {online_p:text(radio) @@ -215,18 +218,27 @@ {options {{Yes t} {"No" f}}} {value t} } +} +if { $new_p && ![empty_string_p $community_id] } { + ad_form -extend -name task -form { + {add_to_more_classes_p:text(checkbox),optional + {label "Add this assignment to other class(es)"} + {options {{"" "t"}}} + {help_text "Check this if you want to add the assignment to other class(es) that you administer"} + } + } +} + +ad_form -extend -name task -form { + } -edit_request { db_1row task_info { *SQL* } set due_date [template::util::date::from_ansi $due_date] } -validate { - {weight - { [ad_var_type_check_number_p $weight] } - {Weight is not a real number} - } {due_date { [template::util::date::compare $due_date [template::util::date::now]] > 0 } {Due date must be in the future} @@ -239,10 +251,6 @@ { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) || ([string eq $url "http://"] && [empty_string_p $upload_file]) } {Upload a file OR a url, not both} } - {number_of_members - { [ad_var_type_check_integer_p $number_of_members] } - {Number of members must be an integer} - } {unattach_p { ([string eq $unattach_p "t"] && [empty_string_p $upload_file] && [string eq $url "http://"]) || [empty_string_p $unattach_p] } {First unattach the file/url, then submit another one or just upload a new file/url and leave this in blank} @@ -312,7 +320,13 @@ } } } -after_submit { + set redirect_to_groups_p 0 if { [info exists admin_groups_p] && $number_of_members > 1 } { + set redirect_to_groups_p 1 + } + 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 }] + } elseif { $redirect_to_groups_p } { ad_returnredirect [export_vars -base "../groups/one-task" { {task_id $revision_id} }] ad_script_abort } else { Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,37 @@ + + + + postgresql7.4 + + + + + select dotlrn_communities_all.pretty_name, + dotlrn_communities_all.community_id, + dotlrn_community__url(dotlrn_communities_all.community_id) as url + from dotlrn_communities_all, + dotlrn_member_rels_approved, + dotlrn_classes + where dotlrn_communities_all.community_id = dotlrn_member_rels_approved.community_id + and dotlrn_communities_all.community_type = dotlrn_classes.class_key + and dotlrn_member_rels_approved.user_id = :user_id + and acs_permission__permission_p(dotlrn_communities_all.community_id, :user_id, 'admin') = true + and dotlrn_communities_all.community_id <> [dotlrn_community::get_community_id] + order by dotlrn_communities_all.pretty_name + + + + + + + + select eg.grade_id as to_grade_id from evaluation_gradesx eg, acs_objects ao + where content_revision__is_live(eg.grade_id) = true + and eg.item_id = ao.object_id + and ao.context_id = :community_package_id + and lower(eg.grade_name) = '[string tolower $grade_name]' + + + + + Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,11 @@ + + @page_title;noquote@ + @context;noquote@ + + +The assignment "@task_name@" has been uploaded in this community. Check the rest of communities where you want to upload the assignment too + + +There are no more communities where you can add the task. +If you administer more than one community and you want to upload an assigment in more than one community, you must set the same name for each of the assignment types in each community so the system can identify where to store the assignment. + Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,62 @@ +# /packages/evaluation/www/admin/tasks/task-add-to-communities + +ad_page_contract { + Page for adding the same task to multiple communities. + + @author jopez@galileo.edu + @creation-date Jun 2004 + @cvs-id $Id: task-add-to-communities.tcl,v 1.1 2004/06/07 16:05:15 josee Exp $ +} { + return_url:notnull + task_id:integer,notnull + communities_packages_ids:array,optional + item_ids:array,optional + {redirect_to_groups_p 0} + foo:optional +} + +set user_id [ad_conn user_id] +set this_package_id [ad_conn package_id] +set page_title "Add Assignment to Communities" + +db_1row task_grade_info { *SQL* } + +set context [list [list [export_vars -base grades { communities_packages_ids }] "Add Assignment"] $page_title] + +ad_form -name communities -cancel_url $return_url -export { return_url task_id } -form { foo:key } + +set form_elements [list] +set communities_count 0 +db_foreach get_user_comunities { *SQL* } { + + array set community_info [site_node::get -url "${url}[apm_package_key_from_id $this_package_id]"] + set community_package_id $community_info(package_id) + + if { [db_0or1row community_has_assignment_type { *SQL* }] } { + + lappend form_elements [list communities_packages_ids.$community_package_id:integer(checkbox),optional \ + [list label "$pretty_name"] \ + [list options [list [list "" "$to_grade_id"]]] \ + ] + incr communities_count + if { [ad_form_new_p -key foo] } { + lappend form_elements [list item_ids.$community_package_id:integer(hidden) \ + [list value [db_nextval acs_object_id_seq]] \ + ] + } + } +} + +ad_form -extend -name communities -form $form_elements +ad_form -extend -name communities -on_submit { + + foreach id [array names communities_packages_ids] { + set revision_id [evaluation::clone_task -item_id $item_ids($id) -from_task_id $task_id -to_grade_id $communities_packages_ids($id) -to_package_id $id] + evaluation::set_live -revision_id $revision_id + } + + ad_returnredirect $return_url + ad_script_abort +} + +ad_return_template Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + + + + select et.task_name, eg.grade_name from evaluation_grades eg, evaluation_tasks et where et.grade_id = eg.grade_id and et.task_id = :task_id + + + + + Index: openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql 7 Jun 2004 16:05:16 -0000 1.2 @@ -6,14 +6,9 @@ - select et3.task_name, - count(ets.solution_id) as task_sols, - count(ea.answer_id) as task_answers - from evaluation_tasks et3, - evaluation_tasks et2 left outer join evaluation_tasks_solsi ets on (ets.task_id = et2.task_id and content_revision__is_live(ets.solution_id) = true), - 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) - where et3.task_id = :task_id - group by et3.task_name + select et.task_name + from evaluation_tasks et + where et.task_id = :task_id Index: openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp 7 Jun 2004 16:05:16 -0000 1.2 @@ -2,7 +2,7 @@ @context;noquote@ Remove Grade -Are you sure you want to delete the task "@task_name@"? (it has @task_sols@ solution(s) and @task_answers@ answer(s) assoticiated and they will be deleted too) +Are you sure you want to delete the task "@task_name@"? (If you delete the task, all the information associated with the task, such as answers, task solutions, etc, will be deleted too) Index: openacs-4/packages/evaluation/www/view/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/view/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/view/index.xql 7 Jun 2004 16:05:17 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + + select cri.content_type + from cr_items cri, cr_revisions crr + where cri.item_id = crr.item_id + and crr.revision_id = :revision_id + + + + + + select crf.folder_id + from cr_folders crf + where crf.label = :content_type||'_'||:package_id + + + + +
Click here if you want to download all the answers in one file
Distribution for grade "@grade_name@" +
Distribution for grade "@grade_plural_name@" @grade_comments@ Index: openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql 7 Jun 2004 16:05:11 -0000 1.2 @@ -6,7 +6,7 @@ - select eg.grade_name, + select eg.grade_plural_name, eg.weight as grade_weight, eg.comments as grade_comments from evaluation_gradesi eg Index: openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.tcl 7 Jun 2004 16:05:11 -0000 1.2 @@ -30,8 +30,13 @@ {label "Assignment Type Name"} {html {size 30}} } + + {grade_plural_name:text + {label "Assignment Plural Type Name"} + {html {size 30}} + } - {weight:text + {weight:float {label "Weight"} {html {size 5}} } @@ -48,9 +53,8 @@ set grade_id $item_id } -validate { - {weight - { [ad_var_type_check_number_p $weight] && ($weight >= 0) && ($weight <= 100) } + { ($weight >= 0) && ($weight <= 100) } {Weight must be a real number and between 0 and 100} } @@ -59,7 +63,7 @@ db_transaction { set revision_id [evaluation::new_grade -new_item_p [ad_form_new_p -key grade_id] -item_id $grade_id -content_type evaluation_grades \ - -content_table evaluation_grades -content_id grade_id -name $grade_name -description $comments -weight $weight] + -content_table evaluation_grades -content_id grade_id -name $grade_name -plural_name $grade_plural_name -description $comments -weight $weight] evaluation::set_live -revision_id $revision_id Index: openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades-add-edit.xql 7 Jun 2004 16:05:11 -0000 1.3 @@ -6,7 +6,7 @@ - select grade_name, comments, weight + select grade_name, grade_plural_name, comments, weight from evaluation_grades where grade_id = :grade_id Index: openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/grades-delete.adp 7 Jun 2004 16:05:11 -0000 1.2 @@ -2,7 +2,7 @@ @context;noquote@ Remove Grade -Are you sure you want to remove the assignment type "@grade_name@"? (If your answer is yes, all the evaluations, tasks, tasks solutions and answers associated with this assignment type will be deleted too) +Are you sure you want to remove the assignment type "@grade_plural_name@"? (If your answer is yes, all the evaluations, tasks, tasks solutions and answers associated with this assignment type will be deleted too) Index: openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl 7 Jun 2004 16:05:11 -0000 1.2 @@ -21,7 +21,7 @@ db_1row get_grade_info " select item_id, - grade_name + grade_plural_name from evaluation_gradesx where grade_id = :grade_id " Index: openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql 7 Jun 2004 16:05:11 -0000 1.3 @@ -8,7 +8,7 @@ select eg.grade_id, eg.item_id, - eg.grade_name, + eg.grade_plural_name, eg.comments, eg.weight from evaluation_gradesx eg, acs_objects ao Index: openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql 31 May 2004 17:04:58 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql 7 Jun 2004 16:05:11 -0000 1.4 @@ -19,13 +19,13 @@ select eg.grade_id, - eg.grade_name, + eg.grade_plural_name, eg.weight from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id - order by grade_name + order by grade_plural_name Index: openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl 31 May 2004 17:04:58 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/grades/grades-reports.tcl 7 Jun 2004 16:05:12 -0000 1.4 @@ -41,7 +41,7 @@ ] db_foreach grade_type { *SQL* } { - set grade_label_${grade_id} "$grade_name ($weight %) " + set grade_label_${grade_id} "$grade_plural_name ($weight %) " append pass_grades " grade_label_${grade_id} " lappend elements grade_$grade_id \ [list label "@grade_label_${grade_id};noquote@" \ Index: openacs-4/packages/evaluation/www/admin/grades/grades.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades.tcl 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades.tcl 7 Jun 2004 16:05:12 -0000 1.3 @@ -33,10 +33,10 @@ -key grade_id \ -pass_properties { return_url aggregate_label } \ -elements { - grade_name { + grade_plural_name { label "Name" - orderby_asc {grade_name asc} - orderby_desc {grade_name desc} + orderby_asc {grade_plural_name asc} + orderby_desc {grade_plural_name desc} link_url_eval {[export_vars -base "distribution-edit" { grade_id }]} link_html { title "View assignment type distribution" } } @@ -76,7 +76,7 @@ set orderby [template::list::orderby_clause -orderby -name grades] if {[string equal $orderby ""]} { - set orderby " order by grade_name asc" + set orderby " order by grade_plural_name asc" } db_multirow grades get_class_grades { *SQL* } Index: openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql 7 Jun 2004 16:05:12 -0000 1.2 @@ -8,7 +8,7 @@ select et.task_name, et.number_of_members, et.task_id as from_task_id, - eg.grade_name + eg.grade_plural_name from evaluation_tasksi et, evaluation_gradesi eg where content_revision__is_live(et.task_id) = true and et.number_of_members > 1 Index: openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl 13 May 2004 16:29:41 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/groups/group-reuse.tcl 7 Jun 2004 16:05:14 -0000 1.4 @@ -23,10 +23,10 @@ [list label "No. of Members" \ orderby_asc {number_of_members asc} \ orderby_desc {number_of_members desc}] \ - grade_name \ + grade_plural_name \ [list label "Assignment Type" \ - orderby_asc {grade_name asc} \ - orderby_desc {grade_name desc}] \ + orderby_asc {grade_plural_name asc} \ + orderby_desc {grade_plural_name desc}] \ ] template::list::create \ Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql 7 Jun 2004 16:05:15 -0000 1.2 @@ -6,7 +6,7 @@ - select grade_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id + select grade_plural_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.adp 7 Jun 2004 16:05:15 -0000 1.3 @@ -35,4 +35,9 @@ } + + + To add this assignment to other classes (where you are administrator) please check the last check box at the bottom of the form. + + 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.5 -r1.6 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 31 May 2004 17:04:58 -0000 1.5 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 7 Jun 2004 16:05:15 -0000 1.6 @@ -15,11 +15,14 @@ {mode "edit"} return_url admin_groups_p:optional + {add_to_more_classes_p ""} } set package_id [ad_conn package_id] -if { [ad_form_new_p -key task_id] } { +set community_id [dotlrn_community::get_community_id] +set new_p [ad_form_new_p -key task_id] +if { $new_p } { set page_title "Add Task" } else { set page_title "Edit Task" @@ -35,7 +38,7 @@ db_1row get_grade_info { *SQL* } -set context [list [list [export_vars -base grades { package_id }] "Grades"] $page_title] +set context [list $page_title] set attached_p "f" ad_form -html { enctype multipart/form-data } -name task -cancel_url $return_url -export { return_url item_id storage_type grade_id attached_p } -mode $mode -form { @@ -49,7 +52,7 @@ } -if { ![ad_form_new_p -key task_id] } { +if { !$new_p } { db_1row get_task_info { *SQL* } @@ -184,18 +187,18 @@ {value {[evaluation::now_plus_days -ndays 15]}} } - {number_of_members:text + {number_of_members:naturalnum {label "Number of Members"} {value "1"} {html {size 5 onChange TaskInGroups()}} {help_text "1 = Individual"} {after_html { Check this if you want to go to the groups admin page after submitting the task }} } - {weight:text + {weight:float {label "Weight"} {html {size 5}} - {help_text "over $grade_weight% of $grade_name"} + {help_text "over $grade_weight% of $grade_plural_name"} } {online_p:text(radio) @@ -215,18 +218,27 @@ {options {{Yes t} {"No" f}}} {value t} } +} +if { $new_p && ![empty_string_p $community_id] } { + ad_form -extend -name task -form { + {add_to_more_classes_p:text(checkbox),optional + {label "Add this assignment to other class(es)"} + {options {{"" "t"}}} + {help_text "Check this if you want to add the assignment to other class(es) that you administer"} + } + } +} + +ad_form -extend -name task -form { + } -edit_request { db_1row task_info { *SQL* } set due_date [template::util::date::from_ansi $due_date] } -validate { - {weight - { [ad_var_type_check_number_p $weight] } - {Weight is not a real number} - } {due_date { [template::util::date::compare $due_date [template::util::date::now]] > 0 } {Due date must be in the future} @@ -239,10 +251,6 @@ { ([string eq $url "http://"] && ![empty_string_p $upload_file]) || (![string eq $url "http://"] && [empty_string_p $upload_file]) || ([string eq $url "http://"] && [empty_string_p $upload_file]) } {Upload a file OR a url, not both} } - {number_of_members - { [ad_var_type_check_integer_p $number_of_members] } - {Number of members must be an integer} - } {unattach_p { ([string eq $unattach_p "t"] && [empty_string_p $upload_file] && [string eq $url "http://"]) || [empty_string_p $unattach_p] } {First unattach the file/url, then submit another one or just upload a new file/url and leave this in blank} @@ -312,7 +320,13 @@ } } } -after_submit { + set redirect_to_groups_p 0 if { [info exists admin_groups_p] && $number_of_members > 1 } { + set redirect_to_groups_p 1 + } + 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 }] + } elseif { $redirect_to_groups_p } { ad_returnredirect [export_vars -base "../groups/one-task" { {task_id $revision_id} }] ad_script_abort } else { Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,37 @@ + + + + postgresql7.4 + + + + + select dotlrn_communities_all.pretty_name, + dotlrn_communities_all.community_id, + dotlrn_community__url(dotlrn_communities_all.community_id) as url + from dotlrn_communities_all, + dotlrn_member_rels_approved, + dotlrn_classes + where dotlrn_communities_all.community_id = dotlrn_member_rels_approved.community_id + and dotlrn_communities_all.community_type = dotlrn_classes.class_key + and dotlrn_member_rels_approved.user_id = :user_id + and acs_permission__permission_p(dotlrn_communities_all.community_id, :user_id, 'admin') = true + and dotlrn_communities_all.community_id <> [dotlrn_community::get_community_id] + order by dotlrn_communities_all.pretty_name + + + + + + + + select eg.grade_id as to_grade_id from evaluation_gradesx eg, acs_objects ao + where content_revision__is_live(eg.grade_id) = true + and eg.item_id = ao.object_id + and ao.context_id = :community_package_id + and lower(eg.grade_name) = '[string tolower $grade_name]' + + + + + Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,11 @@ + + @page_title;noquote@ + @context;noquote@ + + +The assignment "@task_name@" has been uploaded in this community. Check the rest of communities where you want to upload the assignment too + + +There are no more communities where you can add the task. +If you administer more than one community and you want to upload an assigment in more than one community, you must set the same name for each of the assignment types in each community so the system can identify where to store the assignment. + Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,62 @@ +# /packages/evaluation/www/admin/tasks/task-add-to-communities + +ad_page_contract { + Page for adding the same task to multiple communities. + + @author jopez@galileo.edu + @creation-date Jun 2004 + @cvs-id $Id: task-add-to-communities.tcl,v 1.1 2004/06/07 16:05:15 josee Exp $ +} { + return_url:notnull + task_id:integer,notnull + communities_packages_ids:array,optional + item_ids:array,optional + {redirect_to_groups_p 0} + foo:optional +} + +set user_id [ad_conn user_id] +set this_package_id [ad_conn package_id] +set page_title "Add Assignment to Communities" + +db_1row task_grade_info { *SQL* } + +set context [list [list [export_vars -base grades { communities_packages_ids }] "Add Assignment"] $page_title] + +ad_form -name communities -cancel_url $return_url -export { return_url task_id } -form { foo:key } + +set form_elements [list] +set communities_count 0 +db_foreach get_user_comunities { *SQL* } { + + array set community_info [site_node::get -url "${url}[apm_package_key_from_id $this_package_id]"] + set community_package_id $community_info(package_id) + + if { [db_0or1row community_has_assignment_type { *SQL* }] } { + + lappend form_elements [list communities_packages_ids.$community_package_id:integer(checkbox),optional \ + [list label "$pretty_name"] \ + [list options [list [list "" "$to_grade_id"]]] \ + ] + incr communities_count + if { [ad_form_new_p -key foo] } { + lappend form_elements [list item_ids.$community_package_id:integer(hidden) \ + [list value [db_nextval acs_object_id_seq]] \ + ] + } + } +} + +ad_form -extend -name communities -form $form_elements +ad_form -extend -name communities -on_submit { + + foreach id [array names communities_packages_ids] { + set revision_id [evaluation::clone_task -item_id $item_ids($id) -from_task_id $task_id -to_grade_id $communities_packages_ids($id) -to_package_id $id] + evaluation::set_live -revision_id $revision_id + } + + ad_returnredirect $return_url + ad_script_abort +} + +ad_return_template Index: openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql 7 Jun 2004 16:05:15 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + + + + select et.task_name, eg.grade_name from evaluation_grades eg, evaluation_tasks et where et.grade_id = eg.grade_id and et.task_id = :task_id + + + + + Index: openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/tasks/task-delete-postgresql.xql 7 Jun 2004 16:05:16 -0000 1.2 @@ -6,14 +6,9 @@ - select et3.task_name, - count(ets.solution_id) as task_sols, - count(ea.answer_id) as task_answers - from evaluation_tasks et3, - evaluation_tasks et2 left outer join evaluation_tasks_solsi ets on (ets.task_id = et2.task_id and content_revision__is_live(ets.solution_id) = true), - 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) - where et3.task_id = :task_id - group by et3.task_name + select et.task_name + from evaluation_tasks et + where et.task_id = :task_id Index: openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp 28 Apr 2004 11:09:54 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/tasks/task-delete.adp 7 Jun 2004 16:05:16 -0000 1.2 @@ -2,7 +2,7 @@ @context;noquote@ Remove Grade -Are you sure you want to delete the task "@task_name@"? (it has @task_sols@ solution(s) and @task_answers@ answer(s) assoticiated and they will be deleted too) +Are you sure you want to delete the task "@task_name@"? (If you delete the task, all the information associated with the task, such as answers, task solutions, etc, will be deleted too) Index: openacs-4/packages/evaluation/www/view/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/view/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/view/index.xql 7 Jun 2004 16:05:17 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + + select cri.content_type + from cr_items cri, cr_revisions crr + where cri.item_id = crr.item_id + and crr.revision_id = :revision_id + + + + + + select crf.folder_id + from cr_folders crf + where crf.label = :content_type||'_'||:package_id + + + + +
@grade_comments@
Index: openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl 28 Apr 2004 11:06:42 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/grades/grades-delete.tcl 7 Jun 2004 16:05:11 -0000 1.2 @@ -21,7 +21,7 @@ db_1row get_grade_info " select item_id, - grade_name + grade_plural_name from evaluation_gradesx where grade_id = :grade_id " Index: openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql 31 May 2004 17:04:58 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades-postgresql.xql 7 Jun 2004 16:05:11 -0000 1.3 @@ -8,7 +8,7 @@ select eg.grade_id, eg.item_id, - eg.grade_name, + eg.grade_plural_name, eg.comments, eg.weight from evaluation_gradesx eg, acs_objects ao Index: openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql 31 May 2004 17:04:58 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/grades/grades-reports-postgresql.xql 7 Jun 2004 16:05:11 -0000 1.4 @@ -19,13 +19,13 @@ select eg.grade_id, - eg.grade_name, + eg.grade_plural_name, eg.weight from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :package_id - order by grade_name + order by grade_plural_name
+ To add this assignment to other classes (where you are administrator) please check the last check box at the bottom of the form. +
The assignment "@task_name@" has been uploaded in this community. Check the rest of communities where you want to upload the assignment too
Index: openacs-4/packages/evaluation/www/view/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/view/index.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/evaluation/www/view/index.xql 7 Jun 2004 16:05:17 -0000 1.1 @@ -0,0 +1,23 @@ + + + + + + + select cri.content_type + from cr_items cri, cr_revisions crr + where cri.item_id = crr.item_id + and crr.revision_id = :revision_id + + + + + + select crf.folder_id + from cr_folders crf + where crf.label = :content_type||'_'||:package_id + + + + +