[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

www lon-capa-cvs@mail.lon-capa.org
Wed, 22 Oct 2003 19:47:52 -0000


www		Wed Oct 22 15:47:52 2003 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Saving my work on selecting versions.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.86 loncom/interface/londocs.pm:1.87
--- loncom/interface/londocs.pm:1.86	Wed Oct  8 13:34:33 2003
+++ loncom/interface/londocs.pm	Wed Oct 22 15:47:52 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.86 2003/10/08 17:34:33 albertel Exp $
+# $Id: londocs.pm,v 1.87 2003/10/22 19:47:52 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -138,7 +138,7 @@
 # Do the dumping
 	unless ($outhash{'home_'.$ENV{'form.authorspace'}}) { return ''; }
 	my ($ca,$cd)=split(/\@/,$ENV{'form.authorspace'});
-	$r->print('<h3>Copying Files</h3>');
+	$r->print('<h3>'.&mt('Copying Files').'</h3>');
 	my $title=$ENV{'form.authorfolder'};
 	$title=~s/[^\w\/]+/\_/g;
 	my %replacehash=();
@@ -396,7 +396,7 @@
             $foldertitle=&Apache::lontexconvert::msgtexconverted($4);
             $renametitle=$4;
             $title='<i>'.&Apache::lonlocal::locallocaltime($1).'</i> '.
-                &Apache::loncommon::plainname($2,$3).': <br>'.
+                &Apache::loncommon::plainname($2,$3).': <br />'.
 		$foldertitle;
 	}
     $renametitle=~s/\&quot\;/\\\"/g;
@@ -490,7 +490,7 @@
 	  my $result=&Apache::lonnet::repcopy(
                               &Apache::lonnet::filelocation('',$url));
           if ($result==OK) {
-             $r->print('<font color="green">ok</font>');
+             $r->print('<font color="green">'.&mt('ok').'</font>');
              $r->rflush();
              &Apache::lonnet::countacc($url);
              $url=~/\.(\w+)$/;
@@ -511,7 +511,8 @@
                      ($Apache::lonxml::warningcount)) {
 		     if ($Apache::lonxml::errorcount) {
                         $r->print('<font color="red"><b>'.
-			  $Apache::lonxml::errorcount.' error(s)</b></font> ');
+			  $Apache::lonxml::errorcount.' '.
+				  &mt('error(s)').'</b></font> ');
                      }
 		     if ($Apache::lonxml::warningcount) {
                         $r->print('<font color="blue">'.
@@ -519,7 +520,7 @@
 				  &mt('warning(s)').'</font>');
                      }
                  } else {
-                     $r->print('<font color="green">ok</font>');
+                     $r->print('<font color="green">'.&mt('ok').'</font>');
                  }
                  $r->rflush();
              }
@@ -612,7 +613,9 @@
                'cc' => 'Content changed',
 	       'fi' => 'File',
 	       'md' => 'Modification Date',
-	       've' => 'Version',
+               'mr' => 'Most recently published Version',
+	       've' => 'Version used in Course',
+               'vu' => 'Set Version to be used in Course', 
 	       'di' => 'Differences');
        $r->print(<<ENDHEADERS);
 <form action="/adm/coursedocs" method="post">
@@ -627,8 +630,8 @@
 <h3>$lt{'cc'} $seltext</h3>
 <table border="2">
 <tr>
-<th>$lt{'fi'}</th><th>$lt{'md'}</th>
-<th>$lt{'ve'}</th><th>$lt{'di'}</th></tr>
+<th>$lt{'fi'}</th><th>$lt{'md'}</th><th>$lt{'mr'}</th>
+<th>$lt{'ve'}</th><th>$lt{'vu'}</th><th>$lt{'di'}</th></tr>
 ENDHEADERS
        foreach (keys %changes) {
 	  if ($changes{$_}>$starttime) {
@@ -638,8 +641,12 @@
              $r->print(
                  '<tr><td><a href="'.$linkurl.'" target="cat">'.$linkurl.
                  '</a></td><td>'.
-                 &Apache::lonlocal::locallocaltime($changes{$_}).'</td><td>'.$currentversion.'</td>'.
-		       '<td>');
+                 &Apache::lonlocal::locallocaltime($changes{$_}).'</td><td>'.
+		       $currentversion.'</td><td>');
+# Used in course
+	     $r->print('</td><td>');
+# Set version
+	     $r->print('</td><td>');
              my $lastold=1;
              for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) {
                  my $url=$root.'.'.$prevvers.'.'.$extension;
@@ -658,7 +665,7 @@
                     $r->print(' <a href="/adm/diff?filename='.
                             &Apache::lonnet::clutter($root.'.'.$extension).
                             '&versionone='.$prevvers.
-			     '">Diffs</a>');
+			     '">'.&mt('Diffs').'</a>');
                  }
                  $r->print('<br />');
              }