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

bisitz bisitz@source.lon-capa.org
Tue, 15 Dec 2009 18:26:26 -0000


bisitz		Tue Dec 15 18:26:26 2009 EDT

  Modified files:              
    /loncom/homework	grades.pm 
    /loncom/localize/localize	de.pm 
  Log:
  - Problem Part table:
      - Standard data_table
      - Added headlines
      - Translate problem type
      - font-weight normal
      - Removed unused variable $col
  - "Receipt Number":
      - Consistent Wording
      - Updated &mt() calls and kept translation file entries (already up-to-date)
      - Added warning style to "no match" message
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.583 loncom/homework/grades.pm:1.584
--- loncom/homework/grades.pm:1.583	Wed Dec  9 19:41:10 2009
+++ loncom/homework/grades.pm	Tue Dec 15 18:26:18 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.583 2009/12/09 19:41:10 raeburn Exp $
+# $Id: grades.pm,v 1.584 2009/12/15 18:26:18 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -207,8 +207,6 @@
 #--- and parts and response type
 sub showResourceInfo {
     my ($symb,$probTitle,$checkboxes,$res_error) = @_;
-    my $col=3;
-    if ($checkboxes) { $col=4; }
     my $result = '<h3>'.&mt('Current Resource').': '.$probTitle.'</h3>'."\n";
     my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error);
     if (ref($res_error)) {
@@ -216,32 +214,41 @@
             return;
         }
     }
-    $result .='<table border="0">';
+    $result.=&Apache::loncommon::start_data_table()
+            .&Apache::loncommon::start_data_table_header_row();
+    if ($checkboxes) {
+        $result.='<th>&nbsp;</th>';
+    }
+    $result.='<th>'.&mt('Problem Part').'</th>'
+            .'<th>'.&mt('Res. ID').'</th>'
+            .'<th>'.&mt('Type').'</th>'
+            .&Apache::loncommon::end_data_table_header_row();
     my %resptype = ();
     my $hdgrade='no';
     my %partsseen;
     foreach my $partID (sort(keys(%$responseType))) {
-	foreach my $resID (sort(keys(%{ $responseType->{$partID} }))) {
-	    my $handgrade=$$handgrade{$partID.'_'.$resID};
-	    my $responsetype = $responseType->{$partID}->{$resID};
-	    $hdgrade = $handgrade if ($handgrade eq 'yes');
-	    $result.='<tr>';
-	    if ($checkboxes) {
-		if (exists($partsseen{$partID})) {
-		    $result.="<td>&nbsp;</td>";
-		} else {
-		    $result.="<td><input type='checkbox' name='vPart' value='$partID' checked='checked' /></td>";
-		}
-		$partsseen{$partID}=1;
-	    }
-	    my $display_part=&get_display_part($partID,$symb);
-            $result.='<td><b>'.&mt('Part: [_1]',$display_part).'</b>'.
-                ' <span class="LC_internal_info">'.$resID.'</span></td>'.
-                '<td><b>'.&mt('Type: [_1]',$responsetype).'</b></td></tr>';
-#	    '<td>'.&mt('<b>Handgrade: </b>[_1]',$handgrade).'</td></tr>';
-	}
+        foreach my $resID (sort(keys(%{ $responseType->{$partID} }))) {
+            my $handgrade=$$handgrade{$partID.'_'.$resID};
+            my $responsetype = $responseType->{$partID}->{$resID};
+            $hdgrade = $handgrade if ($handgrade eq 'yes');
+            $result.=&Apache::loncommon::start_data_table_row();
+            if ($checkboxes) {
+                if (exists($partsseen{$partID})) {
+                    $result.="<td>&nbsp;</td>";
+                } else {
+                    $result.="<td><input type='checkbox' name='vPart' value='$partID' checked='checked' /></td>";
+                }
+                $partsseen{$partID}=1;
+            }
+            my $display_part=&get_display_part($partID,$symb);
+            $result.='<td>'.$display_part.'</td>'
+                    .'<td>'.'<span class="LC_internal_info">'.$resID.'</span></td>'
+                    .'<td>'.&mt($responsetype).'</td>'
+#                   .'<td>'.&mt('<b>Handgrade: </b>[_1]',$handgrade).'</td>'
+                    .&Apache::loncommon::end_data_table_row();
+        }
     }
