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

bisitz bisitz@source.lon-capa.org
Fri, 15 Jan 2010 16:41:43 -0000


bisitz		Fri Jan 15 16:41:43 2010 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Screen layout consistency and floating enhancements:
  - Replaced some special styles by standard boxes and headlines
  (work in progress)
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.587 loncom/homework/grades.pm:1.588
--- loncom/homework/grades.pm:1.587	Sun Dec 27 01:49:32 2009
+++ loncom/homework/grades.pm	Fri Jan 15 16:41:43 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.587 2009/12/27 01:49:32 raeburn Exp $
+# $Id: grades.pm,v 1.588 2010/01/15 16:41:43 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1869,26 +1869,23 @@
 	$companswer=~s|name="submit"|name="would_have_been_submit"|g;
     }
     $rendered=
-	'<div class="LC_grade_show_problem_header">'.
-	&mt('View of the problem').
-	'</div><div class="LC_grade_show_problem_problem">'.
-	$rendered.
-	'</div>';
+        '<div class="LC_Box">'
+       .'<h3 class="LC_hcell">'.&mt('View of the problem').'</h3>'
+       .$rendered
+       .'</div>';
     $companswer=
-	'<div class="LC_grade_show_problem_header">'.
-	&mt('Correct answer').
-	'</div><div class="LC_grade_show_problem_problem">'.
-	$companswer.
-	'</div>';
+        '<div class="LC_Box">'
+       .'<h3 class="LC_hcell">'.&mt('Correct answer').'</h3>'
+       .$companswer
+       .'</div>';
     my $result;
     if ($mode eq 'both') {
-	$result=$rendered.$companswer;
+        $result=$rendered.$companswer;
     } elsif ($mode eq 'text') {
-	$result=$rendered;
+        $result=$rendered;
     } elsif ($mode eq 'answer') {
-	$result=$companswer;
+        $result=$companswer;
     }
-    $result='<div class="LC_grade_show_problem">'.$result.'</div>';
     return $result;
 }
 
@@ -2113,18 +2110,16 @@
     $request->print(($counter == 0 ? '' : '<br />'));
     my $result='<div class="LC_grade_submissions">';
     
-    $result.='<div class="LC_grade_submissions_header">';
-    $result.= &mt('Submissions');
+    $result.='<div class="LC_Box">'
+            .'<h3 class="LC_hcell">'.&mt('Submissions').'</h3>';
     $result.='<input type="hidden" name="name'.$counter.
-	'" value="'.$env{'form.fullname'}.'" />'."\n";
+             '" value="'.$env{'form.fullname'}.'" />'."\n";
     if ($env{'form.handgrade'} eq 'no') {
-	$result.='<span class="LC_grade_check_note">'.
-	    &mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon)."</span>\n";
-
+        $result.='<p class="LC_info">'
+                .&mt('Part(s) graded correct by the computer is marked with a [_1] symbol.',$checkIcon)
+                ."</p>\n";
     }
 
-
-
     # If any part of the problem is an essay-response (handgraded), then check for collaborators
     my $fullname;
     my $col_fullnames = [];
@@ -2135,9 +2130,9 @@
 	$result.=$sub_result;
     }
     $request->print($result."\n");
-    $request->print('</div>'."\n");
+
     # print student answer/submission
-    # Options are (1) Handgaded submission only
+    # Options are (1) Handgraded submission only
     #             (2) Last submission, includes submission that is not handgraded 
     #                  (for multi-response type part)
     #             (3) Last submission plus the parts info
@@ -2147,10 +2142,10 @@
 	
 	my $lastsubonly;
 
-	if ($$timestamp eq '') {
-	    $lastsubonly.='<div class="LC_grade_submissions_body">'.$$string[0].'</div>'; 
-	} else {
-	    $lastsubonly = '<div class="LC_grade_submissions_body"> <b>Date Submitted:</b> '.$$timestamp."\n";
+        if ($$timestamp eq '') {
+            $lastsubonly.='<div class="LC_grade_submissions_body">'.$$string[0].'</div>'; 
+        } else {
+            $lastsubonly = '<div class="LC_grade_submissions_body"> <b>Date Submitted:</b> '.$$timestamp."\n";
 
 	    my %seenparts;
 	    my @part_response_id = &flatten_responseType($responseType);
@@ -2238,7 +2233,7 @@
 		    }
 		}
 	    }
-	    $lastsubonly.='</div>'."\n";
+	    $lastsubonly.='</div>'."\n"; # End: LC_grade_submissions_body
 	}
 	$request->print($lastsubonly);
    } elsif ($env{'form.lastSub'} eq 'datesub') {
@@ -2301,9 +2296,8 @@
     my @gradePartRespid;
     my @part_response_id = &flatten_responseType($responseType);
     $request->print(
-        '<div class="LC_grade_assign">'
-       .'<div class="LC_grade_assign_header">'
-       .&mt('Assign Grades').'</div>'
+        '<div class="LC_Box">'
+       .'<h3 class="LC_hcell">'.&mt('Assign Grades').'</h3>'
     );
     $request->print(&gradeBox_start()); # <div class="LC_grade_assign_body">
     foreach my $part_response_id (@part_response_id) {