# HG changeset patch # User devi # Date 1116930921 -10800 # Node ID 774de5c1ad004a3c45d53fa71ddf0ddcc7137db3 # Parent 6c1d2b9f45e731fdc43a2b410e8196af2a235aee lm report выводит страничку-индекс для курса diff -r 6c1d2b9f45e7 -r 774de5c1ad00 lm --- a/lm Tue May 24 13:00:28 2005 +0300 +++ b/lm Tue May 24 13:35:21 2005 +0300 @@ -7,6 +7,7 @@ use Switch; use XML::Simple; use Getopt::Long; +use utf8; our $XMLClass; our $XMLCourse; @@ -323,7 +324,52 @@ my $date=$XMLClass->{"date"}; my $encoding=$XMLClass->{"charset"}; - print "date=$date\n"; + my $center = $XMLClass->{"center"}; + my $instructor = $XMLClass->{"instructor"}->{"firstname"}." ".$XMLClass->{"instructor"}->{"surname"}; + my $course_name = $XMLCourse->{"fullname"}[0]; + + # Индекс для данного класса + + my $head; + + $head="Журналы лабораторных работ"; + open(HTML, ">$webdir/$date/index.html") + or die "Can't open $webdir/$date/index.html for writing"; + binmode HTML, ":utf8"; + print HTML < + + + $head + + +

$head

+

+ Курс: $course_name ($course)
+ Начало: $date
+ Учебный центр: $center
+ Инструктор: $instructor
+

+ +HEAD + for my $student (@{$XMLClass->{"student"}}) { + my $user = $student->{"user"}; + my $hostname = $student->{"host"}; + print HTML "\n"; + print HTML "\n"; + print HTML "\n"; + print HTML "\n"; + print HTML "\n"; + print HTML "\n"; + } + print HTML < + +TAIL + close (HTML); + exit; + + # Собственно журналы for my $student (@{$XMLClass->{"student"}}) { my $user = $student->{"user"}; @@ -346,6 +392,9 @@ " --encoding $encoding" ); } + + + } sub load_run
",$student->{"firstname"}," ",$student->{"surname"},"",$hostname,"",$user,"","root","