Diff for /loncom/interface/lonaboutme.pm between versions 1.23 and 1.30

version 1.23, 2004/05/04 14:20:55 version 1.30, 2004/08/25 18:08:11
Line 124  ENDDOCUMENT Line 124  ENDDOCUMENT
       if (($ENV{'form.uploaddoc.filename'}) &&        if (($ENV{'form.uploaddoc.filename'}) &&
           ($ENV{'form.storeupl'}) && ($allowed)) {            ($ENV{'form.storeupl'}) && ($allowed)) {
    if ($ENV{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {     if ($ENV{'form.uploaddoc.filename'}=~/\.(gif|jpg|png|jpeg)$/i) {
              $syllabus{'uploaded.photourl'}=        if ($syllabus{'uploaded.photourl'}) {
                  &Apache::lonnet::userfileupload('uploaddoc');    &Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'});
         }
         $syllabus{'uploaded.photourl'}=
                    &Apache::lonnet::userfileupload('uploaddoc',undef,'aboutme');
    }     }
           $syllabus{'uploaded.lastmodified'}=time;            $syllabus{'uploaded.lastmodified'}=time;
           &Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum);            &Apache::lonnet::put('aboutme',\%syllabus,$cdom,$cnum);
Line 148  ENDDOCUMENT Line 151  ENDDOCUMENT
        $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));         $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));
        $r->print(&mt('Last updated').': '.$lastmod);         $r->print(&mt('Last updated').': '.$lastmod);
        if ($syllabus{'uploaded.photourl'}) {         if ($syllabus{'uploaded.photourl'}) {
    $r->print('<img src="'.     &Apache::lonnet::allowuploaded('/adm/aboutme',
              &Apache::lonnet::tokenwrapper($syllabus{'uploaded.photourl'}).    $syllabus{'uploaded.photourl'});
              '" align="right" />');     my $image='<img src="'.$syllabus{'uploaded.photourl'}.'"
                              align="right" />';
      if ($target eq 'tex') {
          $image=&Apache::lonxml::xmlparse($r,'tex',$image);
      }
      $r->print($image);
        }         }
        if ($allowed) {         if ($allowed) {
            $r->print(             $r->print(
Line 166  ENDDOCUMENT Line 174  ENDDOCUMENT
               $message=~s/\n/\<br \/\>/g;                $message=~s/\n/\<br \/\>/g;
               $message                $message
              =~s/(http\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;               =~s/(http\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
         if ($allowed) {
     $message=&Apache::lonspeller::markeduptext($message);
         }
       $message=&Apache::lontexconvert::msgtexconverted($message);        $message=&Apache::lontexconvert::msgtexconverted($message);
       if ($target ne 'tex') {        if ($target ne 'tex') {
   $r->print('<h3>'.$syllabusfields{$_}.'</h3><blockquote>'.    $r->print('<h3>'.$syllabusfields{$_}.'</h3><blockquote>'.
                             $message.'</blockquote>');                              $message.'</blockquote>');
       } else {        } else {
      $r->print('\\\\\textbf{'.$syllabusfields{$_}.'}\\\\'.       $r->print('\\\\\textbf{'.$syllabusfields{$_}.'}\\\\'.
        &Apache::lonxml::xmlparse($r,' ',$message).'\\\\');         &Apache::lonxml::xmlparse($r,'tex',$message).'\\\\');
       }        }
               if ($allowed) {                if ($allowed) {
                  $r->print('<br /><textarea cols="80" rows="6" name="'.$_.'">'.                   $r->print('<br /><textarea cols="80" rows="6" name="'.$_.'">'.
Line 192  ENDDOCUMENT Line 203  ENDDOCUMENT
     if ($ENV{'request.course.id'}) {      if ($ENV{'request.course.id'}) {
  if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {   if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
     if ($target ne 'tex') {      if ($target ne 'tex') {
    $r->print('<a name="coursecomment" />');
  $r->print('<hr /><h3>'.   $r->print('<hr /><h3>'.
                           &mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'</h3>'.                            &mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'</h3>'.
                           &mt('Shared by course faculty and staff').                            &mt('Shared by course faculty and staff').

Removed from v.1.23  
changed lines
  Added in v.1.30


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