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

raeburn raeburn@source.lon-capa.org
Thu, 19 Mar 2009 21:00:42 -0000


raeburn		Thu Mar 19 21:00:42 2009 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - Apply &mt() to complete phrases.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.559 loncom/homework/grades.pm:1.560
--- loncom/homework/grades.pm:1.559	Thu Mar 19 19:09:47 2009
+++ loncom/homework/grades.pm	Thu Mar 19 21:00:42 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.559 2009/03/19 19:09:47 raeburn Exp $
+# $Id: grades.pm,v 1.560 2009/03/19 21:00:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3226,19 +3226,19 @@
 	'<input type="hidden" name="Status" value="'.$env{'stu_status'}.'" />'."\n".
 	'<input type="hidden" name="probTitle" value="'.$env{'form.probTitle'}.'" />'."\n";
 
-    my $sectionClass;
-    my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section'));
+    my ($common_header,$specific_header);
     if ($env{'form.section'} eq 'all') {
-	$sectionClass=&mt('Class');
+	$common_header = &mt('Assign Common Grade to Class');
+        $specific_header = &mt('Assign Grade to Specific Students in Class');
     } elsif ($env{'form.section'} eq 'none') {
-	$sectionClass=&mt('Students in no Section');
+        $common_header = &mt('Assign Common Grade to Students in no Section');
+	$specific_header = &mt('Assign Grade to Specific Students in no Section');
     } else {
-	$sectionClass=&mt('Students in Section(s) [_1]');
+        my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section'));
+        $common_header = &mt('Assign Common Grade to Students in Section(s) [_1]',$section_display);
+	$specific_header = &mt('Assign Grade to Specific Students in Section(s) [_1]',$section_display);
     }
-    $result.=
-	'<h3>'.
-	&mt("Assign Common Grade to [_1]",$sectionClass,$section_display).'</h3>';
-    $result.= &Apache::loncommon::start_data_table();
+    $result.= '<h3>'.$common_header.'</h3>'.&Apache::loncommon::start_data_table();
     #radio buttons/text box for assigning points for a section or class.
     #handles different parts of a problem
     my ($partlist,$handgrade,$responseType) = &response_type($symb);
@@ -3296,12 +3296,11 @@
 
     #table listing all the students in a section/class
     #header of table
-    $result.= '<h3>'.&mt('Assign Grade to Specific Students in ').$sectionClass,
-			 $section_display.'</h3>';
-    $result.= &Apache::loncommon::start_data_table().
-	&Apache::loncommon::start_data_table_header_row().
-	'<th>'.&mt('No.').'</th>'.
-	'<th>'.&nameUserString('header')."</th>\n";
+    $result.= '<h3>'.$specific_header.'</h3>'.
+              &Apache::loncommon::start_data_table().
+	      &Apache::loncommon::start_data_table_header_row().
+	      '<th>'.&mt('No.').'</th>'.
+	      '<th>'.&nameUserString('header')."</th>\n";
     my (@parts) = sort(&getpartlist($symb));
     my (undef,undef,$url)=&Apache::lonnet::decode_symb($symb);
     my @partids = ();