Index: openacs-4/packages/assessment/catalog/assessment.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/catalog/assessment.es_ES.ISO-8859-1.xml,v diff -u -r1.4 -r1.5 --- openacs-4/packages/assessment/catalog/assessment.es_ES.ISO-8859-1.xml 6 Oct 2004 12:55:26 -0000 1.4 +++ openacs-4/packages/assessment/catalog/assessment.es_ES.ISO-8859-1.xml 15 Nov 2004 17:17:13 -0000 1.5 @@ -1,37 +1,146 @@ + A�adir una pregunta existente + A�adir una pregunta existente a la secci�n + A�adir una secci�n existente + A�adir una secci�n existente al assessment + A�adir nueva pregunta + A�adir nueva pregunta + A�adir nueva secci�n + A�adir al assessment + A�adir a la secci�n + Administraci�n del cat�logo de preguntas Administraci�n + Todos + permitir m�ltiple + permitir varios intentos + Respuestas an�nimas + Permitir que sea respuesto por an�nimos Respuestas + Administraci�n de Assessment Assessment importado correctamente + T�tulo N�mero de intentos + Por usuario + Cancelar y Volver a Assessment + P�gina de Consentimiento + Continuar con Eliminar + Copiar + Copiar este assessment Respuesta correcta + Creado por + Fichero CSV + Path por defecto + Definici�n + Borrar + Borrar este assessment + Descripci�n + Deshabilitar + Tipo de visualizaci�n + No visualizar las respuestas anteriores + Editar + Editar Assessment + Editar Secci�n + Editable + Opciones de e-mail + Hora de Finalizaci�n + P�gina de Entrada + P�gina de Salida + Acciones Extremas: Feedback Hora de finalizaci�n Hora de finalizaci�n + De: + Nombre de la pregunta oculto Importar un fichero QTI ZIP Resultados de la importaci�n + Instrucciones Preguntas + - Te permite usar este assessment como una plantilla para crear un nuevo assessment. + N�mero de intentos permitidos + Hacer an�nimo + Hacer editable + Ocultar nombre de la pregunta + Hacer no-an�nimo + Hacer no editable + Ocultar las respuestas anteriores + Mostrar las respuestas anteriores + Requerir una conexi�n segura + Mostrar el nombre de la pregunta + Permitir una conexi�n no segura + M�x. tiempo permitido: + Minutos requeridos entre intentos + Modo + Bajar + Subir + Nombre + Nuevo Assessment + Crear un nuevo Assessment + No + Permitir reintentar el assessment de forma inmediata + Ninguno + N�mero de Intentos permitidos + Fecha de creaci�n + Datos de un assessment + Solo las respuestas correctas + Solo las respuestas incorrectas M�xima puntuaci�n puntos + Visualizaci�n previa Pregunta Pregunta no contestada + Preguntas + Aleatoria + Se requiere que los usuarios est�n registrados + En relaci�n con esta encuesta + Eliminar: + Eliminar Pregunta + Eliminar Secci�n + - Eliminar todas las preguntas y respuestas + El assessment solicitado no existe + Obligatorio + Opciones de la respuesta: Respuesta Enviada + Devolver URL + Visualizar las respuestas anteriores + Reutilizar Respuestas Revisi�n del Examen + Branching seg�n una regla Puntuaci�n + Secci�n de Navegaci�n + Requiere Acceso Seguro + Requiere acceso seguro + Enviar e-mail Sesi�n Sesiones Ver Assessments + Mostrar Feedback + Visualizar el nombre de la pregunta + Mostrar el nombre de la pregunta Ver Preguntas Ver sesiones + Hora de comienzo Hora de comienzo Respuesta del estudiante Estudiante Enviar + Resumen + Segundos permitidos para realizar el examen + N�mero m�ximo de segundos en responder una pregunta Tiempo de realizaci�n + Minutos a esperar entre intentos + T�tulo Puntuaci�n total + Tiempo para responder ilimitado + N�mero de intentos permitidos ilimitado + Permitir acceso no seguro Subir ficheros Usuario + Los usuarios pueden editar sus respuestas + Los usuarios no pueden editar sus respuestas + Ver Respuestas: Ver Resultados Ver resultados + Si Index: openacs-4/packages/assessment/tcl/as-assessment-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-assessment-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 14 Nov 2004 16:47:04 -0000 1.2 +++ openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 15 Nov 2004 17:17:15 -0000 1.3 @@ -7,7 +7,6 @@ namespace eval as::assessment {} ad_proc -public as::assessment::new { - {-name:required} {-title:required} {-creator_id ""} {-description ""} @@ -40,7 +39,7 @@ # Insert as_assessment in the CR (and as_assessments table) getting the revision_id (as_assessment_id) db_transaction { - set assessment_item_id [content::item::new -parent_id $folder_id -content_type {as_assessments} -name $name -title $title ] + set assessment_item_id [content::item::new -parent_id $folder_id -content_type {as_assessments} -name [ad_generate_random_string] -title $title ] set as_assessment_id [content::revision::new \ -item_id $assessment_item_id \ Index: openacs-4/packages/assessment/tcl/as-item-answer-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-answer-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-answer-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-answer-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -8,7 +8,6 @@ ad_proc -public as::item_answer::new { {-answer_id:required} - {-name:required} {-title:required} {-data_type ""} {-case_sensitive_p ""} @@ -26,9 +25,22 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_answer in the CR (and as_item_sa_answers table) getting the revision_id (as_item_answer_id) - set item_answer_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name $name -title $title ] - set as_item_answer_id [content::revision::new -item_id $item_answer_id -content_type {as_item_answers} -title $title -attributes [list [list answer_id $answer_id ] [list data_type $data_type ] [list case_sensitive_p $case_sensitive_p ] [list percent_score $percent_score] [list compare_by $compare_by] [list regexp_text $regexp_text] [list allowed_answerbox_list $allowed_answerbox_list] ] ] + db_transaction { + set item_answer_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name [ad_generate_random_string] -title $title ] + set as_item_answer_id [content::revision::new \ + -item_id $item_answer_id \ + -content_type {as_item_answers} \ + -title $title \ + -attributes [list [list answer_id $answer_id ] \ + [list data_type $data_type ] \ + [list case_sensitive_p $case_sensitive_p ] \ + [list percent_score $percent_score] \ + [list compare_by $compare_by] \ + [list regexp_text $regexp_text] \ + [list allowed_answerbox_list $allowed_answerbox_list] ] ] # FIXME too much code repetition here # maybe there are more efficient ways to to it (maybe using hashes to pass the values between functions) + } + return $as_item_answer_id } Index: openacs-4/packages/assessment/tcl/as-item-choice-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-choice-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-choice-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-choice-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -8,7 +8,6 @@ ad_proc -public as::item_choice::new { {-mc_id:required} - {-name:required} {-title:required} {-data_type ""} {-numeric_value ""} @@ -31,9 +30,26 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_choice in the CR (and as_item_choices table) getting the revision_id (as_item_choice_id) - set item_choice_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name $name -title $title ] - set as_item_choice_id [content::revision::new -item_id $item_choice_id -content_type {as_item_choices} -title $title -attributes [list [list mc_id $mc_id ] [list data_type $data_type ] [list numeric_value $numeric_value ] [list $text_value text_value] [list boolean_value $boolean_value] [list content_value $content_value] [list feedback_text $feedback_text] [list selected_p $selected_p] [list correct_answer_p $correct_answer_p] [list sort_order $sort_order] [list percent_score $percent_score] ] ] + db_transaction { + set item_choice_id [content::item::new -parent_id $folder_id -content_type {as_item_choices} -name [ad_generate_random_string] -title $title ] + set as_item_choice_id [content::revision::new \ + -item_id $item_choice_id \ + -content_type {as_item_choices} \ + -title $title \ + -attributes [list [list mc_id $mc_id ] \ + [list data_type $data_type ] \ + [list numeric_value $numeric_value ] \ + [list $text_value text_value] \ + [list boolean_value $boolean_value] \ + [list content_value $content_value] \ + [list feedback_text $feedback_text] \ + [list selected_p $selected_p] \ + [list correct_answer_p $correct_answer_p] \ + [list sort_order $sort_order] \ + [list percent_score $percent_score] ] ] # FIXME too much code repetition here # maybe there are more efficient ways to to it (maybe using hashes to pass the values between functions) + } + return $as_item_choice_id } Index: openacs-4/packages/assessment/tcl/as-item-data-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-data-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-data-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-data-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -31,8 +31,27 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_data in the CR (and as_item_data table) getting the revision_id (item_data_id) - set item_data_id [content::item::new -parent_id $folder_id -content_type {as_item_data} -name "$as_item_id-$session_id-$choice_id_answer" -title "$as_item_id-$session_id-$choice_id_answer" ] - set as_item_data_id [content::revision::new -item_id $item_data_id -content_type {as_item_data} -title "$as_item_id-$session_id-$choice_id_answer" -attributes [list [list session_id $session_id] [list event_id $event_id] [list subject_id $subject_id] [list staff_id $staff_id] [list as_item_id $as_item_id] [list choice_id_answer $choice_id_answer] [list boolean_answer $boolean_answer] [list numeric_answer $numeric_answer] [list integer_answer $integer_answer] [list text_answer $text_answer] [list timestamp_answer $timestamp_answer] [list content_answer $content_answer] [list signed_data $signed_data] [list percent_score $percent_score] ] ] + db_transaction { + set item_data_id [content::item::new -parent_id $folder_id -content_type {as_item_data} -name "$as_item_id-$session_id-$choice_id_answer" -title "$as_item_id-$session_id-$choice_id_answer" ] + set as_item_data_id [content::revision::new \ + -item_id $item_data_id \ + -content_type {as_item_data} \ + -title "$as_item_id-$session_id-$choice_id_answer" \ + -attributes [list [list session_id $session_id] \ + [list event_id $event_id] \ + [list subject_id $subject_id] \ + [list staff_id $staff_id] \ + [list as_item_id $as_item_id] \ + [list choice_id_answer $choice_id_answer] \ + [list boolean_answer $boolean_answer] \ + [list numeric_answer $numeric_answer] \ + [list integer_answer $integer_answer] \ + [list text_answer $text_answer] \ + [list timestamp_answer $timestamp_answer] \ + [list content_answer $content_answer] \ + [list signed_data $signed_data] \ + [list percent_score $percent_score] ] ] + } return $as_item_data_id } Index: openacs-4/packages/assessment/tcl/as-item-display-cb-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-display-cb-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-display-cb-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-display-cb-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item_display_cb {} ad_proc -public as::item_display_cb::new { - {-name:required} {-html_display_options ""} {-choice_orientation ""} {-choice_label_orientation ""} @@ -24,8 +23,17 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_display_cb in the CR (and as_item_display_cb table) getting the revision_id (as_item_display_id) - set item_item_display_cb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_cb} -name $name] - set as_item_display_cb_id [content::revision::new -item_id $item_item_display_cb_id -content_type {as_item_display_cb} -attributes [list [list html_display_options $html_display_options] [list choice_orientation $choice_orientation] [list choice_label_orientation $choice_label_orientation] [list sort_order_type $sort_order_type] [list item_answer_alignment $item_answer_alignment] ] ] + db_transaction { + set item_item_display_cb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_cb} -name [ad_generate_random_string]] + set as_item_display_cb_id [content::revision::new \ + -item_id $item_item_display_cb_id \ + -content_type {as_item_display_cb} \ + -attributes [list [list html_display_options $html_display_options] \ + [list choice_orientation $choice_orientation] \ + [list choice_label_orientation $choice_label_orientation] \ + [list sort_order_type $sort_order_type] \ + [list item_answer_alignment $item_answer_alignment] ] ] + } return $as_item_display_cb_id } Index: openacs-4/packages/assessment/tcl/as-item-display-rb-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-display-rb-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-display-rb-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-display-rb-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item_display_rb {} ad_proc -public as::item_display_rb::new { - {-name:required} {-html_display_options ""} {-choice_orientation ""} {-choice_label_orientation ""} @@ -24,8 +23,17 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_display_rb in the CR (and as_item_display_rb table) getting the revision_id (as_item_display_id) - set item_item_display_rb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_rb} -name $name] - set as_item_display_rb_id [content::revision::new -item_id $item_item_display_rb_id -content_type {as_item_display_rb} -attributes [list [list html_display_options $html_display_options] [list choice_orientation $choice_orientation] [list choice_label_orientation $choice_label_orientation] [list sort_order_type $sort_order_type] [list item_answer_alignment $item_answer_alignment] ] ] + db_transaction { + set item_item_display_rb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_rb} -name [ad_generate_random_string]] + set as_item_display_rb_id [content::revision::new \ + -item_id $item_item_display_rb_id \ + -content_type {as_item_display_rb} \ + -attributes [list [list html_display_options $html_display_options] \ + [list choice_orientation $choice_orientation] \ + [list choice_label_orientation $choice_label_orientation] \ + [list sort_order_type $sort_order_type] \ + [list item_answer_alignment $item_answer_alignment] ] ] + } return $as_item_display_rb_id } Index: openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-display-sa-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item_display_sa {} ad_proc -public as::item_display_sa::new { - {-name:required} {-html_display_options ""} {-abs_size ""} {-box_orientation ""} @@ -21,8 +20,15 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_display_sa in the CR (and as_item_display_sa table) getting the revision_id (as_item_display_id) - set item_item_display_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_display_sa} -name $name] - set as_item_display_sa_id [content::revision::new -item_id $item_item_display_sa_id -content_type {as_item_display_sa} -attributes [list [list html_display_options $html_display_options] [list abs_size $abs_size] [list box_orientation $box_orientation] ] ] + db_transaction { + set item_item_display_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_display_sa} -name [ad_generate_random_string]] + set as_item_display_sa_id [content::revision::new \ + -item_id $item_item_display_sa_id \ + -content_type {as_item_display_sa} \ + -attributes [list [list html_display_options $html_display_options] \ + [list abs_size $abs_size] \ + [list box_orientation $box_orientation] ] ] + } return $as_item_display_sa_id } \ No newline at end of file Index: openacs-4/packages/assessment/tcl/as-item-display-ta-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-display-ta-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-display-ta-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-display-ta-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item_display_ta {} ad_proc -public as::item_display_ta::new { - {-name:required} {-html_display_options ""} {-abs_size ""} {-acs_widget ""} @@ -22,8 +21,16 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_display_ta in the CR (and as_item_display_ta table) getting the revision_id (as_item_display_id) - set item_item_display_ta_id [content::item::new -parent_id $folder_id -content_type {as_item_display_ta} -name $name] - set as_item_display_ta_id [content::revision::new -item_id $item_item_display_ta_id -content_type {as_item_display_ta} -attributes [list [list html_display_options $html_display_options] [list abs_size $abs_size] [list acs_widget $acs_widget] [list item_answer_alignment $item_answer_alignment] ] ] + db_transaction { + set item_item_display_ta_id [content::item::new -parent_id $folder_id -content_type {as_item_display_ta} -name [ad_generate_random_string]] + set as_item_display_ta_id [content::revision::new \ + -item_id $item_item_display_ta_id \ + -content_type {as_item_display_ta} \ + -attributes [list [list html_display_options $html_display_options] \ + [list abs_size $abs_size] \ + [list acs_widget $acs_widget] \ + [list item_answer_alignment $item_answer_alignment] ] ] + } return $as_item_display_ta_id } Index: openacs-4/packages/assessment/tcl/as-item-display-tb-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-display-tb-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-display-tb-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-display-tb-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item_display_tb {} ad_proc -public as::item_display_tb::new { - {-name:required} {-html_display_options ""} {-abs_size ""} {-item_answer_alignment ""} @@ -21,8 +20,15 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_display_tb in the CR (and as_item_display_tb table) getting the revision_id (as_item_display_id) - set item_item_display_tb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_tb} -name $name] - set as_item_display_tb_id [content::revision::new -item_id $item_item_display_tb_id -content_type {as_item_display_tb} -attributes [list [list html_display_options $html_display_options] [list abs_size $abs_size] [list item_answer_alignment $item_answer_alignment] ] ] + db_transaction { + set item_item_display_tb_id [content::item::new -parent_id $folder_id -content_type {as_item_display_tb} -name [ad_generate_random_string]] + set as_item_display_tb_id [content::revision::new \ + -item_id $item_item_display_tb_id \ + -content_type {as_item_display_tb} \ + -attributes [list [list html_display_options $html_display_options] \ + [list abs_size $abs_size] \ + [list item_answer_alignment $item_answer_alignment] ] ] + } return $as_item_display_tb_id } \ No newline at end of file Index: openacs-4/packages/assessment/tcl/as-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item {} ad_proc -public as::item::new { - {-name:required} {-title:required} {-subtext ""} {-field_code ""} @@ -27,8 +26,20 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item in the CR (and as_items table) getting the revision_id (as_item_id) - set item_item_id [content::item::new -parent_id $folder_id -content_type {as_items} -name $name -title $title ] - set as_item_id [content::revision::new -item_id $item_item_id -content_type {as_items} -title $title -attributes [list [list subtext $subtext] [list field_code $field_code] [list definition $definition] [list required_p $required_p] [list data_type $data_type] [list max_time_to_complete $max_time_to_complete] [list feedback_right $feedback_right] [list feedback_wrong $feedback_wrong] ] ] + db_transaction { + set item_item_id [content::item::new -parent_id $folder_id -content_type {as_items} -name [ad_generate_random_string] -title $title ] + set as_item_id [content::revision::new -item_id $item_item_id \ + -content_type {as_items} \ + -title $title \ + -attributes [list [list subtext $subtext] \ + [list field_code $field_code] \ + [list definition $definition] \ + [list required_p $required_p] \ + [list data_type $data_type] \ + [list max_time_to_complete $max_time_to_complete] \ + [list feedback_right $feedback_right] \ + [list feedback_wrong $feedback_wrong] ] ] + } return $as_item_id } \ No newline at end of file Index: openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -8,7 +8,6 @@ ad_proc -public as::item_type_mc::new { - {-name:required} {-title ""} {-increasing_p ""} {-allow_negative_p ""} @@ -25,8 +24,17 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_type_mc in the CR (and as_item_type_mc table) getting the revision_id (as_item_type_id) - set item_item_type_mc_id [content::item::new -parent_id $folder_id -content_type {as_item_type_mc} -name $name -title $title ] - set as_item_type_mc_id [content::revision::new -item_id $item_item_type_mc_id -content_type {as_item_type_mc} -title $title -attributes [list [list increasing_p $increasing_p] [list allow_negative_p $allow_negative_p] [list num_correct_answers $num_correct_answers] [list num_answers $num_answers] ] ] + db_transaction { + set item_item_type_mc_id [content::item::new -parent_id $folder_id -content_type {as_item_type_mc} -name [ad_generate_random_string] -title $title ] + set as_item_type_mc_id [content::revision::new \ + -item_id $item_item_type_mc_id \ + -content_type {as_item_type_mc} \ + -title $title \ + -attributes [list [list increasing_p $increasing_p] \ + [list allow_negative_p $allow_negative_p] \ + [list num_correct_answers $num_correct_answers] \ + [list num_answers $num_answers] ] ] + } return $as_item_type_mc_id } \ No newline at end of file Index: openacs-4/packages/assessment/tcl/as-item-type-oq-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-oq-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-type-oq-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-type-oq-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item_type_oq {} ad_proc -public as::item_type_oq::new { - {-name:required} {-title ""} {-default_value ""} {-feedback_text ""} @@ -21,8 +20,15 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_type_oq in the CR (and as_item_type_oq table) getting the revision_id (as_item_type_id) - set item_item_type_oq_id [content::item::new -parent_id $folder_id -content_type {as_item_type_oq} -name $name -title $title ] - set as_item_type_oq_id [content::revision::new -item_id $item_item_type_oq_id -content_type {as_item_type_oq} -title $title -attributes [list [list default_value $default_value] [list feedback_text $feedback_text] ] ] + db_transaction { + set item_item_type_oq_id [content::item::new -parent_id $folder_id -content_type {as_item_type_oq} -name [ad_generate_random_string] -title $title ] + set as_item_type_oq_id [content::revision::new \ + -item_id $item_item_type_oq_id \ + -content_type {as_item_type_oq} \ + -title $title \ + -attributes [list [list default_value $default_value] \ + [list feedback_text $feedback_text] ] ] + } return $as_item_type_oq_id } Index: openacs-4/packages/assessment/tcl/as-item-type-sa-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-sa-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-item-type-sa-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-item-type-sa-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -7,7 +7,6 @@ namespace eval as::item_type_sa {} ad_proc -public as::item_type_sa::new { - {-name:required} {-title ""} {-increasing_p ""} {-allow_negative_p ""} @@ -21,8 +20,15 @@ set folder_id [db_string get_folder_id "select folder_id from cr_folders where package_id=:package_id"] # Insert as_item_type_sa in the CR (and as_item_type_sa table) getting the revision_id (as_item_type_id) - set item_item_type_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_type_sa} -name $name -title $title ] - set as_item_type_sa_id [content::revision::new -item_id $item_item_type_sa_id -content_type {as_item_type_sa} -title $title -attributes [list [list increasing_p $increasing_p] [list allow_negative_p $allow_negative_p] ] ] + db_transaction { + set item_item_type_sa_id [content::item::new -parent_id $folder_id -content_type {as_item_type_sa} -name [ad_generate_random_string] -title $title ] + set as_item_type_sa_id [content::revision::new \ + -item_id $item_item_type_sa_id \ + -content_type {as_item_type_sa} \ + -title $title \ + -attributes [list [list increasing_p $increasing_p] \ + [list allow_negative_p $allow_negative_p] ] ] + } return $as_item_type_sa_id } Index: openacs-4/packages/assessment/tcl/as-qti-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-qti-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/assessment/tcl/as-qti-procs.tcl 5 Nov 2004 00:39:18 -0000 1.8 +++ openacs-4/packages/assessment/tcl/as-qti-procs.tcl 15 Nov 2004 17:17:15 -0000 1.9 @@ -27,8 +27,6 @@ # There are assessments foreach assessment $assessmentNodes { set as_assessments__title [$assessment getAttribute {title} {Assessment}] - #set as_assessments__name [$assessment getAttribute {ident}] - set as_assessments__name [ad_generate_random_string] set nodesList [$assessment childNodes] set as_assessments__definition "" set as_assessments__instructions "" @@ -55,15 +53,13 @@ } } # Insert assessment in the CR (and as_assessments table) getting the revision_id (assessment_id) - set as_assessments__assessment_id [as::assessment::new -name $as_assessments__name -title $as_assessments__title -description $as_assessments__definition -instructions $as_assessments__instructions] + set as_assessments__assessment_id [as::assessment::new -title $as_assessments__title -description $as_assessments__definition -instructions $as_assessments__instructions] # Section set sectionNodes [$assessment selectNodes {section}] foreach section $sectionNodes { set as_assessment_section_map__sort_order 0 set as_sections__title [$section getAttribute {title} {Section}] - #set as_sections__name [$section getAttribute {ident}] - set as_sections__name [ad_generate_random_string] set nodesList [$section childNodes] set as_sections__definition "" foreach node $nodesList { @@ -83,7 +79,7 @@ } } # Insert section in the CR (the and the as_sections table) getting the revision_id (section_id) - set as_sections__section_id [as::section::new -name $as_sections__name -title $as_sections__title -description $as_sections__definition] + set as_sections__section_id [as::section::new -title $as_sections__title -description $as_sections__definition] # Relation between as_sections and as_assessments db_dml as_assessment_section_map_insert {} @@ -107,8 +103,6 @@ # Order of the item_choices set sort_order 0 set as_items__title [$item getAttribute {title} {Item}] - #set as_items__name [$item getAttribute {ident}] - set as_items__name [ad_generate_random_string] array set as_item_choices__correct_answer_p {} array set as_item_choices__score {} set as_items__feedback_right {} @@ -183,7 +177,7 @@ set rows [$render_fib getAttribute {rows} {15}] set cols [$render_fib getAttribute {columns} {55}] set html "rows $rows cols $cols" - set as_item_display_id [as::item_display_ta::new -name [ad_generate_random_string] -abs_size $html] + set as_item_display_id [as::item_display_ta::new -abs_size $html] foreach node $presentationChildNodes { if {[$node nodeName] == {material}} { set mattextNodes [$node selectNodes {mattext/text()}] @@ -193,11 +187,11 @@ } } } - set as_item_type_id [as::item_type_oq::new -name [ad_generate_random_string]] + set as_item_type_id [as::item_type_oq::new] } else { - set as_item_display_id [as::item_display_tb::new -name [ad_generate_random_string]] + set as_item_display_id [as::item_display_tb::new] - set as_item_type_id [as::item_type_mc::new -name [ad_generate_random_string]] + set as_item_type_id [as::item_type_mc::new] foreach node $presentationChildNodes { if {[$node nodeName] == {material}} { set mattextNodes [$node selectNodes {mattext/text()}] @@ -206,52 +200,48 @@ append as_items__title " " } } elseif {[$node nodeName] == {response_str} || [$node nodeName] == {response_num} } { - #set as_item_choices__ident [$node getAttribute {ident}] - set as_item_choices__ident [ad_generate_random_string] + set as_item_choices__ident [$node getAttribute {ident}] # get the correct response set as_item_choices__choice_text_nodes [$node selectNodes "//conditionvar/or/varequal\[@respident='$as_item_choices__ident'\]/text()"] set as_item_choices__choice_text {} foreach respident $as_item_choices__choice_text_nodes { lappend as_item_choices__choice_text [string trim [$respident nodeValue]] } # Insert as_item_choice in the CR (and as_item_choices table) getting the revision_id (choice_id) - set as_item_choice_id [as::item_choice::new -mc_id $as_item_type_id -name $as_item_choices__ident -title $as_item_choices__choice_text -sort_order $sort_order] + set as_item_choice_id [as::item_choice::new -mc_id $as_item_type_id -title $as_item_choices__choice_text -sort_order $sort_order] # order of the item_choices incr sort_order append as_items__title " " } } } # Insert as_item in the CR (and as_items table) getting the revision_id (as_item_id) - set as_item_id [as::item::new -name $as_items__name -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] + set as_item_id [as::item::new -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_type_id"] -relation_tag {as_item_type_rel} -relation_type {cr_item_rel} content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_display_id"] -relation_tag {as_item_display_rel} -relation_type {cr_item_rel} } else { set response_lidNodes [$presentation selectNodes {.//response_lid}] # The first node of the list. It may not be a good idea if it doesn't exist set response_lid [lindex $response_lidNodes 0] - #set as_item_type__name [$response_lid getAttribute {ident}] - set as_item_type__name [ad_generate_random_string] set as_items__rcardinality [$response_lid getAttribute {rcardinality} {Single}] # multiple choice either text (remember it can be internationalized or changed), images, sounds, videos # this is the default set as_item_display_id {} if {$as_items__rcardinality == {Multiple}} { # multiple response either text (remember it can be internationalized or changed), images, sounds, videos - set as_item_display_id [as::item_display_cb::new -name [ad_generate_random_string]] + set as_item_display_id [as::item_display_cb::new] } else { - set as_item_display_id [as::item_display_rb::new -name [ad_generate_random_string]] + set as_item_display_id [as::item_display_rb::new] } - set as_item_type_id [as::item_type_mc::new -name $as_item_type__name] + set as_item_type_id [as::item_type_mc::new] # Insert as_item in the CR (and as_items table) getting the revision_id (as_item_id) - set as_item_id [as::item::new -name $as_items__name -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] + set as_item_id [as::item::new -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_type_id"] -relation_tag {as_item_type_rel} -relation_type {cr_item_rel} content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_display_id"] -relation_tag {as_item_display_rel} -relation_type {cr_item_rel} set response_labelNodes [$presentation selectNodes {.//response_label}] foreach response_label $response_labelNodes { - #set as_item_choices__ident [$response_label getAttribute {ident}] - set as_item_choices__ident [ad_generate_random_string] + set as_item_choices__ident [$response_label getAttribute {ident}] set mattextNodes [$response_label selectNodes {material/mattext/text()}] set as_item_choices__choice_text [db_null] foreach mattext $mattextNodes { @@ -270,7 +260,7 @@ if {![info exists as_item_choices__score($as_item_choices__ident)]} { set as_item_choices__score($as_item_choices__ident) 0 } - as::item_choice::new -mc_id $as_item_type_id -name $as_item_choices__ident -title $as_item_choices__choice_text -sort_order $sort_order -correct_answer_p $as_item_choices__correct_answer_p($as_item_choices__ident) -percent_score $as_item_choices__score($as_item_choices__ident) -content_value $as_item_choices__content_value + as::item_choice::new -mc_id $as_item_type_id -title $as_item_choices__choice_text -sort_order $sort_order -correct_answer_p $as_item_choices__correct_answer_p($as_item_choices__ident) -percent_score $as_item_choices__score($as_item_choices__ident) -content_value $as_item_choices__content_value # order of the item_choices incr sort_order } Index: openacs-4/packages/assessment/tcl/as-section-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-section-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/tcl/as-section-procs.tcl 14 Nov 2004 16:47:04 -0000 1.2 +++ openacs-4/packages/assessment/tcl/as-section-procs.tcl 15 Nov 2004 17:17:15 -0000 1.3 @@ -7,7 +7,6 @@ namespace eval as::section {} ad_proc -public as::section::new { - {-name:required} {-title:required} {-description ""} {-definition ""} @@ -27,7 +26,7 @@ # Insert as_section in the CR (and as_sections table) getting the revision_id (as_section_id) db_transaction { - set section_item_id [content::item::new -parent_id $folder_id -content_type {as_sections} -name $name -title $title -description $description ] + set section_item_id [content::item::new -parent_id $folder_id -content_type {as_sections} -name [ad_generate_random_string] -title $title -description $description ] set as_section_id [content::revision::new \ -item_id $section_item_id \ Index: openacs-4/packages/assessment/tcl/as-session-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-session-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-session-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-session-procs.tcl 15 Nov 2004 17:17:15 -0000 1.2 @@ -32,7 +32,20 @@ # if { ! [info exists as_session_id] } { # Insert as_session in the CR (and as_sessions table) getting the revision_id (session_id) set session_id [content::item::new -parent_id $folder_id -content_type {as_sessions} -name "$subject_id-$assessment_id-[ad_generate_random_string]" -title "$subject_id-$assessment_id-[ad_generate_random_string]" ] - set as_session_id [content::revision::new -item_id $session_id -content_type {as_sessions} -title "$subject_id-$assessment_id-[ad_generate_random_string]" -attributes [list [list assessment_id $assessment_id] [list subject_id $subject_id] [list staff_id $staff_id] [list target_datetime $target_datetime] [list creation_datetime $creation_datetime] [list first_mod_datetime $first_mod_datetime] [list last_mod_datetime $last_mod_datetime] [list completed_datetime $completed_datetime] [list percent_score $percent_score] [list consent_timestamp $consent_timestamp] ] ] + set as_session_id [content::revision::new \ + -item_id $session_id \ + -content_type {as_sessions} \ + -title "$subject_id-$assessment_id-[ad_generate_random_string]" \ + -attributes [list [list assessment_id $assessment_id] \ + [list subject_id $subject_id] \ + [list staff_id $staff_id] \ + [list target_datetime $target_datetime] \ + [list creation_datetime $creation_datetime] \ + [list first_mod_datetime $first_mod_datetime] \ + [list last_mod_datetime $last_mod_datetime] \ + [list completed_datetime $completed_datetime] \ + [list percent_score $percent_score] \ + [list consent_timestamp $consent_timestamp] ] ] # } return $as_session_id } Index: openacs-4/packages/assessment/www/admin/assessment-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/Attic/assessment-form.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/admin/assessment-form.tcl 14 Nov 2004 16:42:32 -0000 1.1 +++ openacs-4/packages/assessment/www/admin/assessment-form.tcl 15 Nov 2004 17:17:16 -0000 1.2 @@ -57,7 +57,6 @@ {show_feedback:text(select),optional {label "[_ assessment.Show_Feedback]"} {options $feedback_options}} {section_navigation:text(select),optional {label "[_ assessment.Section_Navigation]"} {options $navigation_options}} } -new_request { - set name "" set title "" set description "" set instructions "" @@ -96,7 +95,6 @@ } } -new_data { set assessment_rev_id [as::assessment::new \ - -name $name \ -title $title \ -description $description \ -instructions $instructions \ Index: openacs-4/packages/assessment/www/admin/choice-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/Attic/choice-add.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/admin/choice-add.tcl 14 Oct 2004 11:48:36 -0000 1.2 +++ openacs-4/packages/assessment/www/admin/choice-add.tcl 15 Nov 2004 17:17:16 -0000 1.3 @@ -93,7 +93,7 @@ db_transaction { - as::item_choice::new -mc_id $as_item_type_id -name $as_item_choices__name($i) -title $as_item_choices__title($i) -feedback_text $as_item_choices__feedback_text($i) -percent_score $as_item_choices__score($i) + as::item_choice::new -mc_id $as_item_type_id -title $as_item_choices__title($i) -feedback_text $as_item_choices__feedback_text($i) -percent_score $as_item_choices__score($i) } Index: openacs-4/packages/assessment/www/admin/display-create-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/Attic/display-create-type.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/admin/display-create-type.tcl 14 Oct 2004 11:48:36 -0000 1.2 +++ openacs-4/packages/assessment/www/admin/display-create-type.tcl 15 Nov 2004 17:17:16 -0000 1.3 @@ -85,7 +85,7 @@ db_transaction { #add the item #Insert as_item_display_rb in the CR (and as_item_display_rb table) getting the revision_id (as_item_display_id) - set as_item_display_rb_id [as::item_display_rb::new -name $as_item_display_type__name -html_display_options $as_item_display_type__html_display_options -choice_orientation $as_item_display_rb__choice_orientation -choice_label_orientation $as_item_display_rb__choice_label_orientation -sort_order_type $as_item_display_rb__sort_order -item_answer_alignment $as_item_display_rb__item_answer_alignment] + set as_item_display_rb_id [as::item_display_rb::new -html_display_options $as_item_display_type__html_display_options -choice_orientation $as_item_display_rb__choice_orientation -choice_label_orientation $as_item_display_rb__choice_label_orientation -sort_order_type $as_item_display_rb__sort_order -item_answer_alignment $as_item_display_rb__item_answer_alignment] #set the relation between as_items table and as_item_display_rb table content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id1"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_display_rb_id"] -relation_tag {as_item_display_rel} -relation_type {cr_item_rel} Index: openacs-4/packages/assessment/www/admin/item-create-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/Attic/item-create-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/admin/item-create-2.tcl 14 Oct 2004 11:48:36 -0000 1.2 +++ openacs-4/packages/assessment/www/admin/item-create-2.tcl 15 Nov 2004 17:17:16 -0000 1.3 @@ -82,7 +82,7 @@ db_transaction { #Insert as_item_type_mc in the CR (and as_item_type_mc table) getting the revision_id (as_item_type_id) - set as_item_type_id [as::item_type_mc::new -name $as_item_type_id1 -increasing_p $as_item_type_mc__increasing_p -allow_negative_p $as_item_type_mc__allow_negative_p -num_correct_answers $as_item_type_mc__num_correct_answers -num_answers $as_item_type_mc__num_answers] + set as_item_type_id [as::item_type_mc::new -increasing_p $as_item_type_mc__increasing_p -allow_negative_p $as_item_type_mc__allow_negative_p -num_correct_answers $as_item_type_mc__num_correct_answers -num_answers $as_item_type_mc__num_answers] #set the relation between as_items table and as_item_type_mc table content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id1"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_type_id"] -relation_tag {as_item_type_rel} -relation_type {cr_item_rel} } Index: openacs-4/packages/assessment/www/admin/item-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/Attic/item-create.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment/www/admin/item-create.tcl 14 Oct 2004 11:48:36 -0000 1.2 +++ openacs-4/packages/assessment/www/admin/item-create.tcl 15 Nov 2004 17:17:16 -0000 1.3 @@ -52,7 +52,7 @@ db_transaction { #add the item #Insert as_item in the CR (and as_items table) getting the revision_id (as_item_id) - set as_item_id [as::item::new -name $as_items_name -title $as_items_title -definition $as_items_definition -required_p $as_items_required_p -data_type $as_items_data_type -max_time_to_complete $as_items_max_time_to_complete] + set as_item_id [as::item::new -title $as_items_title -definition $as_items_definition -required_p $as_items_required_p -data_type $as_items_data_type -max_time_to_complete $as_items_max_time_to_complete] } #redirect back to display-create-type Index: openacs-4/packages/assessment/www/admin/section-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/admin/Attic/section-form.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/admin/section-form.tcl 14 Nov 2004 16:43:21 -0000 1.1 +++ openacs-4/packages/assessment/www/admin/section-form.tcl 15 Nov 2004 17:17:16 -0000 1.2 @@ -56,7 +56,6 @@ {section_display_type_id:text(select),optional {label "[_ assessment.Display_Type]"} {options $display_types}} {required_p:text(select) {label "[_ assessment.Required]"} {options $boolean_options}} } -new_request { - set name "" set title "" set description "" set definition "" @@ -72,7 +71,6 @@ set new_assessment_rev_id [as::assessment::new_revision -assessment_id $assessment_id] set section_id [as::section::new \ - -name $name \ -title $title \ -description $description \ -definition $definition \