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

raeburn raeburn@source.lon-capa.org
Mon, 20 Dec 2010 22:56:56 -0000


raeburn		Mon Dec 20 22:56:56 2010 EDT

  Modified files:              
    /loncom/interface	coursecatalog.pm 
  Log:
  - Bug 5558 (comment 12).
    - Display end date for self-enrollment once self-enrollment is available.
  
  
Index: loncom/interface/coursecatalog.pm
diff -u loncom/interface/coursecatalog.pm:1.65 loncom/interface/coursecatalog.pm:1.66
--- loncom/interface/coursecatalog.pm:1.65	Thu Oct  7 14:41:49 2010
+++ loncom/interface/coursecatalog.pm	Mon Dec 20 22:56:56 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler for displaying the course catalog interface
 #
-# $Id: coursecatalog.pm,v 1.65 2010/10/07 14:41:49 raeburn Exp $
+# $Id: coursecatalog.pm,v 1.66 2010/12/20 22:56:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1017,7 +1017,13 @@
             if (($info->{'selfenroll_start'} > 0) && ($info->{'selfenroll_start'} > $now)) {
                 $output .= '<td>'.&mt('Starts: [_1]','<span class="LC_cusr_emph">'.$showstart.'</span>').'<br />'.&mt('Ends: [_1]','<span class="LC_cusr_emph">'.$showend.'</span>').'</td>';
             } else { 
-                $output .= '<td><a href="javascript:ToSelfenroll('."'$course'".')">'.&mt('Enroll in course').'</a></td>';
+                $output .= '<td><a href="javascript:ToSelfenroll('."'$course'".')">'.&mt('Enroll in course').'</a><br />';
+                if ($info->{'selfenroll_end'} == 0) {
+                    $output .= &mt('Available permanently');
+                } elsif ($info->{'selfenroll_end'} > $now) {
+                    $output .= &mt('Self-enrollment ends: [_1]','<span class="LC_cusr_emph">'.$showend.'</span>');
+                }
+                $output .= '</td>';
             }
             $selfenroll = 1;
         }