Diff for /loncom/interface/lonsyllabus.pm between versions 1.131 and 1.133

version 1.131, 2013/08/31 18:58:57 version 1.133, 2013/09/17 15:04:30
Line 35  use Apache::loncommon; Line 35  use Apache::loncommon;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lontexconvert;  use Apache::lontexconvert;
 use Apache::lonfeedback;  use Apache::lonfeedback;
   use Apache::lonhtmlgateway;
 use Apache::lonannounce;  use Apache::lonannounce;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonhtmlcommon;  use Apache::lonhtmlcommon;
Line 53  sub handler { Line 54  sub handler {
 # ------------------------------------------------------------ Get query string  # ------------------------------------------------------------ Get query string
     &Apache::loncommon::get_unprocessed_cgi      &Apache::loncommon::get_unprocessed_cgi
                         ($ENV{'QUERY_STRING'},['register','forceedit','todocs',                          ($ENV{'QUERY_STRING'},['register','forceedit','todocs',
                                                'folderpath','title']);                                                 'folderpath','title','only_body']);
 # ----------------------------------------------------- Is this even a course?  # ----------------------------------------------------- Is this even a course?
     my $homeserver=&Apache::lonnet::homeserver($cnum,$cdom);      my $homeserver=&Apache::lonnet::homeserver($cnum,$cdom);
     if ($homeserver eq 'no_host') {      if ($homeserver eq 'no_host') {
Line 97  sub handler { Line 98  sub handler {
     my $uploaded=$courseenv{'uploadedsyllabus'};      my $uploaded=$courseenv{'uploadedsyllabus'};
     my $minimal=$courseenv{'minimalsyllabus'};      my $minimal=$courseenv{'minimalsyllabus'};
   
     if (($minimal =~/\w/) || ($uploaded =~/\w/)) {       if (($minimal =~/\w/) || ($uploaded =~/\w/)) {
         my $item;          my $item;
         if ($minimal =~/\w/) {          if ($minimal =~/\w/) {
             if ($external =~ m{\Q$minimal\E$}) {              if ($external =~ m{\Q$minimal\E$}) {
Line 125  sub handler { Line 126  sub handler {
                                                                        $env{'form.texengine'});                                                                         $env{'form.texengine'});
                         my %args;                          my %args;
                         &get_breadcrumbs($cdom,$cnum,$crstype,\%args);                          &get_breadcrumbs($cdom,$cnum,$crstype,\%args);
                           if ($env{'form.only_body'}) {
                               $args{'only_body'} = 1;
                           }
                         $r->print(&Apache::loncommon::start_page("Syllabus",undef,\%args).                          $r->print(&Apache::loncommon::start_page("Syllabus",undef,\%args).
                                   $result.                                    $result.
                                   &Apache::loncommon::end_page());                                    &Apache::loncommon::end_page());
Line 692  ENDSCRIPT Line 696  ENDSCRIPT
                        );                         );
         $args->{'add_entries'} = \%loaditem;          $args->{'add_entries'} = \%loaditem;
     }      }
       if ($env{'form.only_body'}) {
           $args->{'only_body'} = 1;
       }
     my $start_page =      my $start_page =
         &Apache::loncommon::start_page("Syllabus", $rss_link.$js,$args);          &Apache::loncommon::start_page("Syllabus", $rss_link.$js,$args);
     if ($start_page) {      if ($start_page) {
Line 1168  sub save_changes { Line 1175  sub save_changes {
         foreach my $syl_field (keys(%{$syllabusfields})) {          foreach my $syl_field (keys(%{$syllabusfields})) {
             my $field=$env{'form.'.$syl_field};              my $field=$env{'form.'.$syl_field};
             chomp($field);              chomp($field);
             $field=~s/\s+$//s;              my $gateway = Apache::lonhtmlgateway->new();
             $field=~s/^\s+//s;              $field = $gateway->process_incoming_html($field,1);
             $field=~s/\<br\s*\/*\>$//s;  
             $field=&Apache::lonfeedback::clear_out_html($field,1);  
                             #here it will be stored                              #here it will be stored
             $syllabus->{$syl_field}=$field;              $syllabus->{$syl_field}=$field;
             if ($syl_field eq 'lll_includeurl') { # clean up included URLs              if ($syl_field eq 'lll_includeurl') { # clean up included URLs

Removed from v.1.131  
changed lines
  Added in v.1.133


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