[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 04 Feb 2003 22:01:38 -0000
albertel Tue Feb 4 17:01:38 2003 EDT
Modified files:
/loncom/publisher loncfile.pm
Log:
- xhtmlize
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.22 loncom/publisher/loncfile.pm:1.23
--- loncom/publisher/loncfile.pm:1.22 Tue Feb 4 16:54:17 2003
+++ loncom/publisher/loncfile.pm Tue Feb 4 17:01:38 2003
@@ -10,7 +10,7 @@
#
#
-# $Id: loncfile.pm,v 1.22 2003/02/04 21:54:17 albertel Exp $
+# $Id: loncfile.pm,v 1.23 2003/02/04 22:01:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -336,10 +336,10 @@
return 'Error: destination for operation is a directory.';
}
if ( -e $published) {
- $result.='<p><font color=red>Warning: target file exists, and has been published!</font></p>';
+ $result.='<p><font color="red">Warning: target file exists, and has been published!</font></p>';
}
elsif ( -e $construct) {
- $result.='<p><font color=red>Warning: target file exists!</font></p>';
+ $result.='<p><font color="red">Warning: target file exists!</font></p>';
}
return $result;
@@ -384,7 +384,7 @@
if ($old=~m:(.*)/+([^/]+)\.(\w+)$:) { $oldsuffix=$3; }
if ($oldsuffix ne $newsuffix) {
$result.=
- '<p><font color=red>Warning: change of MIME type!</font></p>';
+ '<p><font color="red">Warning: change of MIME type!</font></p>';
}
return $result;
}
@@ -411,9 +411,9 @@
&Debug($request, "Cancel url is: ".$cancelurl);
- $request->print('<p><input type=submit value=Continue></p></form>');
+ $request->print('<p><input type="submit" value="Continue" /></p></form>');
$request->print('<form action="'.$cancelurl.
- '" method="GET"><p><input type=submit value=Cancel><p></form>');
+ '" method="GET"><p><input type="submit" value="Cancel" /></p></form>');
}
@@ -445,7 +445,7 @@
sub CloseForm2 {
my ($request, $user, $directory) = @_;
- $request->print('<h3><a=href="/priv/'.$user.$directory.'/">Done </a> </h3>');
+ $request->print('<h3><a href="/priv/'.$user.$directory.'/">Done </a> </h3>');
}
=pod
@@ -503,9 +503,10 @@
return;
}
my $dest=&SimplifyDir($dir,$newfilename);
- $request->print('<input type=hidden name=newfilename value="'.
+ $request->print('<input type="hidden" name="newfilename" value="'.
$newfilename.
- '"><p>Rename <tt>'.$filename.'</tt><br /> to <tt>'.
+ '" /><p>Rename <tt>'.$filename.
+ '</tt><br /> to <tt>'.
$dest.'</tt>?</p>');
&CloseForm1($request, $cancelurl);
} else {
@@ -551,8 +552,8 @@
if( -e $filename) {
- $request->print('<input type=hidden name=newfilename value="'.
- $filename.'">');
+ $request->print('<input type="hidden" name="newfilename" value="'.
+ $filename.'"/>');
$request->print('<p> Delete <tt>'.$filename.'</tt>?</p>');
&CloseForm1($request, $cancelurl);
} else {
@@ -606,9 +607,9 @@
return;
}
my $dest=&SimplifyDir($dir,$newfilename);
- $request->print('<input type = hidden name = newfilename value = "'.
+ $request->print('<input type = "hidden" name = "newfilename" value = "'.
$dir.'/'.$newfilename.
- '"><p>Copy <tt>'.$filename.'</tt><br /> to '.
+ '" /><p>Copy <tt>'.$filename.'</tt><br /> to '.
'<tt>'.$dest.'</tt>?</p>');
&CloseForm1($request, $cancelurl);
} else {
@@ -696,8 +697,8 @@
$request->print('<p>Directory exists.</p></form>');
}
else {
- $request->print('<input type=hidden name=newfilename value="'.
- $newdir.'"><p>Make new directory <tt>'.
+ $request->print('<input type="hidden" name="newfilename" value="'.
+ $newdir.'" /><p>Make new directory <tt>'.
$path."/".$newdir.'</tt>?</p>');
&CloseForm1($request, $cancelurl);
@@ -821,10 +822,10 @@
# my $conspace=ConstructionPathFromRelative($uname, $fn);
- $r->print('<form action=/adm/cfile method=post>'.
- '<input type=hidden name=filename value="/~'.$uname.$fn.'">'.
- '<input type=hidden name=phase value=two>'.
- '<input type=hidden name=action value='.$ENV{'form.action'}.'>');
+ $r->print('<form action="/adm/cfile" method="post">'.
+ '<input type="hidden" name="filename" value="/~'.$uname.$fn.'" />'.
+ '<input type="hidden" name="phase" value="two" />'.
+ '<input type="hidden" name="action" value="'.$ENV{'form.action'}.'" />');
if ($ENV{'form.action'} eq 'rename') {
@@ -905,7 +906,7 @@
if(-e $oldfile) {
unless(rename($oldfile,
$directory.'/'.$newfile)) {
- $request->print('<font color=red>Error: '.$!.'</font>');
+ $request->print('<font color="red">Error: '.$!.'</font>');
return 0;
} else {}
} else {
@@ -949,11 +950,11 @@
if(-e $filename) {
unless(unlink($filename)) {
- $request->print('<font color=red>Error: '.$!.'</font>');
+ $request->print('<font color="red">Error: '.$!.'</font>');
return 0;
}
} else {
- $request->print('<p> No such file. </form');
+ $request->print('<p> No such file. </p></form');
return 0;
}
return 1;
@@ -992,11 +993,11 @@
&Debug($request ,"Will try to copy $oldfile to $newfile");
if(-e $oldfile) {
unless (copy($oldfile, $newfile)) {
- $request->print('<font color=red> copy Error: '.$!.'</font>');
+ $request->print('<font color="red"> copy Error: '.$!.'</font>');
return 0;
} else {
unless (chmod(0660, $newfile)) {
- $request->print('<font color=red> chmod error: '.$!.'</font>');
+ $request->print('<font color="red"> chmod error: '.$!.'</font>');
return 0;
}
return 1;
@@ -1033,11 +1034,11 @@
my ($request, $user, $newdirectory) = @_;
unless(mkdir($newdirectory, 02770)) {
- $request->print('<font color=red>Error: '.$!.'</font>');
+ $request->print('<font color="red">Error: '.$!.'</font>');
return 0;
}
unless(chmod(02770, ($newdirectory))) {
- $request->print('<font color=red> Error: '.$!.'</font>');
+ $request->print('<font color="red"> Error: '.$!.'</font>');
return 0;
}
return 1;
@@ -1130,7 +1131,7 @@
$dest = $ENV{'form.newfilename'};
} else {
- $r->print('<p>No New filename specified</form>');
+ $r->print('<p>No New filename specified</p></form>');
return;
}
@@ -1227,13 +1228,13 @@
$r->print('<html><head><title>LON-CAPA Construction Space</title></head>');
$r->print(
- '<body bgcolor="#FFFFFF"><img align=right src=/adm/lonIcons/lonlogos.gif>');
+ '<body bgcolor="#FFFFFF"><img align="right" src="/adm/lonIcons/lonlogos.gif" />');
$r->print('<h1>Construction Space <tt>'.$fn.'</tt></h1>');
if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
- $r->print('<h3><font color=red>Co-Author: '.$uname.' at '.$udom.
+ $r->print('<h3><font color="red">Co-Author: '.$uname.' at '.$udom.
'</font></h3>');
}
@@ -1253,7 +1254,7 @@
$ENV{'form.action'} eq 'newproblemfile') {
$r->print('<h3>New Resource</h3>');
} else {
- $r->print('<p>Unknown Action</body></html>');
+ $r->print('<p>Unknown Action</p></body></html>');
return OK;
}
if ($ENV{'form.phase'} eq 'two') {