-    $result.='</table>'."\n";
+    $result.=&Apache::loncommon::end_data_table();
     return $result,$responseType,$hdgrade,$partlist,$handgrade;
 }
 
@@ -772,7 +779,7 @@
 
     my $title.=
 	'<h3><span class="LC_info">'.
-	&mt('Verifying  Receipt No. [_1]',$receipt).
+	&mt('Verifying Receipt No. [_1]',$receipt).
 	'</span></h3>'."\n".
 	'<h4>'.&mt('<b>Resource: </b>[_1]',$env{'form.probTitle'}).
 	'</h4>'."\n";
@@ -832,11 +839,14 @@
 	}
     }
     if ($matches == 0) {
-	$string = $title.&mt('No match found for the above receipt.');
+        $string = $title
+                 .'<p class="LC_warning">'
+                 .&mt('No match found for the above receipt number.')
+                 .'</p>';
     } else {
 	$string = &jscriptNform($symb).$title.
 	    '<p>'.
-	    &mt('The above receipt matches the following [numerate,_1,student].',$matches).
+	    &mt('The above receipt number matches the following [quant,_1,student].',$matches).
 	    '</p>'.
 	    $header.
 	    $contents.
@@ -8491,7 +8501,7 @@
 
     $Str .= Apache::lonhtmlcommon::generate_menu(@menu);
     #$menudata->{'jscript'}
-    $Str .='<hr /><input type="button" value="'.&mt('Verify Receipt').'" '.
+    $Str .='<hr /><input type="button" value="'.&mt('Verify Receipt No.').'" '.
         ' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '.
         ' /> '.
         &Apache::lonnet::recprefix($env{'request.course.id'}).
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.341 loncom/localize/localize/de.pm:1.342
--- loncom/localize/localize/de.pm:1.341	Tue Dec 15 17:24:41 2009
+++ loncom/localize/localize/de.pm	Tue Dec 15 18:26:26 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.341 2009/12/15 17:24:41 bisitz Exp $
+# $Id: de.pm,v 1.342 2009/12/15 18:26:26 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8117,6 +8117,9 @@
    'Part ID: [_1]'
 => 'Aufgabenteil-ID: [_1]',
 
+   'Res. ID'
+=> 'Aufg.-ID',
+
    'Points:'
 => 'Punkte:',
 
@@ -12533,6 +12536,15 @@
    'Modify this user: [_1]'
 => 'Weitere Änderungen für Benutzer [_1]',
 
+   'radiobutton'
+=> '1-aus-n-Auswahl (radiobutton)',
+
+   'numerical'
+=> 'numerisch',
+
+   'formula'
+=> 'Formel',
+
    'Blank Problem'
 => 'Leere Aufgabe',
 
@@ -13676,6 +13688,9 @@
    '[quant,_1,student]'
 => '[quant,_1,Student/in,Studierende]',
 
+   '[_1]student(s)'
+=> '[_1]Studierende',
+
    '(Next and Previous (student) do not save the scores.)'
 => '("Zurück" und "Weiter" speichert nicht die Bewertungsdaten dieser Seite)',
 
@@ -16476,6 +16491,12 @@
    'Please enter a receipt number given by a student in the receipt box.'
 => 'Bitte geben Sie die Nachweisnummer ein, die der/die Student/in erhalten hat.',
 
+   'No match found for the above receipt number.'
+=> 'Für die angegebene Nachweisnummer konnte kein/e Student/in gefunden werden.',
+
+   'The above receipt number matches the following [quant,_1,student].'
+=> 'Die angegebene Nachweisnummer passt zu folgenden/m/r [quant,_1,Studenten/in,Studierenden].',
+
    'Problems from'
 => 'Aufgaben aus',