Diff for /loncom/interface/lonbulletin.pm between versions 1.41 and 1.42

version 1.41, 2006/08/28 13:09:51 version 1.42, 2006/10/23 18:48:47
Line 212  sub handler { Line 212  sub handler {
           &Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);            &Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);
        }         }
        if (($allowed) && ($env{'form.storesyl'})) {         if (($allowed) && ($env{'form.storesyl'})) {
    foreach (keys %syllabusfields) {     foreach my $syl_field (keys(%syllabusfields)) {
                my $field=$env{'form.'.$_};                 my $field=$env{'form.'.$syl_field};
                $field=~s/\s+$//s;                 $field=~s/\s+$//s;
                $field=&Apache::lonfeedback::clear_out_html($field,1);                 $field=&Apache::lonfeedback::clear_out_html($field,1);
        $syllabus{$_}=$field;         $syllabus{$syl_field}=$field;
            }             }
            $syllabus{'uploaded.lastmodified'}=time;             $syllabus{'uploaded.lastmodified'}=time;
            &Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);             &Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);
Line 239  sub handler { Line 239  sub handler {
          '<input type="submit" name="storeupl" value="'.&mt('Upload').'">'.           '<input type="submit" name="storeupl" value="'.&mt('Upload').'">'.
  '</form><form method="post">');   '</form><form method="post">');
        }         }
        foreach (sort keys %syllabusfields) {         foreach my $field (sort(keys(%syllabusfields))) {
           if (($syllabus{$_}) || ($allowed)) {            if (($syllabus{$field}) || ($allowed)) {
               my $message=$syllabus{$_};                my $message=$syllabus{$field};
       &Apache::lonfeedback::newline_to_br(\$message);        &Apache::lonfeedback::newline_to_br(\$message);
       $message        $message
         =~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;          =~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
Line 249  sub handler { Line 249  sub handler {
   $message=&Apache::lonspeller::markeduptext($message);    $message=&Apache::lonspeller::markeduptext($message);
       }        }
       $message=&Apache::lontexconvert::msgtexconverted($message);        $message=&Apache::lontexconvert::msgtexconverted($message);
       unless ($_ eq 'aaa_title') {        unless ($field eq 'aaa_title') {
  if (($_ ne 'bbb_content') || ($allowed)) {   if (($field ne 'bbb_content') || ($allowed)) {
     if ($target ne 'tex') {      if ($target ne 'tex') {
  $r->print('<h3>'.$syllabusfields{$_}.'</h3>');   $r->print('<h3>'.$syllabusfields{$field}.'</h3>');
     } else {      } else {
  $r->print('\\\\\textbf{'.$syllabusfields{$_}.'}\\\\');   $r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\');
     }      }
  }   }
  if ($target ne 'tex') {   if ($target ne 'tex') {
Line 264  sub handler { Line 264  sub handler {
     $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$message).' ');      $r->print(' '.&Apache::lonxml::xmlparse($r,'tex',$message).' ');
  }   }
                  if ($allowed) {                   if ($allowed) {
                 $r->print('<br /><textarea cols="80" rows="10" name="'.$_.'">'.                  $r->print('<br /><textarea cols="80" rows="10" name="'.$field.'">'.
   &HTML::Entities::encode($syllabus{$_},'&"<>').    &HTML::Entities::encode($syllabus{$field},'&"<>').
            '</textarea><input type="submit" name="storesyl" value="'.&mt('Store').'" />');             '</textarea><input type="submit" name="storesyl" value="'.&mt('Store').'" />');
         }          }
     } else {      } else {
Line 276  sub handler { Line 276  sub handler {
  }   }
                 if ($allowed) {                  if ($allowed) {
                  $r->print(                   $r->print(
                 '<br />'.&mt('Topic').'<br /><textarea cols="80" rows="2" name="'.$_.'">'.                  '<br />'.&mt('Topic').'<br /><textarea cols="80" rows="2" name="'.$field.'">'.
   &HTML::Entities::encode($syllabus{$_},'&"<>').    &HTML::Entities::encode($syllabus{$field},'&"<>').
            '</textarea><input type="submit" name="storesyl" value="'.&mt('Store').'" />');             '</textarea><input type="submit" name="storesyl" value="'.&mt('Store').'" />');
                 }                  }
             }              }

Removed from v.1.41  
changed lines
  Added in v.1.42


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