version 1.153, 2006/09/29 18:21:43
|
version 1.155, 2006/12/11 02:12:08
|
Line 54 use Apache::File;
|
Line 54 use Apache::File;
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonsource(); |
use Apache::lonsource(); |
use GDBM_File; |
use GDBM_File; |
|
use LONCAPA qw(:match); |
|
|
# ---------------------------------------- variables used throughout the module |
# ---------------------------------------- variables used throughout the module |
my %hash; # global user-specific gdbm file |
my %hash; # global user-specific gdbm file |
Line 366 function gothere(val) {
|
Line 367 function gothere(val) {
|
</script> |
</script> |
ENDHEADER |
ENDHEADER |
|
|
my ($headerdom)=($uri=~/^\/res\/(\w+)\//); |
my ($headerdom)=($uri=~m{^/res/($match_domain)/}); |
$r->print(&Apache::loncommon::start_page('Browse Resources',$js, |
$r->print(&Apache::loncommon::start_page('Browse Resources',$js, |
{'domain' => $headerdom,})); |
{'domain' => $headerdom,})); |
# - Evaluate actions from previous page (both cumulatively and chronologically) |
# - Evaluate actions from previous page (both cumulatively and chronologically) |
Line 798 sub display_line {
|
Line 799 sub display_line {
|
my $i=0; |
my $i=0; |
while ($i<=11) { |
while ($i<=11) { |
$tabtag=join('',$tabtag,"<td> </td>") |
$tabtag=join('',$tabtag,"<td> </td>") |
if $hash{'display_attrs_'.$i} == 1; |
if ($i != 9 && |
|
$hash{'display_attrs_'.$i} == 1); |
$i++; |
$i++; |
} |
} |
my $valign = ($hash{'display_attrs_7'} == 1 ? 'top' : 'bottom'); |
my $valign = ($hash{'display_attrs_7'} == 1 ? 'top' : 'bottom'); |
Line 1199 sub showpreview {
|
Line 1201 sub showpreview {
|
$output='<font size="-2">'.$output.'</font>'; |
$output='<font size="-2">'.$output.'</font>'; |
} elsif ($embstyle eq 'img') { |
} elsif ($embstyle eq 'img') { |
$output='<img alt="'.&mt('Preview').'" src="'.$filelink.'" />'; |
$output='<img alt="'.&mt('Preview').'" src="'.$filelink.'" />'; |
} elsif ($filelink=~/^\/res\/(\w+)\/(\w+)\//) { |
} elsif ($filelink=~m{^/res/($match_domain)/($match_username)/}) { |
$output='<img alt="'.&mt('Preview').'" src="http://'. |
$output='<img alt="'.&mt('Preview').'" src="http://'. |
$Apache::lonnet::hostname{&Apache::lonnet::homeserver($2,$1)}. |
$Apache::lonnet::hostname{&Apache::lonnet::homeserver($2,$1)}. |
'/cgi-bin/thumbnail.gif?url='.$filelink.'" />'; |
'/cgi-bin/thumbnail.gif?url='.$filelink.'" />'; |