Diff for /loncom/homework/grades.pm between versions 1.130.2.1 and 1.135

version 1.130.2.1, 2003/08/17 18:36:46 version 1.135, 2003/08/21 18:21:39
Line 517  LISTJAVASCRIPT Line 517  LISTJAVASCRIPT
     my $saveStatus = $ENV{'form.Status'} eq '' ? 'Active' : $ENV{'form.Status'};      my $saveStatus = $ENV{'form.Status'} eq '' ? 'Active' : $ENV{'form.Status'};
     $ENV{'form.Status'} = $saveStatus;      $ENV{'form.Status'} = $saveStatus;
   
     $gradeTable.='<input type="radio" name="lastSub" value="lastonly" '.$checklastsub.' /> last sub only'."\n".      $gradeTable.='<input type="radio" name="lastSub" value="lastonly" '.$checklastsub.' /> last submission only'."\n".
  '<input type="radio" name="lastSub" value="last" /> last sub & parts info'."\n".   '<input type="radio" name="lastSub" value="last" /> last submission & parts info'."\n".
  '<input type="radio" name="lastSub" value="datesub" /> by dates and submissions'."\n".   '<input type="radio" name="lastSub" value="datesub" /> by dates and submissions'."\n".
  '<input type="radio" name="lastSub" value="all" /> all details'."\n".   '<input type="radio" name="lastSub" value="all" /> all details'."\n".
  '<input type="hidden" name="section"     value="'.$getsec.'" />'."\n".   '<input type="hidden" name="section"     value="'.$getsec.'" />'."\n".
Line 544  LISTJAVASCRIPT Line 544  LISTJAVASCRIPT
     $gradeTable.='<input type="button" '."\n".      $gradeTable.='<input type="button" '."\n".
  'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n".   'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n".
  'value="Next->" />'."\n";   'value="Next->" />'."\n";
       $gradeTable.='<input type="checkbox" name="checkPlag" checked="on">Check For Plagiarism</input>';
     my (undef, undef, $fullname) = &getclasslist($getsec,'1');        my (undef, undef, $fullname) = &getclasslist($getsec,'1');  
     $gradeTable.='<table border="0"><tr><td bgcolor="#777777">'.      $gradeTable.='<table border="0"><tr><td bgcolor="#777777">'.
  '<table border="0"><tr bgcolor="#e6ffff">';   '<table border="0"><tr bgcolor="#e6ffff">';
Line 1461  KEYWORDS Line 1461  KEYWORDS
  my ($ressub,$subval) = split(/:/,$_,2);   my ($ressub,$subval) = split(/:/,$_,2);
                             # Similarity check                              # Similarity check
  my $similar='';   my $similar='';
  my ($oname,$odom,$ocrsid,$oessay,$osim)=&most_similar($uname,$udom,$subval);   my $oname;
  if ($osim) {   my $odom;
     $osim=int($osim*100.0);   my $ocrsid;
     $similar='<hr /><h3><font color="#FF0000">Essay is '.$osim.   my $oessay;
  '% similar to an essay by '.&Apache::loncommon::plainname($oname,$odom).   my $osim;
  '</font></h3><blockquote><i>'.   if($ENV{'form.checkPlag'}){
  &keywords_highlight($oessay).'</i></blockquote><hr />';      ($oname,$odom,$ocrsid,$oessay,$osim)=&most_similar($uname,$udom,$subval);
       if ($osim) {
    $osim=int($osim*100.0);
    $similar='<hr /><h3><font color="#FF0000">Essay is '.$osim.
       '% similar to an essay by '.&Apache::loncommon::plainname($oname,$odom).
       '</font></h3><blockquote><i>'.
       &keywords_highlight($oessay).'</i></blockquote><hr />';
       }
  }   }
  $lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part '.   $lastsubonly.='<tr><td bgcolor="#ffffe6"><b>Part '.
     $partid.'</b> <font color="#999999">( ID '.$respid.      $partid.'</b> <font color="#999999">( ID '.$respid.
Line 1480  KEYWORDS Line 1487  KEYWORDS
      'this file may contain virusses</font><br />':'').       'this file may contain virusses</font><br />':'').
      '<b>Submitted Answer: </b>'.       '<b>Submitted Answer: </b>'.
      &cleanRecord($subval,$responsetype,$symb).       &cleanRecord($subval,$responsetype,$symb).
       '<br /><br />'.$similar."\n"       '<br /><br />'.$similar."\n"
      if ($ENV{'form.lastSub'} eq 'lastonly' ||        if ($ENV{'form.lastSub'} eq 'lastonly' || 
  ($ENV{'form.lastSub'} eq 'hdgrade' &&    ($ENV{'form.lastSub'} eq 'hdgrade' && 
   $$handgrade{$part} =~ /:yes$/));    $$handgrade{$part} =~ /:yes$/));
Line 2798  LISTJAVASCRIPT Line 2805  LISTJAVASCRIPT
   
 sub getSymbMap {  sub getSymbMap {
     my ($request) = @_;      my ($request) = @_;
     my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',      my $navmap = Apache::lonnavmaps::navmap->new();
   $ENV{'request.course.fn'}.'_parms.db');  
     $navmap->init();  
   
     my %symbx = ();      my %symbx = ();
     my @titles = ();      my @titles = ();
Line 2845  sub displayPage { Line 2850  sub displayPage {
     &sub_page_js($request);      &sub_page_js($request);
     $request->print($result);      $request->print($result);
   
     my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',      my $navmap = Apache::lonnavmaps::navmap->new();
   $ENV{'request.course.fn'}.'_parms.db',1, 1);  
     my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});      my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});
     my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps      my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
   
Line 3008  sub updateGradeByPage { Line 3012  sub updateGradeByPage {
   
     $request->print($result);      $request->print($result);
   
     my $navmap = Apache::lonnavmaps::navmap-> new($ENV{'request.course.fn'}.'.db',      my $navmap = Apache::lonnavmaps::navmap->new();
   $ENV{'request.course.fn'}.'_parms.db',1, 1);  
     my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});      my ($mapUrl, $id, $resUrl) = split(/___/, $ENV{'form.page'});
     my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps      my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps
   
Line 3328  sub scantron_process_students { Line 3331  sub scantron_process_students {
     my @scanlines=<$scanlines>;      my @scanlines=<$scanlines>;
     my $classlist=&Apache::loncoursedata::get_classlist();      my $classlist=&Apache::loncoursedata::get_classlist();
     my %idmap=&username_to_idmap($classlist);      my %idmap=&username_to_idmap($classlist);
     my $navmap=Apache::lonnavmaps::navmap->new($ENV{'request.course.fn'}.'.db',$ENV{'request.course.fn'}.'_parms.db',1, 1);      my $navmap=Apache::lonnavmaps::navmap->new();
     my $map=$navmap->getResourceByUrl($sequence);      my $map=$navmap->getResourceByUrl($sequence);
     my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);      my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
     $r->print("geto ".scalar(@resources)."<br />");      $r->print("geto ".scalar(@resources)."<br />");

Removed from v.1.130.2.1  
changed lines
  Added in v.1.135


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