--- loncom/interface/lontemplate.pm 2008/12/16 10:41:02 1.9 +++ loncom/interface/lontemplate.pm 2008/12/17 00:44:53 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network # "Template" Functions to generate html output # -# $Id: lontemplate.pm,v 1.9 2008/12/16 10:41:02 ehlerst Exp $ +# $Id: lontemplate.pm,v 1.10 2008/12/17 00:44:53 ehlerst Exp $ # # Copyright Michigan State University Board of Trustees # @@ -58,7 +58,7 @@ sub print_content_template{ my ($r,$allowed,$target,$syllabusfields_ref,$syllabus_ref) = @_; my %syllabusfields = %{$syllabusfields_ref}; my %syllabus = %{$syllabus_ref}; - $r->print('
'); + &start_ContentBox($r,$allowed); foreach my $field (sort(keys(%syllabusfields))) { if (($syllabus{$field}) || ($allowed)) { my $message=$syllabus{$field}; @@ -70,21 +70,23 @@ sub print_content_template{ } $message=&Apache::lontexconvert::msgtexconverted($message); if ($target ne 'tex') { - - &print_template($r,$syllabusfields{$field},$message); - - - + if($allowed){ + $r->print('

'); + } + &print_template($r,$syllabusfields{$field},$message,$allowed); } else { $r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'. &Apache::lonxml::xmlparse($r,'tex',$message).'\\\\'); } if ($allowed) { &print_editbox_template($r,$syllabus{$field},$field); + if($target ne 'tex'){ + $r->print('

'); + } } } } - $r->print('
'); + &end_ContentBox($r); } sub start_ContentBox{ @@ -125,7 +127,7 @@ sub print_template sub print_editbox_template { my ($r,$content,$field) = @_; - $r->print('
');