--- loncom/interface/lonindexer.pm 2001/08/13 14:50:35 1.17 +++ loncom/interface/lonindexer.pm 2001/11/29 20:31:45 1.24 @@ -1,7 +1,30 @@ # The LearningOnline Network with CAPA -# # Directory Indexer # +# $Id: lonindexer.pm,v 1.24 2001/11/29 20:31:45 harris41 Exp $ +# +# Copyright Michigan State University Board of Trustees +# +# This file is part of the LearningOnline Network with CAPA (LON-CAPA). +# +# LON-CAPA is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# LON-CAPA is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LON-CAPA; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# /home/httpd/html/adm/gpl.txt +# +# http://www.lon-capa.org/ +# # YEAR=1999 # 5/21/99, 5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14 Gerd Kortemeyer) # 11/23 Gerd Kortemeyer @@ -14,15 +37,34 @@ # 5/31,6/1,6/2,6/15 Scott Harrison # 6/26,7/8 H. K. Ng # 8/6,8/7,8/10 Scott Harrison +# 8/14 H. K. Ng +# 8/28,10/15,11/28,11/29 Scott Harrison +# +### + +############################################################################### +## ## +## ORGANIZATION OF THIS PERL MODULE ## +## ## +## 1. Description of functions ## +## 2. Modules used by this module ## +## 3. Choices for different output views (detailed, summary, xml, etc) ## +## 4. BEGIN block (to be run once after compilation) ## +## 5. Handling routine called via Apache and mod_perl ## +## 6. Other subroutines ## +## ## +############################################################################### package Apache::lonindexer; +# ------------------------------------------------- modules used by this module use strict; use Apache::lonnet(); use Apache::Constants qw(:common); use Apache::File; use GDBM_File; +# ---------------------------------------- variables used throughout the module my %hash; # tied to a user-specific gdbm file my %dirs; # keys are directories, values are the open/close status my %language; # has the reference information present in language.tab @@ -43,7 +85,7 @@ sub BEGIN { } <$fh>; } -# ---------------------------------------------------------------- Main Handler +# ----------------------------- Handling routine called via Apache and mod_perl sub handler { my $r = shift; $r->content_type('text/html'); @@ -51,8 +93,9 @@ sub handler { return OK if $r->header_only; $fnum=0; $dnum=0; + untie %hash; -# --------------------------------------------- machine configuration variables +# ------------------------------------- read in machine configuration variables my $iconpath= $r->dir_config('lonIconsURL') . "/"; my $domain = $r->dir_config('lonDefDomain'); my $role = $r->dir_config('lonRole'); @@ -128,7 +171,7 @@ function select_data(title,url) { self.close(); } function select_group() { - window.location="/adm/groupsort?acts="+document.forms.fileattr.acts.value; + window.location="/adm/groupsort?catalogmode=groupimport&acts="+document.forms.fileattr.acts.value; } function changeTitle(val) { if (opener.inf.document.forms.resinfo.elements.t) { @@ -169,7 +212,7 @@ END The LearningOnline Network With CAPA Directory Browser -