version 1.27, 2005/04/07 06:56:27
|
version 1.29, 2006/01/31 22:37:04
|
Line 63 sub phaseone {
|
Line 63 sub phaseone {
|
&mt('Version').'</th>'. |
&mt('Version').'</th>'. |
'<th>'.&mt('Published on ...').'</th>'. |
'<th>'.&mt('Published on ...').'</th>'. |
'<th>'.&mt('Metadata').'</th></tr>'); |
'<th>'.&mt('Metadata').'</th></tr>'); |
my $filename; |
|
opendir(DIR,$resdir); |
opendir(DIR,$resdir); |
while ($filename=readdir(DIR)) { |
my @files = grep(/^\Q$main\E\.(\d+)\.\Q$suffix\E$/,readdir(DIR)); |
|
@files = sort { |
|
my ($aver) = ($a=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/); |
|
my ($bver) = ($b=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/); |
|
return $aver <=> $bver; |
|
} (@files); |
|
closedir(DIR); |
|
|
|
foreach my $filename (@files) { |
if ($filename=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/) { |
if ($filename=~/^\Q$main\E\.(\d+)\.\Q$suffix\E$/) { |
my $version=$1; |
my $version=$1; |
my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate'); |
my $rmtime=&Apache::lonnet::metadata($resdir.'/'.$filename,'lastrevisiondate'); |
Line 87 sub phaseone {
|
Line 95 sub phaseone {
|
closedir(DIR); |
closedir(DIR); |
my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate'); |
my $rmtime=&Apache::lonnet::metadata($resfn,'lastrevisiondate'); |
$r->print('<tr><td><input type=radio name=version value="new"></td>'. |
$r->print('<tr><td><input type=radio name=version value="new"></td>'. |
'<th>'.&mt('Currently public version').'</th><td>'.localtime($rmtime). |
'<th>'.&mt('Currently published version').'</th><td>'.localtime($rmtime). |
'</td><td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target=cat>'. |
'</td><td><a href="'.$urldir.$main.'.'.$suffix.'.meta" target=cat>'. |
&mt('Metadata current version').'</a>'); |
&mt('Metadata current version').'</a>'); |
if (&Apache::loncommon::fileembstyle($suffix) eq 'ssi') { |
if (&Apache::loncommon::fileembstyle($suffix) eq 'ssi') { |