Diff for /loncom/homework/grades.pm between versions 1.729 and 1.732

version 1.729, 2014/12/07 19:45:08 version 1.732, 2015/02/22 01:34:48
Line 406  sub cleanRecord { Line 406  sub cleanRecord {
     $env{'form.kwstyle'}  = $keyhash{$loginuser.'_kwstyle'} ne '' ? $keyhash{$loginuser.'_kwstyle'} : '';      $env{'form.kwstyle'}  = $keyhash{$loginuser.'_kwstyle'} ne '' ? $keyhash{$loginuser.'_kwstyle'} : '';
     $env{'form.'.$symb} = 1; # so that we don't have to read it from disk for multiple sub of the same prob.      $env{'form.'.$symb} = 1; # so that we don't have to read it from disk for multiple sub of the same prob.
  }   }
  return '<br /><br /><blockquote><tt>'.&keywords_highlight(&HTML::Entities::encode($answer, '"<>&')).'</tt></blockquote>';   return '<br /><br /><blockquote><tt>'.&keywords_highlight($answer).'</tt></blockquote>';
   
     } elsif ( $response eq 'organic') {      } elsif ( $response eq 'organic') {
         my $result=&mt('Smile representation: [_1]',          my $result=&mt('Smile representation: [_1]',
Line 2231  sub submission { Line 2231  sub submission {
                 if ($hide eq 'rand') {                  if ($hide eq 'rand') {
                     $type = 'randomizetry';                      $type = 'randomizetry';
                     $trial = $record{"resource.$partid.tries"};                      $trial = $record{"resource.$partid.tries"};
                     $rndseed = $record{"resource.$partid.rndseed"};                      if (exists($record{"resource.$partid.rawrndseed"})) {
                           $rndseed = $record{"resource.$partid.rawrndseed"};
                       } else {
                           $rndseed = $record{"resource.$partid.rndseed"};
                       }
                 }                  }
         if ($env{'form.checkPlag'}) {          if ($env{'form.checkPlag'}) {
        my ($oname,$odom,$ocrsid,$oessay,$osim)=         my ($oname,$odom,$ocrsid,$oessay,$osim)=
Line 2543  sub get_last_submission { Line 2547  sub get_last_submission {
             }              }
             unless ($hide) {              unless ($hide) {
                 if (@randomize) {                  if (@randomize) {
                     foreach my $id (@hidden) {                      foreach my $id (@randomize) {
                         if ($key =~ /^\Q$id\E/) {                          if ($key =~ /^\Q$id\E/) {
                             $hide = 'rand';                              $hide = 'rand';
                             last;                              last;
Line 4857  sub displaySubByDates { Line 4861  sub displaySubByDates {
                         my ($trial,$rndseed,$newvariation);                          my ($trial,$rndseed,$newvariation);
                         if ($type eq 'randomizetry') {                          if ($type eq 'randomizetry') {
                             $trial = $$record{"$where.$partid.tries"};                              $trial = $$record{"$where.$partid.tries"};
                             $rndseed = $$record{"$where.$partid.rndseed"};                              if (exists($$record{"$where.$partid.rawrndseed"})) {
                                   $rndseed = $$record{"$where.$partid.rawrndseed"};
                               } else {
                                   $rndseed = $$record{"$where.$partid.rndseed"};
                               }
                         }                          }
         if ($$record{"$where.$partid.tries"} eq '') {          if ($$record{"$where.$partid.tries"} eq '') {
     $displaySub[0].=&mt('Trial not counted');      $displaySub[0].=&mt('Trial not counted');
Line 5714  sub get_scantron_config { Line 5722  sub get_scantron_config {
 =item username_to_idmap  =item username_to_idmap
   
     creates a hash keyed by student/employee ID with values of the corresponding      creates a hash keyed by student/employee ID with values of the corresponding
     student username:domain.      student username:domain. If a single ID occurs for more than one student,
       the status of the student is checked, and if Active, the value in the hash
       will be set to the Active student.
   
   Arguments:    Arguments:
   
Line 5732  sub username_to_idmap { Line 5742  sub username_to_idmap {
     my ($classlist)= @_;      my ($classlist)= @_;
     my %idmap;      my %idmap;
     foreach my $student (keys(%$classlist)) {      foreach my $student (keys(%$classlist)) {
  $idmap{$classlist->{$student}->[&Apache::loncoursedata::CL_ID]}=          my $id = $classlist->{$student}->[&Apache::loncoursedata::CL_ID];
     $student;          unless ($id eq '') {
               if (!exists($idmap{$id})) {
                   $idmap{$id} = $student;
               } else {
                   my $status = $classlist->{$student}->[&Apache::loncoursedata::CL_STATUS];
                   if ($status eq 'Active') {
                       $idmap{$id} = $student;
                   }
               }
           }
     }      }
     return %idmap;      return %idmap;
 }  }

Removed from v.1.729  
changed lines
  Added in v.1.732


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