Index: openacs-4/packages/lorsm/catalog/lorsm.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/catalog/lorsm.en_US.ISO-8859-1.xml,v diff -u -r1.8 -r1.9 --- openacs-4/packages/lorsm/catalog/lorsm.en_US.ISO-8859-1.xml 26 May 2005 18:15:52 -0000 1.8 +++ openacs-4/packages/lorsm/catalog/lorsm.en_US.ISO-8859-1.xml 7 Jun 2006 14:05:43 -0000 1.9 @@ -1,5 +1,5 @@ - + Classification Intended End User Role @@ -130,6 +130,7 @@ Date: Date Date of contribution + Default delivery? Description: Description Descriptions: @@ -771,11 +772,13 @@ Scheme SCORM? SCORM Package Info + SCORM session SCOs seconds See metadata Semantic Density: Semantic Density + Sesion_Runtime_Data Set Course Options Set Course Status Set Course Status \ @@ -846,6 +849,7 @@ Welcome to LEON Yes You can + Your session has expired. Please notify this problem to the System Administrator. Your Stats: Default delivery? SCORM session Index: openacs-4/packages/lorsm/catalog/lorsm.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/catalog/lorsm.es_ES.ISO-8859-1.xml,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lorsm/catalog/lorsm.es_ES.ISO-8859-1.xml 17 May 2005 17:03:39 -0000 1.3 +++ openacs-4/packages/lorsm/catalog/lorsm.es_ES.ISO-8859-1.xml 7 Jun 2006 14:05:43 -0000 1.4 @@ -1,5 +1,5 @@ - + Clasificaci�n Papel previsto de Usuario Final @@ -97,6 +97,7 @@ Entradas de Catalogo: Cat�logo Modificar + Estilo cl�sico Entrada de Clasificaci�n Clasificaci�n MD Clasificaciones: @@ -111,6 +112,7 @@ Info Derechos de Autor Costo: Costo + Formato de presentaci�n: curso. course_id Indice del Curso @@ -123,6 +125,7 @@ Cobertura Creado Por: Fecha de Creaci�n + Formato actual Estado Actual: Fecha: Fecha @@ -220,7 +223,6 @@ Localizaci�n: Localizaciones: Salir - La carga de archivo fall� o posiblemente el archvi est� vac�o Agregar Curso Compatible con IMS/SCORM Agregar Nivel de Agregaci�n Agregar Anotaci�n de Descripci�n de MD @@ -436,6 +438,7 @@ Descripci�n con Derechos de Autor: El Curso ya es parte de su clase Sistema de Entrega de Cursos para LORS + Estilo de presentaci�n Cursos en su Repositorio Descripci�n de Fecha y Hora Borrando folder temporal... @@ -615,6 +618,7 @@ Paquete compatible con SCORM Buscar Objetos de Aprendizaje en el Repositorio Buscar Objetos de Aprendizaje + Establecer formato de presentaci�n Fijar Opciones de Rastreo Compartir Curso/Objeto de Aprendizaje Cursos Compratidos en el Repositorio @@ -656,6 +660,7 @@ Subir un paquete de IMS Actualizando y procesando su curso, porfavor espere ... Utilize el bot�n de \"Examinar...\" para localizar su archivo, luego haga click en \"Abrir\" + Utilice el estilo cl�sico si su curso no contiene un fichero index y desea disponer de un �ndice. En caso contrario, utilice el estilo "Sin �ndice". valign="top" align="left">%isscorm;noquote% Versi�n del Esquema. ejemplo: '1.2.1' Ver la Metadata de Anotaci�n @@ -676,6 +681,8 @@ Lo sentimos, pero parece que no tiene los permisos necesarios para realizar esta operaci�n Si derechos reservados u otra restriccion se aplique Si el uso de este recurso requiere pago + Con barra de navegaci�n abajo + Estilo Sin �ndice Usted esta apunto de agregar a su clase el curso %course_name% Puede agregar cursos que y� existan en el repositorio Usted ha visto este curso @@ -763,6 +770,7 @@ Esquema: SCORM? Informaci�n del Paquete SCORM + Sesi�n SCORM SCOs segundos Ver metadata @@ -779,6 +787,7 @@ Tama�o Fuente: Fuente + Empezar el curso Iniciar Curso Estado: Estado Index: openacs-4/packages/lorsm/catalog/lorsm.es_GT.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/catalog/lorsm.es_GT.ISO-8859-1.xml,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lorsm/catalog/lorsm.es_GT.ISO-8859-1.xml 17 May 2005 17:03:39 -0000 1.3 +++ openacs-4/packages/lorsm/catalog/lorsm.es_GT.ISO-8859-1.xml 7 Jun 2006 14:05:43 -0000 1.4 @@ -1,5 +1,5 @@ - + Clasificaci�n Papel previsto de Usuario Final @@ -220,7 +220,6 @@ Localizaci�n: Localizaciones: Salir - La carga de archivo fall� o posiblemente el archvi est� vac�o Agregar Curso Compatible con IMS/SCORM Agregar Nivel de Agregaci�n Agregar Anotaci�n de Descripci�n de MD Index: openacs-4/packages/lorsm/lib/user-lorsm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/lib/user-lorsm.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/lorsm/lib/user-lorsm.tcl 31 May 2005 22:55:32 -0000 1.10 +++ openacs-4/packages/lorsm/lib/user-lorsm.tcl 7 Jun 2006 14:05:44 -0000 1.11 @@ -27,12 +27,14 @@ label "[_ lorsm.Course_Name_1]" display_template { @d_courses.course_url;noquote@ - - -          - [_ lors-central.add_mat] - - + + + +          + [_ lors-central.add_mat] + + + } html { width 70% } } @@ -67,7 +69,12 @@ } }" + } else { + set lors_central_p 0 } + set lors_central_p 1 +} else { + set lors_central_p 0 } @@ -107,8 +114,9 @@ set delivery_method $needscorte ns_log Debug "lorsm - $needscorte" - - set course_url "$course_name" + + set course_url_url [export_vars -base "[lindex $context 0]$delivery_method" -url {man_id}] + set course_url "$course_name" ns_log Debug "lorsm - course_url: $course_url" } else { set course_url "NO RESOURCES ERROR" Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/sql/postgresql/upgrade/upgrade-0.6d2-0.6d3.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/tcl/lorsm-callback-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/tcl/lorsm-menu-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/tcl/lorsm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/lorsm/tcl/lorsm-procs.tcl 31 May 2006 10:50:05 -0000 1.12 +++ openacs-4/packages/lorsm/tcl/lorsm-procs.tcl 7 Jun 2006 14:05:44 -0000 1.13 @@ -353,18 +353,20 @@ } { db_foreach sql { SELECT - (tree_level(tree_sortkey) - :indent) as indent, - i.ims_item_id as item_id, + i.parent_item, + i.ims_item_id, i.item_title as item_title FROM - acs_objects o, ims_cp_items i + acs_objects o, ims_cp_items i, cr_items cr WHERE o.object_type = 'ims_item_object' AND i.org_id = :org_id AND o.object_id = i.ims_item_id - AND + AND + cr.item_id = ( select item_id from cr_revisions where revision_id = i.ims_item_id) + AND EXISTS (select 1 from acs_object_party_privilege_map p @@ -373,9 +375,9 @@ and p.privilege = 'read') ORDER BY - o.object_id, tree_sortkey + i.sort_order, o.object_id, cr.tree_sortkey } { - lappend item_list $item_id + lappend item_list $ims_item_id } } return $item_list @@ -673,3 +675,43 @@ return $object_id } + +# namespace eval lorsm::merge { + +# ad_proc -callback MergeShowUserInfo -impl lorsm { +# -user_id:required +# } { +# Show lors items of one user +# } { +# set msg "lors items" +# set result [list $msg] + +# lappend result [list "Student tracks : [db_list sel_student_track { *SQL* }] " ] +# lappend result [list "Student bookmarks: [db_list sel_student_bookmark { *SQL* }] "] + +# return $result +# } + +# ad_proc -callback MergePackageUser -impl lorsm { +# -from_user_id:required +# -to_user_id:required +# } { +# Merge the lors items of two users. +# The from_user_id is the user that will be +# deleted and all the entries of this user +# will be mapped to the to_user_id. + +# } { +# set msg "Merging lors" +# ns_log Notice $msg +# set result [list $msg] + +# db_transaction { +# db_dml student_track { *SQL* } +# db_dml student_bookmark { *SQL* } +# } + +# set result "lors merge is done" +# return $result +# } +# } Index: openacs-4/packages/lorsm/tcl/lorsm-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/tcl/lorsm-procs.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lorsm/tcl/lorsm-procs.xql 26 May 2005 19:00:36 -0000 1.3 +++ openacs-4/packages/lorsm/tcl/lorsm-procs.xql 7 Jun 2006 14:05:44 -0000 1.4 @@ -75,4 +75,36 @@ + + + select track_id from + lorsm_student_track + where user_id = :user_id + + + + + + select community_id + from lorsm_student_bookmark + where user_id = :user_id + + + + + + update lorsm_student_track + set user_id = :to_user_id + where user_id = :from_user_id + + + + + + update lorsm_student_bookmark + set user_id = :to_user_id + where user_id = :from_user_id + + + \ No newline at end of file Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/applet.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/applet.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/blank-menu.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/blank-top.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/blank.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery/body.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/body.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/lorsm/www/delivery/body.adp 24 Feb 2005 13:33:22 -0000 1.5 +++ openacs-4/packages/lorsm/www/delivery/body.adp 7 Jun 2006 14:05:44 -0000 1.6 @@ -1,25 +1,55 @@ - +<% +# +# +# +# +%> + + + + + +
- -

