Index: openacs-4/packages/evaluation/evaluation.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/evaluation.info,v diff -u -r1.23 -r1.24 --- openacs-4/packages/evaluation/evaluation.info 18 May 2005 15:26:36 -0000 1.23 +++ openacs-4/packages/evaluation/evaluation.info 23 May 2005 14:19:28 -0000 1.24 @@ -10,6 +10,7 @@ Jose Pablo Escobedo Del Cid This package allows the users (professors and students) to use the system to submit and grade the tasks. + 2005-05-23 This package allows the professors and TAs to assign tasks to the students and to grade them, and to the students to upload their answers and see their grades. @@ -19,6 +20,7 @@ + Index: openacs-4/packages/evaluation/catalog/evaluation.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/catalog/evaluation.en_US.ISO-8859-1.xml,v diff -u -r1.17 -r1.18 --- openacs-4/packages/evaluation/catalog/evaluation.en_US.ISO-8859-1.xml 7 Apr 2005 11:26:58 -0000 1.17 +++ openacs-4/packages/evaluation/catalog/evaluation.en_US.ISO-8859-1.xml 23 May 2005 14:19:28 -0000 1.18 @@ -1,5 +1,5 @@ - + 1 = Individual Add Assignment @@ -31,6 +31,51 @@ Audit info Audit Info Audit info for task + #>" onClick="history.go(-1)"> + </form> +</if> + +<if %evaluations_na:rowcount% gt 0> + <form action="evaluate-students-2" method+"post"> + @export_vars;noquote@ + <input type=hidden name=task_id value="%task_id%"> + <input type=hidden name=max_grade value="%max_grade%"> + <blockquote> + <table> + <multiple name="evaluations_na"> + <if %evaluations_na.rownum% odd><table bgcolor="#EAF2FF"></if><else><table bgcolor="white"></else> + <tr><th align="right">#evaluation.Name#</th><td>%evaluations_na.party_name%</td></tr> + <tr><th align="right">#evaluation.Grade#</th><td>%evaluations_na.grade% / %max_grade%</td></tr> + <tr><th align="right">#evaluation.Comments#</th><td>%evaluations_na.comment%</td></tr> + <tr><th align="right">#evaluation.Will_the_studens_be# <br /> #evaluation.lt_able_to_see_the_grade#</th><td>%evaluations_na.show_student%</td></tr> + </tr> + </table> + </multiple> + </table> + </blockquote> + <input type=submit value="<# Grade Students + #>" onClick="history.go(-1)"> + </form> +</if> +<if %evaluations_na:rowcount% gt 0> + <form action="evaluate-students-2" method+"post"> + @export_vars;noquote@ + <input type=hidden name=task_id value="%task_id%"> + <input type=hidden name=max_grade value="%max_grade%"> + <blockquote> + <table> + <multiple name="evaluations_na"> + <if %evaluations_na.rownum% odd> <table bgcolor="#EAF2FF"> </if> + <else><table bgcolor="white"></else> + <tr><th align="right">#evaluation.Name#</th><td>%evaluations_na.party_name%</td></tr> + <tr><th align="right">#evaluation.Grade#</th><td>%evaluations_na.grade% / %max_grade%</td></tr> + <tr><th align="right">#evaluation.Comments#</th><td>%evaluations_na.comment%</td></tr> + <tr><th align="right">#evaluation.Will_the_studens_be# <br /> #evaluation.lt_able_to_see_the_grade#</th><td>%evaluations_na.show_student%</td></tr> </tr> + </table> + </multiple> + </table> + </blockquote> + <input type=submit value="<# Grade Students Bad input Change Answer Click @@ -99,6 +144,25 @@ Grades Reports Grades Sheet Name Grades Sheets + #> %current_groups_plus_one%" size=20></td> +</tr> +<tr> + <input type=hidden name=task_id value="%task_id%"> + <input type=hidden name=evaluation_group_id value="%evaluation_group_id%"> + <blockquote> + <td></td> + <td> + <table> + <multiple name="students"> + <if %students.rownum% odd><tr class="list-odd"></if><else><tr class="list-even"></else> + <td>%students.rownum%.</td><td>%students.student_name%</td></tr> + </tr> + </multiple> + </table> + </td> + </tr> + <tr> + <td><input type=submit value="<# Create Group Group Members Group Name Group name @@ -238,7 +302,43 @@ The comments/edit reason is a string with no more than 4,000 characters. The edit reason must be less than 4000 characteras long The estimated time must be grather than 0 + The file extension of the file is "%file_extension" and it should be .CSV. Sorry, we can't process it" + } + } +} + +set page_title "<#_ Confirm Evaluation The file extension of the file is "%file_extension%" and it should be .CSV, we can't process it + The file is too large. (The maximun file size is %pretty_maxnbytes% bytes)" + return 0 + } + + set errors 0 + set errors_text "" + set counter 0 + set line_number 0 + + set file_handler [open $tmp_filename {RDWR}] + + while { ![eof $file_handler] } { + incr line_number + set one_line [gets $file_handler] + + # jump first two lines + if { $line_number <= 2 } { + continue + } + + # replace enters (<-|) with semicolons (;) + regsub -all {(,[\r\n])} $one_line "" clean_line + regsub -all {[\r\n]} $clean_line "" clean_line + + set evaluation [split $clean_line ","] + + if { $line_number == 3 } { + set max_grade [string trim [lindex $evaluation 1]] + if { ![ad_var_type_check_number_p $max_grade] } { + ad_return_error "<#_ Invalid Max Grade The file is too large. (The maximun file size is %pretty_maxnbytes% bytes) The file should have a pre-defined format so the system can parse it and obtain the information. If you want to use this functionallity you must follow the following steps: The grade most be a valid number: %wrong_grade% @@ -323,6 +423,9 @@ Weight of this %grade_name% over %grade_plural_name% Weight over 100% <br /> of the Course Weight over %grade_weight%% <br /> of %grade_plural_name% + Weight over %grade_weight%% of %grade_plural_name%"} + {html {size 5}} + {help_text "<#_ You can enter the weight over %grade_weight%% of %grade_plural_name% or you can enter the net value of it in the field below. Weight over %grade_weight%% of %grade_plural_name% Weight used in %grade_plural_name%: %category_weight%% (of 100% of $grade_plural_name) <br /> %grade_plural_name% represents %grade_weight%% of the 100% of the class @@ -348,6 +451,7 @@ You can see the csv files associated with the task by clicking on the "See grades sheets associated with this task" botton. You can upload a file associated to this task by using the browse button (optional) You can upload a file associated to this task by using the browse button and select the file from your computer (optional) + You can't leave the due date empty if the students have to submit their answers online. due es ($due_date y online es $online_p ) You must give an edit reason (%old_grade% --> %grade_wo_reason% Your answer has been submited successfully. Your total grade in this class is: Index: openacs-4/packages/evaluation/catalog/evaluation.es_GT.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/catalog/evaluation.es_GT.ISO-8859-1.xml,v diff -u -r1.5 -r1.6 --- openacs-4/packages/evaluation/catalog/evaluation.es_GT.ISO-8859-1.xml 8 Oct 2004 23:32:06 -0000 1.5 +++ openacs-4/packages/evaluation/catalog/evaluation.es_GT.ISO-8859-1.xml 23 May 2005 14:19:28 -0000 1.6 @@ -113,7 +113,7 @@ Ultima Modificaci�n tarde (tarde) - Una nueva asignaci�n se ha subido -%community_name%-. + Una nueva asignaci�n se ha subido -%community_name%-. �podr�n ver sus notas? Agregar miembro al grupo @@ -281,6 +281,7 @@ La raz�n de comentarios/edici�n es una cadena de caracteres de no mas de 4,000 caracteres. La raz�n de edici�n debe de ser menor a los 4,000 caracteres de largo + El tiempo estimado debe ser mayor o igual a 0 La extensi�n del archivo es "%file_extension" y deber�a ser .CSV. Lo siento, pero no podemos procesarlo" } } } set page_title "<#_ Confirm Evaluation La extensi�n del archivo \"$file_extension\" debe de ser .CSV, lo sentimos, no podemos procesarlo El archivo es muy grande. (El tama�o m�ximo es de %pretty_maxnbytes% bytes) @@ -367,6 +368,7 @@ <blockquote> <pre>%errmsg%</pre> </blockquote> + Tiempo estimado para terminar este(a) %grade_name% (en horas) Si desea agregar asignaciones en varias clases o secciones seleccione la opci�n que se encuentra Para cambiar el nombre, edite el nombre en la entrada del texto y luego haga click en el bot�n "Renombrar Grupo". @@ -481,7 +483,7 @@ Proyectos Eliminar Nota Renombrar Grupo - Hacer "sin punteo" + �Tendr� nota esta tarea? Bloquear Grupos Enviar Archivo Adjunto de la Soluci�n Index: openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl,v diff -u -r1.23 -r1.24 --- openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl 18 May 2005 15:26:36 -0000 1.23 +++ openacs-4/packages/evaluation/tcl/apm-callback-procs.tcl 23 May 2005 14:19:28 -0000 1.24 @@ -99,6 +99,60 @@ } } +ad_proc -public evaluation::apm::package_before_upgrade { + -from_version_name:required + -to_version_name:required +} { + Upgrade script for the evaluation package +} { + apm_upgrade_logic \ + -from_version_name $from_version_name \ + -to_version_name $to_version_name \ + -spec { + 0.4d 2.0d { + + #Create content type attributes for content type evaluation_grades + content::type::attribute::new -content_type evaluation_grades -attribute_name grade_item_id -datatype number -pretty_name grade_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_grades -attribute_name grade_name -datatype string -pretty_name grade_name -column_spec "varchar(100)" + content::type::attribute::new -content_type evaluation_grades -attribute_name grade_plural_name -datatype string -pretty_name grade_plural_name -column_spec "varchar(100)" + content::type::attribute::new -content_type evaluation_grades -attribute_name comments -datatype string -pretty_name Comments -column_spec "varchar(500)" + content::type::attribute::new -content_type evaluation_grades -attribute_name weight -datatype number -pretty_name Weight -column_spec numeric + + #Create content type attributes for content type evaluation_tasks + content::type::attribute::new -content_type evaluation_tasks -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_tasks -attribute_name task_name -datatype number -pretty_name task_name -column_spec integer + content::type::attribute::new -content_type evaluation_tasks -attribute_name number_of_members -datatype string -pretty_name number_of_members -column_spec varchar + content::type::attribute::new -content_type evaluation_tasks -attribute_name due_date -datatype timestamp -pretty_name due_date -column_spec timestamptz + content::type::attribute::new -content_type evaluation_tasks -attribute_name grade_item_id -datatype number -pretty_name grade_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_tasks -attribute_name weight -datatype number -pretty_name weight -column_spec numeric + content::type::attribute::new -content_type evaluation_tasks -attribute_name online_p -datatype string -pretty_name online_p -column_spec "varchar(1)" + content::type::attribute::new -content_type evaluation_tasks -attribute_name late_submit_p -datatype string -pretty_name late_submit_p -column_spec "varchar(1)" + content::type::attribute::new -content_type evaluation_tasks -attribute_name requires_grade_p -datatype string -pretty_name requires_grade_p -column_spec "varchar(1)" + + #Create content type attributes for content type evaluation_tasks_sols + content::type::attribute::new -content_type evaluation_tasks_sols -attribute_name solution_item_id -datatype number -pretty_name solution_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_tasks_sols -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer + + #Create content type attributes for content type evaluation_answers + content::type::attribute::new -content_type evaluation_answers -attribute_name answer_item_id -datatype number -pretty_name answer_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_answers -attribute_name party_id -datatype number -pretty_name party_id -column_spec integer + content::type::attribute::new -content_type evaluation_answers -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer + + #Create content type attributes for content type evaluation_student_evals + content::type::attribute::new -content_type evaluation_student_evals -attribute_name evaluation_item_id -datatype number -pretty_name evaluation_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_student_evals -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_student_evals -attribute_name party_id -datatype number -pretty_name party_id -column_spec integer + content::type::attribute::new -content_type evaluation_student_evals -attribute_name grade -datatype number -pretty_name grade -column_spec numeric + content::type::attribute::new -content_type evaluation_student_evals -attribute_name show_student_p -datatype string -pretty_name show_student_p -column_spec "varchar(1)" + + #Create content type attributes for content type evaluation_grades_sheets + content::type::attribute::new -content_type evaluation_grades_sheets -attribute_name grades_sheet_item_id -datatype number -pretty_name grades_sheet_item_id -column_spec integer + content::type::attribute::new -content_type evaluation_grades_sheets -attribute_name task_item_id -datatype number -pretty_name task_item_id -column_spec integer + + } + } +} + ad_proc -public evaluation::apm::package_uninstall { } { @@ -275,7 +329,6 @@ content::folder::unregister_content_type -folder_id $folder_id -content_type evaluation_tasks_sols -include_subtypes t db_dml delete_task_sols_folder_map "delete from cr_folder_type_map where content_type = 'evaluation_tasks_sols'" content::folder::delete -folder_id $folder_id - ns_log notice "checkpoint 1" #evaluation_answers set folder_id [content::item::get_id -item_path "evaluation_answers_$package_id" -resolve_index f] @@ -289,7 +342,6 @@ content::folder::unregister_content_type -folder_id $folder_id -content_type evaluation_answers -include_subtypes t db_dml delete_answer_folder_map "delete from cr_folder_type_map where content_type = 'evaluation_answers'" content::folder::delete -folder_id $folder_id - ns_log notice "checkpoint 2" #evaluation_students_eval set folder_id [content::item::get_id -item_path "evaluation_student_evals_$package_id" -resolve_index f] @@ -302,8 +354,6 @@ } { evaluation::delete_student_eval -evaluation_id $evaluation_id } - ns_log notice "checkpoint 3" - content::folder::unregister_content_type -folder_id $folder_id -content_type content_revision -include_subtypes t content::folder::unregister_content_type -folder_id $folder_id -content_type evaluation_student_evals -include_subtypes t @@ -322,7 +372,6 @@ #evaluation_grades_sheets set folder_id [content::item::get_id -item_path "evaluation_grades_sheets_$package_id" -resolve_index f] - ns_log notice "checkpoint 4" db_foreach grade_sheet_item { select item_id from cr_items where parent_id = :folder_id @@ -332,7 +381,6 @@ content::folder::unregister_content_type -folder_id $folder_id -content_type content_revision -include_subtypes t content::folder::unregister_content_type -folder_id $folder_id -content_type evaluation_grades_sheets -include_subtypes t - ns_log notice "checkpoint 5" db_dml delete_grade_sheet_folder_map "delete from cr_folder_type_map where content_type = 'evaluation_grades_sheets'" content::folder::delete -folder_id $folder_id @@ -355,7 +403,6 @@ evaluation::delete_task -task_id $item_id } - ns_log notice "checkpoint 6" content::folder::unregister_content_type -folder_id $folder_id -content_type content_revision -include_subtypes t content::folder::unregister_content_type -folder_id $folder_id -content_type evaluation_tasks -include_subtypes t 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.25 -r1.26 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 7 Apr 2005 18:57:01 -0000 1.25 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 23 May 2005 14:19:28 -0000 1.26 @@ -98,7 +98,6 @@ } } elseif { [string eq $title "link"] } { - ns_log notice "si va bien!, content trae -${content}- " if { [string eq $mode "edit"] } { set attached_p "t" @@ -286,8 +285,8 @@ { [_ evaluation.lt_The_number_of_members]} } {online_p - { ([empty_string_p $due_date] && [string eq $online_p "f"]) || (![empty_string_p $due_date] && [string eq $online_p "t"]) } - { "You can't leave the due date empty if the students have to submit their answers online." } + { (![empty_string_p $due_date] && [string eq $online_p "t"]) || [string eq $online_p "f"] } + { "[_ evaluation.lt_You_cant_leave_the_du]" } } {estimated_time { $estimated_time >= 0 }