[LON-CAPA-cvs] cvs: loncom /interface lonpdfupload.pm /localize/localize de.pm

bisitz bisitz@source.lon-capa.org
Sat, 16 May 2009 00:28:46 -0000


bisitz		Sat May 16 00:28:46 2009 EDT

  Modified files:              
    /loncom/interface	lonpdfupload.pm 
    /loncom/localize/localize	de.pm 
  Log:
  Optimized screen layout, wording and localization:
  - Wording
  - Optimized mt usage
  - Added new phrases to de.pm
  - Always separate Navigate link from rest of screen by <hr>
  - Make headlines headlines
  - Added error style to error message
  - Corrected grading table header and added table headline
  
  
Index: loncom/interface/lonpdfupload.pm
diff -u loncom/interface/lonpdfupload.pm:1.5 loncom/interface/lonpdfupload.pm:1.6
--- loncom/interface/lonpdfupload.pm:1.5	Fri May 15 23:40:54 2009
+++ loncom/interface/lonpdfupload.pm	Sat May 16 00:28:38 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpdfupload.pm,v 1.5 2009/05/15 23:40:54 bisitz Exp $
+# $Id: lonpdfupload.pm,v 1.6 2009/05/16 00:28:38 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -65,7 +65,7 @@
     $env{'request.uri'}=$r->uri;
     $r->content_type('text/html');
     $r->send_http_header();
-    $r->print(&Apache::loncommon::start_page('Upload-PDF-Form'));
+    $r->print(&Apache::loncommon::start_page('Upload PDF Form'));
 
     #load post data into environment
     &Apache::lonacc::get_posted_cgi($r);
@@ -80,7 +80,8 @@
     }
 
     #link to course-content
-    $r->print('<p>'."\n"
+    $r->print('<hr />'
+             .'<p>'."\n"
              .'<a href="/adm/navmaps">'."\n"
              .&mt("Navigate Contents")."\n"
              .'</a>'."\n"
@@ -121,7 +122,7 @@
 
 sub get_javascripts() {
     
-    my $message = &mt('Please choose a PDF-File');
+    my $message = &mt('Please choose a PDF-File.');
 
     # simple test if the upload ends with ".pdf"
     # it's only for giving a message to the user
@@ -146,9 +147,9 @@
 sub get_uploadform() {
     
     my %lt = &Apache::lonlocal::texthash(
-                 'title'=>'Submit a PDF-Form with problems', 
-                 'chFile' => 'Choose file',
-                 'submit'=>'Submit'
+                 'title'  => 'Upload a PDF Form with filled Form Fields', 
+                 'chFile' => 'File',
+                 'submit' => 'Upload',
              );
 
     my $result = 
@@ -165,8 +166,7 @@
        .&Apache::lonhtmlcommon::end_pick_box()
        .'<input type="submit" name="Uploaded" value="'.$lt{'submit'}.'" />'
        .'</form>'
-       .'<br />'
-       .'<hr />';
+       .'<br />';
 
   return $result;
 }
@@ -180,7 +180,9 @@
     if (scalar @pdfdata) {    
         &grade_pdf(@pdfdata);
     } else {
-        $result .= "<h2>".&mt("Can't find any valid PDF-formfields")."</h2>";
+        $result .= '<p class="LC_error">'
+                  .&mt("Can't find any valid PDF formfields.")
+                  .'</p>';
     }
 }
 
@@ -215,11 +217,13 @@
     my $debug = ();
 
     $debug  .= "Found: ". scalar @pdfdata." Entries \n";
-    $result .= '<br />';
-    $result .= &Apache::loncommon::start_data_table();
-    $result .= &Apache::loncommon::start_data_table_header_row();
-    $result .= &mt('<b>Results of PDF-Form problems</b>');
-    $result .= &Apache::loncommon::end_data_table_header_row();
+    $result .= '<h2>'.&mt('Results of PDF Form problems').'</h2>';
+    $result .= &Apache::loncommon::start_data_table()
+              .&Apache::loncommon::start_data_table_header_row()
+              .'<th>'.&mt('Problem Name').'</th>'
+              .'<th>'.&mt('Grading').'</th>'
+              .&Apache::loncommon::start_data_table_header_row()
+              .&Apache::loncommon::end_data_table_header_row();
 
     foreach my $entry (sort(@pdfdata)) {
         if ($entry =~ /^meta.*/) {
@@ -239,7 +243,7 @@
             my ($map,$id,$resource)=&Apache::lonnet::decode_symb($symb);  
             $value =~ s/(.*)\n/$1/; 
 
-            #fehlerhafte Radiobuttons rausfiltern (Bug in CABAReT Stage)
+            #filter incorrect radiobuttons (Bug in CABAReT Stage)
             if($type eq 'radiobuttonresponse' && $value eq 'Off' ) {
                 next;
             }
@@ -278,7 +282,6 @@
         $result .= "'>$grade</span></td>";
         $result .= &Apache::loncommon::end_data_table_row();
     }
-    #$result .= "\n</table>";
     $result .= &Apache::loncommon::end_data_table();
 
 
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.297 loncom/localize/localize/de.pm:1.298
--- loncom/localize/localize/de.pm:1.297	Fri May 15 14:42:48 2009
+++ loncom/localize/localize/de.pm	Sat May 16 00:28:45 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.297 2009/05/15 14:42:48 bisitz Exp $
+# $Id: de.pm,v 1.298 2009/05/16 00:28:45 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -16373,6 +16373,27 @@
    'Tools:'
 => 'Werkzeuge:',
 
+   'Upload PDF Form'
+=> 'PDF-Formular hochladen',
+
+   'Upload a PDF Form with filled Form Fields'
+=> 'Hochladen eines PDF-Formulars mit ausgefüllten Formularfeldern',
+
+   'File'
+=> 'Datei',
+
+   'Upload'
+=> 'Hochladen',
+
+   'Please choose a PDF-File.'
+=> 'Bitte wählen Sie eine PDF-Datei aus.',
+
+   "Can't find any valid PDF formfields."
+=> 'Konnte keine PDF-Formularfelder finden',
+
+   'Results of PDF Form problems'
+=> 'Ergebnisse der PDF-Formular-Aufgaben',
+
    ''
 => '',