[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface loncommon.pm

raeburn raeburn@source.lon-capa.org
Tue, 08 Dec 2009 05:00:16 -0000


raeburn		Tue Dec  8 05:00:16 2009 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	loncommon.pm 
  Log:
  - Customization for GCI_3. 
    - Use course descrption from %env.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.925.2.2 loncom/interface/loncommon.pm:1.925.2.3
--- loncom/interface/loncommon.pm:1.925.2.2	Mon Dec  7 20:04:18 2009
+++ loncom/interface/loncommon.pm	Tue Dec  8 05:00:15 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.925.2.2 2009/12/07 20:04:18 raeburn Exp $
+# $Id: loncommon.pm,v 1.925.2.3 2009/12/08 05:00:15 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -10777,19 +10777,9 @@
         }
         my ($tstart,$tend) = split(':',$env{$envkey});
         if (((!$tstart) || ($tstart < $now)) && ((!$tend) || ($tend > $now))) {
-            my %coursehash = &Apache::lonnet::coursedescription($cdom.'/'.$cnum);
-            $courses{$cdom.'_'.$cnum}{'description'} = $coursehash{'description'};
-            $courses{$cdom.'_'.$cnum}{'owner'} = $coursehash{'internal.courseowner'};
-            if (defined($coursehash{'default_enrollment_start_date'}) ) {
-                $courses{$cdom.'_'.$cnum}{'startaccess'} =
-                    &Apache::lonlocal::locallocaltime($coursehash{'default_enrollment_start_date'});
-            }
-            if (defined($coursehash{'default_enrollment_end_date'}) ) {
-                $courses{$cdom.'_'.$cnum}{'endaccess'} =
-                    &Apache::lonlocal::locallocaltime($coursehash{'default_enrollment_end_date'});
-                if ($coursehash{'default_enrollment_end_date'} == 0) {
-                    $courses{$cdom.'_'.$cnum}{'endaccess'} = &mt('No ending date');
-                }
+            my $descr = $env{'course.'.$cdom.'_'.$cnum.'.description'};
+            if ($descr ne '') {
+                $courses{$cdom.'_'.$cnum}{'description'} = $descr;
             }
         }
     }