Diff for /loncom/interface/lonsyllabus.pm between versions 1.107 and 1.110

version 1.107, 2010/03/03 21:33:15 version 1.110, 2010/08/07 19:23:51
Line 282  ENDSCRIPT Line 282  ENDSCRIPT
 #----------Print last update  #----------Print last update
     my $lastmod=$syllabus{'uploaded.lastmodified'};      my $lastmod=$syllabus{'uploaded.lastmodified'};
     $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));      $lastmod=($lastmod?&Apache::lonlocal::locallocaltime($lastmod):&mt('never'));
     my $who = &Apache::loncommon::aboutmewrapper(      my $who;
         &Apache::loncommon::plainname($syllabus{'uploaded.name'},      if (($env{'user.name'} ne 'public') && ($env{'user.domain'} ne 'public')) {
         $syllabus{'uploaded.domain'}),$syllabus{'uploaded.name'},          $who = &Apache::loncommon::aboutmewrapper(
         $syllabus{'uploaded.domain'});                     &Apache::loncommon::plainname($syllabus{'uploaded.name'},
                      $syllabus{'uploaded.domain'}),$syllabus{'uploaded.name'},
                      $syllabus{'uploaded.domain'});
       } else {
           # Public user?
           # Only display name of user, but no link to personal information page
           $who = &Apache::loncommon::plainname(
                      $syllabus{'uploaded.name'},
                      $syllabus{'uploaded.domain'});
       }
   
     if ($target ne 'tex') {      if ($target ne 'tex') {
         $r->print('<div class="LC_info">'.&mt('Last updated').': '.          $r->print('<div class="LC_info">'.&mt('Last updated').': '.
             $lastmod . ' '.              $lastmod . ' '.
Line 356  ENDSCRIPT Line 366  ENDSCRIPT
              &Apache::lonannounce::readcalendar($cdom.'_'.$cnum));               &Apache::lonannounce::readcalendar($cdom.'_'.$cnum));
     if ($target ne 'tex') {      if ($target ne 'tex') {
         if ($allowed) {          if ($allowed) {
             &Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_Box');              &Apache::lontemplate::print_start_template($r,&mt('RSS Feeds and Blogs'),'LC_Box');
             $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));              $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
             my $editurl= &Apache::lonnet::absolute_url().'/adm/'.$cdom.'/'.$cnum.'/_rss.html';              my $editurl= &Apache::lonnet::absolute_url().'/adm/'.$cdom.'/'.$cnum.'/_rss.html';
             $r->print( '<a href="'.$editurl.'">'.&mt('New RSS Feed or Blog').'</a>');              $r->print( '<a href="'.$editurl.'">'.&mt('New RSS Feed or Blog').'</a>');
             &Apache::lontemplate::print_end_template($r);              &Apache::lontemplate::print_end_template($r);
         } elsif (&Apache::lonrss::advertisefeeds($cnum,$cdom) ne '') {          } elsif (&Apache::lonrss::advertisefeeds($cnum,$cdom) ne '') {
             &Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_Box');              &Apache::lontemplate::print_start_template($r,&mt('RSS Feeds and Blogs'),'LC_Box');
             $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));              $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));
             &Apache::lontemplate::print_end_template($r);              &Apache::lontemplate::print_end_template($r);
         }          }
Line 376  ENDSCRIPT Line 386  ENDSCRIPT
             $r->print('<form method="post" action="">'.              $r->print('<form method="post" action="">'.
             '<input type="hidden" name="forceedit" value="edit" />');              '<input type="hidden" name="forceedit" value="edit" />');
         }          }
         my @htmlids=();  
  my $url_include_handler = sub {   my $url_include_handler = sub {
  my ($r, $field, $message, $group, $data_ref, $fields_ref, $target, $allowed) = @_;   my ($r, $field, $message, $group, $data_ref, $fields_ref, $target, $allowed) = @_;
  my %data = %{$data_ref};   my %data = %{$data_ref};
Line 418  ENDSCRIPT Line 427  ENDSCRIPT
  }   }
  };   };
  my %custom_hash = ( 'lll_includeurl' => $url_include_handler );   my %custom_hash = ( 'lll_includeurl' => $url_include_handler );
  @htmlids = &Apache::lontemplate::print_template_fields($r, \%syllabus, \%syllabusfields,    &Apache::lontemplate::print_template_fields($r, \%syllabus, \%syllabusfields, 
  $target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML, \%custom_hash);   $target, $allowed, Apache::lontemplate->RICH_TEXT_DETECT_HTML, \%custom_hash);
         if ($allowed) {          if ($allowed) {
             $r->print('</form>'.              $r->print('</form>'.
             &Apache::lonhtmlcommon::htmlareaselectactive(@htmlids));              &Apache::lonhtmlcommon::htmlareaselectactive());
         }          }
     } else {      } else {
         if ($target ne 'tex') {$r->print('<p>');} else {$r->print('\par ');}          if ($target ne 'tex') {$r->print('<p>');} else {$r->print('\par ');}

Removed from v.1.107  
changed lines
  Added in v.1.110


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