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

raeburn raeburn@source.lon-capa.org
Thu, 06 Aug 2009 00:49:31 -0000


raeburn		Thu Aug  6 00:49:31 2009 EDT

  Modified files:              
    /loncom/interface	lonrequestcourse.pm 
  Log:
  - Use code_order for display of institutional code in crosslistings
  - Add column titles for institutional section and LON-CAPA section for summary of Sections and Crosslistings.   
  
  
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.4 loncom/interface/lonrequestcourse.pm:1.5
--- loncom/interface/lonrequestcourse.pm:1.4	Wed Aug  5 23:44:52 2009
+++ loncom/interface/lonrequestcourse.pm	Thu Aug  6 00:49:31 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Request a course
 #
-# $Id: lonrequestcourse.pm,v 1.4 2009/08/05 23:44:52 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.5 2009/08/06 00:49:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -115,7 +115,7 @@
     my %trail = (
                  crstype  => 'Course Request Action',
                  codepick => 'Category',
-                 courseinfo => 'Information',
+                 courseinfo => 'Description',
                  enrollment => 'Enrollment',
                  personnel => 'Personnel',
                  review => 'Review',
@@ -969,39 +969,55 @@
                              '<td>'.&Apache::lonlocal::locallocaltime($startenroll).'</td>'.
                              '<td>'.&Apache::lonlocal::locallocaltime($endenroll).'</td>';
             $section_values = '<td>';
+            my $secinfo;
             if ($env{'form.sectotal'} > 0) {
                 for (my $i=0; $i<$env{'form.sectotal'}; $i++) {
                     if ($env{'form.sec_'.$i}) {
-                        $section_values .= $env{'form.secnum_'.$i};
+                        $secinfo .= '<tr><td>'.$env{'form.secnum_'.$i}.'</td><td>';
                         if ($env{'form.loncapasec_'.$i} ne '') {
-                            $section_values .= ' => '.$env{'form.loncapasec_'.$i};
+                            $secinfo .= $env{'form.loncapasec_'.$i};
+                        } else {
+                            $secinfo .= &mt('None');
                         }
-                        $section_values .= '<br />';
+                        $secinfo .= '</td></tr>';
                     }
                 }
             }
+            if ($secinfo) {
+                $section_values .= '<table class="LC_innerpickbox"><tr><th>'.
+                                   &mt('Institutional section').'</th>'.
+                                   '<th>'.&mt('LON-CAPA section').'</th></tr>'.$secinfo.
+                                   '</table>';
+            }
             $section_values .= '</td><td>';
+            my $xlistinfo;
             if ($env{'form.crosslisttotal'}) {
                 for (my $i=0; $i<$env{'form.crosslisttotal'}; $i++) {
                     if ($env{'form.crosslist_'.$i}) {
-                        if (ref($codetitles) eq 'ARRAY') {
-                            if (@{$codetitles} > 0) {
-                                foreach my $item (@{$codetitles}) {
-                                    $section_values .= $env{'form.crosslist_'.$i.'_'.$item};
+                        $xlistinfo .= '<tr><td>';
+                        if (ref($code_order) eq 'ARRAY') {
+                            if (@{$code_order} > 0) {
+                                foreach my $item (@{$code_order}) {
+                                    $xlistinfo .= $env{'form.crosslist_'.$i.'_'.$item};
                                 }
-                            } else {
-                                $section_values .= $env{'form.crosslist_'.$i.'_instsec'};
                             }
-                        } else {
-                            $section_values .= $env{'form.crosslist_'.$i.'_instsec'};
                         }
+                        $xlistinfo .= $env{'form.crosslist_'.$i.'_instsec'}.'</td><td>';
                         if ($env{'form.crosslist_'.$i.'_lcsec'}) {
-                            $section_values .= ' => '.$env{'form.crosslist_'.$i.'_lcsec'};                            
+                            $xlistinfo .= $env{'form.crosslist_'.$i.'_lcsec'};
+                        } else {
+                            $xlistinfo .= &mt('None');
                         }
-                        $section_values .= '<br />';
+                        $xlistinfo .= '</td></tr>';
                     }
                 }
             }
+            if ($xlistinfo) {
+                $section_values .= '<table class="LC_innerpickbox"><tr><th>'.
+                                   &mt('Institutional course/section').'</th>'.
+                                   '<th>'.&mt('LON-CAPA section').'</th></tr>'.$xlistinfo.
+                                   '</table>';
+            }
             $section_values .= '</td>';
         }
     }
@@ -1085,7 +1101,7 @@
                   '<td>'.$owneremail.'</td>'.
                   '</tr></table>'."\n".
                   &Apache::lonhtmlcommon::row_closure().
-                  &Apache::lonhtmlcommon::row_title(&mt('Information')).
+                  &Apache::lonhtmlcommon::row_title(&mt('Description')).
                   '<table class="LC_innerpickbox"><tr>'.$inst_headers.'</tr>'."\n".
                   '<tr>'.$inst_values.'</tr></table>'."\n".
                   &Apache::lonhtmlcommon::row_closure().