--- loncom/interface/domainprefs.pm 2011/10/30 22:19:15 1.158
+++ loncom/interface/domainprefs.pm 2011/11/07 18:21:17 1.159
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.158 2011/10/30 22:19:15 raeburn Exp $
+# $Id: domainprefs.pm,v 1.159 2011/11/07 18:21:17 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1058,6 +1058,7 @@ sub print_rolecolors {
sub display_color_options {
my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs,
$images,$bgs,$links,$alt_text,$rowtotal,$logintext) = @_;
+ my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
my $css_class = $itemcount%2?' class="LC_odd_row"':'';
my $datatable = '
'.
''.$choices->{'font'}.' | ';
@@ -1135,11 +1136,11 @@ sub display_color_options {
$showfile = $imgfile;
my $imgdir = $1;
my $filename = $2;
- if (-e "/home/httpd/html/$imgdir/tn-".$filename) {
+ if (-e "$londocroot/$imgdir/tn-".$filename) {
$showfile = "/$imgdir/tn-".$filename;
} else {
- my $input = "/home/httpd/html".$imgfile;
- my $output = '/home/httpd/html/'.$imgdir.'/tn-'.$filename;
+ my $input = $londocroot.$imgfile;
+ my $output = "$londocroot/$imgdir/tn-".$filename;
if (!-e $output) {
my ($width,$height) = &thumb_dimensions();
my ($fullwidth,$fullheight) = &check_dimensions($input);
@@ -1147,7 +1148,7 @@ sub display_color_options {
if ($fullwidth > $width && $fullheight > $height) {
my $size = $width.'x'.$height;
system("convert -sample $size $input $output");
- $showfile = '/'.$imgdir.'/tn-'.$filename;
+ $showfile = "/$imgdir/tn-".$filename;
}
}
}