Diff for /loncom/homework/structuretags.pm between versions 1.343 and 1.344

version 1.343, 2006/04/14 20:16:23 version 1.344, 2006/04/14 21:09:54
Line 85  sub page_start { Line 85  sub page_start {
    $parstack,$parser,$safeeval);     $parstack,$parser,$safeeval);
     }      }
   
     my $page_start;      my %body_args;
     if (!defined($found{'html'})) {      my $extra_head;
       if (defined($found{'html'})) {
    $body_args{'skip_phases'}{'head'}=1;
       } else {
   
  my $extra_head = &Apache::lonhtmlcommon::spellheader();   $extra_head = &Apache::lonhtmlcommon::spellheader();
   
  my $css_href = &Apache::lonnet::EXT('resource.0.cssfile');   my $css_href = &Apache::lonnet::EXT('resource.0.cssfile');
  if ($css_href =~ /\S/) {   if ($css_href =~ /\S/) {
Line 102  sub page_start { Line 105  sub page_start {
  "if (typeof swmenu != 'undefined') {swmenu.currentURL=null;}\n".   "if (typeof swmenu != 'undefined') {swmenu.currentURL=null;}\n".
  &Apache::loncommon::browser_and_searcher_javascript().   &Apache::loncommon::browser_and_searcher_javascript().
                 "\n</script>\n";                  "\n</script>\n";
       
  }   }
  $page_start .=  
     &Apache::loncommon::head($name,$extra_head,  
      {'force_register' =>   
   ($target ne 'edit') });  
     }      }
   
     if (!defined($found{'body'}) && $env{'request.state'} eq 'construct') {      if (defined($found{'body'})) {
    $body_args{'skip_phases'}{'body'}=1;
       } elsif (!defined($found{'body'}) 
        && $env{'request.state'} eq 'construct') {
  if ($target eq 'web' || $target eq 'edit') {   if ($target eq 'web' || $target eq 'edit') {
     $page_start.=&Apache::loncommon::bodytag();      # no extra args to bodytag
     $page_start.=&Apache::lonxml::message_location();  
  }   }
     } elsif (!defined($found{'body'})) {      } elsif (!defined($found{'body'})) {
  my %add_entries;   my %add_entries;
Line 122  sub page_start { Line 122  sub page_start {
  if ($background ne '' ) {   if ($background ne '' ) {
     $add_entries{'background'} = $background;      $add_entries{'background'} = $background;
  }   }
   
  my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack,   my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack,
        $safeeval);         $safeeval);
           if ($bgcolor eq '' ) { $bgcolor = '#FFFFFF'; }
  if ($bgcolor eq '' ) { $bgcolor = '#FFFFFF'; }  
  $page_start .=   $body_args{'bgcolor'}        = $bgcolor;
     &Apache::loncommon::bodytag(undef,undef,\%add_entries,undef,undef,   $body_args{'no_title'}       = 1;
  1,undef,undef,$bgcolor,$target,1);   $body_args{'force_register'} = 1;
    $body_args{'add_entries'}    = \%add_entries;
  if ( ($target eq 'web' || $target eq 'webgrade')      }
      && $env{'request.state'} ne 'construct') {  
     my ($symb,undef,undef,undef,$publicuser)=      my $page_start = &Apache::loncommon::start_page($name,$extra_head,
  &Apache::lonxml::whichuser();      \%body_args);
     if ($symb eq '' && !$publicuser) {  
  my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference");      if (!defined($found{'body'}) 
  $help=&mt("Browsing resource, all submissions are temporary.")."<br />";   && $env{'request.state'} ne 'construct'
  $page_start .= $help;   && ($target eq 'web' || $target eq 'webgrade')) {
     }  
    my ($symb,undef,undef,undef,$publicuser)= &Apache::lonxml::whichuser();
    if ($symb eq '' && !$publicuser) {
       my $help = &Apache::loncommon::help_open_topic("Ambiguous_Reference");
       $help=&mt("Browsing resource, all submissions are temporary.")."<br />";
       $page_start .= $help;
  }   }
  $page_start .= &Apache::lonxml::message_location();  
     }      }
   
       if (!defined($found{'body'})) {
    $page_start .= &Apache::lonxml::message_location();
       }
       
     my $form_tag_start;      my $form_tag_start;
     if (!defined($found{'form'})) {      if (!defined($found{'form'})) {
  $form_tag_start='<form name="lonhomework" enctype="multipart/form-data" method="post" action="';   $form_tag_start='<form name="lonhomework" enctype="multipart/form-data" method="post" action="';
Line 153  sub page_start { Line 162  sub page_start {
  }   }
  $form_tag_start.='>';   $form_tag_start.='>';
     }      }
   
     return ($page_start,$form_tag_start);      return ($page_start,$form_tag_start);
 }  }
   

Removed from v.1.343  
changed lines
  Added in v.1.344


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