version 1.372, 2007/07/04 14:02:14
|
version 1.375.2.1, 2007/10/15 20:00:12
|
Line 448 sub start_meta {
|
Line 448 sub start_meta {
|
if ((not defined $content) && (not defined $name)) { |
if ((not defined $content) && (not defined $name)) { |
&Apache::lonxml::startredirection(); |
&Apache::lonxml::startredirection(); |
} |
} |
|
} elsif ($target eq 'edit') { |
|
$currentstring .= &Apache::edit::tag_start($target,$token); |
|
$currentstring .= &Apache::edit::text_arg('Name:','name',$token,30); |
|
$currentstring .= &Apache::edit::text_arg('Content:','content',$token,70); |
|
$currentstring .= &Apache::edit::end_row(); |
|
} elsif ($target eq 'modified') { |
|
my $constructtag = |
|
&Apache::edit::get_new_args($token,$parstack,$safeeval, |
|
'name','content'); |
|
if ($constructtag) { $currentstring = &Apache::edit::rebuild_tag($token); } |
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
Line 471 sub end_meta {
|
Line 481 sub end_meta {
|
return $currentstring; |
return $currentstring; |
} |
} |
|
|
|
sub insert_meta { |
|
return ' |
|
<meta />'; |
|
} |
|
|
# accessrule |
# accessrule |
sub start_accessrule { |
sub start_accessrule { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my $currentstring = ''; |
my $currentstring = ''; |
my $eff=&Apache::lonxml::get_param |
my $eff =&Apache::lonxml::get_param('effect',$parstack,$safeeval,undef,1); |
('effect',$parstack,$safeeval,undef,1); |
my $realm=&Apache::lonxml::get_param('realm', $parstack,$safeeval,undef,1); |
my $realm=&Apache::lonxml::get_param |
my $role =&Apache::lonxml::get_param('role', $parstack,$safeeval,undef,1); |
('realm',$parstack,$safeeval,undef,1); |
my $type =&Apache::lonxml::get_param('type', $parstack,$safeeval,undef,1); |
my $role=&Apache::lonxml::get_param |
|
('role',$parstack,$safeeval,undef,1); |
my ($dom,$crs,$sec,$separator); |
my ($dom,$crs,$sec)=split(/\_/,$realm); |
|
$dom = &LONCAPA::clean_domain($dom); |
|
my $type=&Apache::lonxml::get_param |
|
('type',$parstack,$safeeval,undef,1); |
|
if ($type eq 'user') { |
if ($type eq 'user') { |
|
($dom,$crs,$sec)=split(m{/},$realm); |
$crs = &LONCAPA::clean_username($crs); |
$crs = &LONCAPA::clean_username($crs); |
|
$separator = '/'; |
} else { |
} else { |
|
($dom,$crs,$sec)=split(/\_/,$realm); |
$crs = &LONCAPA::clean_courseid($crs); |
$crs = &LONCAPA::clean_courseid($crs); |
|
$separator = '_'; |
} |
} |
|
$dom = &LONCAPA::clean_domain($dom); |
|
|
$sec =~s/\W//; |
$sec =~s/\W//; |
$realm = $dom; |
$realm = $dom; |
if ($crs =~ /\S/) { $realm .= '_'.$crs; } |
if ($crs =~ /\S/) { $realm .= $separator.$crs; } |
if ($sec =~ /\S/) { $realm .= '_'.$sec; } |
if ($sec =~ /\S/) { $realm .= $separator.$sec; } |
$role=~s/\W//g; |
$role=~s/\W//g; |
|
|
if ($target eq 'web') { |
if ($target eq 'web') { |
Line 1251 sub start_br {
|
Line 1268 sub start_br {
|
$signal = 1; |
$signal = 1; |
} |
} |
} |
} |
if ($signal eq 1) { |
if ($signal != 1) { |
$currentstring .= ' \vskip 0 mm '; |
|
} else { |
|
$currentstring .= '\strut \\\\ \strut '; |
$currentstring .= '\strut \\\\ \strut '; |
} |
} |
|
|
Line 4523 sub align_latex_image {
|
Line 4538 sub align_latex_image {
|
my ($align, $latex_rendering, $image, $width, $height) = @_; |
my ($align, $latex_rendering, $image, $width, $height) = @_; |
my $currentstring; # The 1/2 wrapped image. |
my $currentstring; # The 1/2 wrapped image. |
my $closure; # The closure of the wrappage. |
my $closure; # The closure of the wrappage. |
|
|
|
# if it's none just return it back |
|
if ($latex_rendering eq 'none') { |
|
return ($image,''); |
|
} |
|
|
# If there's an alignment specification we need to honor it here. |
# If there's an alignment specification we need to honor it here. |
# For the horizontal alignments, we will also honor the |
# For the horizontal alignments, we will also honor the |
# value of the latex specfication. The default is parbox, |
# value of the latex specfication. The default is parbox, |