version 1.13, 2001/08/20 13:18:41
|
version 1.16, 2001/12/04 15:34:57
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# |
|
# (Publication Handler |
# (Publication Handler |
|
# |
|
# $Id$ |
|
# |
|
# Copyright Michigan State University Board of Trustees |
|
# |
|
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
|
# |
|
# LON-CAPA is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; either version 2 of the License, or |
|
# (at your option) any later version. |
|
# |
|
# LON-CAPA is distributed in the hope that it will be useful, |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
# GNU General Public License for more details. |
|
# |
|
# You should have received a copy of the GNU General Public License |
|
# along with LON-CAPA; if not, write to the Free Software |
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
# |
|
# /home/httpd/html/adm/gpl.txt |
|
# |
|
# http://www.lon-capa.org/ |
|
# |
# |
# |
# (TeX Content Handler |
# (TeX Content Handler |
# |
# |
Line 101 sub handler {
|
Line 125 sub handler {
|
|
|
my $extension=''; |
my $extension=''; |
if ($filename=~/\.(\w+)$/) { $extension=$1; } |
if ($filename=~/\.(\w+)$/) { $extension=$1; } |
if (($extension ne 'meta') && |
if ($cmode&$dirptr) { |
(&Apache::lonnet::fileembstyle($extension))) { |
my $disfilename=$filename; |
|
if ($filename eq '..') { |
|
$disfilename='<i>Parent Directory</i>'; |
|
} |
|
unless ((($filename eq '..') && ($thisdisfn eq '')) || |
|
($filename eq '.')) { |
|
$r->print('<tr bgcolor=#BBBBFF'. |
|
'><td><a href="'.$linkdir.'/'.$filename.'">'.$disfilename. |
|
'</a></td><td>'.localtime($cmtime).'</td><td> </td><td> </td></tr>' |
|
); |
|
} |
|
} elsif (&Apache::lonnet::fileembstyle($extension) ne 'hdn') { |
my $status='Unpublished'; |
my $status='Unpublished'; |
my $bgcol='#FFBBBB'; |
my $bgcol='#FFBBBB'; |
if (-e $resdir.'/'.$filename) { |
if (-e $resdir.'/'.$filename) { |
Line 132 sub handler {
|
Line 167 sub handler {
|
'<td><a target="_parent" href="/adm/publish?filename=/~'.$uname. |
'<td><a target="_parent" href="/adm/publish?filename=/~'.$uname. |
$thisdisfn.'/'.$filename.'">'. |
$thisdisfn.'/'.$filename.'">'. |
'Publish</a></td></tr>'); |
'Publish</a></td></tr>'); |
} elsif ($cmode&$dirptr) { |
} else { |
my $disfilename=$filename; |
# "hidden" extension and not a directory, so hide it away. |
if ($filename eq '..') { |
|
$disfilename='<i>Parent Directory</i>'; |
|
} |
|
unless ((($filename eq '..') && ($thisdisfn eq '')) || |
|
($filename eq '.')) { |
|
$r->print('<tr bgcolor=#BBBBFF'. |
|
'><td><a href="'.$linkdir.'/'.$filename.'">'.$disfilename. |
|
'</a></td><td>'.localtime($cmtime).'</td><td> </td><td> </td></tr>' |
|
); |
|
} |
|
} |
} |
} |
} |
closedir(DIR); |
closedir(DIR); |