Diff for /loncom/homework/structuretags.pm between versions 1.228 and 1.230

version 1.228, 2004/01/14 22:47:46 version 1.230, 2004/01/30 16:21:26
Line 186  sub problem_edit_header { Line 186  sub problem_edit_header {
        <input type="submit" name="problemmode" value="'.&mt('EditXML').'" />         <input type="submit" name="problemmode" value="'.&mt('EditXML').'" />
        <input type="submit" name="Undo" value="'.&mt('undo').'" /> <hr />         <input type="submit" name="Undo" value="'.&mt('undo').'" /> <hr />
        <input type="submit" name="submit" value="'.&mt('Submit Changes and Edit').'" />         <input type="submit" name="submit" value="'.&mt('Submit Changes and Edit').'" />
        <input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" /><br />'.         <input type="submit" name="submit" value="'.&mt('Submit Changes and View').'" /><table><tr><td>'.
        &Apache::loncommon::help_open_topic('Problem_Editor_XML_Index','Problem Editing Help').         &Apache::loncommon::help_open_topic('Problem_Editor_XML_Index',
      'Problem Editing Help').'</td><td>'.
          &Apache::loncommon::help_open_faq(5).
          &Apache::loncommon::help_open_bug('Authoring').'</td></tr></table>'.
        '<table border="0"><tr><td bgcolor="#DDDDDD">';         '<table border="0"><tr><td bgcolor="#DDDDDD">';
 }  }
   
Line 456  sub start_problem { Line 459  sub start_problem {
     my @packages = split /,/,$packages;      my @packages = split /,/,$packages;
     my $allow_print_points = 0;      my $allow_print_points = 0;
     foreach my $partial_key (@packages) {      foreach my $partial_key (@packages) {
  if ($partial_key=~m/part_0/) {   if ($partial_key=~m/^part_0$/) {
     $allow_print_points=1;      $allow_print_points=1;
  }   }
     }      }
Line 971  sub start_part { Line 974  sub start_part {
  $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';   $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
     }      }
     my $weight = &Apache::lonnet::EXT("resource.$id.weight");      my $weight = &Apache::lonnet::EXT("resource.$id.weight");
     my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'keys');      my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages');
     my @allkeys = split /,/,$allkeys;      my @allkeys = split /,/,$allkeys;
     my $allow_print_points = 0;      my $allow_print_points = 0;
     foreach my $partial_key (@allkeys) {      foreach my $partial_key (@allkeys) {
  if ($partial_key=~m/\_(\d*)\_weight/) {   if ($partial_key=~m/^part_(.*)$/) {
     if ($1 ne '0') {$allow_print_points=1;}      if ($1 ne '0') {$allow_print_points=1;}
  }   }
     }      }

Removed from v.1.228  
changed lines
  Added in v.1.230


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