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

version 1.22, 2004/05/03 19:04:49 version 1.30, 2004/08/25 18:08:11
Line 107  ENDDOCUMENT Line 107  ENDDOCUMENT
   
        $allowed=(($ENV{'user.name'} eq $cnum) &&          $allowed=(($ENV{'user.name'} eq $cnum) && 
  ($ENV{'user.domain'} eq $cdom));   ($ENV{'user.domain'} eq $cdom));
        if ($forcestudent) { $allowed=0; }         if ($forcestudent or $target eq 'tex') { $allowed=0; }
     
        if ($allowed) {         if ($allowed) {
    if ($target ne 'tex') {     if ($target ne 'tex') {
Line 153  ENDDOCUMENT Line 153  ENDDOCUMENT
        if ($syllabus{'uploaded.photourl'}) {         if ($syllabus{'uploaded.photourl'}) {
    &Apache::lonnet::allowuploaded('/adm/aboutme',     &Apache::lonnet::allowuploaded('/adm/aboutme',
   $syllabus{'uploaded.photourl'});    $syllabus{'uploaded.photourl'});
    $r->print('<img src="'.$syllabus{'uploaded.photourl'}.     my $image='<img src="'.$syllabus{'uploaded.photourl'}.'"
              '" align="right" />');                             align="right" />';
      if ($target eq 'tex') {
          $image=&Apache::lonxml::xmlparse($r,'tex',$image);
      }
      $r->print($image);
        }         }
        if ($allowed & $target ne 'tex') {         if ($allowed) {
            $r->print(             $r->print(
  '<form method="post" enctype="multipart/form-data">'.   '<form method="post" enctype="multipart/form-data">'.
          '<h3>'.&mt('Upload a Photo').'</h3>'.           '<h3>'.&mt('Upload a Photo').'</h3>'.
Line 170  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 and $target ne 'tex') {                if ($allowed) {
                  $r->print('<br /><textarea cols="80" rows="6" name="'.$_.'">'.                   $r->print('<br /><textarea cols="80" rows="6" name="'.$_.'">'.
    $syllabus{$_}.     $syllabus{$_}.
            '</textarea><input type="submit" name="storesyl" value="'.             '</textarea><input type="submit" name="storesyl" value="'.
Line 186  ENDDOCUMENT Line 193  ENDDOCUMENT
       }        }
   }    }
        }         }
        if ($allowed and $target ne 'tex') {         if ($allowed) {
    $r->print('</form>');     $r->print('</form>');
        }         }
        if ($target ne 'tex') {$r->print('</p>');} else {$r->print('\\\\');}         if ($target ne 'tex') {$r->print('</p>');} else {$r->print('\\\\');}
Line 196  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').
Line 205  ENDDOCUMENT Line 213  ENDDOCUMENT
             $r->print(&Apache::loncommon::noteswrapper('Add Records',$cnum,$cdom));              $r->print(&Apache::loncommon::noteswrapper('Add Records',$cnum,$cdom));
     } else {      } else {
  $r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\');   $r->print('\\\\\textbf{'.&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'}\\\\'.&mt('Shared by course faculty and staff').'\\\\\\\\');
  my $mess=&Apache::lonmsg::disfacetoface($r,$cnum,$cdom);   &Apache::lonmsg::disfacetoface($r,$cnum,$cdom);
  #    $r->print(' '.&Apache::lonxml::xmlparse($r,' ',$mess).' ');  
  $r->print(' >>>>'.$mess.'<<<< ');  
     }      }
         }          }
     }      }

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


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