--- loncom/interface/lonsupportreq.pm 2004/09/13 13:31:52 1.9
+++ loncom/interface/lonsupportreq.pm 2004/11/04 00:57:25 1.10
@@ -38,6 +38,7 @@ sub print_request_form {
if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {
$tablecolor = '#CCCCFF';
}
+ $ccode = '';
$os = $ENV{'browser.os'};
$browser = $ENV{'browser.type'};
$bversion = $ENV{'browser.version'};
@@ -313,20 +314,66 @@ END
END
- if ($coursecodes{$cnum}) {
- foreach (@codetitles) {
- $r->print(''.$_.': '.$codes{$cnum}{$_}.'; ');
+ if ($cnum) {
+ if ($coursecodes{$cnum}) {
+ foreach (@codetitles) {
+ $r->print(''.$_.': '.$codes{$cnum}{$_}.'; ');
+ }
+ $r->print(' ');
+ } else {
+ $r->print('Enter institutional course code:
+ ');
}
- $r->print(' ');
} else {
- $r->print('Enter institutional course code:
+ if ($totcodes > 0) {
+ my $numtitles = @codetitles;
+ if ($numtitles == 0) {
+ $r->print('Enter institutional course code:
');
+ } else {
+ my $lasttitle = $numtitles;
+ if ($numtitles > 4) {
+ $lasttitle = 4;
+ }
+ $r->print(''.$codetitles[0].' '."\n".
+ ' | ');
+ for (my $i=1; $i<$numtitles; $i++) {
+ $r->print(''.$codetitles[$i].' '."\n".
+ ''."\n".
+ ' | '
+ );
+ }
+ $r->print(' ');
+ if ($numtitles > 4) {
+ $r->print('
'.$codetitles[$numtitles].' '."\n".
+ ''."\n");
+ }
+ }
+ } else {
+ $r->print('Enter institutional course code:
+ ');
+ }
}
if ($ctitle) {
$r->print(' Title: '.$ctitle.'');
} else {
$r->print(' Enter course title:
- ');
+ ');
}
$r->print(<
@@ -923,18 +970,25 @@ sub recurse_list {
sub javascript_code_selections {
my ($numcats,$script_tag,$idlist,$idnums,$idlist_titles,$codetitles) = @_;
+ my $numtitles = @{$codetitles};
+ my @seltitles = ();
+ for (my $j=0; $j<$numtitles; $j++) {
+ $seltitles[$j] = 'id'.$$codetitles[$j];
+ }
+ my $seltitle_str = join('","',@seltitles);
$$script_tag .= < |