[LON-CAPA-cvs] cvs: loncom /interface groupsort.pm lonindexer.pm
taceyjo1
lon-capa-cvs@mail.lon-capa.org
Mon, 10 May 2004 08:34:51 -0000
taceyjo1 Mon May 10 04:34:51 2004 EDT
Modified files:
/loncom/interface groupsort.pm lonindexer.pm
Log:
Here is the fix for bug 2884 that is better and fixes the problem
without slowing everything down, leaving the 1.101 in there as it
seems
to be good. If these changes seem to open up some type of blackhole
of
some sort or anything else that is no good, just let me know.
Teaches groupsort about metadata to sort it's self out. Tested and
works ok.
Index: loncom/interface/groupsort.pm
diff -u loncom/interface/groupsort.pm:1.26 loncom/interface/groupsort.pm:1.27
--- loncom/interface/groupsort.pm:1.26 Mon Jan 19 13:17:29 2004
+++ loncom/interface/groupsort.pm Mon May 10 04:34:50 2004
@@ -2,7 +2,7 @@
# The LON-CAPA group sort handler
# Allows for sorting prior to import into RAT.
#
-# $Id: groupsort.pm,v 1.26 2004/01/19 18:17:29 albertel Exp $
+# $Id: groupsort.pm,v 1.27 2004/05/10 08:34:50 taceyjo1 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -39,6 +39,7 @@
use GDBM_File;
use Apache::loncommon;
use Apache::lonlocal;
+use Apache::lonnet;
my %hash; # variable to tie to user specific database
my $iconpath; # variable to be accessible to multiple subroutines
@@ -234,7 +235,10 @@
my $key = $_;
$key =~ s/^store_//;
$shash{$key} = $hash{'storectr_'.$key};
- $thash{$key} = $hash{'store_'.$key};
+ if (&Apache::lonnet::gettitle($key) eq '') {
+ $thash{$key} = $hash{'store_'.$key}; }
+ else {
+ $thash{$key} = &Apache::lonnet::gettitle($key); }
}
}
if ($ENV{'form.oldval'}) {
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.102 loncom/interface/lonindexer.pm:1.103
--- loncom/interface/lonindexer.pm:1.102 Fri May 7 11:53:05 2004
+++ loncom/interface/lonindexer.pm Mon May 10 04:34:50 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.102 2004/05/07 15:53:05 www Exp $
+# $Id: lonindexer.pm,v 1.103 2004/05/10 08:34:50 taceyjo1 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -841,8 +841,8 @@
# Set the icon for the file
my $iconname = &Apache::loncommon::icon($listname);
$r->print("<tr valign='$valign' bgcolor=$fileclr><td nowrap>");
-# my $metafile = grep /^\Q$filecom[0]\E\.meta\&/, @list;
- my $metafile=1;
+ my $metafile = grep /^\Q$filecom[0]\E\.meta\&/, @list;
+# my $metafile=1;
my $title;
if ($ENV{'form.catalogmode'} eq 'interactive') {
$title=$listname;
@@ -860,7 +860,7 @@
$title=$listname;
$title = &Apache::lonnet::metadata($filelink,'title')
if ($metafile == 1);
- $title=$listname unless $title;
+ $title=$listname unless $title;
my $titleesc=&HTML::Entities::encode($title,'<>&"');
$r->print("<form name='form$fnum'>\n");
$r->print("<input type='checkbox' name='filelink"."' ".