Diff for /loncom/interface/lontemplate.pm between versions 1.45.6.3 and 1.45.6.4

version 1.45.6.3, 2012/12/18 15:53:07 version 1.45.6.4, 2013/05/10 23:48:12
Line 114  sub print_template { Line 114  sub print_template {
 }  }
   
 sub print_start_template {  sub print_start_template {
  my ($r,$topic,$boxclass) = @_;   my ($r,$topic,$boxclass,$id,$display) = @_;
  $r->print('<div class="'.$boxclass.'">');          my $idattrib;
           if ($id ne '') {
               $idattrib = ' id="'.$id.'"';
           }
    $r->print('<div class="'.$boxclass.'"'.$idattrib.$display.'>');
  $r->print('<h4 class="LC_hcell">'.$topic.'</h4>');   $r->print('<h4 class="LC_hcell">'.$topic.'</h4>');
 }  }
   
Line 145  sub print_saveall_template { Line 149  sub print_saveall_template {
 }  }
   
 sub print_template_fields {  sub print_template_fields {
  my ($r, $data_ref, $fields_ref, $target, $allowed, $default_rich_text, $custom_handlers_ref, $group) = @_;   my ($r, $data_ref, $fields_ref, $target, $allowed, $default_rich_text, $custom_handlers_ref, $group,
               $displayref,$noshowref) = @_;
  my @html_ids = ();   my @html_ids = ();
  my %data = %{$data_ref};   my %data = %{$data_ref};
  my %fields = %{$fields_ref};   my %fields = %{$fields_ref};
  my %custom_handlers = %{$custom_handlers_ref};   my %custom_handlers = %{$custom_handlers_ref};
           my (%displays,%noshow);
           if (ref($displayref) eq 'HASH') {
               %displays = %{$displayref};
           }
           if (ref($noshowref) eq 'HASH') {
               %noshow = %{$noshowref};
           }
  foreach my $field (sort(keys(%fields))) {   foreach my $field (sort(keys(%fields))) {
  my $message = $data{$field} if (($data{$field}=~/\w/) || ($allowed));   my $message = $data{$field} if (($data{$field}=~/\w/) || ($allowed));
                   my $display = $displays{$field};
                   unless ($allowed) {
                       next if ($noshow{$field});
                   }
                 if ((%custom_handlers) && ($custom_handlers{$field})) {                  if ((%custom_handlers) && ($custom_handlers{$field})) {
  $custom_handlers{$field}->($r, $field, $message, $group, $data_ref, $fields_ref, $target, $allowed);   $custom_handlers{$field}->($r, $field, $message, $group, $data_ref, $fields_ref, $target, $allowed, $display);
  } else {   } else {
  if (($data{$field}=~/\w/) || ($allowed)) {   if (($data{$field}=~/\w/) || ($allowed)) {
                                 if (!&Apache::lonfeedback::contains_block_html($message)) {                                  if (!&Apache::lonfeedback::contains_block_html($message)) {
Line 169  sub print_template_fields { Line 184  sub print_template_fields {
                                 $message=&Apache::lontexconvert::msgtexconverted($message);                                  $message=&Apache::lontexconvert::msgtexconverted($message);
  if ($target ne 'tex') {   if ($target ne 'tex') {
  #output of syllabusfields will be generated here.    #output of syllabusfields will be generated here. 
  &Apache::lontemplate::print_start_template($r,$fields{$field},'LC_Box');   &Apache::lontemplate::print_start_template($r,$fields{$field},'LC_Box','box_'.$field,$display);
  $r->print($message);   $r->print($message);
  if ($allowed) {   if ($allowed) {
  $r->print("<br /><div>");   $r->print("<br /><div>");

Removed from v.1.45.6.3  
changed lines
  Added in v.1.45.6.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.