Diff for /loncom/homework/structuretags.pm between versions 1.273 and 1.277

version 1.273, 2004/11/30 23:28:57 version 1.277, 2004/12/11 18:10:49
Line 91  sub page_start { Line 91  sub page_start {
     if (!defined($found{'body'}) && $ENV{'request.state'} eq 'construct'      if (!defined($found{'body'}) && $ENV{'request.state'} eq 'construct'
  && $ENV{'environment.remote'} eq 'off') {   && $ENV{'environment.remote'} eq 'off') {
  $body_tag_start=&Apache::loncommon::bodytag();   $body_tag_start=&Apache::loncommon::bodytag();
    $body_tag_start.=&Apache::lonxml::message_location();
     } elsif (!defined($found{'body'})) {      } elsif (!defined($found{'body'})) {
  $body_tag_start='<body onload="'.&Apache::lonmenu::loadevents().'" '.   $body_tag_start='<body onload="'.&Apache::lonmenu::loadevents().'" '.
     'onunload="'.&Apache::lonmenu::unloadevents().'" ';      'onunload="'.&Apache::lonmenu::unloadevents().'" ';
Line 127  sub page_start { Line 128  sub page_start {
     }      }
     my $form_tag_start;      my $form_tag_start;
     if (!defined($found{'form'})) {      if (!defined($found{'form'})) {
  $form_tag_start='<form name="lonhomework" method="post" action="';   $form_tag_start='<form name="lonhomework" enctype="multipart/form-data" method="post" action="';
  my $uri=$ENV{'request.uri'};   my $uri=$ENV{'request.uri'};
  if ($ENV{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); }   if ($ENV{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); }
  $form_tag_start.=$uri.'">';   $form_tag_start.=$uri.'">';
Line 580  sub start_problem { Line 581  sub start_problem {
     $allow_print_points=1;      $allow_print_points=1;
  }   }
     }      }
       my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries");
       if (defined($maxtries) && $maxtries < 0) { $allow_print_points=0; }
     my $duedate = &Apache::lonnet::EXT("resource.$id.duedate");       my $duedate = &Apache::lonnet::EXT("resource.$id.duedate"); 
     $duedate = POSIX::strftime("%c",localtime($duedate));      $duedate = POSIX::strftime("%c",localtime($duedate));
     my $temp_file;      my $temp_file;
Line 1126  sub start_part { Line 1129  sub start_part {
     if ($1 ne '0') {$allow_print_points=1;}      if ($1 ne '0') {$allow_print_points=1;}
  }   }
     }      }
       my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries");
       if (defined($maxtries) && $maxtries < 0) {
    $allow_print_points=0;
       }
     if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}      if (($Apache::lonhomework::type eq 'exam') && ($allow_print_points)) { $result .= '\fbox{\textit{'.$weight.' pt}}';}
  } elsif ($target eq 'web') {   } elsif ($target eq 'web') {
     $result.='<a name="'.&Apache::lonnet::escape($Apache::inputtags::part).'" />';      $result.='<a name="'.&Apache::lonnet::escape($Apache::inputtags::part).'" />';

Removed from v.1.273  
changed lines
  Added in v.1.277


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