#lorsm.Welcome_to# @course_name@

+ +
+

@course_name@

- #lorsm.Your_Stats# -
- #lorsm.lt_You_have_seen_this_co# @viewed_times@ #lorsm.lt_number_of_times_and_h# @viewed_percent@ % #lorsm.of_the_content# -

- #lorsm.lt_The_last_page_you_vie# @last_page_viewed;noquote@ + Last page viewed: @last_page_viewed;noquote@ + + You have not yet viewed any material from this course. +

- #lorsm.lt_Click_on_menu_to_the_# + Click on the menu items on the left to view course materials + + + + + + + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/bottom.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/bottom.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/delivery-bottom-bar.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/delivery-no-index.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/delivery-scorm.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/delivery.adp'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery/exit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/exit.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lorsm/www/delivery/exit.tcl 17 May 2005 17:03:40 -0000 1.2 +++ openacs-4/packages/lorsm/www/delivery/exit.tcl 7 Jun 2006 14:05:44 -0000 1.3 @@ -14,13 +14,43 @@ } -properties { } -validate { } -errors { -} +} -# stamps the time when leaving the delivery environment +#set the following accordingly +set level "Notice" -if {$track_id != 0} { - lorsm::track::exit -track_id $track_id -} + set track_id [ad_get_client_property lorsm currenttrackid] + set lorsmstudenttrack [ad_get_client_property lorsm studenttrack] + + ns_log $level "EXIT track_id $track_id" + ns_log $level "SCORM lorsmstudenttrack $lorsmstudenttrack" + + if { ! [empty_string_p $lorsmstudenttrack] } { + if { $lorsmstudenttrack == 0 } { + lorsm::track::exit -track_id $track_id } else { + #speficic for courses for which istrackable is on + lorsm::track::exit -track_id $lorsmstudenttrack } + ns_log $level "SCORM exiting a scorm course which didnt'actually FINISH" + } else { + ns_log $level "SCORM exiting a scorm course which never INITED" + } + + #unset the CLIENT properties + ad_set_client_property lorsm currenttrackid "" + ad_set_client_property lorsm studenttrack "" + if { $track_id == 0 || $track_id == "" } { + ns_log $level "SCORM leaving non rte-inited (or better a rte-finished) course" + } else { + ns_log $level "SCORM leaving course which had been rte-inited but NOT FINISHED (user forcing exit before time) (lorsm_cmi_core.track_id=$track_id)" + } + if { $lorsmstudenttrack == 0 || $lorsmstudenttrack == "" } { + ns_log $level "SCORM leaving non istrackable course" + } else { + ns_log $level "SCORM leaving course which was either istrackable or rte-inited (lorsm_student_track.track_id=$lorsmstudenttrack" + } + # redirects -ad_returnredirect $return_url +ns_log Warning "RETURN $return_url" + + ad_returnredirect $return_url Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/header.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/index.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lorsm/www/delivery/index.adp 17 May 2005 17:03:40 -0000 1.3 +++ openacs-4/packages/lorsm/www/delivery/index.adp 7 Jun 2006 14:05:44 -0000 1.4 @@ -1,7 +1,4 @@ - -@course_name@ - - - - - + + \ No newline at end of file Index: openacs-4/packages/lorsm/www/delivery/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/lorsm/www/delivery/index.tcl 17 May 2005 17:03:40 -0000 1.4 +++ openacs-4/packages/lorsm/www/delivery/index.tcl 7 Jun 2006 14:05:44 -0000 1.5 @@ -9,49 +9,85 @@ @arch-tag: 64f3397b-4558-4298-a995-fc63e472f2a1 @cvs-id $Id$ } { + menu_off:integer,notnull,optional man_id:integer,notnull + item_id:integer,notnull,optional ims_id:integer,notnull,optional } -properties { } -validate { } -errors { } + +set debuglevel 0 +ad_set_client_property lorsm debuglevel $debuglevel + +set ses_renew [ad_parameter -package_id [ad_acs_kernel_id] SessionRenew security 300] + +if { ! [info exists menu_off] } { + set menu_off 0 +} + +if { [info exists item_id] } { + ad_set_client_property lorsm ims_id $item_id + if { ! [info exists ims_id] } { + set ims_id $item_id + } +} else { + ad_set_client_property lorsm ims_id "" + ns_log notice "UNSETTING LORSM IMS_ID '[ad_conn url]'" +} + if { [info exists ims_id] } { set item_id $ims_id - + ad_set_client_property lorsm ims_id $ims_id + ns_log notice "SETTING LORSM IMS_ID = '${ims_id}' '[ad_conn url]'" set body_url [export_vars -base "record-view" -url {item_id man_id}] } # Get the course name if {[db_0or1row manifest " select - cp.course_name, - cp.fs_package_id + cp.course_name, + cp.fs_package_id, + isscorm, + pf.folder_name, + pf.format_name from - ims_cp_manifests cp + ims_cp_manifests cp, + lorsm_course_presentation_formats pf where cp.man_id = :man_id - and cp.parent_man_id = 0"]} { + and cp.parent_man_id = 0 + and cp.course_presentation_format = pf.format_id "]} { # Course Name if {[empty_string_p $course_name]} { - set course_name "[_ lorsm.No_Course_Name]" + set course_name "No Course Name" } } else { - set course_name "[_ lorsm.No_Course_Name]" + set course_name "No Course Name" } +if {$isscorm} { + set folder_name "delivery-scorm" +} +set return_url [dotlrn_community::get_community_url [dotlrn_community::get_community_id]] + # Student tracking set package_id [ad_conn package_id] set community_id [dotlrn_community::get_community_id] set user_id [ad_conn user_id] +ad_set_client_property lorsm currentcourse $man_id + if {[lorsm::track::istrackable -course_id $man_id -package_id $package_id]} { - set track_id [lorsm::track::new \ -user_id $user_id \ -community_id $community_id \ -course_id $man_id] + ad_set_client_property lorsm studenttrack $track_id } else { set track_id 0 + ad_set_client_property lorsm studenttrack 0 } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/keepalive.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/keepalive.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery/menu.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/menu.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/lorsm/www/delivery/menu.adp 17 May 2005 17:03:40 -0000 1.4 +++ openacs-4/packages/lorsm/www/delivery/menu.adp 7 Jun 2006 14:05:44 -0000 1.5 @@ -1,164 +1,323 @@ - - - - - - - - - - - - - - - - #lorsm.Exit_Course#
#lorsm.return_to_LRN#
-  -


- - - - - - - + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + +
+ +debug is: ON + + + + Index: openacs-4/packages/lorsm/www/delivery/menu.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/menu.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lorsm/www/delivery/menu.tcl 17 May 2005 17:03:40 -0000 1.3 +++ openacs-4/packages/lorsm/www/delivery/menu.tcl 7 Jun 2006 14:05:44 -0000 1.4 @@ -11,12 +11,14 @@ } { man_id:integer,notnull ims_id:integer,notnull,optional + menu_off:integer,notnull,optional track_id:integer,notnull } -properties { } -validate { } -errors { } +set debuglevel [ad_get_client_property lorsm debuglevel] set org_id [db_string get_org_id { } ] set items_list [lorsm::get_items_indent -org_id $org_id] @@ -26,6 +28,9 @@ set community_id [dotlrn_community::get_community_id] set counter 1 set user_id [ad_conn user_id] +if { ![info exists menu_off] } { + set menu_off 0 +} proc generate_tree_menu { items index rlevel } { # This function is recursive Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/popup.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/popup.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery/record-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/record-view.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lorsm/www/delivery/record-view.tcl 20 May 2005 11:23:51 -0000 1.3 +++ openacs-4/packages/lorsm/www/delivery/record-view.tcl 7 Jun 2006 14:05:44 -0000 1.4 @@ -25,19 +25,21 @@ set ns_item_id $item_id set revision_id $item_id +ad_set_client_property lorsm ims_id $item_id + set item_id [lorsm::delivery::get_item_id -revision_id $revision_id] set folder_id [lorsm::delivery::get_folder_id_from_man_id -man_id $man_id] set lors_root [lorsm::get_root_folder_id] set folder_name [lorsm::delivery::get_folder_name -folder_id $folder_id] set content_root [lorsm::delivery::get_item_id_from_name_parent -name $folder_name -parent_id $lors_root] - +ns_log notice "record-view folder_id='${folder_id}' lors_root='${lors_root}' folder_name='${folder_name}' content_root='${content_root}'" if {[empty_string_p $content_root]} { # This was uploaded with lorsm so we use the folder_id from the table set content_root [lorsm::delivery::get_folder_id_from_man_id -man_id $man_id] } +ns_log notice "record-view content_root='${content_root}'" - set url2 $folder_name # Get the href of the item @@ -103,7 +105,7 @@ nsv_set delivery_vars [ad_conn session_id] [list] nsv_lappend delivery_vars [ad_conn session_id] $content_root - ad_returnredirect [export_vars -base view/$href {ims_item_id} ] + ad_returnredirect [export_vars -base view/$href {ims_item_id man_id} ] ad_script_abort } } else { Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/scorm.css'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/servlet.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery/stuff.jar =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/stuff.jar,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/lorsm/www/delivery/Images/exit.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Images/exit.png,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/lorsm/www/delivery/Images/home.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Images/home.png,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/lorsm/www/delivery/Images/next.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Images/next.png,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/lorsm/www/delivery/Images/nexthide.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Images/nexthide.png,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/lorsm/www/delivery/Images/prev.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Images/prev.png,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/lorsm/www/delivery/Images/prevhide.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/Images/prevhide.png,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/lorsm/www/delivery/view/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/view/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/delivery/view/index-postgresql.xql 4 Sep 2004 14:51:26 -0000 1.1 +++ openacs-4/packages/lorsm/www/delivery/view/index-postgresql.xql 7 Jun 2006 14:05:45 -0000 1.2 @@ -11,5 +11,17 @@ + + + select content_item__get_id(:url, :content_root, 'f') as item_id + + + + + select i.ims_item_id as imsitem_id from ims_cp_items_to_resources i, ims_cp_files f where f.file_id=:file_id and i.res_id=f.res_id; + + + + Index: openacs-4/packages/lorsm/www/delivery/view/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/view/index.vuh,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lorsm/www/delivery/view/index.vuh 17 May 2005 17:03:40 -0000 1.2 +++ openacs-4/packages/lorsm/www/delivery/view/index.vuh 7 Jun 2006 14:05:45 -0000 1.3 @@ -4,11 +4,22 @@ @cvs-id $Id$ } { { ims_item_id "" } + { man_id "" } } - + # check if the nsv variable exists if {![nsv_exists delivery_vars [ad_conn session_id]]} { - ad_returnredirect [dotlrn_community::get_community_url [dotlrn_community::get_community_id -package_id [ad_conn package_id]]] + if {$man_id ne ""} { + db_1row manifest_info { *SQL* } + set content_root [fs::get_root_folder -package_id $fs_package_id] + if {[nsv_exists delivery_vars [ad_conn session_id]]} { + nsv_unset delivery_vars [ad_conn session_id] + } + nsv_set delivery_vars [ad_conn session_id] [list] + nsv_lappend delivery_vars [ad_conn session_id] $content_root + } else { + ad_return_complaint 1 "[_ lorsm.Your_session_has_expired]" + } } if {[info exists ims_item_id]} { @@ -76,6 +87,6 @@ append page "The item is either not available on this server or it is not in a publishable state " append page "Unpublished items can be viewed via the CMS interface if the CMS package is installed.
" append page "[ad_footer]" - doc_return 200 text/html $page + doc_return 404 text/html $page } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/view/index.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery-bottom-bar/body.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery-bottom-bar/body.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/delivery-bottom-bar/body.tcl 18 May 2005 07:45:24 -0000 1.1 +++ openacs-4/packages/lorsm/www/delivery-bottom-bar/body.tcl 7 Jun 2006 14:05:45 -0000 1.2 @@ -14,20 +14,20 @@ db_0or1row get_last_viewed { - select item_id as imsitem_id, coalesce(acs_object__name(object_id),'Item '||object_id) as last_page_viewed + select ims_item_id as imsitem_id, coalesce(acs_object__name(object_id),'Item '||object_id) as last_page_viewed from views v, ims_cp_items i, ims_cp_organizations o where v.viewer_id = :user_id - and v.object_id = i.item_id + and v.object_id = i.ims_item_id and i.org_id = o.org_id and o.man_id = :man_id order by v.last_viewed desc limit 1 } set all_items [db_list get_total_items { - select i.item_id + select i.ims_item_id from ims_cp_items i, ims_cp_organizations o where o.man_id = :man_id Index: openacs-4/packages/lorsm/www/delivery-bottom-bar/bottom.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery-bottom-bar/bottom.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/delivery-bottom-bar/bottom.tcl 18 May 2005 07:45:24 -0000 1.1 +++ openacs-4/packages/lorsm/www/delivery-bottom-bar/bottom.tcl 7 Jun 2006 14:05:45 -0000 1.2 @@ -31,12 +31,12 @@ set item_list [lorsm::get_item_list $man_id $user_id] set last_item_viewed [db_string select_last_item_viewed { - select item_id + select ims_item_id from views v, ims_cp_items i, ims_cp_organizations o where v.viewer_id = :user_id - and v.object_id = i.item_id + and v.object_id = i.ims_item_id and i.org_id = o.org_id and o.man_id = :man_id order by v.last_viewed desc Index: openacs-4/packages/lorsm/www/delivery-bottom-bar/record-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery-bottom-bar/record-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/delivery-bottom-bar/record-view.tcl 18 May 2005 07:45:24 -0000 1.1 +++ openacs-4/packages/lorsm/www/delivery-bottom-bar/record-view.tcl 7 Jun 2006 14:05:45 -0000 1.2 @@ -31,9 +31,9 @@ set url2 "[db_string select_folder_key {select key from fs_folders where folder_id = :folder_id}]/" -set href [db_string href "select href from ims_cp_resources r, ims_cp_items_to_resources ir where ir.item_id = :item_id and ir.res_id = r.res_id" -default ""] +set href [db_string href "select href from ims_cp_resources r, ims_cp_items_to_resources ir where ir.ims_item_id = :item_id and ir.res_id = r.res_id" -default ""] -db_1row item_info "select title from ims_cp_items where item_id = :item_id" +db_1row item_info "select item_title from ims_cp_items where ims_item_id = :item_id" set fs_item_id [fs::get_item_id -folder_id $folder_id -name $href] Index: openacs-4/packages/lorsm/www/delivery-bottom-bar/view/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery-bottom-bar/view/index.vuh,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/delivery-bottom-bar/view/index.vuh 18 May 2005 07:45:24 -0000 1.1 +++ openacs-4/packages/lorsm/www/delivery-bottom-bar/view/index.vuh 7 Jun 2006 14:05:45 -0000 1.2 @@ -5,26 +5,31 @@ @creation-date Unknown @cvs-id $Id$ } { - {item_id ""} + {ims_item_id ""} } # check if the nsv variable exists if {![nsv_exists delivery_vars [ad_conn session_id]]} { ad_returnredirect [dotlrn_community::get_community_url [dotlrn_community::get_community_id -package_id [ad_conn package_id]]] } -if {![empty_string_p $item_id]} { - lorsm::set_ims_item_id $item_id +if {[info exists ims_item_id]} { + lorsm::set_ims_item_id $ims_item_id } + # Get the paths set the_root [ns_info pageroot] set the_url [ad_conn path_info] set content_type "content_revision" set content_root [lindex [nsv_get delivery_vars [ad_conn session_id]] 0] +set ns_item_id [lindex [nsv_get delivery_vars [ad_conn session_id]] 1] +set ims_item_id [lorsm::get_ims_item_id] +set the_url [join [lrange [split $the_url "/"] 1 end] "/"] + set template_root [db_string template_root ""] # Serve the page @@ -33,10 +38,40 @@ # as though it's been passed by reference. This requires that the redirect treat the # path as an absolute path within the filesystem. +# MIGUELM: we need a way to use other content root not only the one for the course since we can have +# items from other courses + +set item_id [content::item::get_id -item_path $the_url -root_folder_id $content_root -resolve_index "f"] + +if { [empty_string_p $item_id] } { + # This item was probably added. We need to check if the item exist on other folder. + # So we will get the first part of the URL + set item_id [lorsm::delivery::get_item_other_folder -url $the_url] +} + +# To get the revision_id (file_id) we need to show here we have to items here +# one is the item_id that is recived on record-view page from the menu +# and the other one is the one that holds all the revisions for one file +set revision_id [lorsm::delivery::get_file_id_from_ims_item_id -ims_item_id $ns_item_id -item_id $item_id] + +if { [empty_string_p $revision_id] } { + # Is a reference to an image or some other resource inside the page, this items don't + # have an entry in ims_cp_files table + set revision_id [item::get_best_revision $item_id] +} + +if { ![empty_string_p $revision_id] } { + # We catch the revision id using the_url and content root + cr_write_content -revision_id $revision_id +} else { + # Write the ims_item_id that we recieve on the page since this is the one that holds the content + cr_write_content -revision_id $ims_item_id +} + if { [lorsm::init the_url the_root $content_root $template_root public "" $content_type] } { # we introduced our own template - rp_internal_redirect -absolute_path [acs_root_dir]/templates/lorsm-default + rp_internal_redirect -absolute_path [acs_root_dir]/templates/lorsm-no-index } else { # ns_returnnotfound