version 1.29, 2002/10/16 19:15:55
|
version 1.31, 2002/10/17 15:18:03
|
Line 294 sub handler {
|
Line 294 sub handler {
|
$r->print('<html><head><title>Verify Content</title></head>'. |
$r->print('<html><head><title>Verify Content</title></head>'. |
&Apache::loncommon::bodytag('Verify Course Documents')); |
&Apache::loncommon::bodytag('Verify Course Documents')); |
$hashtied=0; |
$hashtied=0; |
|
undef %alreadyseen; |
|
%alreadyseen=(); |
&tiehash(); |
&tiehash(); |
foreach (keys %hash) { |
foreach (keys %hash) { |
if (($_=~/^src\_(.+)$/) && (!$alreadyseen{$hash{$_}})) { |
if (($_=~/^src\_(.+)$/) && (!$alreadyseen{$hash{$_}})) { |
Line 306 sub handler {
|
Line 308 sub handler {
|
&Apache::loncommon::bodytag('Check Course Document Versions')); |
&Apache::loncommon::bodytag('Check Course Document Versions')); |
$hashtied=0; |
$hashtied=0; |
&tiehash(); |
&tiehash(); |
|
my %changes=&Apache::lonnet::dump |
|
('versionupdate',$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}); |
|
my $firstkey=(keys %changes)[0]; |
|
unless ($firstkey=~/^error\:/) { |
|
unless ($ENV{'form.timerange'}) { |
|
$ENV{'form.timerange'}=604800; |
|
} |
|
my $seltext='during the last '.$ENV{'form.timerange'}.' seconds'; |
|
my $startsel=''; |
|
my $monthsel=''; |
|
my $weeksel=''; |
|
my $daysel=''; |
|
if ($ENV{'form.timerange'}==-1) { |
|
$seltext='since start of course'; |
|
$startsel='selected'; |
|
} elsif ($ENV{'form.timerange'}==2592000) { |
|
$seltext='during the last month'; |
|
$monthsel='selected'; |
|
} elsif ($ENV{'form.timerange'}==604800) { |
|
$seltext='during the last week'; |
|
$weeksel='selected'; |
|
} elsif ($ENV{'form.timerange'}==86400) { |
|
$seltext='since yesterday'; |
|
$daysel='selected'; |
|
} |
|
$r->print(<<ENDHEADERS); |
|
<form action="/adm/coursedocs" method="post"> |
|
<select name="timerange"> |
|
<option value="-1" $startsel>Since Start of Course</option> |
|
<option value="2592000" $monthsel>Last Month</option> |
|
<option value="604800" $weeksel>Last Week</option> |
|
<option value="86400" $daysel>Since Yesterday</option> |
|
</select> |
|
<input type="submit" name="versions" value="Display" /> |
|
</form> |
|
<h1>Content changed $seltext</h1> |
|
<table border="2"> |
|
<tr> |
|
<th>File</th><th>Modification Date</th> |
|
<th>Version</th><th>Differences</th></tr> |
|
ENDHEADERS |
|
foreach (keys %changes) { |
|
my $currentversion=&Apache::lonnet::getversion($_); |
|
$r->print( |
|
'<tr><td><a href="'.$_.'" target="cat">'.$_.'</a></td><td>'. |
|
localtime($changes{$_}).'</td><td>'.$currentversion.'</td>'); |
|
$r->print('</tr>'); |
|
} |
|
$r->print('</table>'); |
|
} else { |
|
$r->print('<p>No content modifications yet.</p>'); |
|
} |
&untiehash(); |
&untiehash(); |
} else { |
} else { |
# is this a standard course? |
# is this a standard course? |