END
- } else {
- $to = 'helpdesk@lon-capa.org';
- $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';
+ }
}
if (defined($ENV{'form.email'})) {
if ($ENV{'form.email'} =~ m/^[^\@]+\@[^\@]+$/) {
@@ -706,9 +768,9 @@ END
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/^[^:]*:([^:]+)$/) {
+ if ($courses{$course} =~ m/^[^:]*:([^:]+)/) {
$$coursecodes{$course} = &Apache::lonnet::unescape($1);
$totcodes ++;
}
@@ -737,7 +799,6 @@ sub build_code_selections {
}
$$idlist{$$codetitles[0]} = join('","',@contents);
$$idnums{$$codetitles[0]} = scalar(@contents);
- print STDERR "idnums for {$$codetitles[0] is $$idnums{$$codetitles[0]}\n";
if (defined($$cat_titles{$$codetitles[0]})) {
$$idlist_titles{$$codetitles[0]} = join('","',@contents_titles);
}
@@ -755,7 +816,6 @@ sub build_code_selections {
}
$$idlist{$$codetitles[1]}{$key_a} = join('","',@sorted_a);
$$idnums{$$codetitles[1]}{$key_a} = scalar(@sorted_a);
- print STDERR "idnums for {$$codetitles[1] and $key_a is $$idnums{$$codetitles[1]}{$key_a}\n";
if (defined($$cat_titles{$$codetitles[1]})) {
$$idlist_titles{$$codetitles[1]}{$key_a} = join('","',@sorted_a_titles);
}
@@ -837,7 +897,6 @@ sub recurse_list {
if ($num == 0) {
if (!grep/^$$codes{$cid}{$$codetitles[0]}$/,@{$$idarrays{$$codetitles[0]}}) {
push @{$$idarrays{$$codetitles[0]}}, $$codes{$cid}{$$codetitles[0]};
- print STDERR "Adding $$codes{$cid}{$$codetitles[0]} to $$codetitles[0]\n";
}
} elsif ($num == 1) {
if (defined($$idarrays{$$codetitles[1]}{$$codes{$cid}{$$codetitles[0]}})) {
@@ -914,18 +973,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 .= <