Index: openacs-4/packages/evaluation/evaluation.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/evaluation.info,v diff -u -r1.11 -r1.12 --- openacs-4/packages/evaluation/evaluation.info 26 Jul 2004 18:01:40 -0000 1.11 +++ openacs-4/packages/evaluation/evaluation.info 30 Jul 2004 22:50:03 -0000 1.12 @@ -19,7 +19,6 @@ - @@ -28,8 +27,8 @@ - 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.4 -r1.5 --- openacs-4/packages/evaluation/catalog/evaluation.en_US.ISO-8859-1.xml 26 Jul 2004 18:01:41 -0000 1.4 +++ openacs-4/packages/evaluation/catalog/evaluation.en_US.ISO-8859-1.xml 30 Jul 2004 22:50:06 -0000 1.5 @@ -181,6 +181,8 @@ Are you sure you want to remove the group "%group_name%"? (If the group has an evaluation/answer associated, it 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) Assignment Attachment + Assignment Edited (%grade_name% %community_name%) + Assignment Groups for %task_name% Assignment Plural Type Name Assignment Type Name Assignment Type's Comments @@ -216,6 +218,7 @@ Error deleting the task Error while storing file Evaluated Students (%total_evaluated%) + Evaluation Modified %community_name% First unattach the file/url, then submit another one or just upload a new file/url and leave this in blank First, you will see the list of students without group (if there are students without group) and you can create a group by selecting the members of the group and then clicking on the "Create Group" botton. Generate the csv file from the system. This file has the proper structure so the system can parse it and obtain the information about the grades. This file is generated by clicking on the "Generate File" link. @@ -243,6 +246,7 @@ Input \"Will the student be able to see the grade\" must be 1 (one) for YES or 0 (zero) for NO, please don't leave it blank. Is the task submitted online? Max Grade does not seem to be a real number. Please don't leave it in blank. + New Assignment (%grade_name% %community_name%) No file/url associated with this task No file/url associated with this task solution No group for student @@ -337,6 +341,9 @@ There is a comment larger than we can handle: %wrong_comments% There is an edit reason for a grade not realized: %wrong_comments% There is an edit reason larger than we can handle: %wrong_comments% + There is at least one group that does not exist for this assignment. + There is at least one invalid user. + There is at least one invalid student. There is no audit info for this task because there are no students evaluated. There are no grades in the csv file or there are no modifications in the csv file. There is no info for this student Index: openacs-4/packages/evaluation/catalog/evaluation.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/catalog/evaluation.es_ES.ISO-8859-1.xml,v diff -u -r1.1 -r1.2 --- openacs-4/packages/evaluation/catalog/evaluation.es_ES.ISO-8859-1.xml 15 Jun 2004 23:20:28 -0000 1.1 +++ openacs-4/packages/evaluation/catalog/evaluation.es_ES.ISO-8859-1.xml 30 Jul 2004 22:50:06 -0000 1.2 @@ -5,6 +5,8 @@ Agregar Asignaci�n Agregar Tipo de Asignaci�n Agregar tipo de asignaci�n + Agregar %grade_name% + Agregar Agregar Miembro al grupo Agregar Tarea Agregar Soluci�n de la Tarea @@ -50,6 +52,7 @@ Fecha: Editar evaluaci�n Editar Evaluaciones + Editar Raz�n de Modificaci�n: Raz�n de Modificaci�n Editar Tarea @@ -58,19 +61,22 @@ Evaluado Indice de Evaluaciones Evaluaci�n Modificada + Material de Clase Evaluaciones Evaluaciones Administraci�n de Evaluaciones Lista de Evaluaciones + Ex&aacute;men Ex�menes Ex�menes para estudiantes Nombre del archivo: Archivo/url asociado Generar Archivo + Regresar Regresar Nota: Nota - Estudiantes + Evaluar Estudiantes Distribuci�n de Notas Valor Neto de la Nota Nota sobre @@ -88,17 +94,18 @@ aqu� �C�mo funciona esto? Id + si desea ver los miembros del grupo, haga click en el nombre del grupo Individual No se pudo insertar �Esta disponible? Ultima Modificaci�n tarde (tarde) - Una nueva asignaci�n se ha subido, si usted desea ver mas detalles + Una nueva asignaci�n se ha subido, si usted desea ver mas detalles �podr�n ver sus notas? Agregar miembro al grupo - Agregar Asignaci�n a Comunidades + Agregar Asignaci�n a Comunidades Agregar asignaci�n %grade_name% en varias clases o secciones Administraci�n de Tipos de Asignaciones @@ -107,86 +114,90 @@ Grupos ya creados Tambi�n, vera la lista de los grupos ya creados (si hubiera alg�n grupo creado). Haga click en el link de "Administraci�n del Grupo" para administrar el grupo. En estas paginas de administraci�n usted ser� capaz de desasociar miembros de un grupo dado, renombrar el grupo y/o eliminar el grupo. Una asignaci�n ha sido modificada, si desea ver mas detalles - �Esta seguro de querer eliminar la evaluaci�n en "%party_name%"? + �Esta seguro de querer eliminar la evaluaci�n en "%party_name%"? - �Esta seguro de querer eliminar la asignaci�n de tipo "%grade_plural_name%"? -(Si su respuesta es si, todas las evaluaciones, tareas, soluciones y respuestas asociadas a este tipo de asignaci�n ser�n eliminados tambi�n) + �Esta seguro de querer eliminar la asignaci�n de tipo "%grade_plural_name%"? +(Si su respuesta es si, todas las evaluaciones, tareas, soluciones y respuestas asociadas a este tipo de asignaci�n ser�n eliminados tambi�n) �Esta seguro de querer eliminar el grupo "%group_name%"? (Si el grupo tiene una evaluaci�n/respuesta asociada, esta ser� eliminada tambi�n) �Esta seguro de querer eliminar la tarea "%task_name%"? (Si usted elimina esta tarea, toda la informaci�n asociada a la tarea, como respuestas, soluciones, entre otros, ser�n eliminados tambi�n) Adjunto de la Asignaci�n - Plural del Nombre del Tipo de Asignaci�n + Asignaci&oacute;n Editada (%grade_name% %community_name%) + Grupos para %task_name% + Plural del Nombre del Tipo de Asignaci�n - Nombre del Tipo de Asignaci�n + Nombre del Tipo de Asignaci�n - Comentarios de los Tipos de Asignaci�n + Comentarios de los Tipos de Asignaci�n - Distribuci�n de los Tipos de Asignaci�n - - - + Distribuci�n de los Tipos de Asignaci�n + + + Descripci�n: - Asociar a este grupo + Asociar a este grupo Historial de notas de la tarea "%task_name%" �Podr� entregarse tarde esta tarea? Verificar el resto de las comunidades donde usted desea subir la asignaci�n tambi�n - Haga click aqu� para desadjuntar el archivo + Haga click aqu� para desadjuntar el archivo Haga click aqu� si desea ir a la pagina de administraci�n de grupos despu�s de subir la tarea Haga click aqu� si desea agregar esta asignaci�n a varias clases o secciones - Haga click en la tarea que desea ser copiada por los grupos + Haga click en la tarea que desea ser copiada por los grupos - El numero de caracteres en la raz�n del comentario/edici�n en %party_id% es mayor a 4,000, nuestra longitud m�xima. Por favor haga la raz�n del comentario / edici�n mas corta. + El numero de caracteres en la raz�n del comentario/edici�n en %party_id% es mayor a 4,000, nuestra longitud m�xima. Por favor haga la raz�n del comentario / edici�n mas corta. Confirmar su Evaluaci�n - Confirmar su(s) evaluacion(es) en "%task_name%" + Confirmar su(s) evaluacion(es) en "%task_name%" - Actualmente este $content esta asociado a esta soluci�n, pero puede asociarlo a un url/archivo diferente solo con agregarlo aqu� + Actualmente este %content% esta asociado a esta soluci�n, pero puede asociarlo a un url/archivo diferente solo con agregarlo aqu� Actualmente este $content esta asociado a esta tarea, pero puede asociarlo a un url/archivo diferente solo con agregarlo aqu� Actualmente este $content esta asociado a esta soluci�n, pero puede adjuntar un url/archivo diferente solo con agregarlo aqu� Actualmente este $content esta asociado a esta tarea, pero puede adjuntar un url/archivo diferente solo con agregarlo aqu� - Eliminar el Tipo de Asignaci�n + Eliminar el Tipo de Asignaci�n Eliminar el tipo de asignaci�n - Distribuci�n de Notas + Distribuci�n de Notas %grade_plural_name% - No cambie el campo "id" porque con este archivo se asocia la nota con el estudiante o grupo. + No cambie el campo "id" porque con este archivo se asocia la nota con el estudiante o grupo. La fecha de entrega debe de estar en el futuro - Editar Tipo de Asignaci�n + Editar Tipo de Asignaci�n Editar tipo de asignaci�n - Editar distribuci�n de notas de $grade_plural_name + Editar distribuci�n de notas de $grade_plural_name + Editar distribuci%oacute;n de %grade_plural_name% Ingrese las notas de los estudiantes/grupos y CONSERVE LA ESTRUCTURA del archivo. Si usted esta editando una nota, usted DEBE de dar una raz�n en el campo de "raz�n de Comentario/Edici�n". - Error al eliminar la evaluaci�n + Error al eliminar la evaluaci�n Error al eliminar la nota Error al eliminar la tarea Error al guardar el archivo - Evaluar Estudiantes (%total_evaluated%) - Primero debe de quitar el archio/url adjunto, luego subir otro o solo subir un nuevo archivo/url y dejar este en blanco + Estudiantes Evaluados (%total_evaluated%) + Evaluaci&oacute;n Modificada %community_name% + Primero debe de quitar el archio/url adjunto, luego subir otro o solo subir un nuevo archivo/url y dejar este en blanco Primero, usted encontrara una lista de estudiantes sin grupo (si hubieran estudiantes sin grupo) y puede crear un grupo seleccionando los miembros del grupo y haciendo click en el bot�n "Crear Grupo". - Genere el archivo csv del sistema. Este archivo tiene la estructura apropiada para que el sistema pueda reconocerlo y obtener la informaci�n acerca de las notas. Este archivo puede ser generado haciendo click en el link "Generar Archivo" - - + Genere el archivo csv del sistema. Este archivo tiene la estructura apropiada para que el sistema pueda reconocerlo y obtener la informaci�n acerca de las notas. Este archivo puede ser generado haciendo click en el link "Generar Archivo" + + - La nota %grade% parece no ser un numero valido. - + La nota %grade% parece no ser un numero valido. + Nota sobre 100 puntos %grade_plural_name% representa el %grade_weight%% del 100% de la clase - Ingresar notas usando el archivo generado: + Ingresar notas usando el archivo generado: Ingresar notas usando el archivo generado: Calificar con 0 (cero) Reporte de Notas para $student_name Reporte de notas para "%student_name%" - Hoja de Explicaci�n de Notas + Hoja de Explicaci�n de Notas Administraci�n de grupo Administraci�n de grupos @@ -195,59 +206,61 @@ Si usted hace click sobre el nombre del estudiante, usted vera el reporte de notas del estudiante. Si usted no quiere evaluar o editar la nota de un estudiante o grupo, solo deje intacto los campos de esa fila, o puede eliminar la fila entera. si usted no quiere ver las fotos de los estudiantes + Si usted ingresa el valor neto, debe de ser menor a %grade_weight%, que es el valor neto de %grade_plural_name% sobre los 100 puntos de la clase. <br /> Despu�s de subir la %grade_name%, el sistema har� la conversi�n y el valor neto ser� representado como un porcentaje. si usted quiere bajar todas las respuestas en un solo archivo si usted quiere ver las fotos de los estudiantes Para generar este archivo deben de haber varios grupos\usuarios asignados a esta tarea. En esta pagina usted puede administrar los grupos para la asignaci�n. - La entrada \"�Podr�n los estudiantes ver su nota?\" debe de ser 1 (uno) para SI o 0 (cero) para NO, por favor no lo deje en blanco. - + La entrada \"�Podr�n los estudiantes ver su nota?\" debe de ser 1 (uno) para SI o 0 (cero) para NO, por favor no lo deje en blanco. + - �Van los estudiantes a enviar + �Van los estudiantes a enviar las respuestas electr�nicamente? - La Nota M�xima parece no ser un numero valido. Por favor no la deje en blanco. + La Nota M�xima parece no ser un numero valido. Por favor no la deje en blanco. + Nueva Asignaci&oacute;n (%grade_name% %community_name%) No hay ning�n archivo/URL asociado a esta tarea - No hay ning�n archivo/URL asociado a la soluci�n de esta tarea + No hay ning�n archivo/URL asociado a la soluci�n de esta tarea No hay ning�n grupo para estudiante - No, quiero cancelar mi solicitud + No, quiero cancelar mi solicitud No hay foto para $party_name No hay foto para $student_name Notificaci�n para asignaciones Notificaci�n para evaluaciones - Numero de miembros para esta tarea: + Numero de miembros para esta tarea: N�mero de personas en el grupo: sobre %grade_weight%% de %grade_plural_name% - El Id del usuario/grupo %party_id% no parece ser un numero entero. Por favor no modifique este campo. + El Id del usuario/grupo %party_id% no parece ser un numero entero. Por favor no modifique este campo. - en la parte inferior de la p�gina + en la parte inferior de la p�gina y haga click en OK. - Por favor ingrese el nombre del grupo + Por favor ingrese el nombre del grupo Por favor ingrese el nuevo nombre del grupo - Por favor seleccione el grupo + Por favor seleccione el grupo Proyectos para los estudiantes - No admitir grupos de otra asignaci�n - Guarde el archivo csv y MANTENGA EL FORMATO CSV. El archivo CSV puede ser editado con cualquier editor de texto (y MS Excell) pero tiene que mantener el formato CSV. Si usted no mantiene el formato, el sistema no ser� capaz de leer el archivo. + Reusar grupos de otra asignaci�n + Guarde el archivo csv y MANTENGA EL FORMATO CSV. El archivo CSV puede ser editado con cualquier editor de texto (y MS Excell) pero tiene que mantener el formato CSV. Si usted no mantiene el formato, el sistema no ser� capaz de leer el archivo. - Ver los cuadros de notas asociados a esta tarea + Ver los archivos de notas asociados a esta tarea - Env�e el archivo utilizando el bot�n "Enviar archivo". El sistema leer� el archivo y preguntara por una confirmaci�n (si todo esta bien con el archivo) para las notas. - + Env�e el archivo utilizando el bot�n "Enviar archivo". El sistema leer� el archivo y preguntara por una confirmaci�n (si todo esta bien con el archivo) para las notas. + <small>Total de puntos en esta categoria: ${total_grade}/${max_grade} <br /> $grade_plural_name representan el ${grade_weight}% del 100% de la clase</small> - Estudiantes que NO han respondido: (%not_evaluated_with_no_answer%) + Estudiantes que NO han respondido: (%not_evaluated_with_no_answer%) Estudiantes No Evaluados: (%not_evaluated_with_answer%) %submission_date_pretty% (tarde) - $submission_date_pretty <span style=\"color:red;\">(entregar tarde)</span> - La asignaci�n "%task_name%" ha sido subida en esta comunidad. + %submission_date_pretty% <span style=\"color:red;\">(entreg&oacute; tarde)</span> + La asignaci�n "%task_name%" ha sido subida en esta comunidad. 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 + La raz�n de edici�n debe de ser menor a los 4,000 caracteres de largo 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) @@ -256,146 +269,154 @@ La nota debe de ser un NUMERO REAL. La nota debe de ser un NUMERO VALIDO: %wrong_grade% La nota debe de ser un numero valido - La suma de todos las asignaciones es %total_weight% y deber�a de ser 100 al final del curso (generalmente). - + El valor neto debe de ser mayor a 0 o menor que $grade_weight, y no puede ingresar Valor Neto Y Ponderaci�n. + La suma de todos las asignaciones es %total_weight% y deber�a de ser 100 al final del curso (generalmente). + El sistema asume que las notas empiezan en la s�ptima fila del archivo. - No hay notas que editar + La ponderacion debe de ser mayor a 0, y no puede ingresar Valor Neto Y Ponderaci�n. + No hay notas que editar - No hay archivos asociados a esta tarea + No hay archivos asociados a esta tarea No hay notas para este grupo. Todav�a no hay grupos para esta tarea. - No hay mas comunidades donde pueda agregar la tarea. + No hay mas comunidades donde pueda agregar la tarea. - No hay estudiantes asociados a este grupo. + No hay estudiantes asociados a este grupo. - No hay estudiantes para evaluar que ya hayan respondido - + No hay estudiantes para evaluar que ya hayan respondido + - No hay estudiantes para evaluar sin respuesta - + No hay estudiantes para evaluar sin respuesta + No hay tareas asignados(as) - No hay tareas para este paquete. + No hay tareas para este paquete. - No hay tareas para este tipo de nota. - + No hay tareas para este tipo de nota. + - No hay tareas que evaluar para este paquete. + No hay tareas que evaluar para este paquete. - Existe un comentario para una nota que no se ha tomado en cuenta: + Existe un comentario para una nota que no se ha tomado en cuenta: %wrong_comments% - Existe un comentario mas grande del que podemos manejar: + Existe un comentario mas grande del que podemos manejar: %wrong_comments% Existe un comentario mas grande del que podemos manejar: %wrong_comments% - Existe una raz�n de edici�n para una nota que no ha sido tomada en cuenta: + Existe una raz�n de edici�n para una nota que no ha sido tomada en cuenta: %wrong_comments% - Existe una raz�n de edici�n mas grande de la que podemos manejar: + Existe una raz�n de edici�n mas grande de la que podemos manejar: %wrong_comments% + Hay por lo menos un grupo no v&aacute;lido para esta asignaci&oacute;n. + Hay por lo menos un usuario inv&aacute;lido. + Hay por lo menos un estudiante inv&aacute;lido. No hay historial de notas para esta tarea porque no hay estudiantes evaluados. - No hay notas en el archivo csv o no hay modificaciones en el archivo csv. + No hay notas en el archivo csv o no hay modificaciones en el archivo csv. No hay historial de notas para este estudiante. - No hay informaci�n para esta tarea. + No hay informaci�n para esta tarea. - Debe de haber una raz�n de edici�n si desea editar la nota del usuario/grupo %party_id%. + Debe de haber una raz�n de edici�n si desea editar la nota del usuario/grupo %party_id%. Debe de haber al menos una nota para poder trabajar - No deben de haber grupos en esta tarea para poder copiar los grupos de otra tarea. Usted puede regresar y borrar los grupos de esta tarea. + No deben de haber grupos en esta tarea para poder copiar los grupos de otra tarea. Usted puede regresar y borrar los grupos de esta tarea. - Deben de haber algunos estudiantes seleccionados para poder crear el grupo. + Deben de haber algunos estudiantes seleccionados para poder crear el grupo. - Hubo un problema al guardar el archivo. Por favor contacte al administrador. + Hubo un problema al guardar el archivo. Por favor contacte al administrador. <p>El error fue el siguiente: <pre>%errmsg%</pre></li> - Hubo un error al crear los grupos + Hubo un error al crear los grupos - Estos son los cuadros de notas utilizados para evaluar los estudiantes de esta tarea. + Estos son los cuadros de notas utilizados para evaluar los estudiantes de esta tarea. Estos son los estudiantes que ya respondieron pero que no han sido evaluados. Estos son los estudiantes que no han respondido (si la tarea se puede entregar electr�nicamente) y no han sido evaluados. - Esta funcionalidad le permite subir un archivo CSV (Comm Separated Value) con las notas de los estudiantes. Este archivo CSV puede ser editado con MS Excell y con otros editores de texto. + Esta funcionalidad le permite subir un archivo CSV (Comm Separated Value) con las notas de los estudiantes. Este archivo CSV puede ser editado con MS Excell y con otros editores de texto. Este es el reporte de notas de los estudiantes de acuerdo a las asignaciones/evaluaciones que usted hizo. - Este es el reporte de notas de los estudiantes de acuerdo a un tipo de asignaci�n y a las evaluaciones que usted hizo en este tipo de asignaci�n. - + Este es el reporte de notas de los estudiantes de acuerdo a un tipo de asignaci�n y a las evaluaciones que usted hizo en este tipo de asignaci�n. + - Esta tarea no se puede entregar tarde + Esta tarea no se puede entregar tarde - Esta tarea no es grupos + Esta tarea no es grupos - Este fue un error: - <blockquote> - <pre>%errmsg%</pre> + Este fue un error: + <blockquote> + <pre>%errmsg%</pre> </blockquote> 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". + Para cambiar el nombre, edite el nombre en la entrada del texto y luego haga click en el bot�n "Renombrar Grupo". Para eliminar el grupo, haga click en el bot�n "Borrar Grupo" �para entregar las respuestas despu�s de la fecha de entrega? - Para desasociar a un miembro del grupo, haga click en el link de "Desasociar miembro" + Para desasociar a un miembro del grupo, haga click en el link de "Desasociar miembro" NOTA TOTAL: %total_class_grade% - Total de puntos en esta categor�a: %total_grade% / $max_grade<br /> + Total de puntos en esta categor�a: %total_grade% / $max_grade<br /> Esta categor�a de nota representa el ${grade_weight}% del 100% de la clase - Total de puntos en esta categor�a: %total_grade% / $max_grade<br /> + Total de puntos en esta categor�a: %total_grade% / $max_grade<br /> Esta categor�a de nota representa el %grade_weight%% del 100% de la clase Total de puntos en esta categor�a: %total_grade%/%max_grade% - Desasociar estudiante de este grupo + Desasociar estudiante de este grupo - Valor no reconocido para notif type: %$notif_type%. Los valores posibles son -one_assignment_notif and one_evaluation_notif. - + Valor no reconocido para notif type: %$notif_type%. Los valores posibles son +one_assignment_notif and one_evaluation_notif. + - Subir un archivo O un URL, pero no ambos + Subir un archivo O un URL, pero no ambos Subir un archivo O un URL, pero no ambos Subir un archivo O un URL, pero no ambos Subir una soluci�n para esta asignaci�n para que los estudiantes puedan verla y aprender de ella. - user_name ha modificado el %party_name%. \n La raz�n de edici�n dada por %user_name% fue: %edit_reason% \n La nota actual es: %current_grade% \n\n Haga click en este link para ver los detalles de la evaluaci�n: %url_link% \n + user_name ha modificado el %party_name%. \n La raz�n de edici�n dada por %user_name% fue: %edit_reason% \n La nota actual es: %current_grade% \n\n Haga click en este link para ver los detalles de la evaluaci�n: %url_link% \n Ver/Editar Soluci�n de la Tarea - Hubo un error al tratar de eliminar la evaluaci�n: + Hubo un error al tratar de eliminar la evaluaci�n: <pre>%errmsg%</pre> - Hubo un error al tratar de eliminar la nota: + Hubo un error al tratar de eliminar la nota: <pre>%errmsg%</pre> - Hubo un error al tratar de eliminar la tarea: + Hubo un error al tratar de eliminar la tarea: <pre>%errmsg%</pre> La ponderaci�n debe de ser un numero real entre 0 y 100 - La ponderaci�n utilizada en $grade_plural_name es: ${category_weight}% (del 100% de $grade_plural_name) <br /> + Ponderaci�n sobre el 100% <br /> del Curso + Ponderaci�n sobre %grade_weight%% <br /> de %grade_plural_name% + Nota sobre el %grade_weight%% de %grade_plural_name% + La ponderaci�n utilizada en $grade_plural_name es: ${category_weight}% (del 100% de $grade_plural_name) <br /> $grade_plural_name representan el ${grade_weight}% del 100% de la clase - La ponderaci�n utilizada en $grade_plural_name es: ${category_weight}% (del 100% de $grade_plural_name) <br /> + La ponderaci�n utilizada en $grade_plural_name es: ${category_weight}% (del 100% de $grade_plural_name) <br /> $grade_plural_name representan el ${grade_weight}% del 100% de la clase - La ponderaci�n utilizada en $grade_plural_name es: ${category_weight}% (del 100% de $grade_plural_name) <br /> + La ponderaci�n utilizada en $grade_plural_name es: ${category_weight}% (del 100% de $grade_plural_name) <br /> $grade_plural_name representan el ${grade_weight}% del 100% de la clase �Podr� el estudiante ver su nota? (1 = Si / 0 = No): �Podr� el estudiante ver su nota? Podr�n los estudiantes �Ser� %grade_name% enviada electr�nicamente? - �Van los estudiantes a enviar + �Van los estudiantes a enviar las respuestas electr�nicamente? - �Tendr� nota + �Tendr� nota esta tarea? - Si, realmente deseo eliminar esta evaluaci�n - + Si, realmente deseo eliminarla Si, realmente deseo eliminar esta nota Si, realmente deseo eliminar este grupo Si, realmente deseo eliminar esta tarea - Usted tambi�n puede agregar un estudiante a un grupo haciendo click en el link "Asociar a grupo...". Ah� se le preguntara el grupo al que desea agregar el usuario. + Usted tambi�n puede agregar un estudiante a un grupo haciendo click en el link "Asociar a grupo...". Ah� se le preguntara el grupo al que desea agregar el usuario. Usted puede asociar un link a esta asignaci�n introduciendo el url aqu� (opcional) - Usted puede ordenar el reporte de notas por el nombre del estudiante, por el total de la nota, o por el tipo de asignaci�n, o ver los detalles del tipo de asignaci�n haciendo click en el icono a la izquierda del nombre del tipo de asignaci�n. - + Puede ingresar el porcentaje sobre el %grade_weight%% de %grade_plural_name% o puede ingresar el valor neto en el siguiente campo. + Usted puede ordenar el reporte de notas por el nombre del estudiante, por el total de la nota, o por el tipo de asignaci�n, o ver los detalles del tipo de asignaci�n haciendo click en el icono a la izquierda del nombre del tipo de asignaci�n. + Usted puede ordenar el reporte de notas por el nombre del estudiante, por el total de la nota, o por el tipo de asignaci�n. - Usted puede ver los archivos csv asociados a esta tarea haciendo click en el bot�n "Ver cuadros de notas asociados a esta tarea". - + Usted puede ver los archivos csv asociados a esta tarea haciendo click en el bot�n "Ver cuadros de notas asociados a esta tarea". + Usted puede subir un archivo asociado a esta tarea utilizando el bot�n browse (opcional) Utilice el bot�n "Browse..." para localizar su archivo explorando, luego haga click en "Abrir". (opcional) - Usted debe de dar una raz�n de edici�n (%old_grade% --> %grade_wo_reason% + Usted debe de dar una raz�n de edici�n (%old_grade% --> %grade_wo_reason% - El total de su nota es de: + El total de su nota es de: Nota M�xima: Nota M�xima: @@ -405,6 +426,7 @@ Nombre: T�tulo Nombre: %student_name% + Valor Neto Valor neto (NUEVA respuesta) Nueva Asignaci�n @@ -420,6 +442,7 @@ Sin responder No disponible Sin evaluar + si usted desasocia a TODOS los miembros o al grupo, EL GRUPO SERA ELIMINADO. Numero de Integrantes N�mero de personas en el grupo: Una asignaci�n @@ -428,11 +451,13 @@ Un Grupo Enviar Electr�nicamente y entonces + Proyecto Proyectos Eliminar Nota - Grupo + Renombrar Grupo Hacer "sin punteo" Bloquear Grupos + Enviar Archivo Adjunto de la Soluci�n Lista de Estudiantes Lista de Estudiantes @@ -443,6 +468,7 @@ entregar re-entregar Fecha de Entrega + Tarea Lista de Grupos T�tulo: T�tulo: @@ -452,6 +478,8 @@ Tareas Tareas para los estudiantes Lista de Tareas + son los estudiantes evaluados. Note que si ha evaluado a los estudiantes sobre una nota diferente de 100, el sistema autom�ticamente har� la conversi�n y la nota aparecer� sobre 100 puntos. + todav�a no hay grupos para esta asignaci�n. Total Nota total actual: Nota Total @@ -461,7 +489,7 @@ �Remover el archivo adjunto? Enviar Respuesta Fecha de Env�o - Enviar Soluci�n + Enviar Soluci�n Subido por (URL) Index: openacs-4/packages/evaluation/lib/audit-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/audit-chunk-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/lib/audit-chunk-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.3 +++ openacs-4/packages/evaluation/lib/audit-chunk-postgresql.xql 30 Jul 2004 22:50:07 -0000 1.4 @@ -11,12 +11,14 @@ ese.modifying_ip, ese.description as comments, ese.grade as task_grade, - case when content_revision__is_live(evaluation_id) = true then 1 + case when content_revision__is_live(ese.evaluation_id) = true then 1 else 0 end as is_live - from evaluation_student_evalsx ese - where ese.task_id = :task_id + from evaluation_student_evalsx ese, evaluation_tasks et + where ese.task_item_id = :task_item_id and ese.party_id = :party_id + and et.task_item_id = ese.task_item_id + and content_revision__is_live(et.task_id) = true order by evaluation__party_name(party_id,task_id), ese.evaluation_id desc Index: openacs-4/packages/evaluation/lib/evaluations-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/Attic/evaluations-chunk-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/lib/evaluations-chunk-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.3 +++ openacs-4/packages/evaluation/lib/evaluations-chunk-postgresql.xql 30 Jul 2004 22:50:07 -0000 1.4 @@ -9,7 +9,7 @@ select et.task_name, et.weight as task_weight, et.task_id from evaluation_tasksi et - where grade_id = :grade_id + where grade_item_id = :grade_item_id and content_revision__is_live(et.task_id) = true $evaluations_orderby @@ -31,12 +31,12 @@ ea.title as answer_title, ea.answer_id from evaluation_grades eg, - evaluation_tasks et2 left outer join evaluation_student_evalsi ese on (ese.task_id = et2.task_id and content_revision__is_live(ese.evaluation_id) = true + evaluation_tasks et2 left outer join evaluation_student_evalsi ese on (ese.task_item_id = et2.task_item_id and content_revision__is_live(ese.evaluation_id) = true and ese.party_id = evaluation__party_id(:user_id,et2.task_id)), - evaluation_tasks et left outer join evaluation_answersi ea on (ea.task_id = et.task_id and content_revision__is_live(ea.answer_id) = true + evaluation_tasks et left outer join evaluation_answersi ea on (ea.task_item_id = et.task_item_id and content_revision__is_live(ea.answer_id) = true and ea.party_id = evaluation__party_id(:user_id,et.task_id)) - where eg.grade_id = :grade_id - and eg.grade_id = et.grade_id + where eg.grade_item_id = :grade_item_id + and eg.grade_item_id = et.grade_item_id and et.task_id = et2.task_id and content_revision__is_live(et.task_id) = true and content_revision__is_live(eg.grade_id) = true Index: openacs-4/packages/evaluation/lib/evaluations-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/evaluations-chunk.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/evaluation/lib/evaluations-chunk.tcl 26 Jul 2004 18:01:42 -0000 1.7 +++ openacs-4/packages/evaluation/lib/evaluations-chunk.tcl 30 Jul 2004 22:50:07 -0000 1.8 @@ -1,6 +1,6 @@ ad_page_contract { - evaluations chunk to be displayed in the index page + evaluations chunk to be displayed in the index page } @@ -13,42 +13,42 @@ db_1row get_grade_info { *SQL* } set elements [list task_name \ - [list label "[_ evaluation.Name_]" \ + [list label "[_ evaluation-portlet.Name_]" \ link_url_col task_url \ orderby_asc {task_name asc} \ orderby_desc {task_name desc}] \ ] if { $admin_p } { - #admin - lappend elements task_weight \ - [list label "[_ evaluation.Weight_]" \ - display_template {
@grade_tasks_admin.task_weight@%
} \ - orderby_asc {task_weight asc} \ - orderby_desc {task_weight desc}] - set multirow_name grade_tasks_admin - set actions [list "[_ evaluation.lt_Edit_grades_distribut_1]" [export_vars -base "${base_url}admin/grades/distribution-edit" { grade_id }]] + #admin + lappend elements task_weight \ + [list label "[_ evaluation-portlet.Weight_]" \ + display_template {
@grade_tasks_admin.task_weight@%
} \ + orderby_asc {task_weight asc} \ + orderby_desc {task_weight desc}] + set multirow_name grade_tasks_admin + set actions [list "[_ evaluation-portlet.lt_Edit_grades_distribut]" [export_vars -base "${base_url}admin/grades/distribution-edit" { grade_id }]] } else { - #student - lappend elements grade \ - [list label "[_ evaluation.Grade_over_100_]" \ - display_template {
@grade_tasks.grade@
} \ - orderby_asc {grade asc} \ - orderby_desc {grade desc}] - lappend elements comments \ - [list label "[_ evaluation.Comments_]" \ - link_url_col comments_url \ - link_html { title "View evaluation comments" }] - lappend elements task_weight \ - [list label "[_ evaluation.Net_value_]" \ - display_template {
@grade_tasks.task_weight@
} \ - orderby_asc {task_weight asc} \ - orderby_desc {task_weight desc}] - lappend elements answer \ - [list label "" \ - link_url_col answer_url \ - link_html { title "[_ evaluation.View_my_answer_]" }] - set multirow_name grade_tasks - set actions "" + #student + lappend elements grade \ + [list label "[_ evaluation-portlet.Grade_over_100_]" \ + display_template {
@grade_tasks.grade@
} \ + orderby_asc {grade asc} \ + orderby_desc {grade desc}] + lappend elements comments \ + [list label "[_ evaluation-portlet.Comments_]" \ + link_url_col comments_url \ + link_html { title "[_ evaluation-portlet.lt_View_evaluation_comme]" }] + lappend elements task_weight \ + [list label "[_ evaluation-portlet.Net_Value_]" \ + display_template {
@grade_tasks.task_weight@
} \ + orderby_asc {task_weight asc} \ + orderby_desc {task_weight desc}] + lappend elements answer \ + [list label "" \ + link_url_col answer_url \ + link_html { title "[_ evaluation-portlet.View_my_answer_]" }] + set multirow_name grade_tasks + set actions "" } set total_grade 0.00 @@ -63,79 +63,80 @@ -pass_properties { return_url mode base_url } \ -filters { grade_id } \ -elements $elements \ - -orderby { default_value task_name } \ - -orderby_name evaluations_orderby - + -orderby_name evaluations_orderby \ + -orderby { default_value task_name } + set evaluations_orderby [template::list::orderby_clause -orderby -name grade_tasks] - + if { [string equal $evaluations_orderby ""] } { - set evaluations_orderby " order by task_name asc" + set evaluations_orderby " order by task_name asc" } -if { $admin_p } { - +if { $admin_p } { + #admin db_multirow -extend { task_url } grade_tasks_admin get_tasks_admin { *SQL* } { set task_url [export_vars -base "${base_url}admin/evaluations/student-list" { task_id grade_id }] - set category_weight [expr $category_weight + $task_weight] + set category_weight [expr $category_weight + $task_weight] + set task_weight [format %.2f [lc_numeric $task_weight]] } -} else { +} else { + db_multirow -extend { comments comments_url answer answer_url } grade_tasks get_grade_tasks { *SQL* } { if { ![empty_string_p $comments] } { - set comments "[_ evaluation.View_comments_]" + set comments "[_ evaluation-portlet.View_comments_]" set comments_url evaluation_view } set over_weight "" - if { ![empty_string_p $show_student_p] && $show_student_p } { + if { ![empty_string_p $show_student_p] && $show_student_p } { if { ![empty_string_p $grade] } { set grade [format %.2f [lc_numeric $grade]] set over_weight "[format %.2f [lc_numeric $task_grade]]/" set total_grade [expr $total_grade + $task_grade] } else { - set grade "[_ evaluation.Not_evaluated_]" + set grade "[_ evaluation-portlet.Not_evaluated_]" } - set task_weight "${over_weight}[format %.2f [lc_numeric $task_weight]]" set max_grade [expr $task_weight + $max_grade] + set task_weight "${over_weight}[format %.2f [lc_numeric $task_weight]]" + } else { - set grade "[_ evaluation.Not_available_]" - set task_weight "[_ evaluation.Not_available_]" + set grade "[_ evaluation-portlet.Not_available_]" + set task_weight "[_ evaluation-portlet.Not_available_]" } # working with answer stuff (if it has a file/url attached) if { [empty_string_p $answer_data] } { set answer_url "" set answer "" - } elseif { [empty_string_p [db_string content_length "select content_length from cr_revisions where revision_id = :answer_id"]] } { + } elseif { [string eq $answer_title "link"] } { # there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute, # so we have to deal with this case array set community_info [site_node::get -url "[dotlrn_community::get_community_url [dotlrn_community::get_community_id]][evaluation::package_key]"] if { ![regexp ([join [split [parameter::get -parameter urlProtocols -package_id $community_info(package_id)] ","] "|"]) "$answer_data"] } { set answer_data "http://$answer_data" } set answer_url "[export_vars -base "$answer_data" { }]" - set answer "[_ evaluation.View_my_answer_]" + set answer "[_ evaluation-portlet.View_my_answer_]" } else { # we assume it's a file set answer_url "[export_vars -base "${base_url}view/$answer_title" { {revision_id $answer_id} }]" - set answer "[_ evaluation.View_my_answer_]" + set answer "[_ evaluation-portlet.View_my_answer_]" } if { $number_of_members > 1 && [string eq [db_string get_group_id { *SQL* }] 0] } { set answer "" set answer_url "" - set grade "[_ evaluation.No_group_for_task_]" + set grade "[_ evaluation-portlet.No_group_for_task_]" } } } - if { $admin_p } { - set bottom_line "[_ evaluation.lt_Weight_used_in_grade__2]" + set bottom_line "[_ evaluation-portlet.lt_smallWeight_used_in_g]" } else { - set bottom_line "[_ evaluation.lt_smallTotal_points_in_]" + set bottom_line "[_ evaluation-portlet.lt_smallTotal_points_in__1]" } - 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.7 -r1.8 --- openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql 14 Jul 2004 17:42:06 -0000 1.7 +++ openacs-4/packages/evaluation/lib/tasks-chunk-postgresql.xql 30 Jul 2004 22:50:07 -0000 1.8 @@ -7,20 +7,20 @@ select et.task_name, et.number_of_members, et.task_id, - to_char(et.due_date, 'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, + to_char(et.due_date,'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, et.online_p, et.late_submit_p, et.item_id, - et.requires_grade_p, et.description, et.grade_id, + et.requires_grade_p, et.description, et.grade_item_id, cr.content_length, et.data as task_data, cr.title as task_title, et.task_id as revision_id, ets.solution_id as solution_id - from cr_revisions cr, - evaluation_tasksi et left outer join evaluation_tasks_solsi ets on (ets.task_id = et.task_id and content_revision__is_live(ets.solution_id) = true) + from cr_revisions cr, + evaluation_tasksi et left outer join evaluation_tasks_solsi ets on (ets.task_item_id = et.task_item_id and content_revision__is_live(ets.solution_id) = true) where cr.revision_id = et.revision_id - and grade_id = :grade_id + and et.grade_item_id = :grade_item_id and content_revision__is_live(et.task_id) = true $assignments_orderby @@ -31,24 +31,22 @@ select et.task_name, et.number_of_members, et.task_id, - to_char(et.due_date, 'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, -` et.online_p, + to_char(et.due_date,'YYYY-MM-DD HH24:MI:SS') as due_date_ansi, + et.online_p, et.late_submit_p, et.item_id, et.due_date, - et.requires_grade_p, - et.description, - et.grade_id, + et.requires_grade_p, et.description, et.grade_item_id, cr.title as task_title, et.data as task_data, et.task_id as revision_id, cr.content_length, ea.answer_id as answer_id from cr_revisions cr, - evaluation_tasksi et left outer join evaluation_answersi ea on (ea.task_id = et.task_id and content_revision__is_live(ea.answer_id) = true + evaluation_tasksi et left outer join evaluation_answersi ea on (ea.task_item_id = et.task_item_id and content_revision__is_live(ea.answer_id) = true and ea.party_id = evaluation__party_id(:user_id,et.task_id)) where cr.revision_id = et.revision_id - and grade_id = :grade_id + and grade_item_id = :grade_item_id and content_revision__is_live(et.task_id) = true $assignments_orderby @@ -66,9 +64,12 @@ - select grade_plural_name, grade_name from evaluation_grades where grade_id = :grade_id + select grade_name, grade_plural_name + from evaluation_grades + where grade_item_id = :grade_item_id and content_revision__is_live(grade_id) = true + Index: openacs-4/packages/evaluation/lib/tasks-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/lib/tasks-chunk.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/evaluation/lib/tasks-chunk.tcl 27 Jul 2004 17:18:08 -0000 1.7 +++ openacs-4/packages/evaluation/lib/tasks-chunk.tcl 30 Jul 2004 22:50:07 -0000 1.8 @@ -1,6 +1,6 @@ ad_page_contract { - task chunk to be displayed in the index page + task chunk to be displayed in the index page } @@ -12,79 +12,79 @@ set base_url [ad_conn package_url] set mode display -set return_url "[ad_conn url]?[export_vars { grade_id }]" +set return_url "[ad_conn url]?[ns_conn query]&[export_vars { grade_id }]" set elements [list task_name \ - [list label "[_ evaluation.Name_]" \ + [list label "[_ evaluation-portlet.Name_]" \ link_url_col task_url \ orderby_asc {task_name asc} \ orderby_desc {task_name desc}] \ due_date_pretty \ - [list label "[_ evaluation.Due_date_]" \ + [list label "[_ evaluation-portlet.Due_date_]" \ orderby_asc {due_date_ansi asc} \ orderby_desc {due_date_ansi desc}] \ ] if { $admin_p } { - #admin - lappend elements solution \ - [list label "" \ - link_url_col solution_url \ - link_html { title "[_ evaluation.Addedit_solution_]" }] - lappend elements audit_info \ - [list label "" \ - link_url_col audit_info_url \ - link_html { title "[_ evaluation.Audit_info_]" }] - lappend elements groups_admin \ - [list label "" \ - link_url_col groups_admin_url \ - link_html { title "[_ evaluation.lt_Groups_administration]" }] -# lappend elements view \ -# [list label "" \ -# sub_class narrow \ -# display_template {} \ -# link_url_eval {[export_vars -base "${base_url}admin/tasks/task-add-edit" { grade_id task_id return_url mode }]} \ -# link_html { title "[_ evaluation.View_task_]" }] -# lappend elements edit \ -# [list label "" \ -# sub_class narrow \ -# display_template {} \ -# link_url_eval {[export_vars -base "${base_url}admin/tasks/task-add-edit" { return_url item_id grade_id task_id }]} \ -# link_html { title "[_ evaluation.Edit_task_]" }] - lappend elements delete \ - [list label "" \ - sub_class narrow \ - display_template {} \ - link_url_eval {[export_vars -base "${base_url}admin/tasks/task-delete" { grade_id task_id return_url }]} \ - link_html { title "[_ evaluation.Delete_task_]" }] - - set multirow_name tasks_admin - set actions [list "[_ evaluation.Add_grade_name]" [export_vars -base "${base_url}admin/tasks/task-add-edit" { return_url grade_id }] ] + #admin + lappend elements solution \ + [list label "" \ + link_url_col solution_url \ + link_html { title "[_ evaluation-portlet.Addedit_solution_]" }] + lappend elements audit_info \ + [list label "" \ + link_url_col audit_info_url \ + link_html { title "[_ evaluation-portlet.Audit_info_]" }] + lappend elements groups_admin \ + [list label "" \ + link_url_col groups_admin_url \ + link_html { title "[_ evaluation-portlet.lt_Groups_administration]" }] + lappend elements view \ + [list label "" \ + sub_class narrow \ + display_template {} \ + link_url_eval {[export_vars -base "${base_url}admin/tasks/task-add-edit" { grade_id task_id mode return_url }]} \ + link_html { title "[_ evaluation-portlet.View_task_]" }] + lappend elements edit \ + [list label "" \ + sub_class narrow \ + display_template {} \ + link_url_eval {[export_vars -base "${base_url}admin/tasks/task-add-edit" { grade_id return_url item_id task_id }]} \ + link_html { title "[_ evaluation-portlet.Edit_task_]" }] + lappend elements delete \ + [list label "" \ + sub_class narrow \ + display_template {} \ + link_url_eval {[export_vars -base "${base_url}admin/tasks/task-delete" { grade_id task_id return_url }]} \ + link_html { title "[_ evaluation-portlet.Delete_task_]" }] + + set multirow_name tasks_admin + set actions [list "[_ evaluation-portlet.Add_grade_name_]" [export_vars -base "${base_url}admin/tasks/task-add-edit" { return_url grade_id }] ] } else { - #student - lappend elements answer \ - [list label "" \ - link_url_col answer_url \ - link_html { title "[_ evaluation.Addedit_answer_]" }] - lappend elements view \ - [list label "" \ - sub_class narrow \ - display_template {} \ - link_url_eval {[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]} \ - link_html { title "[_ evaluation.View_task_]" }] - set multirow_name tasks - set actions "" + #student + lappend elements answer \ + [list label "" \ + link_url_col answer_url \ + link_html { title "[_ evaluation-portlet.Addedit_answer_]" }] + lappend elements view \ + [list label "" \ + sub_class narrow \ + display_template {} \ + link_url_eval {[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]} \ + link_html { title "[_ evaluation-portlet.View_task_]" }] + set multirow_name tasks + set actions "" } template::list::create \ -name tasks \ -multirow $multirow_name \ -actions $actions \ -key task_id \ - -pass_properties { return_url mode base_url } \ + -pass_properties { return_url mode base_url grade_id } \ -filters { grade_id {} } \ - -elements $elements \ -orderby_name assignments_orderby \ + -elements $elements \ -orderby { default_value task_name } set assignments_orderby [template::list::orderby_clause -orderby -name tasks] @@ -95,14 +95,14 @@ if { $admin_p } { - db_multirow -extend { solution_url solution solution_mode task_url audit_info audit_info_url groups_admin groups_admin_url due_date_pretty } tasks_admin get_tasks_admin { *SQL* } { - set due_date_pretty [lc_time_fmt $due_date_ansi "%q"] + db_multirow -extend { solution_url due_date_pretty solution solution_mode task_url audit_info audit_info_url groups_admin groups_admin_url } tasks_admin get_tasks_admin { *SQL* } { + set due_date_pretty [lc_time_fmt $due_date_ansi "%q"] # working with task stuff (if it has a file/url attached) if { [empty_string_p $task_data] } { set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]" - set task_name "$task_name (No data)" - } elseif { [empty_string_p $content_length] } { + set task_name "[_ evaluation-portlet.task_name_No_data_]" + } elseif { [string eq $task_title "link"] } { # there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute, # so we have to deal with this case @@ -111,7 +111,8 @@ set task_data "http://$task_data" } set task_url "[export_vars -base "$task_data" { }]" - set task_name "$task_name (URL)" + set task_name "[_ evaluation-portlet.task_name_URL_]" + } else { # we assume it's a file set task_url "[export_vars -base "${base_url}view/$task_title" { revision_id }]" @@ -121,32 +122,32 @@ if { ![empty_string_p $solution_id] } { set solution_mode display set solution_url "[export_vars -base "${base_url}admin/tasks/solution-add-edit" { grade_id task_id solution_id return_url solution_mode }]" - set solution "[_ evaluation.ViewEdit_Solution_]" + set solution "[_ evaluation-portlet.ViewEdit_Solution_]" } else { set solution_mode edit set solution_url "[export_vars -base "${base_url}admin/tasks/solution-add-edit" { grade_id task_id return_url solution_mode }]" - set solution "[_ evaluation.Upload_Solution_]" + set solution "[_ evaluation-portlet.Upload_Solution_]" } set audit_info_url "[export_vars -base "${base_url}admin/evaluations/audit-info" { grade_id task_id }]" - set audit_info "[_ evaluation.Audit_Info_]" + set audit_info "[_ evaluation-portlet.Audit_Info_]" if { ![string eq $number_of_members 1] } { set groups_admin_url "[export_vars -base "${base_url}admin/groups/one-task" { grade_id task_id }]" - set groups_admin "[_ evaluation.Groups_Admin_]" + set groups_admin "[_ evaluation-portlet.Groups_Admin_]" } } } else { - db_multirow -extend { task_url solution_url solution solution_mode answer answer_url due_date_pretty } tasks get_tasks { *SQL* } { - set answer_mode display + db_multirow -extend { task_url solution_url solution due_date_pretty solution_mode answer answer_url } tasks get_tasks { *SQL* } { - set due_date_pretty [lc_time_fmt $due_date_ansi "%q"] + set answer_mode display + set due_date_pretty [lc_time_fmt $due_date_ansi "%q"] # working with task stuff (if it has a file/url attached) if { [empty_string_p $task_data] } { set task_url "[export_vars -base "${base_url}task-view" { grade_id task_id return_url }]" - set task_name "$task_name [_ evaluation.No_data_]" - } elseif { [empty_string_p $content_length] } { + set task_name "[_ evaluation-portlet.task_name_No_data_]" + } elseif { [string eq $task_title "link"] } { # there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute, # so we have to deal with this case @@ -155,7 +156,8 @@ set task_data "http://$task_data" } set task_url "[export_vars -base "$task_data" { }]" - set task_name "$task_name [_ evaluation.URL_]" + set task_name "[_ evaluation-portlet.task_name_URL_]" + } else { # we assume it's a file set task_url "[export_vars -base "${base_url}view/$task_title" { revision_id }]" @@ -165,21 +167,21 @@ if { [string eq $online_p "t"] } { if { ([template::util::date::compare $due_date [template::util::date::now]] > 0) } { if { [empty_string_p $answer_id] } { - set answer "[_ evaluation.submit_answer_]" + set answer "[_ evaluation-portlet.submit_answer_]" set answer_mode edit set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id return_url answer_mode }]" } else { - set answer "[_ evaluation.submit_answer_again_]" + set answer "[_ evaluation-portlet.submit_answer_again_]" set answer_mode display set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id answer_id return_url answer_mode }]" } } elseif { [string eq $turn_in_late_p "t"] } { if { [empty_string_p $answer_id] } { - set answer "submit answer " + set answer "[_ evaluation-portlet.lt_submit_answer_style_f]" set answer_mode edit set answer_url "[export_vars -base "${base_url}answer-add-edit" { grade_id task_id return_url answer_mode }]" } else { - set answer "submit answer [_ evaluation.again_]" + set answer "[_ evaluation-portlet.lt_submit_answer_style_f_1]" set answer_mode display set answer_url "[export_vars -base "${base_url}admin/tasks/solution-add-edit" { grade_id task_id answer_id return_url solution_mode }]" } @@ -191,5 +193,4 @@ } } - -} \ No newline at end of file +} 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.9 -r1.10 --- openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 25 Jul 2004 11:12:24 -0000 1.9 +++ openacs-4/packages/evaluation/sql/postgresql/evaluation-create.sql 30 Jul 2004 22:50:07 -0000 1.10 @@ -6,6 +6,9 @@ primary key constraint evaluation_grades_id_fk references cr_revisions(revision_id), + grade_item_id integer + constraint evaluation_grades_gid_fk + references cr_items(item_id), grade_name varchar(100), grade_plural_name varchar(100), comments text, @@ -31,6 +34,9 @@ primary key constraint evaluation_tasks_fk references cr_revisions(revision_id), + task_item_id integer + constraint evaluation_tasks_tid_fk + references cr_items(item_id), task_name varchar constraint evaluation_tasks_tn_nn not null, @@ -41,11 +47,11 @@ constraint evaluation_tasks_nom_df default 1, due_date timestamp, - grade_id integer + grade_item_id integer constraint evaluation_tasks_gid_fk - references evaluation_grades, + references cr_items(item_id), -- percentage of the grade of the course - weight integer, + weight numeric, -- the task will be submitted on line online_p char(1) constraint evaluation_tasks_onp_ck @@ -74,9 +80,12 @@ create table evaluation_tasks_sols ( solution_id integer primary key, - task_id integer + solution_item_id integer + constraint evaluation_tsols_siid_fk + references cr_items(item_id), + task_item_id integer constraint evaluation_tsols_tid_fk - references evaluation_tasks + references cr_items(item_id) ); -- create indexes @@ -96,15 +105,18 @@ answer_id integer primary key references cr_revisions, + answer_item_id integer + constraint evaluation_sans_aiid_fk + references cr_items(item_id), -- person/group to wich the answer belongs party_id integer constraint evaluation_sans_pid_nn not null constraint evaluation_sans_pid_fk references parties(party_id), - task_id integer + task_item_id integer constraint evaluation_sans_tid_fk - references evaluation_tasks + references cr_items(tem_id) ); create index evaluation_answers_tid_index on evaluation_answers(party_id,task_id); @@ -126,11 +138,13 @@ primary key constraint evaluation_stu_evals_fk references acs_objects(object_id), - task_id integer + evaluation_item_id integer constraint evaluation_stu_evals_eiid + references cr_items(item_id), + task_item_id integer constraint evaluation_stu_evals_tid_nn not null constraint evaluation_stu_evals_tid_fk - references evaluation_tasks, + references evaluation_tasks(task_item_id), -- must have student_id or team_id party_id integer constraint evaluation_stu_evals_pid_nn @@ -162,9 +176,12 @@ create table evaluation_grades_sheets ( grades_sheet_id integer primary key, - task_id integer + grades_sheet_item_id integer + constraint evaluation_gsheets_giid_fk + references cr_items(item_id), + task_item_id integer constraint evaluation_gsheets_t_id_fk - references evaluation_tasks + references evaluation_tasks(task_item_id) ); -- create indexes @@ -202,11 +219,11 @@ primary key constraint evaluation_task_groups_fk references groups(group_id), - task_id integer + task_item_id integer constraint evaluation_task_groups_tid_nn not null constraint evaluation_task_groups_tid_fk - references evaluation_tasks(task_id) + references evaluation_tasks(task_item_id) ); create index evaluation_task_groups_tid_index on evaluation_task_groups(task_id); @@ -336,13 +353,15 @@ ); insert into evaluation_grades - (grade_id, + (grade_id, + grade_item_id, grade_name, grade_plural_name, comments, weight) values - (v_revision_id, + (v_revision_id, + p_item_id, p_grade_name, p_grade_plural_name, p_description, @@ -355,26 +374,30 @@ create function evaluation__delete_grade (integer) returns integer as ' declare - p_grade_id alias for $1; + p_grade_item_id alias for $1; del_rec record; + begin FOR del_rec IN - select task_id - from evaluation_tasks - where grade_id = p_grade_id + select task_item_id + from evaluation_tasks + where grade_item_id = p_grade_item_id + LOOP - delete from evaluation_student_evals where task_id = del_rec.task_id; - delete from evaluation_answers where task_id = del_rec.task_id; - delete from evaluation_tasks_sols where task_id = del_rec.task_id; - delete from evaluation_grades_sheets where task_id = del_rec.task_id; + + PERFORM evaluation__delete_student_eval(evaluation_id) from evaluation_student_evals where task_item_id = del_rec.task_item_id; + PERFORM evaluation__delete_answer(answer_id) from evaluation_answers where task_item_id = del_rec.task_item_id; + PERFORM evaluation__delete_task_sol(solution_id) from evaluation_tasks_sols where task_item_id = del_rec.task_item_id; + PERFORM evaluation__delete_grades_sheet(grades_sheet_id) from evaluation_grades_sheets where task_item_id = del_rec.task_item_id; + END LOOP; - delete from evaluation_tasks where grade_id = p_grade_id; - delete from evaluation_grades where grade_id = p_grade_id; - - PERFORM content_revision__delete(p_grade_id); + PERFORM evaluation__delete_task(task_id) from evaluation_tasks where grade_item_id = p_grade_item_id; + delete from evaluation_grades where grade_item_id = p_grade_item_id; + PERFORM content_revision__delete(grade_id) from evaluation_grades where grade_item_id = p_grade_item_id; + return 0; end;' language 'plpgsql'; @@ -404,7 +427,7 @@ p_revision_id alias for $2; p_task_name alias for $3; p_number_of_members alias for $4; - p_grade_id alias for $5; + p_grade_item_id alias for $5; p_description alias for $6; p_weight alias for $7; p_due_date alias for $8; @@ -441,20 +464,22 @@ insert into evaluation_tasks (task_id, + task_item_id, task_name, number_of_members, due_date, - grade_id, + grade_item_id, weight, online_p, late_submit_p, requires_grade_p) values - (v_revision_id, + (v_revision_id, + p_item_id, p_task_name, p_number_of_members, p_due_date, - p_grade_id, + p_grade_item_id, p_weight, p_online_p, p_late_submit_p, @@ -467,17 +492,19 @@ create function evaluation__delete_task (integer) returns integer as ' declare - p_task_id alias for $1; + p_task_item_id alias for $1; del_rec record; begin - delete from evaluation_student_evals where task_id = p_task_id; - delete from evaluation_answers where task_id = p_task_id; - delete from evaluation_tasks_sols where task_id = p_task_id; - delete from evaluation_grades_sheets where task_id = p_task_id; - delete from evaluation_tasks where task_id = p_task_id; + + PERFORM evaluation__delete_student_eval(evaluation_id) from evaluation_student_evals where task_item_id = p_task_item_id; + PERFORM evaluation__delete_answer(answer_id) from evaluation_answers where task_item_id = p_task_item_id; + PERFORM evaluation__delete_task_sol(solution_id) from evaluation_tasks_sols where task_item_id = p_task_item_id; + PERFORM evaluation__delete_grades_sheet(grades_sheet_id) from evaluation_grades_sheets where task_item_id = p_task_item_id; + + delete from evaluation_tasks where task_id = p_task_item_id; - PERFORM content_revision__delete(p_task_id); + PERFORM content_revision__delete(task_id) from evaluation_tasks where task_item_id = p_task_item_id; return 0; @@ -506,7 +533,7 @@ declare p_item_id alias for $1; p_revision_id alias for $2; - p_task_id alias for $3; + p_task_item_id alias for $3; p_object_type alias for $4; p_creation_date alias for $5; p_creation_user alias for $6; @@ -537,10 +564,12 @@ insert into evaluation_tasks_sols (solution_id, - task_id) + solution_item_id, + task_item_id) values (v_revision_id, - p_task_id); + p_item_id, + p_task_item_id); return v_revision_id; end; @@ -571,7 +600,7 @@ declare p_item_id alias for $1; p_revision_id alias for $2; - p_task_id alias for $3; + p_task_item_id alias for $3; p_party_id alias for $4; p_object_type alias for $5; p_creation_date alias for $6; @@ -603,11 +632,13 @@ insert into evaluation_answers (answer_id, - task_id, + answer_item_id, + task_item_id, party_id) values - (v_revision_id, - p_task_id, + (v_revision_id, + p_item_id, + p_task_item_id, p_party_id); return v_revision_id; @@ -638,7 +669,7 @@ declare p_item_id alias for $1; p_revision_id alias for $2; - p_task_id alias for $3; + p_task_item_id alias for $3; p_object_type alias for $4; p_creation_date alias for $5; p_creation_user alias for $6; @@ -669,10 +700,12 @@ insert into evaluation_grades_sheets (grades_sheet_id, - task_id) + grades_sheet_item_id, + task_item_id) values (v_revision_id, - p_task_id); + p_item_id, + p_task_item_id); return v_revision_id; end; @@ -701,7 +734,7 @@ declare p_item_id alias for $1; p_revision_id alias for $2; - p_task_id alias for $3; + p_task_item_id alias for $3; p_party_id alias for $4; p_grade alias for $5; p_show_student_p alias for $6; @@ -736,13 +769,15 @@ insert into evaluation_student_evals (evaluation_id, - task_id, + evaluation_item_id, + task_item_id, party_id, grade, show_student_p) values (v_revision_id, - p_task_id, + p_item_id, + p_task_item_id, p_party_id, p_grade, p_show_student_p); @@ -778,7 +813,7 @@ p_creation_user alias for $5; p_creation_ip alias for $6; p_context_id alias for $7; - p_task_id alias for $8; + p_task_item_id alias for $8; v_group_id integer; @@ -799,10 +834,10 @@ insert into evaluation_task_groups (group_id, - task_id) + task_item_id) values (v_group_id, - p_task_id); + p_task_item_id); return v_group_id; end; @@ -942,11 +977,11 @@ FOR v_grades_cursor IN select (ese.grade*et.weight*eg.weight)/10000 as grade from evaluation_gradesx eg, evaluation_tasks et, evaluation_student_evalsi ese, acs_objects ao - where et.task_id = ese.task_id - and et.grade_id = eg.grade_id + where et.task_item_id = ese.task_item_id + and et.grade_item_id = eg.grade_item_id and eg.item_id = ao.object_id and ao.context_id = p_package_id - and ese.party_id = evaluation__party_id(p_user_id,ese.task_id) + and ese.party_id = evaluation__party_id(p_user_id,et.task_id) and content_revision__is_live(ese.evaluation_id) = true and content_revision__is_live(eg.grade_id) = true and content_revision__is_live(et.task_id) = true @@ -998,10 +1033,13 @@ if v_number_of_members = 1 then return p_user_id; else - return coalesce((select etg.group_id from evaluation_task_groups etg, acs_rels map + return coalesce((select etg.group_id from evaluation_task_groups etg, + evaluation_tasks et, + acs_rels map where map.object_id_one = etg.group_id and map.object_id_two = p_user_id - and etg.task_id = p_task_id),0); + and etg.task_item_id = et.task_item_id + and et.task_id = p_task_id),0); end if; end;' language 'plpgsql'; 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.12 -r1.13 --- openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql 27 Jul 2004 03:02:11 -0000 1.12 +++ openacs-4/packages/evaluation/tcl/evaluation-procs-postgresql.xql 30 Jul 2004 22:50:08 -0000 1.13 @@ -12,7 +12,7 @@ null, :creation_user, :package_id, - current_timestamp, + now(), :creation_ip, :name, :description, @@ -119,7 +119,7 @@ :revision_id, :task_name, :number_of_members, - :to_grade_id, + :to_grade_item_id, :description, :weight, :due_date, @@ -183,7 +183,7 @@ :revision_id, :name, :number_of_members, - :grade_id, + :grade_item_id, :description, :weight, :due_date, @@ -244,7 +244,7 @@ select evaluation__new_task_sol ( :item_id, :revision_id, - :task_id, + :task_item_id, 'evaluation_tasks_sols', :creation_date, --creation date :creation_user, @@ -299,7 +299,7 @@ select evaluation__new_answer ( :item_id, :revision_id, - :task_id, + :task_item_id, :party_id, 'evaluation_answers', :creation_date, --creation date @@ -355,7 +355,7 @@ select evaluation__new_student_eval ( :item_id, :revision_id, - :task_id, + :task_item_id, :party_id, :grade, :show_student_p, @@ -384,7 +384,7 @@ :creation_user, :creation_ip, :context, - :task_id + :task_item_id ); @@ -428,7 +428,7 @@ select evaluation__new_grades_sheet ( :item_id, :revision_id, - :task_id, + :task_item_id, 'evaluation_grades_sheets', :creation_date, --creation date :creation_user, @@ -445,7 +445,7 @@ - select grade_id from evaluation_tasks where task_id = :task_id and content_revision__is_live(task_id) = true + select eg.grade_id from evaluation_tasks est, evaluation_grades eg where est.task_id = :task_id and est.grade_item_id = eg.grade_item_id and content_revision__is_live(est.task_id) = true and content_revision__is_live(eg.grade_id) = true @@ -457,16 +457,35 @@ ese.grade, ese.description as comments from cc_users cu left outer join evaluation_student_evalsi ese on (ese.party_id = cu.person_id - and ese.task_id = :task_id + and ese.task_item_id = :task_item_id and content_revision__is_live(ese.evaluation_id) = true) + + + + select p.person_id as party_id, p.last_name||' - '||p.first_names as party_name, + ese.grade, + ese.description as comments + from registered_users ru, + dotlrn_member_rels_approved app, + persons p left outer join evaluation_student_evalsi ese on (ese.party_id = p.person_id + and ese.task_item_id = :task_item_id + and content_revision__is_live(ese.evaluation_id) = true) + where app.community_id = :community_id + and app.user_id = ru.user_id + and app.user_id = p.person_id + and app.role = 'student' + + + + - select et.task_name, et.number_of_members + select et.task_name, et.number_of_members, et.task_item_id from evaluation_tasks et where et.task_id = :task_id @@ -482,9 +501,9 @@ ese.description as comments from groups g, evaluation_task_groups etg left outer join evaluation_student_evalsi ese on (ese.party_id = etg.group_id - and ese.task_id = :task_id + and ese.task_item_id = :task_item_id and content_revision__is_live(ese.evaluation_id) = true) - where etg.task_id = :task_id + where etg.task_item_id = :task_item_id and etg.group_id = g.group_id @@ -506,8 +525,9 @@ from evaluation_grades eg, evaluation_tasks et where et.task_id = :task_id - and et.grade_id = eg.grade_id - + and et.grade_item_id = eg.grade_item_id + and content_revision__is_live(eg.grade_id) = true + @@ -516,7 +536,7 @@ select description as edit_reason, grade as current_grade, - evaluation__party_name(party_id,task_id) as party_name + evaluation__party_name(party_id,:task_id) as party_name from evaluation_student_evalsi where evaluation_id = :evaluation_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.12 -r1.13 --- openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 27 Jul 2004 03:02:12 -0000 1.12 +++ openacs-4/packages/evaluation/tcl/evaluation-procs.tcl 30 Jul 2004 22:50:08 -0000 1.13 @@ -88,13 +88,19 @@ db_1row select_names { *SQL* } + set community_name "" + set community_id [dotlrn_community::get_community_id] + if { ![empty_string_p $community_id] } { + set community_name [db_string get_community_name "select pretty_name from dotlrn_communities_all where community_id = :community_id"] + } + switch $notif_type { "one_assignment_notif" { if { [string eq $edit_p 0] } { - set notif_subject "[_ evaluation.New_Assignment_] ($grade_name)" + set notif_subject "[_ evaluation.lt_New_Assignment_grade_]" set notif_text "[_ evaluation.lt_A_new_assignment_was_] \n" } else { - set notif_subject "Assignment Edited ($grade_name)" + set notif_subject "[_ evaluation.lt_Assignment_Edited_gra]" set notif_text "[_ evaluation.lt_An_assignment_was_mod] \n" } append notif_text "[_ evaluation.click_on_this_link_] [evaluation::notification::get_url -task_id $task_id -notif_type one_assignment_notif] \n" @@ -104,7 +110,7 @@ "one_evaluation_notif" { db_1row get_eval_info { *SQL* } set user_name [person::name -person_id [ad_conn user_id]] - set notif_subject "[_ evaluation.Evaluation_Modified_]" + set notif_subject "[_ evaluation.lt_Evaluation_Modified_c]" set url_link [evaluation::notification::get_url -task_id $task_id -evaluation_id $evaluation_id -notif_type one_evaluation_notif] set notif_text "[_ evaluation.lt_user_name_has_modifie]" set response_id $evaluation_id @@ -236,7 +242,7 @@ ad_proc -public evaluation::clone_task { -item_id:required -from_task_id:required - -to_grade_id:required + -to_grade_item_id:required -to_package_id:required } { Cone a task @@ -270,7 +276,7 @@ -content_id:required -new_item_p:required -name:required - -grade_id:required + -grade_item_id:required -number_of_members:required -requires_grade_p:required -storage_type:required @@ -292,7 +298,7 @@ @param content_type The type to make @param content_table @param new_item_p If true make a new item using item_id - @param grade_id Grade type where the task belongs + @param grade_item_id Grade type where the task belongs @param name The name of the task @number_of_members If the task is in groups this parameter must be > 1 @param online_p If the task will be submited online @@ -325,30 +331,13 @@ return $revision_id } -ad_proc -public evaluation::clone_task_references { - -item_id:required - -from_task_id:required - -to_task_id:required -} { - Cone a task - - @param item_id The item to create. - @param from_task_id Task to clone. - @param to_task_id Target. -} { - - db_transaction { - - } -} - ad_proc -public evaluation::new_solution { -item_id:required -content_type:required -content_table:required -content_id:required -new_item_p:required - -task_id:required + -task_item_id:required -storage_type:required -title:required {-mime_type "text/plain"} @@ -404,7 +393,7 @@ -content_table:required -content_id:required -new_item_p:required - -task_id:required + -task_item_id:required -storage_type:required -title:required -party_id:required @@ -461,7 +450,7 @@ -content_id:required -new_item_p:required -party_id:required - -task_id:required + -task_item_id:required -grade:required {-title "evaluation"} {-show_student_p "t"} @@ -516,7 +505,7 @@ ad_proc -public evaluation::new_evaluation_group { -group_id:required -group_name:required - -task_id:required + -task_item_id:required {-context ""} {-creation_date ""} } { @@ -566,7 +555,7 @@ -content_table:required -content_id:required -new_item_p:required - -task_id:required + -task_item_id:required -storage_type:required -title:required -mime_type:required @@ -643,7 +632,13 @@ if { $number_of_members == 1 } { # the task is individual - set sql_query [db_map sql_query_individual] + set community_id [dotlrn_community::get_community_id] + if { [empty_string_p $community_id] } { + set sql_query [db_map sql_query_individual] + } else { + set sql_query [db_map sql_qyery_comm_ind] + } + } else { # the task is in groups Index: openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.3 +++ openacs-4/packages/evaluation/www/answer-add-edit-postgresql.xql 30 Jul 2004 22:50:09 -0000 1.4 @@ -11,6 +11,16 @@ + + + + select task_item_id + from evaluation_tasks + where task_id = :task_id + + + + 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.6 -r1.7 --- openacs-4/packages/evaluation/www/answer-add-edit.tcl 14 Jul 2004 17:42:07 -0000 1.6 +++ openacs-4/packages/evaluation/www/answer-add-edit.tcl 30 Jul 2004 22:50:09 -0000 1.7 @@ -37,6 +37,8 @@ set context [list $page_title] +db_1row task_info { *SQL* } + ad_form -html { enctype multipart/form-data } -name answer -cancel_url $return_url -export { item_id grade_id task_id attached_p return_url } -form { answer_id:key @@ -101,7 +103,7 @@ } set revision_id [evaluation::new_answer -new_item_p [ad_form_new_p -key answer_id] -item_id $item_id -content_type evaluation_answers \ - -content_table evaluation_answers -content_id answer_id -storage_type $storage_type -task_id $task_id \ + -content_table evaluation_answers -content_id answer_id -storage_type $storage_type -task_item_id $task_item_id \ -title $title -mime_type $mime_type -party_id $party_id] evaluation::set_live -revision_id $revision_id @@ -113,9 +115,15 @@ # create the new item db_dml lob_content { *SQL* } -blob_files [list $tmp_file] + set content_length [file size $tmp_file] + # Unfortunately, we can only calculate the file size after the lob is uploaded + db_dml lob_size { *SQL* } + } elseif { ![string eq $url "http://"] } { db_dml link_content { *SQL* } + set content_length 0 + db_dml lob_size { *SQL* } } } 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.4 -r1.5 --- openacs-4/packages/evaluation/www/index-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.4 +++ openacs-4/packages/evaluation/www/index-postgresql.xql 30 Jul 2004 22:50:09 -0000 1.5 @@ -7,7 +7,8 @@ select eg.grade_plural_name, - eg.grade_id + eg.grade_id, + eg.grade_item_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id Index: openacs-4/packages/evaluation/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/index.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/evaluation/www/index.adp 10 Jun 2004 21:08:53 -0000 1.7 +++ openacs-4/packages/evaluation/www/index.adp 30 Jul 2004 22:50:09 -0000 1.8 @@ -14,7 +14,7 @@
  • @grades.grade_plural_name@
    - +
  • @@ -27,7 +27,7 @@
  • @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.5 -r1.6 --- openacs-4/packages/evaluation/www/task-view-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.5 +++ openacs-4/packages/evaluation/www/task-view-postgresql.xql 30 Jul 2004 22:50:09 -0000 1.6 @@ -18,9 +18,10 @@ eg.grade_plural_name, eg.weight as grade_weight, ets.revision_id as solution_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) + evaluation_tasksi et left outer join evaluation_tasks_solsi ets on (ets.task_item_id = et.task_item_id and content_revision__is_live(ets.solution_id) = true) where et.task_id = :task_id - and et.grade_id = eg.grade_id + and et.grade_item_id = eg.grade_item_id + and content_revision__is_live(eg.grade_id) = true
    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.5 -r1.6 --- openacs-4/packages/evaluation/www/task-view.tcl 15 Jun 2004 23:20:29 -0000 1.5 +++ openacs-4/packages/evaluation/www/task-view.tcl 30 Jul 2004 22:50:09 -0000 1.6 @@ -53,7 +53,13 @@ if { ![empty_string_p $solution_data] } { - if { [regexp "http://" $solution_data] } { + if { [string eq $solution_title "link"] } { + # there is a bug in the template::list, if the url does not has a http://, ftp://, the url is not absolute, + # so we have to deal with this case + array set community_info [site_node::get -url "[dotlrn_community::get_community_url [dotlrn_community::get_community_id]][evaluation::package_key]"] + if { ![regexp ([join [split [parameter::get -parameter urlProtocols -package_id $community_info(package_id)] ","] "|"]) "$solution_data"] } { + set solution_data "http://$solution_data" + } set solution_url "$solution_data" } else { # we assume it's a file 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.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/index-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/index-postgresql.xql 30 Jul 2004 22:50:09 -0000 1.4 @@ -7,7 +7,8 @@ select eg.grade_plural_name, - eg.grade_id + eg.grade_id, + eg.grade_item_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id Index: openacs-4/packages/evaluation/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/index.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/evaluation/www/admin/index.adp 26 Jul 2004 18:01:43 -0000 1.8 +++ openacs-4/packages/evaluation/www/admin/index.adp 30 Jul 2004 22:50:09 -0000 1.9 @@ -18,7 +18,7 @@
  • @grades.grade_plural_name@
    - +
  • @@ -32,7 +32,7 @@
  • @grades.grade_plural_name@
    - +
  • Index: openacs-4/packages/evaluation/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/index.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/evaluation/www/admin/index.tcl 27 Jul 2004 03:02:12 -0000 1.9 +++ openacs-4/packages/evaluation/www/admin/index.tcl 30 Jul 2004 22:50:09 -0000 1.10 @@ -39,5 +39,4 @@ -url [ad_conn url] \ ] -set uno $dos ad_return_template \ No newline at end of file Index: openacs-4/packages/evaluation/www/admin/evaluations/audit-info-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/audit-info-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/audit-info-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/audit-info-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -6,11 +6,11 @@ - select evaluation__party_name(ese.party_id,ese.task_id) as party_name, + select evaluation__party_name(ese.party_id,:task_id) as party_name, ese.party_id from evaluation_student_evals ese where content_revision__is_live(ese.evaluation_id) = true - and ese.task_id = :task_id + and ese.task_item_id = :task_item_id Index: openacs-4/packages/evaluation/www/admin/evaluations/audit-info.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/audit-info.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/evaluation/www/admin/evaluations/audit-info.adp 7 Jul 2004 17:26:44 -0000 1.4 +++ openacs-4/packages/evaluation/www/admin/evaluations/audit-info.adp 30 Jul 2004 22:50:10 -0000 1.5 @@ -8,7 +8,7 @@
    • @parties.party_name@ - +
    Index: openacs-4/packages/evaluation/www/admin/evaluations/audit-info.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/audit-info.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/audit-info.xql 7 Jul 2004 17:26:44 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/audit-info.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -6,7 +6,8 @@ - select task_name from evaluation_tasks where task_id = :task_id + select task_name, task_item_id + from evaluation_tasks where task_id = :task_id 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.6 -r1.7 --- openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.tcl 7 Jul 2004 17:26:44 -0000 1.6 +++ openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.tcl 30 Jul 2004 22:50:10 -0000 1.7 @@ -137,6 +137,8 @@ } } +db_1row task_info { *SQL* } + if { ![empty_string_p $tmp_filename] } { set tmp_filename "${tmp_filename}_grades_sheet" @@ -147,7 +149,7 @@ set mime_type [cr_filename_to_mime_type -create $title] set revision_id [evaluation::new_grades_sheet -new_item_p 1 -item_id $grades_sheet_item_id -content_type evaluation_grades_sheets \ - -content_table evaluation_grades_sheets -content_id grades_sheet_id -storage_type lob -task_id $task_id \ + -content_table evaluation_grades_sheets -content_id grades_sheet_id -storage_type lob -task_item_id $task_item_id \ -title $title -mime_type $mime_type] evaluation::set_live -revision_id $revision_id @@ -170,7 +172,7 @@ set grades_gs($party_id) [expr ($grades_gs($party_id)*100)/$max_grade.0] set revision_id [evaluation::new_evaluation -new_item_p $new_p_gs($party_id) -item_id $item_ids($party_id) -content_type evaluation_student_evals \ -content_table evaluation_student_evals -content_id evaluation_id -description $comments_gs($party_id) \ - -show_student_p $show_student_gs($party_id) -grade $grades_gs($party_id) -task_id $task_id -party_id $party_id] + -show_student_p $show_student_gs($party_id) -grade $grades_gs($party_id) -task_item_id $task_item_id -party_id $party_id] evaluation::set_live -revision_id $revision_id @@ -194,15 +196,15 @@ if { [info exists grades_wa($party_id)] && ![empty_string_p $grades_wa($party_id)] } { # new file? - if { [db_string grades_wa_new "select count(*) from evaluation_student_evals where party_id = :party_id and task_id = :task_id and content_revision__is_live(evaluation_id) = true"] } { + if { [db_string grades_wa_new "select count(*) from evaluation_student_evals ese, evaluation_tasks est where ese.party_id = :party_id and ese.task_item_id = :task_item_id and content_revision__is_live(ese.evaluation_id) = true and est.task_id = :task_id and est.task_item_id = ese.task_item_id"] } { set new_item_p 0 } else { set new_item_p 1 } set grades_wa($party_id) [expr ($grades_wa($party_id)*100)/$max_grade.0] set revision_id [evaluation::new_evaluation -new_item_p $new_item_p -item_id $item_ids($party_id) -content_type evaluation_student_evals \ -content_table evaluation_student_evals -content_id evaluation_id -description $comments_wa($party_id) \ - -show_student_p $show_student_wa($party_id) -grade $grades_wa($party_id) -task_id $task_id -party_id $party_id] + -show_student_p $show_student_wa($party_id) -grade $grades_wa($party_id) -task_item_id $task_item_id -party_id $party_id] evaluation::set_live -revision_id $revision_id } @@ -218,15 +220,15 @@ } if { [info exists grades_na($party_id)] && ![empty_string_p $grades_na($party_id)] } { # new file? - if { [db_string grades_na_new "select count(*) from evaluation_student_evals where party_id = :party_id and task_id = :task_id and content_revision__is_live(evaluation_id) = true"] } { + if { [db_string grades_na_new "select count(*) from evaluation_student_evals ese, evaluation_tasks est where ese.party_id = :party_id and ese.task_item_id = :task_item_id and content_revision__is_live(ese.evaluation_id) = true and ese.task_item_id = est.task_item_id and est.task_id = :task_id"] } { set new_item_p 0 } else { set new_item_p 1 } set grades_na($party_id) [expr ($grades_na($party_id)*100)/$max_grade.0] set revision_id [evaluation::new_evaluation -new_item_p $new_item_p -item_id $item_ids($party_id) -content_type evaluation_student_evals \ -content_table evaluation_student_evals -content_id evaluation_id -description $comments_na($party_id) \ - -show_student_p $show_student_na($party_id) -grade $grades_na($party_id) -task_id $task_id -party_id $party_id] + -show_student_p $show_student_na($party_id) -grade $grades_na($party_id) -task_item_id $task_item_id -party_id $party_id] evaluation::set_live -revision_id $revision_id } @@ -239,7 +241,7 @@ set grades_to_edit($party_id) [expr ($grades_to_edit($party_id)*100)/$max_grade.0] set revision_id [evaluation::new_evaluation -new_item_p 0 -item_id $item_to_edit_ids($party_id) -content_type evaluation_student_evals \ -content_table evaluation_student_evals -content_id evaluation_id -description $reasons_to_edit($party_id) \ - -show_student_p $show_student_to_edit($party_id) -grade $grades_to_edit($party_id) -task_id $task_id -party_id $party_id] + -show_student_p $show_student_to_edit($party_id) -grade $grades_to_edit($party_id) -task_item_id $task_item_id -party_id $party_id] evaluation::set_live -revision_id $revision_id 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 -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.xql 7 Jun 2004 16:05:09 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/evaluations/evaluate-students-2.xql 30 Jul 2004 22:50:10 -0000 1.2 @@ -21,6 +21,16 @@
    + + + + + select task_item_id + from evaluation_tasks + where task_id = :task_id + + + \ No newline at end of file Index: openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-2.tcl 10 Jun 2004 21:08:53 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-2.tcl 30 Jul 2004 22:50:10 -0000 1.3 @@ -12,9 +12,10 @@ operation } -if { [string eq $operation "[_ evaluation.lt_Yes_I_really_want_to_]"] } { - db_transaction { +ns_log notice "por comprarar ($operation) con ([_ evaluation.lt_Yes_I_really_want_to_]) \n" +if { [string eq $operation [_ evaluation.lt_Yes_I_really_want_to_]] } { + db_transaction { db_exec_plsql delete_evaluation { *SQL* } } on_error { Index: openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/evaluation-delete-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -6,7 +6,7 @@ - select evaluation__party_name(party_id,task_id) as party_name + select evaluation__party_name(party_id,:task_id) as party_name from evaluation_student_evals where evaluation_id = :evaluation_id Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -14,30 +14,53 @@ - select grade from evaluation_student_evals where party_id = :party_id and task_id = :task_id and content_revision__is_live(evaluation_id) = true + select ese.grade + from evaluation_student_evals ese, evaluation_tasks et + where ese.party_id = :party_id + and ese.task_item_id = et.task_item_id + and et.task_id = :task_id + and content_revision__is_live(ese.evaluation_id) = true - select 1 from evaluation_student_evalsi where task_id = :task_id and party_id = :party_id and grade = :grade and description = :comments and content_revision__is_live(evaluation_id) = true + select 1 + from evaluation_student_evalsi ese, evaluation_tasks et + where ese.task_item_id = et.task_item_id + and et.task_id = :task_id + and ese.party_id = :party_id + and ese.grade = :grade + and ese.description = :comments + and content_revision__is_live(ese.evaluation_id) = true - select 1 from evaluation_student_evalsi where task_id = :task_id and party_id = :party_id and grade = :grade and description is null and content_revision__is_live(evaluation_id) = true + select 1 from evaluation_student_evalsi ese, evaluation_tasks et + where ese.task_item_id = et.task_item_id + and et.task_id = :task_id + and ese.party_id = :party_id + and ese.grade = :grade + and ese.description is null + and content_revision__is_live(ese.evaluation_id) = true - select evaluation_id from evaluation_student_evals where task_id = :task_id and party_id = :party_id and content_revision__is_live(evaluation_id) = true + select ese.evaluation_id + from evaluation_student_evals ese, evaluation_tasks et + where ese.task_item_id = et.task_item_id + and et.task_id = :task_id + and ese.party_id = :party_id + and content_revision__is_live(ese.evaluation_id) = true Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp 7 Jul 2004 17:26:44 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.adp 30 Jul 2004 22:50:10 -0000 1.4 @@ -20,7 +20,7 @@ - + #evaluation.lt_There_is_no_info_# 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.5 -r1.6 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl 15 Jun 2004 23:20:29 -0000 1.5 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.tcl 30 Jul 2004 22:50:10 -0000 1.6 @@ -13,11 +13,13 @@ task_id:integer,notnull grades_sheet_item_id:integer,notnull } -validate { - csv_type_p { - set file_extension [file extension $upload_file] - if { [string compare [string tolower $file_extension] ".csv"] } { - ad_complain "[_ evaluation.lt_The_file_extension_of_1]" - } + csv_type_p -requires { upload_file } { + if { [info exists upload_file] } { + set file_extension [file extension $upload_file] + if { [string compare [string tolower $file_extension] ".csv"] } { + ad_complain "[_ evaluation.lt_The_file_extension_of_1]" + } + } } } @@ -131,6 +133,27 @@ incr errors append errors_text "
  • [_ evaluation.lt_There_must_be_an_edit]
  • " } + + if { $number_of_members > 1 } { + + if { ![db_string task_group { *SQL* }] } { + incr errors + append errors_text "
  • [_ evaluation.lt_There_is_at_least_one]
  • " + } + + } else { + set community_id [dotlrn_community::get_community_id] + ns_log notice "vamos bien... part $party_id comm $community_id\n" + if { [empty_string_p $community_id] } { + if { ![db_string valid_user { *SQL* }] } { + incr errors + append errors_text "
  • [_ evaluation.lt_There_is_at_least_one_1]
  • " + } + } elseif { ![db_string valid_student { *SQL* }] } { + incr errors + append errors_text "
  • [_ evaluation.lt_There_is_at_least_one_2]
  • " + } + } if { $errors } { ad_return_complaint $errors $errors_text Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.xql 7 Jul 2004 17:26:44 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheet-parse.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -6,7 +6,8 @@ - select task_name + select task_name, task_item_id, + number_of_members from evaluation_tasks et where task_id=:task_id @@ -21,6 +22,38 @@ + + + + select count(*) from evaluation_task_groups etg where group_id = :party_id and task_item_id = :task_item_id + + + + + + + + select coun(*) from cc_users where person_id = :party_id + + + + + + + + select count(*) + from persons p, + registered_users ru, + dotlrn_member_rels_approved app + where app.community_id = :community_id + and app.user_id = ru.user_id + and app.user_id = p.person_id + and app.user_id = :party_id + and app.role = 'student' + + + + Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets-postgresql.xql 7 Jul 2004 17:26:44 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.4 @@ -6,7 +6,10 @@ - select count(*) from evaluation_grades_sheets where task_id = :task_id and content_revision__is_live(grades_sheet_id) = true + select count(*) from evaluation_grades_sheets egs, evaluation_tasks et + where egs.task_item_id = et.task_item_id + and et.task_id = :task_id + and content_revision__is_live(egs.grades_sheet_id) = true @@ -19,8 +22,10 @@ person__name(egs.creation_user) as upload_user, egs.data as sheet_data, egs.revision_id - from evaluation_grades_sheetsi egs - where egs.task_id = :task_id + from evaluation_grades_sheetsi egs, + evaluation_tasks et + where egs.task_item_id = et.task_item_id + and et.task_id = :task_id and content_revision__is_live(egs.grades_sheet_id) = true $orderby Index: openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets.tcl 10 Jun 2004 21:08:53 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/grades-sheets.tcl 30 Jul 2004 22:50:10 -0000 1.3 @@ -39,8 +39,8 @@ } upload_date_pretty { label "[_ evaluation.Upload_Date_]" - orderby_asc {upload_date asc} - orderby_desc {upload_date desc} + orderby_asc {upload_date_ansi asc} + orderby_desc {upload_date_ansi desc} } upload_user { label "[_ evaluation.Uploaded_by_]" Index: openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.tcl 10 Jun 2004 21:08:53 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.tcl 30 Jul 2004 22:50:10 -0000 1.4 @@ -73,7 +73,7 @@ set revision_id [evaluation::new_evaluation -new_item_p 0 -item_id $item_id -content_type evaluation_student_evals \ -content_table evaluation_student_evals -content_id evaluation_id -description $comments \ - -show_student_p $show_student_p -grade $grade -task_id $task_id -party_id $party_id] + -show_student_p $show_student_p -grade $grade -task_item_id $task_item_id -party_id $party_id] evaluation::set_live -revision_id $revision_id Index: openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.xql 7 Jul 2004 17:26:44 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/evaluations/one-evaluation-edit.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -7,7 +7,8 @@ select ese.party_id, - ese.item_id + ese.item_id, + ese.task_item_id from evaluation_student_evalsx ese where ese.evaluation_id = :evaluation_id 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.5 -r1.6 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql 14 Jul 2004 17:42:07 -0000 1.5 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.6 @@ -16,7 +16,7 @@ from evaluation_tasks et, evaluation_student_evalsi ese where et.task_id = :task_id - and et.task_id = ese.task_id + and et.task_item_id = ese.task_item_id and content_revision__is_live(ese.evaluation_id) = true $orderby @@ -26,7 +26,7 @@ - select count(party_id) from evaluation_answers ea where ea.task_id = :task_id $processed_clause and content_revision__is_live(ea.answer_id) = true + select count(party_id) from evaluation_answers ea where ea.task_item_id = :task_item_id $processed_clause and content_revision__is_live(ea.answer_id) = true @@ -41,7 +41,7 @@ ea.last_modified as submission_date from evaluation_answersi ea where ea.party_id = :party_id - and ea.task_id = :task_id + and ea.task_item_id = :task_item_id and content_revision__is_live(ea.answer_id) = true @@ -51,9 +51,10 @@ select count(*) - from evaluation_student_evals - where task_id = :task_id - and content_revision__is_live(evaluation_id) = true + from evaluation_student_evals ese, evaluation_tasks et + where ese.task_item_id = et.task_item_id + and et.task_id = :task_id + and content_revision__is_live(ese.evaluation_id) = true @@ -69,7 +70,7 @@ - select evaluation__party_name(ea.party_id, ea.task_id) as party_name, + select evaluation__party_name(ea.party_id, :task_id) as party_name, ea.party_id, ea.data as answer_data, ea.title as answer_title, @@ -80,7 +81,7 @@ from evaluation_answersi ea, evaluation_tasks et, cr_items cri - where ea.task_id = et.task_id + where ea.task_item_id = et.task_item_id and et.task_id = :task_id and ea.data is not null and cri.live_revision = ea.answer_id 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.9 -r1.10 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl 27 Jul 2004 03:02:13 -0000 1.9 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.tcl 30 Jul 2004 22:50:10 -0000 1.10 @@ -59,13 +59,15 @@ ] \ action \ [list label "" \ + display_template { @evaluated_students.action;noquote@ } \ link_url_col action_url \ ] \ ] if { [string eq $online_p "t"] } { lappend elements submission_date_pretty \ [list label "[_ evaluation.Submission_Date_]" \ + display_template { @evaluated_students.submission_date_pretty;noquote@ } \ orderby_asc {submission_date_ansi asc} \ orderby_desc {submission_date_ansi desc}] } @@ -171,6 +173,7 @@ lappend elements submission_date_pretty \ [list label "[_ evaluation.Submission_Date_]" \ + display_template { @not_evaluated_wa.submission_date_pretty;noquote@ } \ orderby_asc {submission_date_ansi asc} \ orderby_desc {submission_date_ansi desc}] lappend elements answer \ @@ -260,7 +263,7 @@ ] lappend elements show_answer \ [list label "[_ evaluation.lt_Allow_the_students_br]" \ - display_template {
    [_ evaluation.Yes_] @not_evaluated_na.party_id@ [_ evaluation.No_]
    } \ + display_template {
    [_ evaluation.Yes_] [_ evaluation.No_]
    } \ ] template::list::create \ 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.6 -r1.7 --- openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 14 Jul 2004 17:42:07 -0000 1.6 +++ openacs-4/packages/evaluation/www/admin/evaluations/student-list.xql 30 Jul 2004 22:50:10 -0000 1.7 @@ -7,6 +7,7 @@ select et.task_name, + et.task_item_id, eg.grade_id, eg.grade_plural_name, eg.weight as grade_weight, @@ -16,7 +17,8 @@ et.online_p from evaluation_grades eg, evaluation_tasks et where et.task_id = :task_id - and et.grade_id = eg.grade_id + and et.grade_item_id = eg.grade_item_id + and content_revision__is_live(eg.grade_id) = true
    @@ -38,7 +40,9 @@ - select count(*) from evaluation_task_groups etg where etg.task_id = :task_id + select count(*) from evaluation_task_groups etg, evaluation_tasks et + where etg.task_item_id = et.task_item_id + and et.task_id = :task_id $not_in_clause @@ -79,8 +83,9 @@ select acs_group__name(etg.group_id) as party_name, etg.group_id as party_id - from evaluation_task_groups etg - where etg.task_id = :task_id + from evaluation_task_groups etg, evaluation_tasks et + where etg.task_item_id = et.task_item_id + and et.task_id = :task_id $not_in_clause $orderby_na Index: openacs-4/packages/evaluation/www/admin/grades/distribution-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/Attic/distribution-edit-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/distribution-edit-postgresql.xql 7 Jul 2004 17:26:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/distribution-edit-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -11,7 +11,7 @@ requires_grade_p, task_id from evaluation_tasksi - where grade_id = :grade_id + where grade_item_id = :grade_item_id and content_revision__is_live(task_id) = true order by task_name 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.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql 7 Jul 2004 17:26:45 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/grades/distribution-edit.xql 30 Jul 2004 22:50:10 -0000 1.4 @@ -8,6 +8,7 @@ select eg.grade_plural_name, eg.weight as grade_weight, + eg.grade_item_id, eg.comments as grade_comments from evaluation_gradesi eg where grade_id = :grade_id Index: openacs-4/packages/evaluation/www/admin/grades/grades-delete-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/grades/grades-delete-2-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/grades/grades-delete-2-postgresql.xql 7 Jul 2004 17:26:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/grades/grades-delete-2-postgresql.xql 30 Jul 2004 22:50:10 -0000 1.3 @@ -6,9 +6,7 @@ - select evaluation__delete_grade ( - :grade_id - ); + select evaluation__delete_grade(grade_item_id) from evaluation_grades where grade_id = :grade_id; 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.6 -r1.7 --- openacs-4/packages/evaluation/www/admin/grades/grades.tcl 27 Jul 2004 17:18:09 -0000 1.6 +++ openacs-4/packages/evaluation/www/admin/grades/grades.tcl 30 Jul 2004 22:50:10 -0000 1.7 @@ -26,16 +26,6 @@ set aggregate_label "[_ evaluation.Total_]" } -# edit { -# label {} -# sub_class narrow -# display_template { -# -# } -# link_url_eval {[export_vars -base "grades-add-edit" { item_id grade_id }]} -# link_html { title "[_ evaluation.lt_Edit_assignment_type_]" } -# } - template::list::create \ -name grades \ -multirow grades \ @@ -63,6 +53,15 @@ orderby_asc {comments asc} orderby_desc {comments desc} } + edit { + label {} + sub_class narrow + display_template { + + } + link_url_eval {[export_vars -base "grades-add-edit" { item_id grade_id }]} + link_html { title "[_ evaluation.lt_Edit_assignment_type_]" } + } delete { label {} sub_class narrow 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.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/groups/group-member-add.xql 10 Jun 2004 21:08:54 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/groups/group-member-add.xql 30 Jul 2004 22:50:11 -0000 1.4 @@ -8,10 +8,11 @@ select g.group_name, g.group_id as evaluation_group_id, count(map.object_id_two) as number_of_members - from groups g, acs_rels map, evaluation_task_groups etg + from groups g, acs_rels map, evaluation_task_groups etg, evaluation_tasks et where map.object_id_one = g.group_id and g.group_id = etg.group_id - and etg.task_id = :task_id + and etg.task_item_id = et.task_item_id + and et.task_id = :task_id group by g.group_id, g.group_name $orderby Index: openacs-4/packages/evaluation/www/admin/groups/group-new-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-new-2-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/groups/group-new-2-postgresql.xql 7 Jul 2004 17:26:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/groups/group-new-2-postgresql.xql 30 Jul 2004 22:50:11 -0000 1.3 @@ -19,4 +19,14 @@
    + + + + select task_item_id + from evaluation_tasks + where task_id = :task_id + + + + Index: openacs-4/packages/evaluation/www/admin/groups/group-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-new-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/groups/group-new-2.tcl 10 Jun 2004 21:08:54 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/groups/group-new-2.tcl 30 Jul 2004 22:50:11 -0000 1.3 @@ -23,8 +23,10 @@ set creation_ip [ad_conn peeraddr] set package_id [ad_conn package_id] +db_1row task_info { *SQL* } + db_transaction { - evaluation::new_evaluation_group -group_id $evaluation_group_id -group_name $group_name -task_id $task_id -context $package_id + evaluation::new_evaluation_group -group_id $evaluation_group_id -group_name $group_name -task_item_id $task_item_id -context $package_id foreach student_id [array names student_ids] { if {[info exists student_ids($student_id)]} { db_exec_plsql evaluation_relationship_new { *SQL* } Index: openacs-4/packages/evaluation/www/admin/groups/group-new.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-new.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/groups/group-new.adp 15 Jun 2004 23:20:29 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/groups/group-new.adp 30 Jul 2004 22:50:11 -0000 1.4 @@ -8,7 +8,7 @@ - + @@ -26,7 +26,7 @@ - +
    #evaluation.lt_Please_enter_the_grou#
    Index: openacs-4/packages/evaluation/www/admin/groups/group-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-new.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/groups/group-new.tcl 10 Jun 2004 21:08:54 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/groups/group-new.tcl 30 Jul 2004 22:50:11 -0000 1.3 @@ -21,7 +21,7 @@ set page_title "[_ evaluation.New_Group_]" set context [list [list "[export_vars -base one-task { task_id }]" "[_ evaluation.Task_Groups_]"] "[_ evaluation.Create_Group_]"] -set current_groups_plus_one [db_string get_groups "select count(group_id)+1 from evaluation_task_groups where task_id = :task_id"] +set current_groups_plus_one [db_string get_groups {* SQL* *}] set evaluation_group_id [db_nextval acs_object_id_seq] # if the structure of the multirow datasource ever changes, this needs to be rewritten Index: openacs-4/packages/evaluation/www/admin/groups/group-new.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-new.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/groups/group-new.xql 7 Jul 2004 17:26:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/groups/group-new.xql 30 Jul 2004 22:50:11 -0000 1.3 @@ -1,8 +1,18 @@ - postgresql7.3 + + + select count(group_id)+1 + from evaluation_task_groups etg, evaluation_tasks et + where et.task_id = :task_id + and etg.task_item_id = et.task_item_id + and content_revision__is_live(et.task_id) = true + + + + Index: openacs-4/packages/evaluation/www/admin/groups/group-reuse-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-reuse-2-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/groups/group-reuse-2-postgresql.xql 7 Jul 2004 17:26:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/groups/group-reuse-2-postgresql.xql 30 Jul 2004 22:50:11 -0000 1.3 @@ -3,18 +3,40 @@ postgresql7.3 + + + + select count(*) + from evaluation_task_groups etg, evaluation_tasks et + where etg.task_item_id = et.task_item_id + and et.task_id = :task_id + + + + select etg.group_id as from_evaluation_group_id, g.group_name - from evaluation_task_groups etg, groups g - where etg.task_id = :from_task_id - and etg.group_id = g.group_id + from evaluation_task_groups etg, groups g, evaluation_tasks et + where etg.task_item_id = et.task_item_id + and et.task_id = :from_task_id + and etg.group_id = g.group_id + + + + select task_item_id + from evaluation_tasks + where task_id = :task_id + + + + Index: openacs-4/packages/evaluation/www/admin/groups/group-reuse-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/groups/group-reuse-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/groups/group-reuse-2.tcl 10 Jun 2004 21:08:54 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/groups/group-reuse-2.tcl 30 Jul 2004 22:50:11 -0000 1.3 @@ -11,7 +11,7 @@ from_task_id:integer,notnull } -validate { no_groups { - if { [db_string get_groups_for_task "select count(*) from evaluation_task_groups where task_id = :task_id"] > 0 } { + if { [db_string get_groups_for_task { *SQL* }] > 0 } { ad_complain "[_ evaluation.lt_There_must_be_no_grou]" } } @@ -21,14 +21,15 @@ set creation_user_id [ad_conn user_id] set creation_ip [ad_conn peeraddr] +db_1row task_info { *SQL* } db_transaction { db_foreach evaluation_group { *SQL* } { set new_evaluation_group_id [db_nextval acs_object_id_seq] - evaluation::new_evaluation_group -group_id $new_evaluation_group_id -group_name $group_name -task_id $task_id -context $package_id + evaluation::new_evaluation_group -group_id $new_evaluation_group_id -group_name $group_name -task_item_id $task_item_id -context $package_id db_exec_plsql evaluation_relationship_new { *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.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql 7 Jul 2004 17:26:45 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/groups/group-reuse-postgresql.xql 30 Jul 2004 22:50:11 -0000 1.4 @@ -12,8 +12,9 @@ from evaluation_tasksi et, evaluation_gradesi eg where content_revision__is_live(et.task_id) = true and et.number_of_members > 1 - and et.grade_id = eg.grade_id + and et.grade_item_id = eg.grade_item_id and content_revision__is_live(eg.grade_id) = true + and content_revision__is_live(et.task_id) = true and et.task_id <> :task_id $orderby 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.5 -r1.6 --- openacs-4/packages/evaluation/www/admin/groups/one-task.adp 7 Jul 2004 17:26:45 -0000 1.5 +++ openacs-4/packages/evaluation/www/admin/groups/one-task.adp 30 Jul 2004 22:50:11 -0000 1.6 @@ -20,7 +20,7 @@
    - +

    #evaluation.lt_Number_of_members_for#
    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.5 -r1.6 --- openacs-4/packages/evaluation/www/admin/groups/one-task.tcl 7 Jul 2004 17:26:45 -0000 1.5 +++ openacs-4/packages/evaluation/www/admin/groups/one-task.tcl 30 Jul 2004 22:50:11 -0000 1.6 @@ -22,7 +22,7 @@ db_1row get_info { *SQL* } set page_title "[_ evaluation.lt_Groups_for_task_task_]" -set context [list "[_ evaluation.Assignment_Groups_]"] +set context [list "[_ evaluation.lt_Assignment_Groups_for]"] # 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) 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.4 -r1.5 --- openacs-4/packages/evaluation/www/admin/groups/one-task.xql 7 Jul 2004 17:26:45 -0000 1.4 +++ openacs-4/packages/evaluation/www/admin/groups/one-task.xql 30 Jul 2004 22:50:11 -0000 1.5 @@ -6,15 +6,15 @@ - select number_of_members from evaluation_tasks where task_id = :task_id + select task_name, number_of_members from evaluation_tasks where task_id = :task_id - select task_name, number_of_members as n_of_members from evaluation_tasks where task_id = :task_id + select task_name, number_of_members as n_of_members, task_item_id from evaluation_tasks where task_id = :task_id @@ -25,10 +25,12 @@ select p.last_name ||', '|| p.first_names as student_name, p.person_id as student_id from cc_users p - where p.person_id not in (select map.object_id_two from acs_rels map, evaluation_task_groups etg + where p.person_id not in (select map.object_id_two from acs_rels map, evaluation_task_groups etg, evaluation_tasks et where map.object_id_two = p.person_id and map.object_id_one = etg.group_id - and etg.task_id = :task_id + and etg.task_item_id = :task_item_id + and etg.task_item_id = et.task_item_id + and et.task_id = :task_id and map.rel_type = 'evaluation_task_group_rel') $orderby @@ -43,10 +45,12 @@ 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 p.person_id not in (select map.object_id_two from acs_rels map, evaluation_task_groups etg, evaluation_tasks et where map.object_id_two = p.person_id and map.object_id_one = etg.group_id - and etg.task_id = :task_id + and etg.task_item_id = :task_item_id + and etg.task_item_id = et.task_item_id + and et.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 @@ -62,12 +66,13 @@ select g.group_id as evaluation_group_id, g.group_name, count(map.object_id_two) as number_of_members - from groups g, evaluation_task_groups etg, + from groups g, evaluation_task_groups etg, evaluation_tasks et, acs_rels map where g.group_id = etg.group_id and etg.group_id = map.object_id_one and map.rel_type = 'evaluation_task_group_rel' - and etg.task_id = :task_id + and etg.task_item_id = :task_item_id + and et.task_id = :task_id group by g.group_id, g.group_name $orderby_groups @@ -87,8 +92,10 @@ - select count(*) from evaluation_task_groups - where task_id = :task_id + select count(*) from evaluation_task_groups etg, evaluation_tasks et + where et.task_id = :task_id + and et.task_item_id = etg.task_item_id + and etg.task_item_id = :task_item_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.6 -r1.7 --- openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl 14 Jul 2004 17:42:07 -0000 1.6 +++ openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.tcl 30 Jul 2004 22:50:11 -0000 1.7 @@ -25,6 +25,8 @@ set page_title "[_ evaluation.lt_ViewEdit_Task_Solutio]" } +db_1row task_info { *SQL* } + set context [list [list [export_vars -base ../grades/grades { }] "[_ evaluation.Grades_]"] $page_title] set attached_p "f" @@ -73,7 +75,7 @@ } } } - } elseif { [regexp "http://" $content] } { + } elseif { [string eq $title "link"] } { if { [string eq $solution_mode "edit"] } { @@ -194,7 +196,7 @@ } set revision_id [evaluation::new_solution -new_item_p [ad_form_new_p -key solution_id] -item_id $item_id -content_type evaluation_tasks_sols \ - -content_table evaluation_tasks_sols -content_id solution_id -storage_type $storage_type -task_id $task_id \ + -content_table evaluation_tasks_sols -content_id solution_id -storage_type $storage_type -task_item_id $task_item_id \ -title $title -mime_type $mime_type] evaluation::set_live -revision_id $revision_id @@ -206,9 +208,15 @@ # create the new item db_dml lob_content { *SQL* } -blob_files [list $tmp_file] + set content_length [file size $tmp_file] + # Unfortunately, we can only calculate the file size after the lob is uploaded + db_dml lob_size { *SQL* } + } elseif { ![string eq $url "http://"] } { db_dml link_content { *SQL* } + set content_length 0 + db_dml lob_size { *SQL* } } elseif { [string eq $attached_p "t"] && ![string eq $unattach_p "t"] } { # just copy the old content to the new revision Index: openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.xql 7 Jul 2004 17:26:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/tasks/solution-add-edit.xql 30 Jul 2004 22:50:11 -0000 1.3 @@ -14,6 +14,16 @@ + + + + update cr_revisions + set content_length = :content_length + where revision_id = :revision_id + + + + @@ -24,6 +34,17 @@ + + + + select task_item_id + from evaluation_tasks + where task_id = :task_id + + + + + 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.5 -r1.6 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql 7 Jul 2004 17:26:45 -0000 1.5 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit-postgresql.xql 30 Jul 2004 22:50:11 -0000 1.6 @@ -6,7 +6,11 @@ - select grade_plural_name, grade_name, weight as grade_weight from evaluation_grades where grade_id = :grade_id + select grade_plural_name, + grade_name, + weight as grade_weight, + grade_item_id + from evaluation_grades where grade_id = :grade_id @@ -16,7 +20,7 @@ select content_revision__get_content(et.revision_id) as content, et.title, - et.item_id, + et.item_id, cri.storage_type from evaluation_tasksi et, cr_items cri where et.task_id = :task_id 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.11 -r1.12 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 27 Jul 2004 17:18:09 -0000 1.11 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-edit.tcl 30 Jul 2004 22:50:11 -0000 1.12 @@ -90,7 +90,7 @@ } } } - } elseif { [regexp "http://" $content] } { + } elseif { [string eq $title "link"] } { if { [string eq $mode "edit"] } { @@ -308,7 +308,11 @@ set mime_type [cr_filename_to_mime_type -create $title] set storage_type lob - } + } elseif { ![string eq $url "http://"] } { + set mime_type "text/plain" + set title "link" + set storage_type text + } set title [evaluation::safe_url_name -name $title] set due_date [db_string set_date { *SQL* }] @@ -319,17 +323,12 @@ 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 \ + -grade_item_id $grade_item_id -number_of_members $number_of_members -online_p $online_p -storage_type $storage_type \ -due_date $due_date -late_submit_p $late_submit_p -requires_grade_p $requires_grade_p -title $title \ -mime_type $mime_type] evaluation::set_live -revision_id $revision_id - - if { ![ad_form_new_p -key task_id] } { - evaluation::clone_task_references -from_task_id $task_id -to_task_id $revision_id - } - if { ![empty_string_p $upload_file] } { set tmp_file [template::util::file::get_property tmp_filename $upload_file] @@ -344,6 +343,8 @@ } elseif { ![string eq $url "http://"] } { db_dml link_content { *SQL* } + set content_length 0 + db_dml lob_size { *SQL* } } elseif { [string eq $attached_p "t"] && ![string eq $unattach_p "t"] } { # just copy the old content to the new revision 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 -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql 7 Jul 2004 17:26:45 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities-postgresql.xql 30 Jul 2004 22:50:11 -0000 1.3 @@ -25,7 +25,7 @@ - select eg.grade_id as to_grade_id from evaluation_gradesx eg, acs_objects ao + select eg.grade_item_id as to_grade_item_id from evaluation_gradesx eg, acs_objects ao where content_revision__is_live(eg.grade_id) = true and eg.item_id = ao.object_id and ao.context_id = :community_package_id 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 -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp 7 Jul 2004 17:26:45 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.adp 30 Jul 2004 22:50:11 -0000 1.4 @@ -5,5 +5,4 @@

    #evaluation.lt_The_assignment_task_n#
    #evaluation.lt_Check_the_rest_of_com#

    -
    - + no rregreso nada?!?!??! @communities_count@ :p 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 -r1.3 -r1.4 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl 7 Jul 2004 17:26:45 -0000 1.3 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.tcl 30 Jul 2004 22:50:11 -0000 1.4 @@ -36,7 +36,7 @@ lappend form_elements [list communities_packages_ids.$community_package_id:integer(checkbox),optional \ [list label "$pretty_name"] \ - [list options [list [list "" "$to_grade_id"]]] \ + [list options [list [list "" "$to_grade_item_id"]]] \ ] incr communities_count if { [ad_form_new_p -key foo] } { @@ -45,7 +45,9 @@ ] } } -} if_no_rows { +} + +if { !$communities_count } { ad_returnredirect $return_url ad_script_abort } @@ -54,7 +56,7 @@ 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] + set revision_id [evaluation::clone_task -item_id $item_ids($id) -from_task_id $task_id -to_grade_item_id $communities_packages_ids($id) -to_package_id $id] evaluation::set_live -revision_id $revision_id } 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 -r1.1 -r1.2 --- openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql 7 Jun 2004 16:05:15 -0000 1.1 +++ openacs-4/packages/evaluation/www/admin/tasks/task-add-to-communities.xql 30 Jul 2004 22:50:11 -0000 1.2 @@ -6,7 +6,9 @@ - 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 + select et.task_name, eg.grade_name + from evaluation_grades eg, evaluation_tasks et + where et.grade_item_id = eg.grade_item_id and et.task_id = :task_id and content_revision__is_live(eg.grade_id) = true Index: openacs-4/packages/evaluation/www/admin/tasks/task-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/www/admin/tasks/task-delete-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/evaluation/www/admin/tasks/task-delete-2.tcl 10 Jun 2004 21:08:54 -0000 1.2 +++ openacs-4/packages/evaluation/www/admin/tasks/task-delete-2.tcl 30 Jul 2004 22:50:11 -0000 1.3 @@ -13,7 +13,7 @@ return_url } -if { [string eq $operation "[_ evaluation.lt_Yes_I_really_want_to__3]"] } { +if { [string eq $operation [_ evaluation.lt_Yes_I_really_want_to__3]] } { db_transaction { db_exec_plsql delete_task { *SQL* }