Diff for /loncom/homework/grades.pm between versions 1.738 and 1.741

version 1.738, 2016/10/14 16:47:25 version 1.741, 2017/07/02 16:50:30
Line 293  sub reset_caches { Line 293  sub reset_caches {
     }      }
   
     sub scantron_partids_tograde {      sub scantron_partids_tograde {
         my ($resource,$cid,$uname,$udom,$check_for_randomlist,$bubbles_per_row) = @_;          my ($resource,$cid,$uname,$udom,$check_for_randomlist,$bubbles_per_row,$scancode) = @_;
         my (%analysis,@parts);          my (%analysis,@parts);
         if (ref($resource)) {          if (ref($resource)) {
             my $symb = $resource->symb();              my $symb = $resource->symb();
Line 301  sub reset_caches { Line 301  sub reset_caches {
             if ($check_for_randomlist) {              if ($check_for_randomlist) {
                 $add_to_form = { 'check_parts_withrandomlist' => 1,};                  $add_to_form = { 'check_parts_withrandomlist' => 1,};
             }              }
               if ($scancode) {
                   if (ref($add_to_form) eq 'HASH') {
                       $add_to_form->{'code_for_randomlist'} = $scancode;
                   } else {
                       $add_to_form = { 'code_for_randomlist' => $scancode,};
                   }
               }
             my $analyze =               my $analyze = 
                 &get_analyze($symb,$uname,$udom,undef,$add_to_form,                  &get_analyze($symb,$uname,$udom,undef,$add_to_form,
                              undef,undef,undef,$bubbles_per_row);                               undef,undef,undef,$bubbles_per_row);
Line 3798  sub viewgrades { Line 3805  sub viewgrades {
                     $result .= &mt('There are no students in section(s) [_1] with enrollment status [_2] to modify or grade.',                      $result .= &mt('There are no students in section(s) [_1] with enrollment status [_2] to modify or grade.',
                                    $section_display,$stu_status);                                     $section_display,$stu_status);
                 } elsif (grep(/^none$/,@groups)) {                  } elsif (grep(/^none$/,@groups)) {
                     $result .= &mt('There are no students in section(s) [_1] nd no group with enrollment status [_2] to modify or grade.',                      $result .= &mt('There are no students in section(s) [_1] and no group with enrollment status [_2] to modify or grade.',
                                    $section_display,$stu_status);                                     $section_display,$stu_status);
                 } else {                  } else {
                     $result .= &mt('There are no students in section(s) [_1] and group(s) [_2] with enrollment status [_3] to modify or grade.',                      $result .= &mt('There are no students in section(s) [_1] and group(s) [_2] with enrollment status [_3] to modify or grade.',
Line 8601  SCANTRONFORM Line 8608  SCANTRONFORM
             }              }
             if ((exists($grader_randomlists_by_symb{$ressymb})) ||              if ((exists($grader_randomlists_by_symb{$ressymb})) ||
                 (ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) {                  (ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) {
                   my $currcode;
                   if (exists($grader_randomlists_by_symb{$ressymb})) {
                       $currcode = $scancode;
                   }
                 my ($analysis,$parts) =                  my ($analysis,$parts) =
                     &scantron_partids_tograde($resource,$env{'request.course.id'},                      &scantron_partids_tograde($resource,$env{'request.course.id'},
                                               $uname,$udom,undef,$bubbles_per_row);                                                $uname,$udom,undef,$bubbles_per_row,
                                                 $currcode);
                 $partids_by_symb{$ressymb} = $parts;                  $partids_by_symb{$ressymb} = $parts;
             } else {              } else {
                 $partids_by_symb{$ressymb} = $grader_partids_by_symb{$ressymb};                  $partids_by_symb{$ressymb} = $grader_partids_by_symb{$ressymb};
Line 9258  sub checkscantron_results { Line 9270  sub checkscantron_results {
             my $ressymb = $resource->symb();              my $ressymb = $resource->symb();
             if ((exists($grader_randomlists_by_symb{$ressymb})) ||              if ((exists($grader_randomlists_by_symb{$ressymb})) ||
                 (ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) {                  (ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) {
                   my $currcode;
                   if (exists($grader_randomlists_by_symb{$ressymb})) {
                       $currcode = $scancode;
                   }
                 (my $analysis,$parts) =                  (my $analysis,$parts) =
                     &scantron_partids_tograde($resource,$env{'request.course.id'},                      &scantron_partids_tograde($resource,$env{'request.course.id'},
                                               $username,$domain,undef,                                                $username,$domain,undef,
                                               $bubbles_per_row);                                                $bubbles_per_row,$currcode);
             } else {              } else {
                 $parts = $grader_partids_by_symb{$ressymb};                  $parts = $grader_partids_by_symb{$ressymb};
             }              }
Line 9737  sub substatus_options { Line 9753  sub substatus_options {
                                       'queued'    => 'in grading queue',                                        'queued'    => 'in grading queue',
                                       'graded'    => 'with ungraded submissions',                                        'graded'    => 'with ungraded submissions',
                                       'incorrect' => 'with incorrect submissions',                                        'incorrect' => 'with incorrect submissions',
                                       'all'       => 'with any status');                                        'all'       => 'with any status',
                                         );
 }  }
   
 sub reset_perm {  sub reset_perm {

Removed from v.1.738  
changed lines
  Added in v.1.741


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