[LON-CAPA-cvs] cvs: loncom /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 12 Dec 2006 18:15:57 -0000


albertel		Tue Dec 12 13:15:57 2006 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - one more \w replacement
  - fix handgrading to work (<option>&nbsp;</option> generates a value in the form parameter that isn't eq '' or matches \s)
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.383 loncom/homework/grades.pm:1.384
--- loncom/homework/grades.pm:1.383	Fri Nov  3 15:04:08 2006
+++ loncom/homework/grades.pm	Tue Dec 12 13:15:53 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.383 2006/11/03 20:04:08 albertel Exp $
+# $Id: grades.pm,v 1.384 2006/12/12 18:15:53 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1513,10 +1513,10 @@
     $result.='<select name="GD_SEL'.$counter.'_'.$partid.'" '.
 	'onChange="javascript:clearRadBox(this.form,\''.$counter.'_'.$partid.'\')" >'."\n";
     if ($$record{'resource.'.$partid.'.solved'} eq 'excused') {
-	$result.='<option>&nbsp;</option>'.
+	$result.='<option></option>'.
 	    '<option selected="on">excused</option>';
     } else {
-	$result.='<option selected="on">&nbsp;</option>'.
+	$result.='<option selected="on"></option>'.
 	    '<option>excused</option>';
     }
     $result.='<option>reset status</option></select>'."\n";
@@ -1758,7 +1758,7 @@
 # Load the other essays for similarity check
 #
             my (undef,undef,$essayurl) = &Apache::lonnet::decode_symb($symb);
-	    my ($adom,$aname,$apath)=($essayurl=~/^(\w+)\/(\w+)\/(.*)$/);
+	    my ($adom,$aname,$apath)=($essayurl=~/^($LONCAPA::domain_re)\/($LONCAPA::username_re)\/(.*)$/);
 	    $apath=&escape($apath);
 	    $apath=~s/\W/\_/gs;
 	    %oldessays=&Apache::lonnet::dump('nohist_essay_'.$apath,$adom,$aname);