[LON-CAPA-cvs] cvs: loncom /interface lonrequestcourse.pm
raeburn
raeburn@source.lon-capa.org
Thu, 06 Aug 2009 04:01:37 -0000
raeburn Thu Aug 6 04:01:37 2009 EDT
Modified files:
/loncom/interface lonrequestcourse.pm
Log:
- CDATA in Javascript call for xhtml compliance
- Unbalanced <tr> tag in review table
- Display "None" for Sections and Crosslistings if course is "official" and auto-enrollment is active, but no sections/crosslistings were selected.
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.5 loncom/interface/lonrequestcourse.pm:1.6
--- loncom/interface/lonrequestcourse.pm:1.5 Thu Aug 6 00:49:31 2009
+++ loncom/interface/lonrequestcourse.pm Thu Aug 6 04:01:36 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Request a course
#
-# $Id: lonrequestcourse.pm,v 1.5 2009/08/06 00:49:31 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.6 2009/08/06 04:01:36 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -190,8 +190,9 @@
sub header {
my ($bodytitle,$jscript,$loaditems,$jsextra) = @_;
if ($jscript) {
- $jscript = '<script type="text/javascript">'.
- $jscript.'</script>'."\n";
+ $jscript = '<script type="text/javascript">'."\n".
+ '// <![CDATA['."\n".
+ $jscript."\n".'// ]]>'."\n".'</script>'."\n";
}
if ($loaditems) {
$loaditems = {'add_entries' => $loaditems,};
@@ -968,7 +969,9 @@
'<td>'.$autoroster[$env{'form.autodrops'}].'</td>'.
'<td>'.&Apache::lonlocal::locallocaltime($startenroll).'</td>'.
'<td>'.&Apache::lonlocal::locallocaltime($endenroll).'</td>';
- $section_values = '<td>';
+ $section_values = '<td><table class="LC_innerpickbox"><tr><th>'.
+ &mt('Institutional section').'</th>'.
+ '<th>'.&mt('LON-CAPA section').'</th></tr>';
my $secinfo;
if ($env{'form.sectotal'} > 0) {
for (my $i=0; $i<$env{'form.sectotal'}; $i++) {
@@ -983,13 +986,13 @@
}
}
}
- if ($secinfo) {
- $section_values .= '<table class="LC_innerpickbox"><tr><th>'.
- &mt('Institutional section').'</th>'.
- '<th>'.&mt('LON-CAPA section').'</th></tr>'.$secinfo.
- '</table>';
+ if ($secinfo eq '') {
+ $secinfo = '<tr><td colspan="2">'.&mt('None').'</td></tr>';
}
- $section_values .= '</td><td>';
+ $section_values .= $secinfo.'</table></td><td>'.
+ '<table class="LC_innerpickbox"><tr><th>'.
+ &mt('Institutional course/section').'</th>'.
+ '<th>'.&mt('LON-CAPA section').'</th></tr>';
my $xlistinfo;
if ($env{'form.crosslisttotal'}) {
for (my $i=0; $i<$env{'form.crosslisttotal'}; $i++) {
@@ -1012,13 +1015,10 @@
}
}
}
- if ($xlistinfo) {
- $section_values .= '<table class="LC_innerpickbox"><tr><th>'.
- &mt('Institutional course/section').'</th>'.
- '<th>'.&mt('LON-CAPA section').'</th></tr>'.$xlistinfo.
- '</table>';
+ if ($xlistinfo eq '') {
+ $xlistinfo = '<tr><td colspan="2">'.&mt('None').'</td></tr>';
}
- $section_values .= '</td>';
+ $section_values .= $xlistinfo.'</table></td>';
}
}
@@ -1092,7 +1092,7 @@
my $output = '<p>'.&mt('Review the details of the course request before submission.').'</p>'.
'<div>'.&Apache::lonhtmlcommon::start_pick_box().
&Apache::lonhtmlcommon::row_title(&mt('Owner')).
- '<table class="LC_innerpickbox">'.
+ '<table class="LC_innerpickbox"><tr>'.
'<th>'.&mt('Name').'</th>'.
'<th>'.&mt('Username:Domain').'</th>'.
'<th>'.&mt('E-mail address').'</th>'.