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.6 -r1.7 --- openacs-4/packages/lorsm/lib/user-lorsm.tcl 21 Apr 2005 16:03:52 -0000 1.6 +++ openacs-4/packages/lorsm/lib/user-lorsm.tcl 26 Apr 2005 08:56:23 -0000 1.7 @@ -17,6 +17,9 @@ #set package_id $list_of_packages_ids +# link_url_eval {[site_node::get_url_from_object_id -object_id $lorsm_instance_id]${folder_name}/?[export_vars man_id]} +# link_html {title "[_ lorsm.Access_Course]" target "_blank"} + template::list::create \ -name d_courses \ @@ -28,10 +31,8 @@ -elements { course_name { label "[_ lorsm.Course_Name_1]" - display_col course_name + display_template {@d_courses.course_url;noquote@} html { width 70% } - link_url_eval {[site_node::get_url_from_object_id -object_id $lorsm_instance_id]${folder_name}/?[export_vars man_id]} - link_html {title "[_ lorsm.Access_Course]"} } subject { label "[_ lorsm.Subject]" @@ -56,7 +57,7 @@ foreach package $package_id { - db_multirow -extend { ims_md_id last_viewed total_item_count viewed_item_count viewed_percent delivery_folder} -append d_courses select_d_courses { + db_multirow -extend { ims_md_id last_viewed total_item_count viewed_item_count viewed_percent course_url } -append d_courses select_d_courses { select cp.man_id, cp.course_name, @@ -67,6 +68,7 @@ acs.creation_user, acs.creation_date, pf.folder_name, + pf.format_name, acs.context_id, cpmc.community_id, cpmc.lorsm_instance_id @@ -86,6 +88,11 @@ order by acs.creation_date desc } { set ims_md_id $man_id + if { [string eq $format_name "default"] } { + set course_url "$course_name" + } else { + set course_url "$course_name" + } # DEDS: these are expensive # and for demo purposes only Index: openacs-4/packages/lorsm/templates/lorsm-no-index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/templates/lorsm-no-index.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lorsm/templates/lorsm-no-index.tcl 22 Apr 2005 09:10:55 -0000 1.2 +++ openacs-4/packages/lorsm/templates/lorsm-no-index.tcl 26 Apr 2005 08:56:24 -0000 1.3 @@ -2,6 +2,7 @@ # The detected content type is "content_revision". lorsm::get_content content_revision +set user_id [ad_conn user_id] if { [info exists content(item_id)] } { if { ![string equal -length 4 "text" $content(mime_type)] } { @@ -38,7 +39,6 @@ and i.org_id = o.org_id }] } { # record view - set user_id [ad_conn user_id] set item_list [lorsm::get_item_list $man_id $user_id] set litem_list [llength $item_list] @@ -63,10 +63,38 @@ set viewed_item_id [lindex $item_list [expr [lsearch -exact $item_list $viewed_item_id] - 1]] } lorsm::record_view $viewed_item_id $man_id + + # Student tracking + set package_id [ad_conn package_id] + set community_id [dotlrn_community::get_community_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] + lorsm::track::exit -track_id $track_id + } + + # refresh the page every 300 seconds so we can have an estimate of the time when the user viewed the course for the last time + if { ![regsub -nocase {<\/head>} $text { + + + } text] } { + regsub -nocase {} $text { + +
+ + + } text + } } # parent window regsub -all -nocase {target=[^ |^>]+} $text {target="_parent"} text + + } ad_return_template Index: openacs-4/packages/lorsm/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/index.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/lorsm/www/index.tcl 21 Apr 2005 16:03:53 -0000 1.5 +++ openacs-4/packages/lorsm/www/index.tcl 26 Apr 2005 08:56:24 -0000 1.6 @@ -46,10 +46,8 @@ -elements { course_name { label "[_ lorsm.Available_Courses]" + display_template {@d_courses.course_url;noquote@} display_col course_name - link_url_eval {${folder_name}/?[export_vars man_id]} - link_html {title "[_ lorsm.Access_Course]"} - } hasmetadata { label "[_ lorsm.Metadata_1]" @@ -97,7 +95,7 @@ } -db_multirow -extend { ims_md_id } d_courses select_d_courses { +db_multirow -extend { ims_md_id course_url } d_courses select_d_courses { select cp.man_id, cp.course_name, @@ -116,6 +114,7 @@ acs.creation_user, acs.creation_date, pf.folder_name, + pf.format_name, acs.context_id, case when cpmc.isenabled = 't' then 'Enabled' @@ -139,5 +138,10 @@ order by acs.creation_date desc } { set ims_md_id $man_id + if { [string eq $format_name "default"] } { + set course_url "$course_name" + } else { + set course_url "$course_name" + } } Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery-no-index/body.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/lorsm/www/delivery-no-index/body.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lorsm/www/delivery-no-index/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/www/delivery-no-index/index.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lorsm/www/delivery-no-index/index.adp 22 Apr 2005 09:10:55 -0000 1.1 +++ openacs-4/packages/lorsm/www/delivery-no-index/index.adp 26 Apr 2005 08:56:24 -0000 1.2 @@ -1,8 +1,18 @@ - - --
+ #lorsm.Your_Stats# ++ #lorsm.lt_The_last_page_you_vie# @last_page_viewed;noquote@ +