Diff for /loncom/interface/lonsyllabus.pm between versions 1.119 and 1.120

version 1.119, 2013/05/05 02:21:20 version 1.120, 2013/05/06 16:15:59
Line 143  sub handler { Line 143  sub handler {
         }          }
     }      }
   
       my $crstype = &Apache::loncommon::course_type();
   
 # ------------------------------ The buck stops here: internal syllabus display  # ------------------------------ The buck stops here: internal syllabus display
 # --------------------------------------------------------- The syllabus fields  # --------------------------------------------------------- The syllabus fields
     my %syllabusfields=&Apache::lonlocal::texthash(      my %syllabusfields=&Apache::lonlocal::texthash(
Line 292  ENDSCRIPT Line 294  ENDSCRIPT
                    text=>"Course syllabus"});                     text=>"Course syllabus"});
             $args->{'bread_crumbs'} = $brcrum;              $args->{'bread_crumbs'} = $brcrum;
         } elsif ($env{'form.folderpath'} =~ /^supplemental/) {          } elsif ($env{'form.folderpath'} =~ /^supplemental/) {
             my $crstype = &Apache::loncommon::course_type();  
             my $title = $env{'form.title'};              my $title = $env{'form.title'};
             if ($title eq '') {              if ($title eq '') {
                 $title = &mt('Syllabus');                  $title = &mt('Syllabus');
Line 646  ENDSCRIPT Line 647  ENDSCRIPT
             }              }
             &Apache::lontemplate::print_start_template($r,&mt('RSS Feeds and Blogs'),'LC_Box',              &Apache::lontemplate::print_start_template($r,&mt('RSS Feeds and Blogs'),'LC_Box',
                                                        'box_000_showrssfeeds',$display);                                                         'box_000_showrssfeeds',$display);
             $r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit));              my ($numfeeds,$hiddenfeeds,$rsslinktext);
               my $feeds=&Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit,\$numfeeds,\$hiddenfeeds);
               if ($numfeeds) {
                   $r->print($feeds);
                   $rsslinktext = &mt('New RSS Feed or Blog');
               } else {
                   my $msg = '<br />'.
                             &mt("RSS Feeds and Blogs item is not included in a student's view of the syllabus.");
                   if ($hiddenfeeds) {
                       $r->print('<p class="LC_info">'.
                                 &mt('All feeds currently hidden').
                                 $msg.
                                 '</p>');
                   } else {
                       $r->print('<p class="LC_info">'.
                                 &mt('No current feeds').
                                 $msg.
                                 '</p>');
                   }
                   $rsslinktext = &mt('Manage Course RSS Feeds/Blogs');
                   if ($crstype eq 'Community') {
                       $rsslinktext = &mt('Manage Communiity RSS Feeds/Blogs');
                   }
               }
             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.'">'.$rsslinktext.'</a>');
             &Apache::lontemplate::print_end_template($r);              &Apache::lontemplate::print_end_template($r);
         } else {          } else {
             unless ($syllabus{'000_showrssfeeds'} eq 'no') {              unless ($syllabus{'000_showrssfeeds'} eq 'no') {
                 if (&Apache::lonrss::advertisefeeds($cnum,$cdom) ne '') {                  my $feeds = &Apache::lonrss::advertisefeeds($cnum,$cdom,$forceedit);
                   if ($feeds ne '') {
                     &Apache::lontemplate::print_start_template($r,&mt('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($feeds);
                     &Apache::lontemplate::print_end_template($r);                      &Apache::lontemplate::print_end_template($r);
                 }                  }
             }              }

Removed from v.1.119  
changed lines
  Added in v.1.120


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