lilalo
changeset 84:2cb912bff2ea
* В журнале выводится имя курса, а не только его код
* Исправлена ошибка с фильтром при чтении журнала из XML-репозитория
Теперь всё ок
* Исправлена ошибка с фильтром при чтении журнала из XML-репозитория
Теперь всё ок
author | devi |
---|---|
date | Sat Feb 25 08:02:25 2006 +0200 (2006-02-25) |
parents | bdc1f02d3f87 |
children | 3f92cd706473 |
files | l3-agent l3-cgi l3-frontend l3config.pm |
line diff
1.1 --- a/l3-agent Fri Feb 24 18:43:35 2006 +0200 1.2 +++ b/l3-agent Sat Feb 25 08:02:25 2006 +0200 1.3 @@ -279,6 +279,9 @@ 1.4 #Загруженную информацию сразу же отправляем в поток 1.5 print_session($Config{cache}, $local_session_id); 1.6 } 1.7 + else { 1.8 + die "can't open session file"; 1.9 + } 1.10 } 1.11 1.12 open (FILE, "$file"); 1.13 @@ -581,10 +584,12 @@ 1.14 @Command_Lines_Index = sort { 1.15 defined($Command_Lines[$index[$a]]->{"time"}) 1.16 ? $Command_Lines[$index[$a]]->{"time"} <=> $Command_Lines[$index[$b]]->{"time"} 1.17 - : $Command_Lines[$index[$a]]->{"day"} cmp $Command_Lines[$index[$b]]->{"day"} 1.18 + : defined($Command_Lines[$index[$a]]->{"day"}) 1.19 + ? $Command_Lines[$index[$a]]->{"day"} cmp $Command_Lines[$index[$b]]->{"day"} 1.20 || $Command_Lines[$index[$a]]->{"hour"} <=> $Command_Lines[$index[$b]]->{"hour"} 1.21 || $Command_Lines[$index[$a]]->{"min"} <=> $Command_Lines[$index[$b]]->{"min"} 1.22 || $Command_Lines[$index[$a]]->{"sec"} <=> $Command_Lines[$index[$b]]->{"sec"} 1.23 + : 0 1.24 } @index; 1.25 1.26 print "finished\n" if $Config{"verbose"} =~ /y/; 1.27 @@ -738,12 +743,16 @@ 1.28 my $local_session_id = $_[1]; 1.29 return if not defined($Sessions{$local_session_id}); 1.30 1.31 + print "printing session info. session id = ".$local_session_id."\n" 1.32 + if $Config{verbose} =~ /y/; 1.33 + 1.34 open(OUT, ">>", $output_filename) 1.35 or die "Can't open $output_filename for writing\n"; 1.36 print OUT "<session>\n"; 1.37 my %session = %{$Sessions{$local_session_id}}; 1.38 for my $key (keys %session) { 1.39 - print OUT "<$key>".$session{$key}."</$key>\n" 1.40 + print OUT "<$key>".$session{$key}."</$key>\n"; 1.41 + print " ".$key,"\n"; 1.42 } 1.43 print OUT "</session>\n"; 1.44 close(OUT);
2.1 --- a/l3-cgi Fri Feb 24 18:43:35 2006 +0200 2.2 +++ b/l3-cgi Sat Feb 25 08:02:25 2006 +0200 2.3 @@ -6,16 +6,16 @@ 2.4 use utf8; 2.5 2.6 BEGIN { 2.7 - chdir("/home/devi/cvs/lilalo"); 2.8 - require l3config; 2.9 - l3config::init_config(); 2.10 + chdir("/home/devi/cvs/lilalo"); 2.11 + require l3config; 2.12 + l3config::init_config(); 2.13 }; 2.14 2.15 my %filter; 2.16 2.17 for my $key (qw(login_from local_session_id)) { 2.18 - $filter{$key} = param($key) if param($key); 2.19 - $filter{$key} = $ENV{$key} if defined $ENV{$key}; 2.20 + $filter{$key} = param($key) if param($key); 2.21 + $filter{$key} = $ENV{$key} if defined $ENV{$key}; 2.22 } 2.23 2.24 my %Trainings; 2.25 @@ -23,7 +23,7 @@ 2.26 my %Machines; 2.27 my $print = ""; 2.28 2.29 -$l3config::Config{cgi2file} = $ENV{cgi2file} if defined($ENV{cgi2file}); 2.30 +$l3config::Config{cgi2file} = $ENV{cgi2file} if defined($ENV{cgi2file}); 2.31 $ENV{PATH_INFO} = $l3config::Config{cgi_path_info} if $l3config::Config{cgi_path_info}; 2.32 2.33 my $is_not_cgi=""; 2.34 @@ -39,87 +39,93 @@ 2.35 sub load_training 2.36 { 2.37 my $training_file; 2.38 - 2.39 - $training_file = $l3config::Config{"path_classes"}.$_[0].$l3config::Config{"class_suffix"} if $_[0]; 2.40 + 2.41 + $training_file = $l3config::Config{"path_classes"}.$_[0].$l3config::Config{"class_suffix"} if $_[0]; 2.42 $training_file ||= $l3config::Config{"classfile"} || 2.43 $l3config::Config{"path_classes"}.$l3config::Config{"class"}.$l3config::Config{"class_suffix"}; 2.44 2.45 my $XMLTraining = XMLin($training_file , ForceArray => [ 'student' ] ) 2.46 or die "Can't open file of the training ",$training_file,"\n"; 2.47 2.48 + my $course_file = $l3config::Config{"courses_path"}.$XMLTraining->{"course"}.".xml"; 2.49 + my $XMLCourse; 2.50 + if (eval{$XMLCourse = XMLin($course_file)}) { 2.51 + $XMLTraining->{"course-name"} = $XMLCourse->{"fullname"}; 2.52 + } 2.53 + 2.54 for my $student (@{$XMLTraining->{"student"}}) { 2.55 - $XMLTraining->{host}->{$student->{"host"}}=$student; 2.56 + $XMLTraining->{host}->{$student->{"host"}}=$student; 2.57 } 2.58 - return $XMLTraining; 2.59 + return $XMLTraining; 2.60 } 2.61 2.62 2.63 2.64 if ($ENV{PATH_INFO} eq "/index") { 2.65 - # Показываем индекс курсов 2.66 - my @training_files = glob($l3config::Config{"path_classes"}."/2*".$l3config::Config{"class_suffix"}); 2.67 - if (@training_files) { 2.68 - for my $training_file (@training_files) { 2.69 - $training_file =~ s@.*/@@; 2.70 - $training_file =~ s@$l3config::Config{"class_suffix"}$@@; 2.71 - my $training = load_training($training_file); 2.72 - $Trainings{$training->{"date"}}=$training; 2.73 - } 2.74 - $print .= "<html>\n"; 2.75 - $print .= "<head>\n"; 2.76 - $print .= "<title>Журналы лабораторных работ</title>\n"; 2.77 - $print .= "</head>\n"; 2.78 - $print .= "<body>\n"; 2.79 - $print .= "<table>\n"; 2.80 - for my $tdate (reverse sort keys %Trainings) { 2.81 - my $t = $Trainings{$tdate}; 2.82 - $print .= "<tr>"; 2.83 - $print .= "<td>".$t->{date}."</td>"; 2.84 - $print .= "<td>".$t->{course}."</td>"; 2.85 - $print .= "</tr>\n"; 2.86 - $print .= "<tr>"; 2.87 - $print .= "<td/>"; 2.88 - $print .= "<td><pre>"; 2.89 - for my $host (sort keys %{$t->{host}}) { 2.90 - my $h = $t->{host}->{$host}; 2.91 - $print .= "$host"; 2.92 - $print .= " ".$h->{firstname}." ".$h->{surname}." "; 2.93 - $print .= " ".$h->{company}." "; 2.94 - $print .= "<a href='/cgi-bin/l3/".$tdate."/".$host."/root'>root</a> "; 2.95 - $print .= "<a href='/cgi-bin/l3/".$tdate."/".$host."/".$h->{user}."'>".$h->{user}."</a> "; 2.96 - $print .= "\n"; 2.97 - } 2.98 - $print .= "</pre><td>"; 2.99 - $print .= "</tr>\n"; 2.100 - } 2.101 - $print .= "</table>\n"; 2.102 - $print .= "</body>\n"; 2.103 - $print .= "</html>\n"; 2.104 - } 2.105 - else { 2.106 - $print .= "No training-files found<br/>\n"; 2.107 - $print .= "Template to load files: ".$l3config::Config{"path_classes"}."*".$l3config::Config{"class_suffix"}."\n" 2.108 - } 2.109 + # Показываем индекс курсов 2.110 + my @training_files = glob($l3config::Config{"path_classes"}."/2*".$l3config::Config{"class_suffix"}); 2.111 + if (@training_files) { 2.112 + for my $training_file (@training_files) { 2.113 + $training_file =~ s@.*/@@; 2.114 + $training_file =~ s@$l3config::Config{"class_suffix"}$@@; 2.115 + my $training = load_training($training_file); 2.116 + $Trainings{$training->{"date"}}=$training; 2.117 + } 2.118 + $print .= "<html>\n"; 2.119 + $print .= "<head>\n"; 2.120 + $print .= "<title>Журналы лабораторных работ</title>\n"; 2.121 + $print .= "</head>\n"; 2.122 + $print .= "<body>\n"; 2.123 + $print .= "<table>\n"; 2.124 + for my $tdate (reverse sort keys %Trainings) { 2.125 + my $t = $Trainings{$tdate}; 2.126 + $print .= "<tr>"; 2.127 + $print .= "<td>".$t->{date}."</td>"; 2.128 + $print .= "<td>".$t->{course}."</td>"; 2.129 + $print .= "</tr>\n"; 2.130 + $print .= "<tr>"; 2.131 + $print .= "<td/>"; 2.132 + $print .= "<td><pre>"; 2.133 + for my $host (sort keys %{$t->{host}}) { 2.134 + my $h = $t->{host}->{$host}; 2.135 + $print .= "$host"; 2.136 + $print .= " ".$h->{firstname}." ".$h->{surname}." "; 2.137 + $print .= " ".$h->{company}." "; 2.138 + $print .= "<a href='/cgi-bin/l3/".$tdate."/".$host."/root'>root</a> "; 2.139 + $print .= "<a href='/cgi-bin/l3/".$tdate."/".$host."/".$h->{user}."'>".$h->{user}."</a> "; 2.140 + $print .= "\n"; 2.141 + } 2.142 + $print .= "</pre><td>"; 2.143 + $print .= "</tr>\n"; 2.144 + } 2.145 + $print .= "</table>\n"; 2.146 + $print .= "</body>\n"; 2.147 + $print .= "</html>\n"; 2.148 + } 2.149 + else { 2.150 + $print .= "No training-files found<br/>\n"; 2.151 + $print .= "Template to load files: ".$l3config::Config{"path_classes"}."*".$l3config::Config{"class_suffix"}."\n" 2.152 + } 2.153 } 2.154 elsif ($ENV{PATH_INFO} eq "/current") { 2.155 - open (FRONTEND, "./l3-frontend --output - --show_comments no --frontend_css $l3config::Config{frontend_css}|"); 2.156 - binmode FRONTEND, ":utf8"; 2.157 - while (<FRONTEND>) { 2.158 - $print .= $_; 2.159 - } 2.160 - close(FRONTEND); 2.161 + open (FRONTEND, "./l3-frontend --output - --show_comments no --frontend_css $l3config::Config{frontend_css}|"); 2.162 + binmode FRONTEND, ":utf8"; 2.163 + while (<FRONTEND>) { 2.164 + $print .= $_; 2.165 + } 2.166 + close(FRONTEND); 2.167 } 2.168 else { 2.169 - # Вызов производится по URL 2.170 - $ENV{PATH_INFO} = "/".$ENV{PATH_INFO} unless $ENV{PATH_INFO} =~ m@^/@; 2.171 - my ($skip, $training, $host, $user) = split /\//,$ENV{PATH_INFO},4; 2.172 + # Вызов производится по URL 2.173 + $ENV{PATH_INFO} = "/".$ENV{PATH_INFO} unless $ENV{PATH_INFO} =~ m@^/@; 2.174 + my ($skip, $training, $host, $user) = split /\//,$ENV{PATH_INFO},4; 2.175 2.176 - if (!$host || $host eq "index") { 2.177 - # Нам неизвестен курс или явно указан просмотр индекса 2.178 - # Просматриваем его 2.179 + if (!$host || $host eq "index") { 2.180 + # Нам неизвестен курс или явно указан просмотр индекса 2.181 + # Просматриваем его 2.182 2.183 - my $t = load_training($training); 2.184 - $training ||= "current"; 2.185 + my $t = load_training($training); 2.186 + $training ||= "current"; 2.187 2.188 my $prefix = "/cgi-bin/l3/$training/"; 2.189 my $suffix = ""; 2.190 @@ -130,52 +136,50 @@ 2.191 my $path = $to_file; 2.192 $path = "" unless $path =~ s@/[^/]*$@@; 2.193 2.194 - $print .= "<html>\n"; 2.195 - $print .= "<head>\n"; 2.196 - $print .= "<title>Журналы лабораторных работ</title>\n"; 2.197 + $print .= "<html>\n"; 2.198 + $print .= "<head>\n"; 2.199 + $print .= "<title>Журналы лабораторных работ</title>\n"; 2.200 $print .= "<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />"; 2.201 - $print .= "<link rel='stylesheet' href='".$l3config::Config{frontend_css}."' type='text/css'/>\n"; 2.202 - $print .= "</head>\n"; 2.203 - $print .= "<body>\n"; 2.204 - $print .= "<h1>Журналы лабораторных работ</h1>\n"; 2.205 - $print .= "<table>\n"; 2.206 - $print .= "<tr class='table_header'>\n"; 2.207 - $print .= "<td>"."Имя"."</td>"; 2.208 - $print .= "<td>Хост</td>"; 2.209 - $print .= "<td colspan='3'>Пользователь</td>"; 2.210 - $print .= "</tr>\n"; 2.211 - for my $host (sort keys %{$t->{host}}) { 2.212 + $print .= "<link rel='stylesheet' href='".$l3config::Config{frontend_css}."' type='text/css'/>\n"; 2.213 + $print .= "</head>\n"; 2.214 + $print .= "<body>\n"; 2.215 + $print .= "<h1>Журналы лабораторных работ</h1>\n"; 2.216 + $print .= "<table>\n"; 2.217 + $print .= "<tr class='table_header'>\n"; 2.218 + $print .= "<td>"."Имя"."</td>"; 2.219 + $print .= "<td>Хост</td>"; 2.220 + $print .= "<td colspan='3'>Пользователь</td>"; 2.221 + $print .= "</tr>\n"; 2.222 + for my $host (sort keys %{$t->{host}}) { 2.223 + $print .= "<tr>\n"; 2.224 + my $h = $t->{host}->{$host}; 2.225 + $print .= "<td>".$h->{firstname}." ".$h->{surname}."</td>"; 2.226 + $print .= "<td>$host</td>"; 2.227 + $print .= "<td><a href='".$prefix.$host."/root$suffix'>root</a></td>"; 2.228 + $print .= "<td><a href='".$prefix.$host."/".$h->{user}."$suffix'>".$h->{user}."</a></td>"; 2.229 + $print .= "<td><a href='".$prefix.$host."$suffix'>все</a></td>" if not $is_not_cgi; 2.230 + $print .= "</td>\n"; 2.231 + $print .= "</tr>\n"; 2.232 2.233 - 2.234 - $print .= "<tr>\n"; 2.235 - my $h = $t->{host}->{$host}; 2.236 - $print .= "<td>".$h->{firstname}." ".$h->{surname}."</td>"; 2.237 - $print .= "<td>$host</td>"; 2.238 - $print .= "<td><a href='".$prefix.$host."/root$suffix'>root</a></td>"; 2.239 - $print .= "<td><a href='".$prefix.$host."/".$h->{user}."$suffix'>".$h->{user}."</a></td>"; 2.240 - $print .= "<td><a href='".$prefix.$host."$suffix'>все</a></td>" if not $is_not_cgi; 2.241 - $print .= "</td>\n"; 2.242 - $print .= "</tr>\n"; 2.243 - 2.244 - if ($is_not_cgi) { 2.245 - # Это грязный хак 2.246 - # Если мы чувствуем, что нас вызывают для генерения индексного файла, 2.247 - # нам нужно создать и файлы, на которые он указывает 2.248 - # Лучше было бы это сделать хотя бы через вызов функций 2.249 + if ($is_not_cgi) { 2.250 + # Это грязный хак 2.251 + # Если мы чувствуем, что нас вызывают для генерения индексного файла, 2.252 + # нам нужно создать и файлы, на которые он указывает 2.253 + # Лучше было бы это сделать хотя бы через вызов функций 2.254 # Такой же хак чуть ниже 2.255 - mkdir("$path/$host"); 2.256 - system("$0 --cgi2file $path/$prefix$host/root$suffix ". 2.257 - "--cgi_path_info ".$training."/".$host."/root ". 2.258 - "--frontend_css ../$l3config::Config{frontend_css}"); 2.259 - system("$0 --cgi2file $path/$prefix$host/".$h->{user}."$suffix ". 2.260 - "--cgi_path_info ".$training."/".$host."/".$h->{user}." ". 2.261 - "--frontend_css ../$l3config::Config{frontend_css}"); 2.262 - # system("$0 --cgi2file $path/$prefix$host$suffix ". 2.263 - # "--cgi_path_info ".$training."/".$host." ". 2.264 - # "--frontend_css ../$l3config::Config{frontend_css}"); 2.265 - } 2.266 - 2.267 - } 2.268 + mkdir("$path/$host"); 2.269 + system("$0 --cgi2file $path/$prefix$host/root$suffix ". 2.270 + "--cgi_path_info ".$training."/".$host."/root ". 2.271 + "--frontend_css ../$l3config::Config{frontend_css}"); 2.272 + system("$0 --cgi2file $path/$prefix$host/".$h->{user}."$suffix ". 2.273 + "--cgi_path_info ".$training."/".$host."/".$h->{user}." ". 2.274 + "--frontend_css ../$l3config::Config{frontend_css}"); 2.275 + # system("$0 --cgi2file $path/$prefix$host$suffix ". 2.276 + # "--cgi_path_info ".$training."/".$host." ". 2.277 + # "--frontend_css ../$l3config::Config{frontend_css}"); 2.278 + } 2.279 + 2.280 + } 2.281 # Такой же хак был чуть выше 2.282 if ($is_not_cgi) { 2.283 # $print .= "<td><a href='".$prefix."instructor.".$suffix."'>все</a></td>"; 2.284 @@ -191,42 +195,45 @@ 2.285 $print .= "<td/>"; 2.286 $print .= "<td><a href='$training"."?login_from=192.168.15.254'>все</a></td>"; 2.287 } 2.288 - $print .= "</tr>\n"; 2.289 - $print .= "</table>\n"; 2.290 - $print .= "</body>\n"; 2.291 - $print .= "</html>\n"; 2.292 - } 2.293 - else { 2.294 + $print .= "</tr>\n"; 2.295 + $print .= "</table>\n"; 2.296 + $print .= "</body>\n"; 2.297 + $print .= "</html>\n"; 2.298 + } 2.299 + else { 2.300 2.301 - $l3config::Config{"class"}=$training if $training ne 'current'; 2.302 - $XMLTraining = load_training; 2.303 + $l3config::Config{"class"}=$training if $training ne 'current'; 2.304 + $XMLTraining = load_training; 2.305 2.306 - my @args=( 2.307 - "--output" => "-", 2.308 - "--show_comments" => "no", 2.309 - "--course-center" => $XMLTraining->{center}, 2.310 - "--course-trainer" => $XMLTraining->{instructor}->{firstname}." ".$XMLTraining->{instructor}->{surname}, 2.311 - "--course-student" => $XMLTraining->{host}->{$host}->{firstname}." ".$XMLTraining->{host}->{$host}->{surname}, 2.312 - "--course-code" => $XMLTraining->{course}, 2.313 - "--course-date" => $XMLTraining->{date}, 2.314 - "--encoding" => $XMLTraining->{host}->{$host}->{charset}, 2.315 - ); 2.316 - if ($training ne 'current') { 2.317 - push @args, ("--backend_datafile" => "/var/lilalo/lablogs-xml/$training/$host/$user.xml"); 2.318 - } else { 2.319 - $filter{hostname} = $host if $host; 2.320 - $filter{user} = $user if $user; 2.321 - push @args, ("--filter" => join ("&", (map("$_=$filter{$_}", keys %filter)))); 2.322 - ##push @args, ("--filter" => "hostname=".$host."&user=".$user); 2.323 - } 2.324 + my @args=( 2.325 + "--output" => "-", 2.326 + "--show_comments" => "no", 2.327 + "--course-center" => $XMLTraining->{center}, 2.328 + "--course-trainer" => $XMLTraining->{instructor}->{firstname}." ".$XMLTraining->{instructor}->{surname}, 2.329 + "--course-student" => $XMLTraining->{host}->{$host}->{firstname}." ".$XMLTraining->{host}->{$host}->{surname}, 2.330 + "--course-code" => $XMLTraining->{course}, 2.331 + "--course-date" => $XMLTraining->{date}, 2.332 + "--encoding" => $XMLTraining->{host}->{$host}->{charset}, 2.333 + ); 2.334 + if ($XMLTraining->{"course-name"}) { 2.335 + push @args, ("--course-name" => $XMLTraining->{"course-name"}); 2.336 + }; 2.337 + if ($training ne 'current') { 2.338 + push @args, ("--backend_datafile" => "/var/lilalo/lablogs-xml/$training/$host/$user.xml"); 2.339 + } else { 2.340 + $filter{hostname} = $host if $host; 2.341 + $filter{user} = $user if $user; 2.342 + } 2.343 + push @args, ("--filter" => join ("&", (map("$_=$filter{$_}", keys %filter)))); 2.344 2.345 - open (FRONTEND, "./l3-frontend --frontend_css $l3config::Config{frontend_css} ".join(" ",map("\"$_\"",@args))." |"); 2.346 - binmode FRONTEND, ":utf8"; 2.347 - while (<FRONTEND>) { 2.348 - $print .= $_; 2.349 - } 2.350 - close(FRONTEND); 2.351 - } 2.352 + #$print .= "./l3-frontend --frontend_css $l3config::Config{frontend_css} ".join(" ",map("\"$_\"",@args))." |<br/>"; 2.353 + open (FRONTEND, "./l3-frontend --frontend_css $l3config::Config{frontend_css} ".join(" ",map("\"$_\"",@args))." |"); 2.354 + binmode FRONTEND, ":utf8"; 2.355 + while (<FRONTEND>) { 2.356 + $print .= $_; 2.357 + } 2.358 + close(FRONTEND); 2.359 + } 2.360 } 2.361 2.362 # Если задана переменная окружения l3_to_file,
3.1 --- a/l3-frontend Fri Feb 24 18:43:35 2006 +0200 3.2 +++ b/l3-frontend Sat Feb 25 08:02:25 2006 +0200 3.3 @@ -11,6 +11,7 @@ 3.4 our %Args_Description; 3.5 our $Mywi_Socket; 3.6 our %Sessions; 3.7 +our %filter; 3.8 3.9 our %Files; 3.10 3.11 @@ -255,12 +256,13 @@ 3.12 my $data = <CLASS>; 3.13 close(CLASS); 3.14 3.15 - for my $session ($data =~ m@<session>(.*?)</session>@sg) { 3.16 - my %session; 3.17 + my $i=0; 3.18 + for my $session ($data =~ m@<session>(.*?)</session>@msg) { 3.19 + my %session_hash; 3.20 while ($session =~ m@<([^>]*?)>(.*?)</\1>@sg) { 3.21 - $session{$1} = $2; 3.22 + $session_hash{$1} = $2; 3.23 } 3.24 - $Sessions{$session{local_session_id}} = \%session; 3.25 + $Sessions{$session_hash{local_session_id}} = \%session_hash; 3.26 } 3.27 } 3.28 3.29 @@ -409,7 +411,6 @@ 3.30 3.31 my @known_commands; 3.32 3.33 - my %filter; 3.34 3.35 if ($Config{filter}) { 3.36 # Инициализация фильтра 3.37 @@ -455,9 +456,9 @@ 3.38 #$result .= "undefined local session id<br/>\n" if !defined($cl->{local_session_id}); 3.39 #$result .= "undefined filter key $filter_key <br/>\n" if !defined($Sessions{$cl->{local_session_id}}->{$filter_key}); 3.40 #$result .= $Sessions{$cl->{local_session_id}}->{$filter_key}." != ".$filter{$filter_key}; 3.41 - next COMMAND_LINE if 3.42 - defined($cl->{local_session_id}) 3.43 - && defined($Sessions{$cl->{local_session_id}}->{$filter_key}) 3.44 + next COMMAND_LINE 3.45 + if defined($cl->{local_session_id}) 3.46 + && defined($Sessions{$cl->{local_session_id}}->{$filter_key}) 3.47 && $Sessions{$cl->{local_session_id}}->{$filter_key} ne $filter{$filter_key}; 3.48 } 3.49 3.50 @@ -688,7 +689,7 @@ 3.51 my $hint = make_comment($cl->{"cline"}); 3.52 3.53 my $cline; 3.54 - $prompt_hint = join (" ", map("$_=$cl->{$_}", grep (!/^output$/, sort(keys(%{$cl}))))); 3.55 + $prompt_hint = join (" ", map("$_=$cl->{$_}", grep (!/^(output|diff)$/, sort(keys(%{$cl}))))); 3.56 $cline = "<span title='$prompt_hint'>".$cl->{"prompt"}."</span>".$cl->{"cline"}; 3.57 $cline =~ s/\n//; 3.58 3.59 @@ -836,6 +837,14 @@ 3.60 my $files_section = print_files; 3.61 3.62 $result = print_header($toc); 3.63 + 3.64 + 3.65 +# $result.= join " <br/>", keys %Sessions; 3.66 +# for my $sess (keys %Sessions) { 3.67 +# $result .= join " ", keys (%{$Sessions{$sess}}); 3.68 +# $result .= "<br/>"; 3.69 +# } 3.70 + 3.71 $result.= "<h2 id='log'>Журнал</h2>" . $command_lines; 3.72 $result.= "<h2 id='files'>Файлы</h2>" . $files_section if $files_section; 3.73 $result.= "<h2 id='stat'>Статистика</h2>" . print_stat; 3.74 @@ -944,6 +953,7 @@ 3.75 $result .= "($course_code)" if $course_code; 3.76 $result .= ", $course_date<br/>" if $course_date; 3.77 $result .= "Учебный центр $course_center <br/>" if $course_center; 3.78 + $result .= "Фильтр ".join(" ", map("$filter{$_}=$_", keys %filter))."<br/>" if %filter; 3.79 $result .= "</p>"; 3.80 } 3.81
4.1 --- a/l3config.pm Fri Feb 24 18:43:35 2006 +0200 4.2 +++ b/l3config.pm Sat Feb 25 08:02:25 2006 +0200 4.3 @@ -94,7 +94,7 @@ 4.4 4.5 "course-name" => "", 4.6 "course-code" => "", 4.7 - "course-date" => "", 4.8 + "course-date" => 4.9 "course-center" => "", 4.10 "course-trainer" => "", 4.11 "course-student" => "",