[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 26 Oct 2004 15:24:20 -0000
www Tue Oct 26 11:24:20 2004 EDT
Modified files:
/loncom/interface londocs.pm
Log:
Bug #3343: Removing and renaming only resource in a folder.
Display counter was off due to skipped empty resources
(introduced when NO RESOURCE message was removed)
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.147 loncom/interface/londocs.pm:1.148
--- loncom/interface/londocs.pm:1.147 Mon Sep 27 11:20:23 2004
+++ loncom/interface/londocs.pm Tue Oct 26 11:24:20 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.147 2004/09/27 15:20:23 matthew Exp $
+# $Id: londocs.pm,v 1.148 2004/10/26 15:24:20 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -989,15 +989,17 @@
# ---------------------------------------------------------------- End commands
# ---------------------------------------------------------------- Print screen
my $idx=0;
+ my $shown=0;
$r->print('<table>');
foreach (@Apache::lonratedt::order) {
my ($name,$url)=split(/\:/,$Apache::lonratedt::resources[$_]);
unless ($name) { $name=(split(/\//,$url))[-1]; }
- unless ($name) { next; }
+ unless ($name) { $idx++; next; }
$r->print(&entryline($idx,$name,$url,$folder,$allowed,$_,$coursenum));
$idx++;
+ $shown++;
}
- unless ($idx) {
+ unless ($shown) {
$r->print('<tr><td>'.&mt('Currently no documents.').'</td></tr>');
}
$r->print('</table>');