lilalo
changeset 5:7d4d067f9823
Добавился параметр --classfile
для указания точного пути к файлу класса
для указания точного пути к файлу класса
author | devi |
---|---|
date | Tue May 24 13:56:12 2005 +0300 (2005-05-24) |
parents | 774de5c1ad00 |
children | a0f30dd46d1a |
files | lm |
line diff
1.1 --- a/lm Tue May 24 13:35:21 2005 +0300 1.2 +++ b/lm Tue May 24 13:56:12 2005 +0300 1.3 @@ -38,6 +38,7 @@ 1.4 1.5 "class" => "class", # Имя файла класса 1.6 "class_suffix" => ".xml", # Cуффикс файла класса 1.7 + "classfile" => "", 1.8 1.9 "sshkey" => "$ENV{HOME}/.ssh/id_dsa.pub", 1.10 "lmssh" => "./lm-ssh", 1.11 @@ -152,6 +153,7 @@ 1.12 sub load_class 1.13 { 1.14 my $classfile = 1.15 + $Config{"classfile"} || 1.16 $Config{"path_classes"}."/".$Config{"class"}.$Config{"class_suffix"}; 1.17 $XMLClass = XMLin($classfile , ForceArray => [ 'student' ] ) 1.18 or die "Can't open file of the class ",$classfile,"\n"; 1.19 @@ -328,6 +330,31 @@ 1.20 my $instructor = $XMLClass->{"instructor"}->{"firstname"}." ".$XMLClass->{"instructor"}->{"surname"}; 1.21 my $course_name = $XMLCourse->{"fullname"}[0]; 1.22 1.23 + 1.24 + # Собственно журналы 1.25 + 1.26 + for my $student (@{$XMLClass->{"student"}}) { 1.27 + my $user = $student->{"user"}; 1.28 + my $hostname = $student->{"host"}; 1.29 + my $encoding = $student->{"encoding"}; 1.30 + 1.31 + system("mkdir -p $webdir/$date/$hostname"); 1.32 + system("cp ".$Config{"path_share"}."/*.{ico,css} $webdir/$date/$hostname"); 1.33 + system($Config{"l3-report"}. 1.34 + " --input ".$Config{"path_lablogs"}."/$course/$date/$hostname/$user". 1.35 + " --diffs ".$Config{"path_lablogs"}."/$course/$date/$hostname/$user ". 1.36 + $Config{"path_lablogs"}."/$course/$date/$hostname/root". 1.37 + " --output $webdir/$date/$hostname/$user.html". 1.38 + " --encoding $encoding" 1.39 + ); 1.40 + system($Config{"l3-report"}. 1.41 + " --input ".$Config{"path_lablogs"}."/$course/$date/$hostname/root". 1.42 + " --diffs ".$Config{"path_lablogs"}."/$course/$date/$hostname/root ". 1.43 + " --output $webdir/$date/$hostname/root.html". 1.44 + " --encoding $encoding" 1.45 + ); 1.46 + } 1.47 + 1.48 # Индекс для данного класса 1.49 1.50 my $head; 1.51 @@ -367,31 +394,6 @@ 1.52 </html> 1.53 TAIL 1.54 close (HTML); 1.55 - exit; 1.56 - 1.57 - # Собственно журналы 1.58 - 1.59 - for my $student (@{$XMLClass->{"student"}}) { 1.60 - my $user = $student->{"user"}; 1.61 - my $hostname = $student->{"host"}; 1.62 - my $encoding = $student->{"encoding"}; 1.63 - 1.64 - system("mkdir -p $webdir/$date/$hostname"); 1.65 - system("cp ".$Config{"path_share"}."/*.{ico,css} $webdir/$date/$hostname"); 1.66 - system($Config{"l3-report"}. 1.67 - " --input ".$Config{"path_lablogs"}."/$course/$date/$hostname/$user". 1.68 - " --diffs ".$Config{"path_lablogs"}."/$course/$date/$hostname/$user ". 1.69 - $Config{"path_lablogs"}."/$course/$date/$hostname/root". 1.70 - " --output $webdir/$date/$hostname/$user.html". 1.71 - " --encoding $encoding" 1.72 - ); 1.73 - system($Config{"l3-report"}. 1.74 - " --input ".$Config{"path_lablogs"}."/$course/$date/$hostname/root". 1.75 - " --diffs ".$Config{"path_lablogs"}."/$course/$date/$hostname/root ". 1.76 - " --output $webdir/$date/$hostname/root.html". 1.77 - " --encoding $encoding" 1.78 - ); 1.79 - } 1.80 1.81 1.82