[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm londocs.pm /localize/localize de.pm zh.pm

bisitz bisitz@source.lon-capa.org
Tue, 14 Jul 2009 17:33:48 -0000


This is a MIME encoded message

--bisitz1247592828
Content-Type: text/plain

bisitz		Tue Jul 14 17:33:48 2009 EDT

  Modified files:              
    /loncom/interface	londocs.pm loncommon.pm 
    /loncom/localize/localize	de.pm zh.pm 
  Log:
  Optimized DOCS screen layout:
  - Use same background color for parameters on right side as for actions on left side ("LC_docs_entry_parameter")
  - Added missing parameter display "random order"
  - Added headlines to document table
  - Optimized output for empty folders: Only display table and headlines if content exists
  - Wrapped clipboard in fieldset
  - Wrapped parameter list for current folder in Box (including warning messages)
  - Added warning style to warning messages (randomly pick, random order)
  - Added width to div for "move up/down" icons ("LC_docs_entry_move")
  - Optimized &mt call for "randomly pick X resources"
  - Adjusted translations (de, zh) and added missing translations (de, zh)
  
  
--bisitz1247592828
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20090714173348.txt"

Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.380 loncom/interface/londocs.pm:1.381
--- loncom/interface/londocs.pm:1.380	Tue Jul 14 12:27:52 2009
+++ loncom/interface/londocs.pm	Tue Jul 14 17:33:43 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.380 2009/07/14 12:27:52 bisitz Exp $
+# $Id: londocs.pm,v 1.381 2009/07/14 17:33:43 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1273,10 +1273,11 @@
     my ($r,$container) = @_;
     return if (!defined($env{'docs.markedcopy_url'}));
 
-    $r->print(<<ENDPASTE);
-<form name="pasteform" action="/adm/coursedocs" method="post"><p>
-ENDPASTE
-    $r->print('<input type="submit" name="pastemarked" value="'.&mt('Paste').'" /> ');
+    $r->print('<fieldset>'
+             .'<legend>'.&mt('Clipboard').'</legend>'
+             .'<form name="pasteform" action="/adm/coursedocs" method="post">'
+             .'<input type="submit" name="pastemarked" value="'.&mt('Paste').'" /> '
+    );
 
     my $type;
     if ($env{'docs.markedcopy_url'} =~ m{^(?:/adm/wrapper/ext|(?:http|https)(?:&colon;|:))//} ) {
@@ -1305,7 +1306,7 @@
         <input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />
 ');
     }
-    $r->print('</p></form>');
+    $r->print('</form></fieldset>');
 }
 
 sub do_paste_from_buffer {
@@ -1588,36 +1589,66 @@
     my $idx=0;
     my $shown=0;
     if (($ishidden) || ($isencrypted) || ($randompick>=0) || ($is_random_order)) {
-	$r->print('<p>'.&mt('Parameters').':<ul>'.
-		  ($randompick>=0?'<li>'.&mt('randomly pick [_1] resources',$randompick).'</li>':'').
+	$r->print('<div class="LC_Box">'.
+          '<p>'.&mt('Parameters:').
+          '<ul>'.
+		  ($randompick>=0?'<li>'.&mt('randomly pick [quant,_1,resource]',$randompick).'</li>':'').
 		  ($ishidden?'<li>'.&mt('contents hidden').'</li>':'').
 		  ($isencrypted?'<li>'.&mt('URLs hidden').'</li>':'').
+		  ($is_random_order?'<li>'.&mt('random order').'</li>':'').
 		  '</ul></p>');
+        if ($randompick>=0) {
+            $r->print('<p class="LC_warning">'
+                 .&mt('Caution: this folder is set to randomly pick a subset'
+                     .' of resources. Adding or removing resources from this'
+                     .' folder will change the set of resources that the'
+                     .' students see, resulting in spurious or missing credit'
+                     .' for completed problems, not limited to ones you'
+                     .' modify. Do not modify the contents of this folder if'
+                     .' it is in active student use.')
+                 .'</p>'
+            );
+        }
+        if ($is_random_order) {
+            $r->print('<p class="LC_warning">'
+                 .&mt('Caution: this folder is set to randomly order its'
+                     .' contents. Adding or removing resources from this folder'
+                     .' will change the order of resources shown.')
+                 .'</p>'
+            );
+        }
+        $r->print('</div>');
     }
-    if ($randompick>=0) {
-	$r->print('<p>'.&mt('Caution: this folder is set to randomly pick a subset of resources. Adding or removing resources from this folder will change the set of resources that the students see, resulting in spurious or missing credit for completed problems, not limited to ones you modify. Do not modify the contents of this folder if it is in active student use.').'</p>');
-    }
-    if ($is_random_order) {
-	$r->print('<p>'.&mt('Caution: this folder is set to randomly order its contents. Adding or removing resources from this folder will change the order of resources shown.').'</p>');
-    }
-    $r->print(&Apache::loncommon::start_data_table());
+
+    my $output;
     foreach my $res (@LONCAPA::map::order) {
-	my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$res]);
-	$name=&LONCAPA::map::qtescape($name);
-	$url=&LONCAPA::map::qtescape($url);
-	unless ($name) {  $name=(split(/\//,$url))[-1]; }
-	unless ($name) { $idx++; next; }
-	$r->print(&entryline($idx,$name,$url,$folder,$allowed,$res,
-			     $coursenum));
-	$idx++;
-	$shown++;
-    }
-    unless ($shown) {
-	$r->print('<tr><td><p class="LC_info">'
-             .&mt('Currently no documents.')
-             .'</p></td></tr>');
+        my ($name,$url)=split(/\:/,$LONCAPA::map::resources[$res]);
+        $name=&LONCAPA::map::qtescape($name);
+        $url=&LONCAPA::map::qtescape($url);
+        unless ($name) {  $name=(split(/\//,$url))[-1]; }
+        unless ($name) { $idx++; next; }
+        $output .= &entryline($idx,$name,$url,$folder,$allowed,$res,
+                              $coursenum);
+        $idx++;
+        $shown++;
+    }
+    if ($shown) {
+    $r->print(&Apache::loncommon::start_data_table()
+             .&Apache::loncommon::start_data_table_header_row()
+             .'<th colspan="2">'.&mt('Move').'</th>'
+             .'<th>'.&mt('Actions').'</th>'
+             .'<th colspan="2">'.&mt('Document').'</th>'
+             .'<th colspan="4">'.&mt('Settings').'</th>'
+             .&Apache::loncommon::end_data_table_header_row()
+             .$output
+             .&Apache::loncommon::end_data_table()
+    )
+    } else {
+        $r->print('<p class="LC_info">'
+                 .&mt('Currently no documents.')
+                 .'</p>'
+        );
     }
-    $r->print(&Apache::loncommon::end_data_table());
     if ($allowed) {
         &print_paste_buffer($r,$container);
     }
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.860 loncom/interface/loncommon.pm:1.861
--- loncom/interface/loncommon.pm:1.860	Tue Jul 14 12:04:50 2009
+++ loncom/interface/loncommon.pm	Tue Jul 14 17:33:43 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.860 2009/07/14 12:04:50 bisitz Exp $
+# $Id: loncommon.pm,v 1.861 2009/07/14 17:33:43 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5562,18 +5562,24 @@
   padding: 4px;
 }
 
-.LC_docs_entry_move {
+div.LC_docs_entry_move {
   border: 1px solid #BBBBBB;
   background: #DDDDDD;
+  width: 22px;
   padding: 1px;
   margin: 0;
 }
 
-table.LC_data_table tr > td.LC_docs_entry_commands {
+table.LC_data_table tr > td.LC_docs_entry_commands,
+table.LC_data_table tr > td.LC_docs_entry_parameter {
   background: #DDDDDD;
   font-size: x-small;
 }
 
+.LC_docs_entry_parameter {
+  white-space: nowrap;
+}
+
 .LC_docs_copy {
   color: #000099;
 }
@@ -5595,12 +5601,6 @@
   font-size: x-small;
 }
 
-table.LC_data_table tr > td.LC_docs_entry_parameter {
-  background: #BBBBFF;
-  font-size: x-small;
-  white-space: nowrap;
-}
-
 table.LC_docs_adddocs td,
 table.LC_docs_adddocs th {
   border: 1px solid #BBBBBB;
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.314 loncom/localize/localize/de.pm:1.315
--- loncom/localize/localize/de.pm:1.314	Fri Jul 10 17:05:09 2009
+++ loncom/localize/localize/de.pm	Tue Jul 14 17:33:47 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.314 2009/07/10 17:05:09 bisitz Exp $
+# $Id: de.pm,v 1.315 2009/07/14 17:33:47 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -243,6 +243,12 @@
    'Special Documents'
 => 'Spezielle Dokumente',
 
+   'Document'
+=> 'Dokument',
+
+   'Settings'
+=> 'Einstellungen',
+
    'create'
 => 'erstelle',
 
@@ -7366,6 +7372,9 @@
    'WARNING: Removing a resource makes associated grades and scores inaccessible!'
 => 'Achtung: Das Entfernen der Ressource macht die damit verknüpften Bewertungen und Punkte unerreichbar!',
 
+   'Clipboard'
+=> 'Zwischenablage',
+
    'Remove[_99]'
 => 'Soll[_99]',
 
@@ -9907,9 +9916,18 @@
    'Broadcast Message'
 => 'Broadcast-Nachricht',
 
+   'randomly pick [quant,_1,resource]'
+=> 'zufällig [quant,_1,Ressource,Ressourcen] wählen',
+
    'contents hidden'
 => 'Inhalte verborgen',
 
+   'URLs hidden'
+=> 'URLs verborgen',
+
+   'random order'
+=> 'zufällige Reihenfolge',
+
    'Resources in course with version changes since yesterday'
 => 'Ressourcen im Kurs mit Versionsänderungen seit gestern',
 
@@ -11690,9 +11708,15 @@
    'Caution: this folder is set to randomly pick a subset of resources. Adding or removing resources from this folder will change the set of resources that the students see, resulting in spurious or missing credit for completed problems, not limited to ones you modify. Do not modify the contents of this folder if it is in active student use.'
 => 'Achtung, dieses Verzeichnis ist so eingestellt, dass zufällig eine Teilmenge der Ressourcen gewählt wird. Hinzufügen oder Entfernen von Ressourcen zu/aus diesem Verzeichnis wird die Auswahl ändern, die die Studierenden sehen. Dies kann falsche oder fehlende Bewertungen für abgeschlossene Aufgaben zur Folge haben, was nicht beschränkt auf die Ressourcen ist, die Sie ändern. Ändern Sie daher die Inhalte dieses Verzeichnisses nicht, wenn es in aktueller studentischer Verwendung ist.',
 
+   'Caution: this folder is set to randomly order its contents. Adding or removing resources from this folder will change the order of resources shown.'
+=> 'Achtung, dieses Verzeichnis ist so eingestellt, dass der Inhalt in zufälliger Reihenfolge angezeigt wird. Hinzufügen oder Entfernen von Ressourcen zu/aus diesem Verzeichnis wird die Reihenfolge ändern, in der die Ressourcen gezeigt werden.',
+
    'Parameters'
 => 'Parameter',
 
+   'Parameters:'
+=> 'Parameter:',
+
    'Total Score and Maximum Possible for each Sequence or Folder'
 => 'Gesamtpunkte und maximal mögliche für jede Sequenz oder jedes Verzeichnis',
 
Index: loncom/localize/localize/zh.pm
diff -u loncom/localize/localize/zh.pm:1.67 loncom/localize/localize/zh.pm:1.68
--- loncom/localize/localize/zh.pm:1.67	Fri Jul 10 17:05:09 2009
+++ loncom/localize/localize/zh.pm	Tue Jul 14 17:33:47 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Chinese Simplified Localization Lexicon
 #
-# $Id: zh.pm,v 1.67 2009/07/10 17:05:09 bisitz Exp $
+# $Id: zh.pm,v 1.68 2009/07/14 17:33:47 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -222,6 +222,12 @@
    'Special documents'
 => '特别文件',
 
+   'Document'
+=> 'Dokument',
+
+   'Settings'
+=> 'Einstellungen',
+
    'create'
 => '创建',
 
@@ -7445,6 +7451,9 @@
    'WARNING: Removing a resource makes associated grades and scores inaccessible!'
 => 'Achtung: Das Entfernen der Ressource macht die damit verknüpften Bewertungen und Punkte unerreichbar!',
 
+   'Clipboard'
+=> 'Zwischenablage',
+
    'Remove[_99]'
 => 'Soll[_99]',
 
@@ -9978,9 +9987,18 @@
    'Broadcast Message'
 => '广播消息',
 
+   'randomly pick [quant,_1,resource]'
+=> 'zufällig [quant,_1,Ressource,Ressourcen] wählen',
+
    'contents hidden'
 => '隐藏的内容',
 
+   'URLs hidden'
+=> 'URLs verborgen',
+
+   'random order'
+=> 'zufällige Reihenfolge',
+
    'Resources in course with version changes since yesterday'
 => '课程中的资源,从昨天起版本的变化',
 
@@ -11750,9 +11768,15 @@
    'Caution: this folder is set to randomly pick a subset of resources. Adding or removing resources from this folder will change the set of resources that the students see, resulting in spurious or missing credit for completed problems, not limited to ones you modify. Do not modify the contents of this folder if it is in active student use.'
 => 'Achtung, dieses Verzeichnis ist so eingestellt, dass zufällig eine Teilmenge der Ressourcen gewählt wird. Hinzufügen oder Entfernen von Ressourcen zu/aus diesem Verzeichnis wird die Auswahl ändern, die die Studenten sehen. Dies kann falsche oder fehlende Bewertungen für abgeschlossene Aufgaben zur Folge haben, was nicht beschränkt auf die Ressourcen ist, die Sie ändern. Ändern Sie daher die Inhalte dieses Verzeichnisses nicht, wenn es in aktueller studentischer Verwendung ist.',
 
+   'Caution: this folder is set to randomly order its contents. Adding or removing resources from this folder will change the order of resources shown.'
+=> 'Achtung, dieses Verzeichnis ist so eingestellt, dass der Inhalt in zufälliger Reihenfolge angezeigt wird. Hinzufügen oder Entfernen von Ressourcen zu/aus diesem Verzeichnis wird die Reihenfolge ändern, in der die Ressourcen gezeigt werden.',
+
    'Parameters'
 => '参数',
 
+   'Parameters:'
+=> '参数:',
+
    'Total Score and Maximum Possible for each Sequence or Folder'
 => 'Gesamtpunkte und maximal mögliche für jede Sequenz oder jedes Verzeichnis',
 

--bisitz1247592828--