Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/body-oracle.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/www/delivery/body-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/delivery/body.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/body.tcl,v
diff -u -r1.5.2.1 -r1.5.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/body.tcl 5 May 2006 17:00:19 -0000 1.5.2.1
+++ openacs-4/packages/lorsm/www/delivery/body.tcl 20 Dec 2006 12:25:43 -0000 1.5.2.1.2.1
@@ -17,55 +17,20 @@
set user_id [ad_conn user_id]
set community_id [dotlrn_community::get_community_id]
-db_0or1row get_last_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.ims_item_id
- and i.org_id = o.org_id
- and o.man_id = :man_id
- order by v.last_viewed desc
- limit 1
-}
+db_0or1row get_last_viewed {}
-set all_items [db_list get_total_items {
- select i.ims_item_id
- from ims_cp_items i,
- ims_cp_organizations o
- where o.man_id = :man_id
- and i.org_id = o.org_id
-}]
+set all_items [db_list get_total_items {}]
set total_item_count [llength $all_items]
-set viewed_items [db_list get_viewed_items "
- select v.object_id
- from views v
- where v.viewer_id = :user_id
- and v.object_id in ([join $all_items ,])
- "]
+set viewed_items [db_list get_viewed_items {}]
set viewed_item_count [llength $viewed_items]
set viewed_percent [lc_numeric [expr [expr $viewed_item_count * 1.00] / $total_item_count * 100] "%.2f"]
#Get times viewed
-set viewed_times [db_string select_viewed_times "
- select count(*)
- from lorsm_student_track
- where community_id = :community_id
- and course_id = :man_id
- and user_id = :user_id "]
+set viewed_times [db_string select_viewed_times {}]
# Get the course name
-if {[db_0or1row manifest "
- select
- cp.course_name,
- cp.fs_package_id
- from
- ims_cp_manifests cp
- where
- cp.man_id = :man_id
- and cp.parent_man_id = 0"]} {
+if {[db_0or1row manifest {}]} {
# Course Name
if {[empty_string_p $course_name]} {
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/body.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/www/delivery/bottom-oracle.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/www/delivery/bottom-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/delivery/bottom.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/bottom.tcl,v
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/bottom.tcl 5 May 2006 17:00:19 -0000 1.1.2.1
+++ openacs-4/packages/lorsm/www/delivery/bottom.tcl 20 Dec 2006 12:25:43 -0000 1.1.2.1.2.1
@@ -30,21 +30,10 @@
set item_list [lorsm::get_item_list $man_id $user_id]
-set last_item_viewed [db_string select_last_item_viewed {
- 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.ims_item_id
- and i.org_id = o.org_id
- and o.man_id = :man_id
- order by v.last_viewed desc
- limit 1
-} -default "no_item"]
+set last_item_viewed [db_string select_last_item_viewed {} -default "no_item"]
set first_item_id [lindex $item_list 0]
-set first_item_url ""
+set first_item_url ""
set curr_index [expr [lsearch -exact $item_list $last_item_viewed]]
set prev_item_id [lindex $item_list [expr $curr_index - 1]]
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/delivery-no-index-body-oracle.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/www/delivery/delivery-no-index-body-postgresql.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/www/delivery/delivery-no-index-body.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-body.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-no-index-body.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/delivery/delivery-no-index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/delivery-no-index.adp,v
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/delivery-no-index.adp 5 May 2006 17:00:19 -0000 1.1.2.1
+++ openacs-4/packages/lorsm/www/delivery/delivery-no-index.adp 20 Dec 2006 12:25:44 -0000 1.1.2.1.2.1
@@ -1,18 +1,7 @@
-
-
-
-#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@
-
-
- #lorsm.Start#
-
-
+
\ 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.2.1 -r1.4.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/index.tcl 5 May 2006 17:00:19 -0000 1.4.2.1
+++ openacs-4/packages/lorsm/www/delivery/index.tcl 20 Dec 2006 12:25:44 -0000 1.4.2.1.2.1
@@ -46,20 +46,7 @@
}
# Get the course name
-if {[db_0or1row manifest "
- select
- cp.course_name,
- cp.fs_package_id,
- isscorm,
- pf.folder_name,
- pf.format_name
- from
- ims_cp_manifests cp,
- lorsm_course_presentation_formats pf
- where
- cp.man_id = :man_id
- and cp.parent_man_id = 0
- and cp.course_presentation_format = pf.format_id "]} {
+if {[db_0or1row manifest {}]} {
# Course Name
if {[empty_string_p $course_name]} {
@@ -81,6 +68,8 @@
ad_set_client_property lorsm currentcourse $man_id
+ns_log Debug "lorsm: folder_name $folder_name"
+
if {[lorsm::track::istrackable -course_id $man_id -package_id $package_id]} {
set track_id [lorsm::track::new \
-user_id $user_id \
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/index.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/delivery/menu-mk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/menu-mk.tcl,v
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/menu-mk.tcl 5 May 2006 17:00:19 -0000 1.1.2.1
+++ openacs-4/packages/lorsm/www/delivery/menu-mk.tcl 20 Dec 2006 12:25:44 -0000 1.1.2.1.2.1
@@ -1,4 +1,4 @@
-# packages/lorsm/www/delivery/index.tcl
+# packages/lorsm/www/delivery/menu-mk.tcl
ad_page_contract {
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/menu-oracle.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/www/delivery/menu-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/delivery/menu.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/menu.xql,v
diff -u -r1.1 -r1.1.4.1
--- openacs-4/packages/lorsm/www/delivery/menu.xql 17 May 2005 17:23:27 -0000 1.1
+++ openacs-4/packages/lorsm/www/delivery/menu.xql 20 Dec 2006 12:25:44 -0000 1.1.4.1
@@ -1,36 +1,6 @@
-
-
- SELECT
- i.parent_item,
- i.ims_item_id,
- i.item_title as item_title
- FROM
- 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
- $extra_query
- 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
- where p.object_id = i.ims_item_id
- and p.party_id = :user_id
- and p.privilege = 'read')
-
- ORDER BY
- i.sort_order, o.object_id, cr.tree_sortkey
-
-
-
select
@@ -42,24 +12,6 @@
-
-
- select
- org.org_id,
- org.org_title as org_title,
- org.hasmetadata,
- tree_level(o.tree_sortkey) as indent
- from
- ims_cp_organizations org, acs_objects o
- where
- org.org_id = o.object_id
- and
- man_id = :man_id
- order by
- org_id
-
-
-
select
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/servlet-oracle.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/www/delivery/servlet-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/delivery/servlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/servlet.tcl,v
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/servlet.tcl 5 May 2006 17:00:19 -0000 1.1.2.1
+++ openacs-4/packages/lorsm/www/delivery/servlet.tcl 20 Dec 2006 12:25:44 -0000 1.1.2.1.2.1
@@ -94,30 +94,7 @@
ns_log $level "SCORM called with no track id for current session (istrackable is off): try to fetch one"
#here track id was not set (course is not lors-trackable)
#we should first try to see if we find an already open track in lorsm.track
- if { ! [ db_0or1row isanysuspendedsession "
- select lorsm.track_id as track_id from lorsm_student_track lorsm, lorsm_cmi_core cmi
- where
- lorsm.user_id = $user_id
- and
- lorsm.community_id = $community_id
- and
- lorsm.course_id = $currentcourse
- and
- lorsm.track_id = cmi.track_id
- and
- not (
- cmi.lesson_status = 'completed'
- or
- cmi.lesson_status = 'passed'
- )
- and
- cmi.man_id = $currentcourse
- and
- cmi.item_id = $currentpage
- order by
- lorsm.track_id desc
- limit 1
- " ] } { #faccio un nuovo trackid
+ if { ! [ db_0or1row isanysuspendedsession "" ] } { #faccio un nuovo trackid
#we create a new track which is going to be the new 'master track' for this cmi data set
set currenttrackid [lorsm::track::new \
-user_id $user_id \
@@ -138,58 +115,26 @@
} else {
ns_log $level "SCORM called with track id for current session (=$lorsmstudenttrack) (istrackable is on): going to check whether to create a lorsm_cmi_core new track"
#now we look for the existance of a lorsm.cmi.core track id for this user / course / class which is still not completed
- if { ! [ db_0or1row isanysuspendedsession "
- select lorsm.track_id as track_id from lorsm_student_track lorsm, lorsm_cmi_core cmi
- where
- lorsm.user_id = $user_id
- and
- lorsm.community_id = $community_id
- and
- lorsm.course_id = $currentcourse
- and
- lorsm.track_id = cmi.track_id
- and
- not (
- cmi.lesson_status = 'completed'
- or
- cmi.lesson_status = 'passed'
- )
- and
- cmi.man_id = $currentcourse
- and
- cmi.item_id = $currentpage
- order by
- lorsm.track_id desc
- limit 1
- " ] } {
+ if { ! [ db_0or1row isanysuspendedsession "" ] } {
set currenttrackid $lorsmstudenttrack
} else {
set currenttrackid $track_id
}
}
#in any case at this stage track_id is currentely set to the value it should have in lorsm_cmi_core (disregarding if we have still to create it)
- if { ! [ db_0or1row istherealready "select * from lorsm_cmi_core where track_id = :currenttrackid "]} {
+ if { ! [ db_0or1row istherealready ""]} {
ns_log $level "SCORM Inserting track id in lorsm_cmi_core: value will be $currenttrackid"
ns_log $level "SCORM I now have a track_id=$currenttrackid but i cannot find no corresponding record in lorsm_cmi_core "
#get initialization data from manifest data already imported
- db_0or1row get_adlcp_student_data { select datafromlms,maxtimeallowed,timelimitaction,masteryscore from ims_cp_items where ims_item_id=:currentpage; }
+ db_0or1row get_adlcp_student_data1 {}
ns_log $level "SCORM data for lorsm_cmi_student_data is $datafromlms, $maxtimeallowed, $timelimitaction, $masteryscore"
#
- db_dml lmsinitialize { insert into lorsm_cmi_core(track_id,man_id,item_id,student_id,student_name,lesson_location,
- lesson_status,
- launch_data,
- comments,comments_from_lms, session_time, total_time, time_stamp)
- values(:currenttrackid,:currentcourse,:currentpage,:username,:name,:currentcourse,
- 'not attempted',
- :datafromlms,
- '','commenti da lors',0,0,CURRENT_TIMESTAMP) }
- db_dml lmsinitialize { insert into lorsm_cmi_student_data(track_id,student_id,max_time_allowed,time_limit_action,mastery_score)
- values(:currenttrackid,:username,:maxtimeallowed,:timelimitaction,:masteryscore)
- }
+ db_dml lmsinitialize1 {}
+ db_dml lmsinitialize2 {}
ad_set_client_property lorsm currenttrackid $currenttrackid
- db_1row istherealready "select * from lorsm_cmi_core where track_id = :currenttrackid"
+ db_1row istherealready ""
#AURALOG HACK
#adjust on a per-server basis
@@ -206,7 +151,7 @@
} else {
ad_set_client_property lorsm currenttrackid $currenttrackid
#retrieve data other than core
- db_0or1row get_adlcp_student_data { select max_time_allowed ,time_limit_action ,mastery_score from lorsm_cmi_student_data where track_id=:currenttrackid; }
+ db_0or1row get_adlcp_student_data2 {}
#
# THIS CHECK is somehow just a previous bug catcher, shouldn't actually be needed
if { [db_resultrows] == 1 } {
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery/servlet.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/lorsm/www/delivery/view/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/view/index-oracle.xql,v
diff -u -r1.1 -r1.1.6.1
--- openacs-4/packages/lorsm/www/delivery/view/index-oracle.xql 4 Sep 2004 14:51:26 -0000 1.1
+++ openacs-4/packages/lorsm/www/delivery/view/index-oracle.xql 20 Dec 2006 12:25:44 -0000 1.1.6.1
@@ -5,11 +5,18 @@
-
- select content_template.get_root_folder from dual
-
+ select content_template.get_root_folder from dual
+
+
+ begin
+ :1 := content_item.get_id(:url, :content_root, 'f');
+ end;
+
+
+
+
Index: openacs-4/packages/lorsm/www/delivery/view/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery/view/index.xql,v
diff -u -r1.1.2.1 -r1.1.2.1.2.1
--- openacs-4/packages/lorsm/www/delivery/view/index.xql 30 May 2006 18:05:04 -0000 1.1.2.1
+++ openacs-4/packages/lorsm/www/delivery/view/index.xql 20 Dec 2006 12:25:44 -0000 1.1.2.1.2.1
@@ -7,11 +7,21 @@
-
+
+
select fs_package_id, folder_id
from ims_cp_manifests
where man_id = :man_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;
+
+
+
\ No newline at end of file