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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 06 May 2005 20:26:35 -0000


albertel		Fri May  6 16:26:35 2005 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm 
  Log:
  - poking at the grading interface
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.17 loncom/homework/bridgetask.pm:1.18
--- loncom/homework/bridgetask.pm:1.17	Tue May  3 10:52:31 2005
+++ loncom/homework/bridgetask.pm	Fri May  6 16:26:35 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.17 2005/05/03 14:52:31 albertel Exp $
+# $Id: bridgetask.pm,v 1.18 2005/05/06 20:26:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -194,6 +194,7 @@
 	    $Apache::bridgetask::queue_key=$todo;
 	    &Apache::structuretags::initialize_storage();
 	    &Apache::lonhomework::showhash(%Apache::lonhomework::history);
+	    $result.="\n".'<table width="100%" style="width:100%" border="1">';
 	} else {
 	    $result.="\n".
 		'<table><tr><td>No user to be graded.</td></tr></table>';
@@ -246,7 +247,7 @@
 	    }
 	}
     } elsif ($target eq 'webgrade') {
-	$result.="\n<hr />";
+	$result.="</table>\n<hr />";
 	$result.='<input type="submit" name="next" value="'.
 	    &mt('Save & Next').'" /> ';
 	$result.='<input type="submit" name="end" value="'.
@@ -488,22 +489,42 @@
     return $order[0];
 }
 
-sub end_Dimension {
-    my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
-    my $result;
-    if ($target eq 'web') {
-	my $instance=&get_instance();
-	$result=$dimension{'intro'}.$dimension{$instance.'.text'};
-    } elsif ($target eq 'webgrade') {
-	my $instance=&get_instance();
-	$result.="\n".'<table>';
-	foreach my $id (@{$dimension{$instance.'.criterias'}}) {
-	    $result.='<tr><td>'.
-		$dimension{$instance.'.criteria.'.$id}.'</td></tr>';
+{
+    my $last_link;
+    sub end_Dimension {
+	my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
+	my $result;
+	if ($target eq 'web') {
+	    my $instance=&get_instance();
+	    $result=$dimension{'intro'}.$dimension{$instance.'.text'};
+	} elsif ($target eq 'webgrade') {
+	    my $instance=&get_instance();
+	    foreach my $id (@{$dimension{$instance.'.criterias'}}) {
+		my $link='criteria_'.$instance.'_'.$id;
+		$result.='<tr><td valign="top">'.
+		    '<a name="'.$link.'" />'.
+		    '<a name="next_'.$last_link.'" />'.
+		    '<br /><textarea enabled="false" style="width:100%" rows="8" width="25" wrap="hard">'.$dimension{$instance.'.criteria.'.$id}.'</textarea>'.
+		    #$dimension{$instance.'.criteria.'.$id}.
+		    '</td>'.
+		    '<td>Additional Comment for Student <br />'.
+		    '<textarea style="width:100%" rows="8" width="25" wrap="hard" name="HWVAL_comment_'.$link.'"></textarea>'.
+		    '</td>'.
+		    '<td>'.
+		    '<label><input type="radio" name="HWVAL_'.$link.'" value="ungraded" />Ungraded</label><br />'.
+		    '<label><input type="radio" name="HWVAL_'.$link.'" value="pass" />Pass</label><br />'.
+		    '<label><input type="radio" name="HWVAL_'.$link.'" value="fail" />Fail</label><br />'.
+		    '<label><input type="radio" name="HWVAL_'.$link.'" value="review" />Review</label><br />'.
+		    '</td>'.
+		    '<td>'.
+		    '<a href="#'.$last_link.'">Prev</a><br />'.
+		    '<a href="#next_'.$link.'">Next</a><br />'.
+		    '</td></tr>';
+		$last_link=$link;
+	    }
 	}
-	$result.='</table>';
+	return $result;
     }
-    return $result;
 }
 
 sub start_IntroParagraph {