Diff for /loncom/interface/lonsimplepage.pm between versions 1.19 and 1.22

version 1.19, 2004/05/12 18:53:35 version 1.22, 2004/07/27 23:35:34
Line 104  ENDDOCUMENT Line 104  ENDDOCUMENT
 # --------------------------------------- There is such a user, get environment  # --------------------------------------- There is such a user, get environment
   
     if ($target ne 'tex') {      if ($target ne 'tex') {
  $r->print('</head>'.&Apache::loncommon::bodytag   $r->print(&Apache::lonhtmlcommon::htmlareaheaders().
     '</head>'.&Apache::loncommon::bodytag
   ("Course Page",$forcestudent,$addentries,'',$dom,$ENV{'form.register'}));    ("Course Page",$forcestudent,$addentries,'',$dom,$ENV{'form.register'}));
     }      }
   
Line 138  ENDDOCUMENT Line 139  ENDDOCUMENT
     if (($allowed) && ($ENV{'form.storesyl'})) {      if (($allowed) && ($ENV{'form.storesyl'})) {
  foreach (keys %syllabusfields) {   foreach (keys %syllabusfields) {
     my $field=$ENV{'form.'.$_};      my $field=$ENV{'form.'.$_};
       chomp($field);
     $field=~s/\s+$//s;      $field=~s/\s+$//s;
       $field=~s/^\s+//s;
       $field=~s/\<br\s*\/*\>$//s;
     $field=&Apache::lonfeedback::clear_out_html($field,1);      $field=&Apache::lonfeedback::clear_out_html($field,1);
     $syllabus{$_}=$field;      $syllabus{$_}=$field;
  }   }
Line 151  ENDDOCUMENT Line 155  ENDDOCUMENT
  if ($syllabus{'uploaded.photourl'}) {   if ($syllabus{'uploaded.photourl'}) {
     &Apache::lonnet::allowuploaded('/adm/smppg',      &Apache::lonnet::allowuploaded('/adm/smppg',
    $syllabus{'uploaded.photourl'});     $syllabus{'uploaded.photourl'});
       
     if ($target ne 'tex') {      my $image='<img src="'.$syllabus{'uploaded.photourl'}.'"
  $r->print('<img src="'.$syllabus{'uploaded.photourl'}.                              align="right" />';
   '" align="right" />');      if ($target eq 'tex') {
     } else {   $image=&Apache::lonxml::xmlparse($r,'tex',$image);
  $r->print(&Apache::lonxml::xmlparse($r,'tex','<img src="'.$syllabus{'uploaded.photourl'}.  
   '" align="right" />'));  
     }      }
       $r->print($image);
  }   }
  if ($allowed) {   if ($allowed) {
     $r->print(      $r->print(
Line 176  ENDDOCUMENT Line 179  ENDDOCUMENT
  $message   $message
     =~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;      =~s/(https*\:\/\/[^\s]+)/\<a href=\"$1\"\>\<tt\>$1\<\/tt\>\<\/a\>/g;
  $message=&Apache::lontexconvert::msgtexconverted($message);   $message=&Apache::lontexconvert::msgtexconverted($message);
    if ($allowed) {
       $message=&Apache::lonspeller::markeduptext($message);
    }
  unless ($_ eq 'aaa_title') {   unless ($_ eq 'aaa_title') {
     if (($_ ne 'bbb_content') || ($allowed)) {      if (($_ ne 'bbb_content') || ($allowed)) {
  if ($target ne 'tex') {   if ($target ne 'tex') {
Line 194  ENDDOCUMENT Line 200  ENDDOCUMENT
     }      }
     if ($allowed) {      if ($allowed) {
  if ($target ne 'tex') {   if ($target ne 'tex') {
     $r->print('<br /><textarea cols="80" rows="20" name="'.$_.'">'.      $r->print('<br /><textarea cols="80" rows="24" name="'.$_.'" id="'.$_.'">'.
       $syllabus{$_}.        $syllabus{$_}.
       '</textarea><input type="submit" name="storesyl" value="Store" />');        '</textarea><input type="submit" name="storesyl" value="Store" />');
  } else {   } else {
Line 224  ENDDOCUMENT Line 230  ENDDOCUMENT
     }      }
  }   }
  if ($allowed && ($ENV{'form.grade_target'} ne 'tex')) {   if ($allowed && ($ENV{'form.grade_target'} ne 'tex')) {
     $r->print('</form>');      $r->print(&Apache::lonhtmlcommon::htmlareaselectactive
         ('bbb_content').'</form>');
  }   }
  if ($ENV{'form.grade_target'} ne 'tex') {$r->print('</p>');}   if ($ENV{'form.grade_target'} ne 'tex') {$r->print('</p>');}
     } else {      } else {

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


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