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

minaeibi lon-capa-cvs@mail.lon-capa.org
Sat, 02 Mar 2002 02:03:47 -0000


minaeibi		Fri Mar  1 21:03:47 2002 EDT

  Modified files:              
    /loncom/interface	lonchart.pm 
  Log:
  Fixed bugs
  
  
Index: loncom/interface/lonchart.pm
diff -u loncom/interface/lonchart.pm:1.36 loncom/interface/lonchart.pm:1.37
--- loncom/interface/lonchart.pm:1.36	Fri Mar  1 20:44:00 2002
+++ loncom/interface/lonchart.pm	Fri Mar  1 21:03:47 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # (Publication Handler
 #
-# $Id: lonchart.pm,v 1.36 2002/03/02 01:44:00 minaeibi Exp $
+# $Id: lonchart.pm,v 1.37 2002/03/02 02:03:47 minaeibi Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -222,35 +222,6 @@
        }
     }
 }
-
-
-sub usection2 {
-    my ($udom,$unam,$courseid,$ActiveFlag)=@_;
-    $courseid=~s/\_/\//g;
-    $courseid=~s/^(\w)/\/$1/;
-    foreach my $elem(split(/\&/,&Apache::lonnet::reply('dump:'.$udom.':'.$unam.':roles',
-                     &Apache::lonnet::homeserver($unam,$udom)))) {
-        my ($key,$value)=split(/\=/,$elem);
-        $key=&Apache::lonnet::unescape($key);
-        if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) {
-            my $section=$1;
-            if ($key eq $courseid.'_st') { $section=''; }
-	    my ($dummy,$end,$start)=split(/\_/,&Apache::lonnet::unescape($value));
-            my $now=time;
-            my $notactive=0;
-            if ($start) {
-		if ($now<$start) { $notactive=1; }
-            }
-            if ($end) {
-                if ($now>$end) { $notactive=1; }
-            } 
-	    if ($ActiveFlag == 1) { $notactive=0; }
-            unless ($notactive) { return $section; }
-        }
-    }
-    return '-1';
-}
-
 
 sub usection {
     my ($udom,$unam,$courseid,$ActiveFlag)=@_;