Diff for /loncom/interface/Attic/lonspreadsheet.pm between versions 1.100 and 1.100.2.2

version 1.100, 2002/08/16 18:25:24 version 1.100.2.2, 2002/09/10 21:11:23
Line 1667  sub updateclasssheet { Line 1667  sub updateclasssheet {
                 $name=&Apache::lonnet::unescape($name);                  $name=&Apache::lonnet::unescape($name);
                 my ($sname,$sdom)=split(/\:/,$name);                  my ($sname,$sdom)=split(/\:/,$name);
                 my $ssec=&Apache::lonnet::usection($sdom,$sname,$cid);                  my $ssec=&Apache::lonnet::usection($sdom,$sname,$cid);
                 if ($ssec==-1) {  #                if ($ssec==-1) {
    unless ($ENV{'form.showcsv'}) {  #   unless ($ENV{'form.showcsv'}) {
                     $rowlabel='<font color=red>Data not available: '.$name.  #                    $rowlabel='<font color=red>Data not available: '.$name.
       '</font>';  #      '</font>';
    } else {  #   } else {
        $rowlabel='ERROR","'.$name.  #       $rowlabel='ERROR","'.$name.
                                  '","Data not available","","","';  #                                 '","Data not available","","","';
                    }  #                   }
                 } else {  #                } else {
                     my %reply=&Apache::lonnet::idrget($sdom,$sname);                      my %reply=&Apache::lonnet::idrget($sdom,$sname);
                     my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname.                      my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname.
       ':environment:firstname&middlename&lastname&generation',        ':environment:firstname&middlename&lastname&generation',
Line 1698  sub updateclasssheet { Line 1698  sub updateclasssheet {
                     unless ($ncount==4) { $rowlabel.=',""'; }                      unless ($ncount==4) { $rowlabel.=',""'; }
                     $rowlabel=~s/\"$//;                      $rowlabel=~s/\"$//;
    }     }
                 }  #                }
  $currentlist{&Apache::lonnet::unescape($name)}=$rowlabel;   $currentlist{&Apache::lonnet::unescape($name)}=$rowlabel;
             }              }
         } # end of foreach (split(/\&/,$classlst))          } # end of foreach (split(/\&/,$classlst))
Line 1750  sub updatestudentassesssheet { Line 1750  sub updatestudentassesssheet {
     my $safeeval=shift;      my $safeeval=shift;
     my %bighash;      my %bighash;
     my $stype=&gettype($safeeval);      my $stype=&gettype($safeeval);
       my $uname=&getuname($safeeval);
       my $udom =&getudom($safeeval);
     my %current=();      my %current=();
     unless ($updatedata{$ENV{'request.course.fn'}.'_'.$stype}) {      unless ($updatedata{
           $ENV{'request.course.fn'}.'_'.$stype.'_'.$uname.'_'.$udom}) {
 # -------------------------------------------------------------------- Tie hash  # -------------------------------------------------------------------- Tie hash
       if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db',        if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db',
                        &GDBM_READER(),0640)) {                         &GDBM_READER(),0640)) {
Line 1832  sub updatestudentassesssheet { Line 1835  sub updatestudentassesssheet {
         } elsif ($stype eq 'studentcalc') {          } elsif ($stype eq 'studentcalc') {
             %current=%allassess;              %current=%allassess;
         }          }
         $updatedata{$ENV{'request.course.fn'}.'_'.$stype}=          $updatedata{$ENV{'request.course.fn'}.'_'.$stype.'_'.$uname.'_'.$udom}=
     join('___;___',%current);      join('___;___',%current);
     } else {      } else {
         return 'Could not access course data';          return 'Could not access course data';
Line 1840  sub updatestudentassesssheet { Line 1843  sub updatestudentassesssheet {
 # ------------------------------------------------------ Get current from cache  # ------------------------------------------------------ Get current from cache
     } else {      } else {
         %current=split(/\_\_\_\;\_\_\_/,          %current=split(/\_\_\_\;\_\_\_/,
        $updatedata{$ENV{'request.course.fn'}.'_'.$stype});       $updatedata{$ENV{'request.course.fn'}.'_'.$stype.'_'.$uname.'_'.$udom});
     }      }
 # -------------------- Find discrepancies between the course row table and this  # -------------------- Find discrepancies between the course row table and this
 #  #
Line 2584  ENDSCRIPT Line 2587  ENDSCRIPT
     unless (&gettype($asheet) eq 'classcalc') {      unless (&gettype($asheet) eq 'classcalc') {
         $r->print('<p><b>User:</b> '.&getuname($asheet).          $r->print('<p><b>User:</b> '.&getuname($asheet).
                   '<br><b>Domain:</b> '.&getudom($asheet));                    '<br><b>Domain:</b> '.&getudom($asheet));
         if (&getcsec($asheet) eq '-1') {  #        if (&getcsec($asheet) eq '-1') {
            $r->print('<h3><font color=red>'.  #           $r->print('<h3><font color=red>'.
                      'Not a student in this course</font></h3>');  #                     'Not a student in this course</font></h3>');
         } else {  #        } else {
            $r->print('<br><b>Section/Group:</b> '.&getcsec($asheet));             $r->print('<br><b>Section/Group:</b> '.&getcsec($asheet));
         }  #        }
         if ($ENV{'form.usymb'}) {          if ($ENV{'form.usymb'}) {
            $r->print('<br><b>Assessment:</b> <tt>'.$ENV{'form.usymb'}.'</tt>');             $r->print('<br><b>Assessment:</b> <tt>'.$ENV{'form.usymb'}.'</tt>');
         }          }

Removed from v.1.100  
changed lines
  Added in v.1.100.2.2


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