[LON-CAPA-cvs] cvs: rat / lonratparms.pm loncom/localize/localize de.pm loncom/lonnet/perl lonnet.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 06 Oct 2003 20:38:25 -0000


www		Mon Oct  6 16:38:25 2003 EDT

  Modified files:              
    /loncom/localize/localize	de.pm 
    /loncom/lonnet/perl	lonnet.pm 
    /rat	lonratparms.pm 
  Log:
  - get symb from alias-parameter in &EXT
  - some translations
  
  
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.39 loncom/localize/localize/de.pm:1.40
--- loncom/localize/localize/de.pm:1.39	Sat Oct  4 20:43:58 2003
+++ loncom/localize/localize/de.pm	Mon Oct  6 16:38:25 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.39 2003/10/05 00:43:58 www Exp $
+# $Id: de.pm,v 1.40 2003/10/06 20:38:25 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -905,29 +905,28 @@
 => 'Erzeuge einen neuen Kurs',
 
    'Customized right of use ...	'
-=> 'Customized right of use ...	',
+=> 'Spezielle Nutzungsrechte ... ',
 
    'Delete messages from bulletin boards'
 => 'Lösche Mitteilungen vom Schwarzen Brett',
 
    'Domain only - use limited to courses in the domain'
-=> 'Domain only - use limited to courses in the domain',
-# Domäne only - use limited to kurss in the Domäne
+=> 'Beschränkt auf Domäne - Nutzung begrenzt auf Kurse innerhalb dieser Domäne',
    'Edit and view documents included in this course'
-=> 'Edit and view documents included in this course',
-# Editor and sehe documents included in this kurs
+=> 'Editiere und betrachte Dokumente innerhalb dieses Kurses',
+
    'Edit/Modify DOCS'
-=> 'Edit/Modify DOCS',
-# Editor/Modify DOCS
+=> 'Editiere/Ändere DOKUS',
+
    'Enter my resource construction space'
 => 'Enter my resource construction space',
 # eingeben my resource construction space
    'Failed to copy source'
-=> 'Failed to copy source',
-# Abbruched to copy source
+=> 'Konnte Quelldatei nicht kopieren',
+
    'Failed to write metadata copy'
-=> 'Failed to write metadata copy',
-# Abbruched to write metadata copy
+=> 'Konnte Metadaten nicht kopieren',
+
    'Finalize Publication'
 => 'Veröffentlichung abschließen',
 
@@ -1010,7 +1009,7 @@
 => 'Zusätzliche Schlüsselwörter',
 
    'Additional Metadata (non-standard, parameters, exports)'
-=> 'Additional Metadata (non-standard, parameters, exports)',
+=> 'Zusätzliche Metadaten (nicht standatisiert, Rarameter, Exporte)',
 
    'Author and Co-Author roles may not be available on servers other than your home server.'
 => 'Author and Co-Author roles may not be available on servers other than your home server.',
@@ -1019,8 +1018,8 @@
 => 'Autor(en)',
 
    'Average number of tries till solved'
-=> 'Average number of tries till solved',
-# Average number of Versuche till solved
+=> 'Durchschnittliche Anzahl von Versuche zur Lösung',
+
    'Browse Resources'
 => 'Browse Resources',
 
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.426 loncom/lonnet/perl/lonnet.pm:1.427
--- loncom/lonnet/perl/lonnet.pm:1.426	Fri Oct  3 22:34:01 2003
+++ loncom/lonnet/perl/lonnet.pm	Mon Oct  6 16:38:25 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.426 2003/10/04 02:34:01 albertel Exp $
+# $Id: lonnet.pm,v 1.427 2003/10/06 20:38:25 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2711,6 +2711,31 @@
     }
 }
 
+# --------------------------------------------------------- Get symb from alias
+
+sub get_symb_from_alias {
+    my $symb=shift;
+    my ($map,$resid,$url)=&decode_symb($symb);
+# Already is a symb
+    if ($url) { return $symb; }
+# Must be an alias
+    my $aliassymb='';
+    my %bighash;
+    if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db',
+                            &GDBM_READER(),0640)) {
+        my $rid=$bighash{'mapalias_'.$symb};
+	if ($rid) {
+	    my ($mapid,$resid)=split(/\./,$rid);
+	    $aliassymb=
+		&declutter($bighash{'map_id_'.$mapid}).
+		'___'.$resid.'___'.
+		&declutter($bighash{'src_'.$rid});
+	}
+        untie %bighash;
+    }
+    return $aliassymb;
+}
+
 # ----------------------------------------------------------------- Define Role
 
 sub definerole {
@@ -3429,6 +3454,9 @@
     #get real user name/domain, courseid and symb
     my $courseid;
     my $publicuser;
+    if ($symbparm) {
+	$symbparm=&get_symb_from_alias($symbparm);
+    }
     if (!($uname && $udom)) {
       (my $cursymb,$courseid,$udom,$uname,$publicuser)=
 	  &Apache::lonxml::whichuser($symbparm);
Index: rat/lonratparms.pm
diff -u rat/lonratparms.pm:1.16 rat/lonratparms.pm:1.17
--- rat/lonratparms.pm:1.16	Mon Sep 29 10:31:00 2003
+++ rat/lonratparms.pm	Mon Oct  6 16:38:25 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Set parameters inside of the RAT
 #
-# $Id: lonratparms.pm,v 1.16 2003/09/29 14:31:00 www Exp $
+# $Id: lonratparms.pm,v 1.17 2003/10/06 20:38:25 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -108,10 +108,10 @@
 # --------------------------------------------------- Print input screen header
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
     my $bodytag=&Apache::loncommon::bodytag('Set Resource Parameters in Map');
-    my %lt=&Apache::loncommon::texthash('pa' => 'Parameter',
-					'de' => 'Default',
-					'va' => 'Value',
-					'se' => 'Set');
+    my %lt=&Apache::lonlocal::texthash('pa' => 'Parameter',
+			               'de' => 'Default',
+				       'va' => 'Value',
+				       'se' => 'Set');
  
     $r->print(<<ENDHEADER);
 <html>
@@ -157,7 +157,7 @@
 <table border=2>
 <tr><th>$lt{'pa'}</th><th>$lt{'de'}</th><th>$lt{'va'}</th><th>$lt{'se'}?</th></tr>
 ENDDOCUMENT
-    %display=&Apache::lonlocal::texthash(%display);
+###    %display=&Apache::lonlocal::texthash(%display);
     my $enter=&mt('Enter');
     foreach (keys(%content)) {
         my $cur=$content{$_};