--- loncom/interface/lontemplate.pm 2010/02/15 20:28:51 1.43.2.1
+++ loncom/interface/lontemplate.pm 2011/05/13 19:45:28 1.43.4.1
@@ -1,7 +1,7 @@
# The LearningOnline Network
# "Template" Functions to generate html output
#
-# $Id: lontemplate.pm,v 1.43.2.1 2010/02/15 20:28:51 faziophi Exp $
+# $Id: lontemplate.pm,v 1.43.4.1 2011/05/13 19:45:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -114,12 +114,9 @@ sub print_template {
}
sub print_start_template {
- my ($r,$topic,$boxclass, $id) = @_;
- $r->print('
print(' id="'.$id.'"');
- }
- $r->print('>
'.$topic.'
');
+ my ($r,$topic,$boxclass) = @_;
+ $r->print('
');
+ $r->print('
'.$topic.'
');
}
sub print_end_template {
@@ -184,8 +181,12 @@ sub print_template_fields {
&Apache::lontemplate::print_end_template($r);
} else {
my $safeinit;
- $r->print(&Apache::lonxml::xmlparse($r,'tex',''.$fields{$field}.'
'));
- $r->print(&Apache::lonxml::xmlparse($r,'tex',$message));
+ if ($fields{$field}=~/\w/) {
+ $r->print(&Apache::lonxml::xmlparse($r,'tex',''.$fields{$field}.'
'));
+ } else {
+ $r->print(&Apache::lonxml::xmlparse($r,'tex','
'));
+ }
+ $r->print(&Apache::lonxml::xmlparse($r,'tex',$message));
}
push(@html_ids,$field);
}