--- loncom/interface/lonsupportreq.pm 2004/09/09 05:58:42 1.8 +++ 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(''); + for (my $i=1; $i<$numtitles; $i++) { + $r->print('' + ); + } + $r->print('
'.$codetitles[0].'
'."\n". + '
'.$codetitles[$i].'
'."\n". + ''."\n". + '
'); + 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(< @@ -544,17 +591,29 @@ Date/Time: $reporttime $bodytag

A support request has been sent to $to

END - } else { - $r->print(<print(< + + LON-CAPA support request recorded + +$bodytag +

A support request has been sent to $to

+END + } else { + $r->print(< LON-CAPA support request recorded $bodytag

Warning: Problem with support e-mail address

-As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has not been sent to the LON-CAPA support staff at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University. +As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has not been sent to the LON-CAPA support staff or administrator at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University. END - $to = 'helpdesk@lon-capa.org'; + $to = 'helpdesk@lon-capa.org'; + } } if (defined($ENV{'form.email'})) { if ($ENV{'form.email'} =~ m/^[^\@]+\@[^\@]+$/) { @@ -911,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 .= <