version 1.42, 2001/07/06 19:50:02
|
version 1.44, 2001/07/09 04:10:30
|
Line 234 sub start_meta {
|
Line 234 sub start_meta {
|
sub end_meta { |
sub end_meta { |
} |
} |
|
|
sub editfield { |
|
my ($tag,$data)=@_; |
|
|
|
my $count=0; |
|
my $maxlength=-1; |
|
map { $count++; |
|
if (length($_) > $maxlength) { $maxlength = length ($_); } |
|
} split ("\n", $data); |
|
|
|
return "<br />\n<$tag><br />\n <textarea rows=\"$count\" cols=\"$maxlength\" name=homework_edit_".$Apache::lonxml::curdepth.">$data</textarea><br />\n</$tag><br />\n"; |
|
} |
|
|
|
sub getfilenothere { |
|
my ($filename) = @_; |
|
my $a=""; |
|
|
|
$filename=~ s/^\s*(\S+)\s*$/$1/; ## strip off leading and trailing spaces |
|
$filename="/home/httpd/html/res".$filename; |
|
if (! -e $filename ) { |
|
&Apache::lonnet::subscribe($filename); |
|
&Apache::lonnet::repcopy($filename); |
|
} |
|
if (! -e $filename ) { return -1; }; |
|
my $fh=Apache::File->new($filename); |
|
while (<$fh>) { |
|
$a .=$_; |
|
} |
|
return $a |
|
} |
|
|
|
|
|
sub start_storetc { |
sub start_storetc { |
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result = ''; |
my $result = ''; |
&Apache::lonxml::startredirection; |
&Apache::lonxml::startredirection; |
return $result; |
return $result; |
} |
} |
|
|
sub end_storetc { |
sub end_storetc { |
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
my $output=&Apache::lonxml::endredirection; |
my $output=&Apache::lonxml::endredirection; |
$output =~ s/\"/\"\;/g; |
$output =~ s/\"/\"\;/g; |
Line 284 sub end_storetc {
|
Line 253 sub end_storetc {
|
|
|
sub start_physnet { |
sub start_physnet { |
|
|
my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $cbistylefile = &Apache::lonnet::getfile('/home/httpd/res/msu/physnet/cbi.sty'); |
my $cbistylefile = &Apache::lonnet::getfile('/home/httpd/res/msu/physnet/cbi.sty'); |
%$style = (%$style,&Apache::style::styleparser($target,$cbistylefile)); |
%$style = (%$style,&Apache::style::styleparser($target,$cbistylefile)); |
&Apache::lonxml::newparser($parser$$style{'physnet'}); |
if ( defined($$style{'physnet'}) ) { |
|
&Apache::lonxml::newparser($parser,$$style{'physnet'}); |
|
} |
|
|
return ""; |
return ''; |
} |
} |
|
|
|
|