Index: openacs-4/packages/user-tracking/user-tracking.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/user-tracking.info,v diff -u -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/user-tracking/user-tracking.info 28 Jun 2005 09:27:29 -0000 1.3.2.1 +++ openacs-4/packages/user-tracking/user-tracking.info 25 Oct 2005 00:44:42 -0000 1.3.2.2 @@ -1,4 +1,4 @@ - + @@ -8,21 +8,21 @@ f user-tracking - + David Ortega Sergio González Pablo Arozarena Package for user tracking - 2005-06-27 + 2005-04-12 E-lane The purpose behind this development is to ensure we track and retrieve knowledge about how end users are making use of the system. The main objective of this package will be to track user behaviour and activities, so that Professors and administrators can use this to understand how the system is used and make improvements in the learning process. - + - - + + Index: openacs-4/packages/user-tracking/catalog/user-tracking.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/catalog/user-tracking.en_US.ISO-8859-1.xml,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/user-tracking/catalog/user-tracking.en_US.ISO-8859-1.xml 27 Apr 2005 15:54:21 -0000 1.5 +++ openacs-4/packages/user-tracking/catalog/user-tracking.en_US.ISO-8859-1.xml 25 Oct 2005 00:44:42 -0000 1.5.2.1 @@ -156,10 +156,7 @@ User Name Users Statistics User Tracking access package - UserTracking Administration User Tracking Home - UserTracking Managment - User Tracking Users Visits by user Have an Admin role: %NofAdmin% Index: openacs-4/packages/user-tracking/catalog/user-tracking.es_ES.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/catalog/user-tracking.es_ES.ISO-8859-1.xml,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/user-tracking/catalog/user-tracking.es_ES.ISO-8859-1.xml 27 Apr 2005 15:54:21 -0000 1.5 +++ openacs-4/packages/user-tracking/catalog/user-tracking.es_ES.ISO-8859-1.xml 25 Oct 2005 00:44:42 -0000 1.5.2.1 @@ -156,10 +156,7 @@ Nombre de usuario Estad�sticas de usuarios Acceso al paquete de User Tracking - Administrando UserTracking User Tracking - Manejor de UserTracking - User Tracking Usuarios Visitas por usuario Participan como Administradores: %NofAdmin% Index: openacs-4/packages/user-tracking/tcl/user-tracking-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/tcl/user-tracking-procs.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/user-tracking/tcl/user-tracking-procs.tcl 28 Jun 2005 09:27:30 -0000 1.2.2.1 +++ openacs-4/packages/user-tracking/tcl/user-tracking-procs.tcl 25 Oct 2005 00:44:43 -0000 1.2.2.2 @@ -85,7 +85,8 @@ 4 { set site_p 1} } } - set binPerl [parameter::get -parameter "PerlPath"] + set binPerl [parameter::get -parameter "PerlPath" -default "/usr/bin/perl" ] + ns_log notice "LEIDO $binPerl" if {[exists_and_not_null all_users_p]} { @@ -94,7 +95,9 @@ db_foreach user "select user_id from cc_users" { ns_log notice "USER: $user_id" set execAnalyzer [list "$binPerl" "[user-tracking::get_user_tracking_dir]/www/awstats/cgi-bin/awstats_dotlrn.pl" "-config=site" "-update" "-onlyusers=$user_id"] + ns_log notice $execAnalyzer catch {exec [lindex $execAnalyzer 0] [lindex $execAnalyzer 1] [lindex $execAnalyzer 2] [lindex $execAnalyzer 3] [lindex $execAnalyzer 4]} aux + ns_log notice $aux } } if {[exists_and_not_null all_communities_p]} { Index: openacs-4/packages/user-tracking/www/loading.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/loading.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/user-tracking/www/loading.tcl 28 Jun 2005 09:27:30 -0000 1.1.2.2 +++ openacs-4/packages/user-tracking/www/loading.tcl 25 Oct 2005 00:44:43 -0000 1.1.2.3 @@ -21,19 +21,21 @@ set onlyuser [string trimleft $onlyuser " "] } -if { [string length $month] == 1} { - set month "0${month}" -} -set logs [ns_config "ns/server/[ns_info server]/module/nslog" file] -set patron "(.*)([ns_info server]\.log$)" +set logs [ns_config "ns/server/[ns_info server]/module/nslog" file] +set patron "(.*)([ns_info server]\.log$)" regexp $patron $logs all logdir part2 ] ns_log notice "LOGDIR=$logdir" set todayyear [template::util::date::get_property year [template::util::date::today]] set todaymonth [template::util::date::get_property month [template::util::date::today]] set todayday [template::util::date::get_property day [template::util::date::today]] +if { [string length $month] == 2} { + if { [string index $month 0] == 0} { + set month [string index $month 1] + } +} if {$month < 12} { set nextmonth [expr $month +1] set nextyear $year @@ -44,6 +46,9 @@ if { [string length $nextmonth] == 1} { set nextmonth "0${nextmonth}" } + if { [string length $month] == 1} { + set month "0${month}" + } if {[exists_and_not_null LastTime]} { set campos [split $LastTime "/-"] @@ -62,10 +67,10 @@ append expresion ",$x" } append expresion "\]" - set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log |" + set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logs}.$year-$month-${expresion}* ${logs} |" ns_log notice $logresolvemerge } else { - set logresolvemerge "-LogFile=${logdir}elane.log" + set logresolvemerge "-LogFile=${logs}" } } else { if {[expr $lastday + 1] <= [template::util::date::get_property days_in_month "$lastyear$lastmonth"] } { @@ -75,29 +80,32 @@ } append expresion "\]" ns_log notice $expresion - set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log.$nextyear-$nextmonth-01* |" + set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logs}.$year-$month-${expresion}* ${logs}.$nextyear-$nextmonth-01* |" ns_log notice $logresolvemerge } } } else { set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl " - append logresolvemerge " ${logdir}elane.log.$year-$month-0\[2-9\]* " - append logresolvemerge " ${logdir}elane.log.$year-$month-1\[0-9\]* " - append logresolvemerge " ${logdir}elane.log.$year-$month-2\[0-9\]* " - append logresolvemerge " ${logdir}elane.log.$year-$month-3\[0-1\]* " - append logresolvemerge " ${logdir}elane.log.$nextyear-$nextmonth-01* " + append logresolvemerge " ${logs}.$year-$month-0\[2-9\]* " + append logresolvemerge " ${logs}.$year-$month-1\[0-9\]* " + append logresolvemerge " ${logs}.$year-$month-2\[0-9\]* " + append logresolvemerge " ${logs}.$year-$month-3\[0-1\]* " + append logresolvemerge " ${logs}.$nextyear-$nextmonth-01* " + if { [string length $todaymonth] == 1} { + set todaymonth "0${todaymonth}" + } if {$month == $todaymonth} { - append logresolvemerge " ${logdir}elane.log |" + append logresolvemerge " ${logs} |" } else { append logresolvemerge " |" } } -ad_progress_bar_begin \ - -title "" \ - -message_1 "#user-tracking.updating_datafile#" \ - -message_2 "#user-tracking.we_will_continue#" - +ad_progress_bar_begin \ + -title "" \ + -message_1 "#user-tracking.updating_datafile#" \ + -message_2 "#user-tracking.we_will_continue#" + ns_write "

$message

" set binPerl [parameter::get -parameter "PerlPath"] Index: openacs-4/packages/user-tracking/www/loading2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/loading2.tcl,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/user-tracking/www/loading2.tcl 28 Jun 2005 09:27:30 -0000 1.1.2.2 +++ openacs-4/packages/user-tracking/www/loading2.tcl 25 Oct 2005 00:44:43 -0000 1.1.2.3 @@ -14,8 +14,10 @@ aux:onevalue } -if { [string length $month] == 1} { - set month "0${month}" +if { [string length $month] == 2} { + if { [string index $month 0] == 0} { + set month [string index $month 1] + } } if {$month < 12} { @@ -28,9 +30,11 @@ if { [string length $nextmonth] == 1} { set nextmonth "0${nextmonth}" } - -set logs [ns_config "ns/server/[ns_info server]/module/nslog" file] -set patron "(.*)([ns_info server]\.log$)" + if { [string length $month] == 1} { + set month "0${month}" + } +set logs [ns_config "ns/server/[ns_info server]/module/nslog" file] +set patron "(.*)([ns_info server]\.log$)" regexp $patron $logs all logdir part2 ] set message "[_ user-tracking.updating_statistics]" @@ -58,10 +62,10 @@ append expresion ",$x" } append expresion "\]" - set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log |" + set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logs}.$year-$month-${expresion}* ${logs} |" ns_log notice $logresolvemerge } else { - set logresolvemerge "-LogFile=${logdir}elane.log" + set logresolvemerge "-LogFile=${logs}" } } else { if {[expr $lastday + 1] <= [template::util::date::get_property days_in_month "$lastyear$lastmonth"] } { @@ -71,17 +75,17 @@ } append expresion "\]" ns_log notice $expresion - set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log.$nextyear-$nextmonth-01* |" + set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logs}.$year-$month-${expresion}* ${logs}.$nextyear-$nextmonth-01* |" ns_log notice $logresolvemerge } } } -ad_progress_bar_begin \ - -title "" \ - -message_1 "#user-tracking.updating_datafile#" \ - -message_2 "#user-tracking.we_will_continue#" - +ad_progress_bar_begin \ + -title "" \ + -message_1 "#user-tracking.updating_datafile#" \ + -message_2 "#user-tracking.we_will_continue#" + ns_write "

$message

" set aux ""