version 1.92, 2003/10/29 21:21:55
|
version 1.95, 2003/11/07 23:22:21
|
Line 510 sub checkonthis {
|
Line 510 sub checkonthis {
|
&Apache::lonxml::xmlparse($r,'web', |
&Apache::lonxml::xmlparse($r,'web', |
&Apache::lonnet::getfile( |
&Apache::lonnet::getfile( |
&Apache::lonnet::filelocation('',$url))); |
&Apache::lonnet::filelocation('',$url))); |
|
undef($Apache::lonhomework::parsing_a_problem); |
$ENV{'request.filename'}=$oldpath; |
$ENV{'request.filename'}=$oldpath; |
if (($Apache::lonxml::errorcount) || |
if (($Apache::lonxml::errorcount) || |
($Apache::lonxml::warningcount)) { |
($Apache::lonxml::warningcount)) { |
Line 596 sub checkversions {
|
Line 597 sub checkversions {
|
$haschanged=1; |
$haschanged=1; |
foreach (keys %hash) { |
foreach (keys %hash) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
my $src=$1; |
$newsetversions{$1}='mostrecent'; |
} |
} |
} |
} |
} elsif ($ENV{'form.setcurrent'}) { |
} elsif ($ENV{'form.setcurrent'}) { |
$haschanged=1; |
$haschanged=1; |
foreach (keys %hash) { |
foreach (keys %hash) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
if ($_=~/^ids\_(\/res\/.+)$/) { |
my $src=$1; |
my $getvers=&Apache::lonnet::getversion($1); |
|
if ($getvers>0) { |
|
$newsetversions{$1}=$getvers; |
|
} |
} |
} |
} |
} |
} elsif ($ENV{'form.setversions'}) { |
} elsif ($ENV{'form.setversions'}) { |
Line 714 ENDHEADERS
|
Line 718 ENDHEADERS
|
if ($changes{$_}>$starttime) { |
if ($changes{$_}>$starttime) { |
my ($root,$extension)=($_=~/^(.*)\.(\w+)$/); |
my ($root,$extension)=($_=~/^(.*)\.(\w+)$/); |
my $currentversion=&Apache::lonnet::getversion($_); |
my $currentversion=&Apache::lonnet::getversion($_); |
|
if ($currentversion<0) { |
|
$currentversion=&mt('Could not be determined.'); |
|
} |
my $linkurl=&Apache::lonnet::clutter($_); |
my $linkurl=&Apache::lonnet::clutter($_); |
$r->print( |
$r->print( |
'<tr><td><b>'. |
'<tr><td><b>'. |
Line 725 ENDHEADERS
|
Line 732 ENDHEADERS
|
$currentversion.'</font></td><td><font size="+2">'); |
$currentversion.'</font></td><td><font size="+2">'); |
# Used in course |
# Used in course |
my $usedversion=$hash{'version_'.$linkurl}; |
my $usedversion=$hash{'version_'.$linkurl}; |
if ($usedversion) { |
if (($usedversion) && ($usedversion ne 'mostrecent')) { |
$r->print($usedversion); |
$r->print($usedversion); |
} else { |
} else { |
$r->print($currentversion); |
$r->print($currentversion); |
Line 735 ENDHEADERS
|
Line 742 ENDHEADERS
|
$r->print(&Apache::loncommon::select_form($setversions{$linkurl}, |
$r->print(&Apache::loncommon::select_form($setversions{$linkurl}, |
'set_version_'.$linkurl, |
'set_version_'.$linkurl, |
('' => '', |
('' => '', |
'current' => 'most recent', |
'mostrecent' => 'most recent', |
map {$_,$_} (1..$currentversion)))); |
map {$_,$_} (1..$currentversion)))); |
$r->print('</td><td><font size="1"><ul>'); |
$r->print('</td><td><font size="1"><ul>'); |
my $lastold=1; |
my $lastold=1; |
Line 789 sub handler {
|
Line 796 sub handler {
|
$r->send_http_header; |
$r->send_http_header; |
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
&Apache::lonlocal::clearreroutetrans(); |
|
# --------------------------------------------- Initialize help topics for this |
# --------------------------------------------- Initialize help topics for this |
foreach ('Adding_Course_Doc','Main_Course_Documents', |
foreach ('Adding_Course_Doc','Main_Course_Documents', |
'Adding_External_Resource','Navigate_Content', |
'Adding_External_Resource','Navigate_Content', |
Line 1276 ENDSUPFORM
|
Line 1282 ENDSUPFORM
|
&entryline(0,&mt("Click to download or use your browser's Save Link function"),$showdoc).'</table></p>'); |
&entryline(0,&mt("Click to download or use your browser's Save Link function"),$showdoc).'</table></p>'); |
} |
} |
} |
} |
$r->print(&Apache::lonlocal::endreroutetrans().'</body></html>'); |
$r->print('</body></html>'); |
return OK; |
return OK; |
} |
} |
|
|