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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 11 Dec 2006 22:20:21 -0000


albertel		Mon Dec 11 17:20:21 2006 EDT

  Modified files:              
    /loncom/interface	lonpickcourse.pm 
  Log:
  - couldn't search for - . userna,es and domains
  
  
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.60 loncom/interface/lonpickcourse.pm:1.61
--- loncom/interface/lonpickcourse.pm:1.60	Wed Nov 29 02:46:39 2006
+++ loncom/interface/lonpickcourse.pm	Mon Dec 11 17:20:20 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Pick a course
 #
-# $Id: lonpickcourse.pm,v 1.60 2006/11/29 07:46:39 raeburn Exp $
+# $Id: lonpickcourse.pm,v 1.61 2006/12/11 22:20:20 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,7 +35,6 @@
 use Apache::lonnet;
 use Apache::lonlocal;
 use Apache::longroup;
-use lib '/home/httpd/lib/perl/';
 use LONCAPA;
 
 sub handler {
@@ -266,7 +265,15 @@
     foreach my $item (@{$filterlist}) {
         $filter->{$item} = $env{'form.'.$item};
         if ($item ne 'descriptfilter' && $item ne 'instcodefilter') {
-            $filter->{$item} =~ s/\W//g;
+	    if ($item eq 'domainfilter' || $item eq 'ownerdomfilter') {
+		$filter->{$item} = &LONCAPA::clean_domain($filter->{$item});
+	    } elsif ($item eq 'coursefilter') {
+		$filter->{$item} = &LONCAPA::clean_courseid($filter->{$item});
+	    } elsif ($item eq 'ownerfilter') {
+		$filter->{$item} = &LONCAPA::clean_username($filter->{$item});
+	    } else {
+		$filter->{$item} =~ s/\W//g;
+	    }
             if (!$filter->{$item}) {
                 $filter->{$item} = '';
             }