--- loncom/interface/lonsupportreq.pm 2004/12/20 21:09:29 1.18
+++ loncom/interface/lonsupportreq.pm 2004/12/30 16:18:16 1.19
@@ -110,8 +110,11 @@ END
my ($sec,$grp) = split/:/,$_;
$groupid{$sec} = $grp;
}
- my $defdom = $Apache::lonnet::perlvar{'lonDefDomain'};
- my $codedom = $defdom;
+ my $codedom = $Apache::lonnet::perlvar{'lonDefDomain'};
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['codedom']);
+ if (exists($ENV{'form.codedom'})) {
+ $codedom = $ENV{'form.codedom'};
+ }
my %coursecodes = ();
my %codes = ();
my @codetitles = ();
@@ -124,7 +127,7 @@ END
my $totcodes = 0;
my $format_reply;
my $jscript = '';
-
+
if ($cdom) {
$codedom = $cdom;
}
@@ -264,10 +267,10 @@ END
}
if ($udomform eq '') {
$udomform = 'domain: ';
- $udomform .= &Apache::loncommon::select_dom_form($defdom,'udom');
+ $udomform .= &Apache::loncommon::select_dom_form($codedom,'udom');
}
if ($unameform eq '') {
- $unameform= 'username: ';
+ $unameform= 'username: ';
}
$r->print($unameform.$udomform.'
Enter the username you use to log-in to your LON-CAPA system, and choose your domain.');
}
@@ -588,13 +591,27 @@ sub print_request_receipt {
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
my @formvars = ('username','email','uname','udom','sourceurl','phone','section','coursecode','title','subject','description','screenshot');
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},\@formvars);
-
+ my $coursecode = $ENV{'form.coursecode'};
+ if ($coursecode eq '') {
+ if (defined($ENV{'form.Year'})) {
+ $coursecode .= $ENV{'form.Year'};
+ }
+ if (defined($ENV{'form.Semester'})) {
+ $coursecode .= $ENV{'form.Semester'};
+ }
+ if (defined($ENV{'form.Department'})) {
+ $coursecode .= $ENV{'form.Department'};
+ }
+ if (defined($ENV{'form.Number'})) {
+ $coursecode .= $ENV{'form.Number'};
+ }
+ }
my $supportmsg = qq|
Name: $ENV{'form.username'}
Email: $ENV{'form.email'}
Username/domain: $ENV{'form.uname'} - $ENV{'form.udom'}
Tel: $ENV{'form.phone'}
-Course Information: $ENV{'form.title'} - $ENV{'form.coursecode'} - section: $ENV{'form.section'}
+Course Information: $ENV{'form.title'} - $coursecode - section: $ENV{'form.section'}
Subject: $ENV{'form.subject'}
Description: $ENV{'form.description'}
URL: $ENV{'form.sourceurl'}
@@ -608,7 +625,7 @@ Date/Time: $reporttime
Email: $ENV{'form.email'}
Username/domain: $ENV{'form.uname'} - $ENV{'form.udom'}
Tel: $ENV{'form.phone'}
-Course Information: $ENV{'form.title'} - $ENV{'form.coursecode'} - section: $ENV{'form.section'}
+Course Information: $ENV{'form.title'} - $coursecode - section: $ENV{'form.section'}
Subject: $ENV{'form.subject'}
Description: $descrip
URL: $ENV{'form.sourceurl'}
@@ -922,9 +939,9 @@ sub build_code_selections {
my @sorted_b = ();
my @sorted_b_titles = ();
&sort_cats($num,$cat_order,$codetitles,\@{$idarrays{$$codetitles[2]}{$key_a}{$key_b}},\@sorted_b);
- if (defined($$cat_titles{$$codetitles[1]})) {
+ if (defined($$cat_titles{$$codetitles[2]})) {
foreach (@sorted_b) {
- push @sorted_b_titles, $$cat_titles{$$codetitles[1]}{$_};
+ push @sorted_b_titles, $$cat_titles{$$codetitles[2]}{$_};
}
}
$$idlist{$$codetitles[2]}{$key_a}{$key_b} = join('","',@sorted_b);
@@ -1104,14 +1121,14 @@ END
}
}
$$script_tag .= (<