Diff for /loncom/homework/grades.pm between versions 1.528 and 1.528.2.3

version 1.528, 2008/07/14 10:28:19 version 1.528.2.3, 2008/12/22 15:13:45
Line 1681  sub gradeBox { Line 1681  sub gradeBox {
   
     my $radio.='<table border="0"><tr>'."\n";  # display radio buttons in a nice table 10 across      my $radio.='<table border="0"><tr>'."\n";  # display radio buttons in a nice table 10 across
     while ($thisweight<=$wgt) {      while ($thisweight<=$wgt) {
  $radio.= '<td><span style="white-space: nowrap;"><label><input type="radio" name="RADVAL'.$counter.'_'.$partid.'" '.   $radio.= '<td><span class="LC_nobreak"><label><input type="radio" name="RADVAL'.$counter.'_'.$partid.'" '.
     'onclick="javascript:writeBox(this.form,\''.$counter.'_'.$partid.'\','.      'onclick="javascript:writeBox(this.form,\''.$counter.'_'.$partid.'\','.
     $thisweight.')" value="'.$thisweight.'" '.      $thisweight.')" value="'.$thisweight.'" '.
     ($score eq $thisweight ? 'checked="checked"':'').' /> '.$thisweight."</label></span></td>\n";      ($score eq $thisweight ? 'checked="checked"':'').' /> '.$thisweight."</label></span></td>\n";
Line 2796  sub handback_files { Line 2796  sub handback_files {
                                            $newflg.'_'.$part_resp.'_returndoc'.$file_counter,                                             $newflg.'_'.$part_resp.'_returndoc'.$file_counter,
                                            $save_file_name);                                             $save_file_name);
                     if ($result !~ m|^/uploaded/|) {                      if ($result !~ m|^/uploaded/|) {
                         $request->print('<span class="LC_error">An error occurred ('.$result.                          $request->print('<br /><span class="LC_error">'.
                         ') while trying to upload '.$newflg.'_'.$part_resp.'_returndoc'.$file_counter.'</span><br />');                              &mt('An error occurred ([_1]) while trying to upload [_2].',
                                   $result,$newflg.'_'.$part_resp.'_returndoc'.$file_counter).
                                           '</span>');
                     } else {                      } else {
                         # mark the file as read only                          # mark the file as read only
                         my @files = ($save_file_name);                          my @files = ($save_file_name);
Line 4985  sub scantron_CODElist { Line 4987  sub scantron_CODElist {
 =cut  =cut
   
 sub scantron_CODEunique {  sub scantron_CODEunique {
     my $result='<span style="white-space: nowrap;">      my $result='<span class="LC_nobreak">
                  <label><input type="radio" name="scantron_CODEunique"                   <label><input type="radio" name="scantron_CODEunique"
                         value="yes" checked="checked" />'.&mt('Yes').' </label>                          value="yes" checked="checked" />'.&mt('Yes').' </label>
                 </span>                  </span>
                 <span style="white-space: nowrap;">                  <span class="LC_nobreak">
                  <label><input type="radio" name="scantron_CODEunique"                   <label><input type="radio" name="scantron_CODEunique"
                         value="no" />'.&mt('No').' </label>                          value="no" />'.&mt('No').' </label>
                 </span>';                  </span>';
Line 7333  sub scantron_get_maxbubble { Line 7335  sub scantron_get_maxbubble {
     foreach my $resource (@resources) {      foreach my $resource (@resources) {
         my $symb = $resource->symb();          my $symb = $resource->symb();
   
         my (@parts,@allparts,@possible_parts);          my @parts;
   
         # Need to retrieve part IDs and response IDs because essayresponse,  
         # reactionresponse and organicresponse items are not included in   
         # $analysis{'parts'} from lonnet::ssi.    
         if (ref($resource->parts()) eq 'ARRAY') {  
             foreach my $part (@{$resource->parts()}) {  
                 if (!&Apache::loncommon::check_if_partid_hidden($part,$symb,$udom,$uname)) {  
                     my @resp_ids = $resource->responseIds($part);  
                     foreach my $id (@resp_ids) {  
                         my $part_id = $part.'.'.$id;  
                         push(@possible_parts,$part_id);  
                     }  
                 }  
             }  
         }  
   
         my $result=&ssi_with_retries($resource->src(), $ssi_retries,          my $result=&ssi_with_retries($resource->src(), $ssi_retries,
                                         ('symb' => $symb,                                          ('symb' => $symb,
Line 7369  sub scantron_get_maxbubble { Line 7356  sub scantron_get_maxbubble {
                 }                  }
             }              }
         }          }
         # Add part_ids for any essayresponse, reactionresponse or   
         # organicresponse items.   
         foreach my $part_id (@possible_parts) {  
             if (grep(/^\Q$part_id\E$/,@parts)) {  
                 push(@allparts,$part_id);  
             } else {  
                 if (($analysis{$part_id.'.type'} eq 'essayresponse') ||  
                     ($analysis{$part_id.'.type'} eq 'reactionresponse') ||  
                     ($analysis{$part_id.'.type'} eq 'organicresponse')) {  
                     push(@allparts,$part_id);  
                 }  
             }  
         }  
   
  foreach my $part_id (@allparts) {   foreach my $part_id (@parts) {
             my $lines;              my $lines;
   
     # TODO - make this a persistent hash not an array.      # TODO - make this a persistent hash not an array.

Removed from v.1.528  
changed lines
  Added in v.1.528.2.3


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