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

bisitz bisitz@source.lon-capa.org
Wed, 15 Apr 2009 17:02:35 -0000


bisitz		Wed Apr 15 17:02:35 2009 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Optimized screen layout for manual grading options list:
  - Now use standard pick box for options
  - Moved the "Check For Plagiarism" checkbox to the other options
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.560 loncom/homework/grades.pm:1.561
--- loncom/homework/grades.pm:1.560	Thu Mar 19 21:00:42 2009
+++ loncom/homework/grades.pm	Wed Apr 15 17:02:35 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.560 2009/03/19 21:00:42 raeburn Exp $
+# $Id: grades.pm,v 1.561 2009/04/15 17:02:35 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -889,16 +889,17 @@
     my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'.
 	"\n".$table;
 	
-    $gradeTable .= 
-	'&nbsp;<b>'.&mt('View Problem Text').': </b>'.
-	    '<label><input type="radio" name="vProb" value="no" checked="checked" /> '.&mt('no').' </label>'."\n".
-	    '<label><input type="radio" name="vProb" value="yes" /> '.&mt('one student').' </label>'."\n".
-	    '<label><input type="radio" name="vProb" value="all" /> '.&mt('all students').' </label><br />'."\n";
-    $gradeTable .= 
-	'&nbsp;<b>'.&mt('View Answer').': </b>'.
-	    '<label><input type="radio" name="vAns" value="no"  /> '.&mt('no').' </label>'."\n".
-	    '<label><input type="radio" name="vAns" value="yes" /> '.&mt('one student').' </label>'."\n".
-	    '<label><input type="radio" name="vAns" value="all" checked="checked" /> '.&mt('all students').' </label><br />'."\n";
+    $gradeTable .= &Apache::lonhtmlcommon::start_pick_box();
+    $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('View Problem Text'))
+                  .'<label><input type="radio" name="vProb" value="no" checked="checked" /> '.&mt('no').' </label>'."\n"
+                  .'<label><input type="radio" name="vProb" value="yes" /> '.&mt('one student').' </label>'."\n"
+                  .'<label><input type="radio" name="vProb" value="all" /> '.&mt('all students').' </label><br />'."\n"
+                  .&Apache::lonhtmlcommon::row_closure();
+    $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('View Answer'))
+                  .'<label><input type="radio" name="vAns" value="no"  /> '.&mt('no').' </label>'."\n"
+                  .'<label><input type="radio" name="vAns" value="yes" /> '.&mt('one student').' </label>'."\n"
+                  .'<label><input type="radio" name="vAns" value="all" checked="checked" /> '.&mt('all students').' </label><br />'."\n"
+                  .&Apache::lonhtmlcommon::row_closure();
 
     my $submission_options;
     if ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1) {
@@ -913,19 +914,20 @@
 	'<label><input type="radio" name="lastSub" value="last" /> '.&mt('last submission &amp; parts info').' </label>'."\n".
 	'<label><input type="radio" name="lastSub" value="datesub" /> '.&mt('by dates and submissions').' </label>'."\n".
 	'<label><input type="radio" name="lastSub" value="all" /> '.&mt('all details').'</label>';
-    $gradeTable .= 
-	'&nbsp;<b>'.&mt('Submissions').': </b>'.$submission_options.'<br />'."\n";
+    $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Submissions'))
+                  .$submission_options
+                  .&Apache::lonhtmlcommon::row_closure();
+
+    $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Grading Increments'))
+                  .'<select name="increment">'
+                  .'<option value="1">'.&mt('Whole Points').'</option>'
+                  .'<option value=".5">'.&mt('Half Points').'</option>'
+                  .'<option value=".25">'.&mt('Quarter Points').'</option>'
+                  .'<option value=".1">'.&mt('Tenths of a Point').'</option>'
+                  .'</select>'
+                  .&Apache::lonhtmlcommon::row_closure();
 
     $gradeTable .= 
-        '&nbsp;<b>'.&mt('Grading Increments').': </b>'.
-	    '<select name="increment">'.
-	    '<option value="1">'.&mt('Whole Points').'</option>'.
-	    '<option value=".5">'.&mt('Half Points').'</option>'.
-	    '<option value=".25">'.&mt('Quarter Points').'</option>'.
-	    '<option value=".1">'.&mt('Tenths of a Point').'</option>'.
-	    '</select>';
-    
-    $gradeTable .= 
         &build_section_inputs().
 	'<input type="hidden" name="submitonly"  value="'.$submitonly.'" />'."\n".
 	'<input type="hidden" name="handgrade"   value="'.$env{'form.handgrade'}.'" /><br />'."\n".
@@ -936,14 +938,23 @@
 	'<input type="hidden" name="saveStatusOld" value="'.$saveStatus.'" />'."\n";
 
     if (exists($env{'form.gradingMenu'}) && exists($env{'form.Status'})) {
-	$gradeTable.='<input type="hidden" name="Status"   value="'.$stu_status.'" />'."\n";
+	$gradeTable .= '<input type="hidden" name="Status" value="'.$stu_status.'" />'."\n";
     } else {
-	$gradeTable.=&mt('<b>Student Status:</b> [_1]',
-			 &Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,'javascript:reLoadList(this.form);')).'<br />';
+        $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Student Status'))
+                      .&Apache::lonhtmlcommon::StatusOptions(
+                           $saveStatus,undef,1,'javascript:reLoadList(this.form);')
+                      .&Apache::lonhtmlcommon::row_closure();
     }
 
-    $gradeTable.=&mt('To '.lc($viewgrade)." a submission or a group of submissions, click on the check box(es) next to the student's name(s). Then click on the Next button.").'<br />'."\n".
-	'<input type="hidden" name="command" value="processGroup" />'."\n";
+    $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Check For Plagiarism'))
+                  .'<input type="checkbox" name="checkPlag" checked="checked" />'
+                  .&Apache::lonhtmlcommon::row_closure(1)
+                  .&Apache::lonhtmlcommon::end_pick_box();
+
+    $gradeTable .= '<p>'
+                  .&mt('To '.lc($viewgrade)." a submission or a group of submissions, click on the check box(es) next to the student's name(s). Then click on the Next button.")."\n"
+                  .'<input type="hidden" name="command" value="processGroup" />'
+                  .'</p>';
 
 # checkall buttons
     $gradeTable.=&check_script('gradesub', 'stuinfo');
@@ -951,7 +962,6 @@
 	'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n".
 	'value="'.&mt('Next').' &rarr;" /> <br />'."\n";
     $gradeTable.=&check_buttons();
-    $gradeTable.='<label><input type="checkbox" name="checkPlag" checked="checked" />'.&mt('Check For Plagiarism').'</label>';
     my ($classlist, undef, $fullname) = &getclasslist($getsec,'1',$getgroup);
     $gradeTable.= &Apache::loncommon::start_data_table().
 	&Apache::loncommon::start_data_table_header_row();