--- loncom/interface/lonsupportreq.pm 2005/04/10 23:45:57 1.27 +++ loncom/interface/lonsupportreq.pm 2006/03/15 19:41:26 1.30 @@ -1,5 +1,5 @@ # -# $Id: lonsupportreq.pm,v 1.27 2005/04/10 23:45:57 raeburn Exp $ +# $Id: lonsupportreq.pm,v 1.30 2006/03/15 19:41:26 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -62,7 +62,7 @@ sub handler { sub print_request_form { my ($r,$origurl,$function) = @_; - my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,$cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server); + my ($os,$browser,$bversion,$uhost,$uname,$udom,$uhome,$urole,$usec,$email,$cid,$cdom,$cnum,$ctitle,$ccode,$sectionlist,$lastname,$firstname,$server,$formname); my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0" onLoad="initialize_codes()"',1); my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) { @@ -79,6 +79,7 @@ sub print_request_form { $urole = $env{'request.role'}; $usec = $env{'request.course.sec'}; $cid = $env{'request.course.id'}; + $formname = 'logproblem'; if ($origurl =~ m-^http://-) { $server = $origurl; } else { @@ -189,21 +190,23 @@ function initialize_codes() { if ($format_reply eq 'ok') { my $numtypes = @codetitles; &build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles); - &javascript_code_selections($numtypes,\%cat_titles,\$jscript,\%idlist,\%idnums,\%idlist_titles,\@codetitles); + &javascript_code_selections($formname,$numtypes,\%cat_titles,\$jscript,\%idlist,\%idnums,\%idlist_titles,\@codetitles); $loaditems = ''; } } } + my $html=&Apache::lonxml::xmlbegin(); + my $head = &Apache::loncommon::headtag('LON-CAPA support request'); + my $end_head = &Apache::loncommon::endheadtag(); $r->print(< - LON-CAPA support request +$head - +$end_head $bodytag ENDHEAD if ($r->uri eq '/adm/helpdesk') { @@ -594,6 +597,7 @@ END END } + $r->print(< @@ -630,9 +634,8 @@ END - - END + $r->print(&Apache::loncommon::end_page()); return; } @@ -695,11 +698,10 @@ Date/Time: $reporttime Date/Time: $reporttime
|; my $html=&Apache::lonxml::xmlbegin(); + my $head = &Apache::loncommon::head('LON-CAPA support request recorded'); $r->print(<<"END"); $html - - LON-CAPA support request recorded - +$head $bodytag
@@ -890,9 +892,8 @@ END - - "); + $r->print(&Apache::loncommon::end_page()); } sub print_header { @@ -967,7 +968,7 @@ Please review the information in "Log-in sub retrieve_instcodes { my ($coursecodes,$codedom,$totcodes) = @_; - my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.'); + my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.','.'); foreach my $course (keys %courses) { if ($courses{$course} =~ m/^[^:]*:([^:]+)/) { $$coursecodes{$course} = &Apache::lonnet::unescape($1); @@ -1186,7 +1187,7 @@ sub recurse_list { } sub javascript_code_selections { - my ($numcats,$cat_titles,$script_tag,$idlist,$idnums,$idlist_titles,$codetitles) = @_; + my ($formname,$numcats,$cat_titles,$script_tag,$idlist,$idnums,$idlist_titles,$codetitles) = @_; my $numtitles = @{$codetitles}; my @seltitles = (); for (my $j=0; $j<$numtitles; $j++) { @@ -1207,10 +1208,10 @@ function courseSet(caller) { var ids = new Array ("$seltitle_str"); var formitems = new Array ($numtitles); var longtitles = new Array ("$longtitles_str"); - var idyr = document.logproblem.Year.selectedIndex - var idsem = document.logproblem.Semester.selectedIndex - var iddept = document.logproblem.Department.selectedIndex - var idclass = document.logproblem.Number.selectedIndex + var idyr = document.$formname.Year.selectedIndex + var idsem = document.$formname.Semester.selectedIndex + var iddept = document.$formname.Department.selectedIndex + var idclass = document.$formname.Number.selectedIndex var idyears = new Array("$$idlist{$$codetitles[0]}"); END if ($longtitles[0]) { @@ -1274,55 +1275,59 @@ END } $$script_tag .= (<