--- loncom/interface/lonaboutme.pm 2006/09/21 15:50:10 1.56 +++ loncom/interface/lonaboutme.pm 2006/10/23 18:48:46 1.57 @@ -1,7 +1,7 @@ # The LearningOnline Network # "About Me" Personal Information # -# $Id: lonaboutme.pm,v 1.56 2006/09/21 15:50:10 albertel Exp $ +# $Id: lonaboutme.pm,v 1.57 2006/10/23 18:48:46 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -171,12 +171,12 @@ sub handler { } } if (($allowed) && ($env{'form.storesyl'})) { - foreach (keys %syllabusfields) { - my $field=$env{'form.'.$_}; + foreach my $syl_field (keys(%syllabusfields)) { + my $field=$env{'form.'.$syl_field}; $field=~s/\s+$//s; $field=&Apache::lonfeedback::clear_out_html($field, $env{'user.adv'}); - $syllabus{$_}=$field; + $syllabus{$syl_field}=$field; } $syllabus{'uploaded.lastmodified'}=time; &Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum); @@ -209,9 +209,9 @@ sub handler { '
'); } - foreach (sort keys %syllabusfields) { - if (($syllabus{$_}) || ($allowed)) { - my $message=$syllabus{$_}; + foreach my $field (sort(keys(%syllabusfields))) { + if (($syllabus{$field}) || ($allowed)) { + my $message=$syllabus{$field}; &Apache::lonfeedback::newline_to_br(\$message); $message =~s/(http\:\/\/[^\s]+)/\\$1\<\/tt\>\<\/a\>/g; @@ -220,15 +220,15 @@ sub handler { } $message=&Apache::lontexconvert::msgtexconverted($message); if ($target ne 'tex') { - $r->print('

'.$syllabusfields{$_}.'

'. + $r->print('

'.$syllabusfields{$field}.'

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