--- loncom/publisher/londiff.pm 2001/12/04 15:34:57 1.6 +++ loncom/publisher/londiff.pm 2001/12/13 14:02:54 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to show differences between file versions # -# $Id: londiff.pm,v 1.6 2001/12/04 15:34:57 albertel Exp $ +# $Id: londiff.pm,v 1.7 2001/12/13 14:02:54 harris41 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -41,6 +41,9 @@ # 03/31,04/03 Gerd Kortemeyer) # # 05/02/01,05/09 Gerd Kortemeyer +# 12/13 Scott Harrison +# +### package Apache::londiff; @@ -50,6 +53,8 @@ use File::Copy; use Algorithm::Diff qw(diff); use Apache::Constants qw(:common :http :methods); use Apache::loncacc; +use Apache::lonnet(); +use Apache::loncommon(); sub handler { @@ -57,7 +62,7 @@ sub handler { # Get query string for limited number of parameters - map { + foreach (split(/&/,$ENV{'QUERY_STRING'})) { my ($name, $value) = split(/=/,$_); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; @@ -67,7 +72,7 @@ sub handler { $ENV{'form.'.$name}=$value; } } - } (split(/&/,$ENV{'QUERY_STRING'})); + } # Get the files @@ -107,7 +112,7 @@ sub handler { } - if (&Apache::lonnet::fileembstyle(($efn=~/\.(\w+)$/)) eq + if (&Apache::loncommon::fileembstyle(($efn=~/\.(\w+)$/)) eq 'ssi') { if ($ENV{'form.versionone'} eq 'priv') { my $fn='/home/'.$cuname.'/public_html/'.$efn;