# HG changeset patch # User devi # Date 1116940148 -10800 # Node ID a0f30dd46d1a62fb5ee774da6dacd367e0cf9a89 # Parent 7d4d067f9823504e756fe5b16cf5d3b333241f4b В журнале появились секции * статистика * справка * о программе И оглавление. В начале журнала выводится информация о том курсе и слушателе, к которым этот журнал относится diff -r 7d4d067f9823 -r a0f30dd46d1a lm --- a/lm Tue May 24 13:56:12 2005 +0300 +++ b/lm Tue May 24 16:09:08 2005 +0300 @@ -336,7 +336,8 @@ for my $student (@{$XMLClass->{"student"}}) { my $user = $student->{"user"}; my $hostname = $student->{"host"}; - my $encoding = $student->{"encoding"}; + my $encoding = $student->{"charset"}; + my $student_name = $student->{"firstname"}." ".$student->{"surname"}; system("mkdir -p $webdir/$date/$hostname"); system("cp ".$Config{"path_share"}."/*.{ico,css} $webdir/$date/$hostname"); @@ -345,12 +346,24 @@ " --diffs ".$Config{"path_lablogs"}."/$course/$date/$hostname/$user ". $Config{"path_lablogs"}."/$course/$date/$hostname/root". " --output $webdir/$date/$hostname/$user.html". + " --course-name '$course_name'". + " --course-code '$course'". + " --course-date '$date'". + " --course-center '$center'". + " --course-student '$student_name'". + " --course-trainer '$instructor'". " --encoding $encoding" ); system($Config{"l3-report"}. " --input ".$Config{"path_lablogs"}."/$course/$date/$hostname/root". " --diffs ".$Config{"path_lablogs"}."/$course/$date/$hostname/root ". " --output $webdir/$date/$hostname/root.html". + " --course-name '$course_name'". + " --course-code '$course'". + " --course-date '$date'". + " --course-center '$center'". + " --course-student '$student_name'". + " --course-trainer '$instructor'". " --encoding $encoding" ); } diff -r 7d4d067f9823 -r a0f30dd46d1a lm-report --- a/lm-report Tue May 24 13:56:12 2005 +0300 +++ b/lm-report Tue May 24 16:09:08 2005 +0300 @@ -56,6 +56,13 @@ comment_width => "300", time_width => "60", + "course-name" => "", + "course-code" => "", + "course-date" => "", + "course-center" => "", + "course-trainer" => "", + "course-student" => "", + ); our @Command_Lines; @@ -92,6 +99,10 @@ => "продолжение с помощью tab" ); +sub init_variables; +our $Html_Help; +our $Html_About; + sub load_diff_files { @@ -586,10 +597,23 @@ } + +=cut +Вывести результат обработки журнала. +=cut + + sub print_command_lines { my $output_filename=$_[0]; my $format = $Config{"output_format"}; + + my $course_name = $Config{"course-name"}; + my $course_code = $Config{"course-code"}; + my $course_date = $Config{"course-date"}; + my $course_center = $Config{"course-center"}; + my $course_trainer = $Config{"course-trainer"}; + my $course_student = $Config{"course-student"}; open(OUT, ">", $output_filename) or die "Can't open $output_filename for writing\n"; @@ -655,6 +679,24 @@ } +

Журнал лабораторных работ

+ +

+ Выполнил $course_student
+ Проверил $course_trainer
+ Курс $course_name ($course_code), + $course_date
+ Учебный центр $course_center
+

+ + + +

Журнал

HEADER print OUT "
\n"; for my $element (keys %Elements_Visibility) @@ -857,6 +899,16 @@ } if ($format eq "html") { print OUT "
\n"; + + print OUT "
"; + print OUT "

Статистика

"; + print OUT "Статистическая информация о журнале
"; + print OUT "
"; + print OUT "

Справка

"; + print OUT "$Html_Help
"; + print OUT "
"; + print OUT "

О программе

"; + print OUT "$Html_About"; print OUT "\n"; print OUT "\n"; } @@ -886,11 +938,11 @@ my %file_config; my %argv_config; +init_variables; read_config_file(\%file_config, $Config_File); GetOptions(\%argv_config, map "$_=s", keys %Config); %Config = (%Config, %file_config, %argv_config); - my $i=0; for my $lab_log (split (/\s+/, $Config{"diffs"} || $Config{"input"})) @@ -910,3 +962,20 @@ $i++; } + +sub init_variables +{ +$Html_Help = < + LiLaLo (L3) расшифровывается как Live Lab Log.
+ Программа разработана для повышения эффективности обучения
+ Unix/Linux-системам.
+ (c) Игорь Чубин, 2004-2005
+ \$Id$ +

+ABOUT +}