Diff for /loncom/homework/structuretags.pm between versions 1.533 and 1.534

version 1.533, 2015/04/10 08:22:21 version 1.534, 2015/04/10 12:01:28
Line 811  sub template_dropdown_datastructure { Line 811  sub template_dropdown_datastructure {
         foreach my $title (sort @{$tmplthash{$cat}}) {          foreach my $title (sort @{$tmplthash{$cat}}) {
             my $path = $tmpltcontent{$title}->[0];              my $path = $tmpltcontent{$title}->[0];
             my $code;              my $code;
             open(FH, "<:encoding(UTF-8)", $path);              open(FH, "<$path");
             while(<FH>){              while(<FH>){
                 $code.= $_ unless $_ =~ /(<problem>)|(<\/problem>)/;                  $code.= $_ unless $_ =~ /(<problem>)|(<\/problem>)/;
             }              }
             close(FH);              close(FH);
   
  if ($code ne '') {   if ($code ne '') {
  my $href = 'javascript:insertText(\'' . &convert_for_js(&HTML::Entities::encode($code)) . '\')';                  my $href = 'javascript:insertText(\'' . &convert_for_js(&HTML::Entities::encode($code,'<>&"')) . '\')';
  my $currItem = [$href, $title, undef];   my $currItem = [$href, $title, undef];
  push @{$catItems}, $currItem;   push @{$catItems}, $currItem;
  }   }

Removed from v.1.533  
changed lines
  Added in v.1.534


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>