[LON-CAPA-cvs] cvs: loncom /interface lonsupportreq.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jul 2004 16:35:12 -0000
This is a MIME encoded message
--raeburn1090254912
Content-Type: text/plain
raeburn Mon Jul 19 12:35:12 2004 EDT
Modified files:
/loncom/interface lonsupportreq.pm
Log:
Discussion postings associated with resources and bulletin boards now searchable.
--raeburn1090254912
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20040719123512.txt"
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.5 loncom/interface/lonsupportreq.pm:1.6
--- loncom/interface/lonsupportreq.pm:1.5 Tue Jul 13 13:35:58 2004
+++ loncom/interface/lonsupportreq.pm Mon Jul 19 12:35:12 2004
@@ -50,7 +50,6 @@
$cid = $ENV{'request.course.id'};
$server = $ENV{'SERVER_NAME'};
my $scripttag = (<<END);
-<script>
function validate() {
if (document.logproblem.email.value.indexOf("\@") == -1) {
alert("You must enter a valid e-mail address");
@@ -58,7 +57,6 @@
}
document.logproblem.submit();
}
-</script>
END
if ($cid =~ m/_/) {
($cdom,$cnum) = split/_/,$cid;
@@ -94,9 +92,13 @@
my @codetitles = ();
my %cat_titles = ();
my %cat_order = ();
+ my %idlist = ();
+ my %idnums = ();
+ my %idlist_titles = ();
my $caller = 'global';
my $totcodes = 0;
my $format_reply;
+ my $jscript = '';
if ($cdom) {
$codedom = $cdom;
@@ -115,12 +117,20 @@
}
if ($totcodes > 0) {
$format_reply = &Apache::lonnet::auto_instcode_format($caller,$codedom,\%coursecodes,\%codes,\@codetitles,\%cat_titles,\%cat_order);
+ if ($ccode eq '') {
+ my $numtypes = @codetitles;
+ &build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles);
+ &javascript_code_selections($numtypes,\$jscript,\%idlist,\%idnums,\%idlist_titles,\@codetitles);
+ }
}
$r->print(<<END);
<html>
<head>
<title>LON-CAPA support request</title>
+<script>
$scripttag
+$jscript
+</script>
</head>
$bodytag
<table width="580" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
@@ -706,4 +716,299 @@
return $totcodes;
}
+sub build_code_selections {
+ my ($codes,$codetitles,$cat_titles,$cat_order,$idlist,$idnums,$idlist_titles) = @_;
+ my %idarrays = ();
+ for (my $i=1; $i<@{$codetitles}; $i++) {
+ %{$idarrays{$$codetitles[$i]}} = ();
+ }
+ foreach my $cid (sort keys %{$codes}) {
+ &recurse_list($cid,$codetitles,$codes,0,\%idarrays);
+ }
+ for (my $num=0; $num<@{$codetitles}; $num++) {
+ if ($num == 0) {
+ my @contents = ();
+ my @contents_titles = ();
+ &sort_cats($num,$cat_order,$codetitles,\@{$idarrays{$$codetitles[0]}},\@contents);
+ if (defined($$cat_titles{$$codetitles[0]})) {
+ foreach (@contents) {
+ push @contents_titles, $$cat_titles{$$codetitles[0]}{$_};
+ }
+ }
+ $$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);
+ }
+ } elsif ($num == 1) {
+ %{$$idlist{$$codetitles[1]}} = ();
+ %{$$idlist_titles{$$codetitles[1]}} = ();
+ foreach my $key_a (keys %{$idarrays{$$codetitles[1]}}) {
+ my @sorted_a = ();
+ my @sorted_a_titles = ();
+ &sort_cats($num,$cat_order,$codetitles,\@{$idarrays{$$codetitles[1]}{$key_a}},\@sorted_a);
+ if (defined($$cat_titles{$$codetitles[1]})) {
+ foreach (@sorted_a) {
+ push @sorted_a_titles, $$cat_titles{$$codetitles[1]}{$_};
+ }
+ }
+ $$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);
+ }
+ }
+ } elsif ($num == 2) {
+ %{$$idlist{$$codetitles[2]}} = ();
+ %{$$idlist_titles{$$codetitles[2]}} = ();
+ foreach my $key_a (keys %{$idarrays{$$codetitles[2]}}) {
+ %{$$idlist{$$codetitles[2]}{$key_a}} = ();
+ %{$$idlist_titles{$$codetitles[2]}{$key_a}} = ();
+ foreach my $key_b (keys %{$idarrays{$$codetitles[2]}{$key_a}}) {
+ 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]})) {
+ foreach (@sorted_b) {
+ push @sorted_b_titles, $$cat_titles{$$codetitles[1]}{$_};
+ }
+ }
+ $$idlist{$$codetitles[2]}{$key_a}{$key_b} = join('","',@sorted_b);
+ $$idnums{$$codetitles[2]}{$key_a}{$key_b} = scalar(@sorted_b);
+ if (defined($$cat_titles{$$codetitles[2]})) {
+ $$idlist_titles{$$codetitles[2]}{$key_a}{$key_b} = join('","',@sorted_b_titles);
+ }
+ }
+ }
+ } elsif ($num == 3) {
+ %{$$idlist{$$codetitles[3]}} = ();
+ foreach my $key_a (keys %{$idarrays{$$codetitles[3]}}) {
+ %{$$idlist{$$codetitles[3]}{$key_a}} = ();
+ foreach my $key_b (keys %{$idarrays{$$codetitles[3]}{$key_a}}) {
+ %{$$idlist{$$codetitles[3]}{$key_a}{$key_b}} = ();
+ foreach my $key_c (keys %{$idarrays{$$codetitles[3]}{$key_a}{$key_b}}) {
+ my @sorted_c = ();
+ &sort_cats($num,$cat_order,$codetitles,\@{$idarrays{$$codetitles[3]}{$key_a}{$key_b}{$key_c}},\@sorted_c);
+ $$idlist{$$codetitles[3]}{$key_a}{$key_b}{$key_c} = join('","',@sorted_c);
+ $$idnums{$$codetitles[3]}{$key_a}{$key_b}{$key_c} = scalar(@sorted_c);
+ }
+ }
+ }
+ } elsif ($num == 4) {
+ %{$$idlist{$$codetitles[4]}} = ();
+ foreach my $key_a (keys %{$idarrays{$$codetitles[4]}}) {
+ %{$$idlist{$$codetitles[4]}{$key_a}} = ();
+ foreach my $key_b (keys %{$idarrays{$$codetitles[4]}{$key_a}}) {
+ %{$$idlist{$$codetitles[4]}{$key_a}{$key_b}} = ();
+ foreach my $key_c (keys %{$idarrays{$$codetitles[4]}{$key_a}{$key_b}}) {
+ %{$$idlist{$$codetitles[4]}{$key_a}{$key_b}{$key_c}} = ();
+ foreach my $key_d (keys %{$idarrays{$$codetitles[4]}{$key_a}{$key_b}{$key_c}}) {
+ my @sorted_d = ();
+ &sort_cats($num,$cat_order,$codetitles,$idarrays{$$codetitles[4]}{$key_a}{$key_b}{$key_c}{$key_d},\@sorted_d);
+ $$idlist{$$codetitles[4]}{$key_a}{$key_b}{$key_c}{$key_d} = join('","',@sorted_d);
+ $$idnums{$$codetitles[4]}{$key_a}{$key_b}{$key_c}{$key_d} = scalar(@sorted_d);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+sub sort_cats {
+ my ($num,$cat_order,$codetitles,$idsarrayref,$sorted) = @_;
+ my @unsorted = @{$idsarrayref};
+ if (defined($$cat_order{$$codetitles[$num]})) {
+ foreach (@{$$cat_order{$$codetitles[$num]}}) {
+ if (grep/^$_$/,@unsorted) {
+ push @{$sorted}, $_;
+ }
+ }
+ } else {
+ @{$sorted} = sort (@unsorted);
+ }
+}
+
+
+sub recurse_list {
+ my ($cid,$codetitles,$codes,$num,$idarrays) = @_;
+ 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]}})) {
+ if (!grep/^$$codes{$cid}{$$codetitles[1]}$/,@{$$idarrays{$$codetitles[1]}{$$codes{$cid}{$$codetitles[0]}}}) {
+ push @{$$idarrays{$$codetitles[1]}{$$codes{$cid}{$$codetitles[0]}}}, $$codes{$cid}{$$codetitles[1]};
+ }
+ } else {
+ @{$$idarrays{$$codetitles[1]}{$$codes{$cid}{$$codetitles[0]}}} = ("$$codes{$cid}{$$codetitles[1]}");
+ }
+ } elsif ($num == 2) {
+ if (defined($$idarrays{$$codetitles[2]}{$$codes{$cid}{$$codetitles[0]}})) {
+ if (defined($$idarrays{$$codetitles[2]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}})) {
+ if (!grep/^$$codes{$cid}{$$codetitles[2]}$/,@{$$idarrays{$$codetitles[2]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}}) {
+ push @{$$idarrays{$$codetitles[2]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}}, $$codes{$cid}{$$codetitles[2]};
+ }
+ } else {
+ @{$$idarrays{$$codetitles[2]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}} = ("$$codes{$cid}{$$codetitles[2]}");
+ }
+ } else {
+ %{$$idarrays{$$codetitles[2]}{$$codes{$cid}{$$codetitles[0]}}} = ();
+ @{$$idarrays{$$codetitles[2]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}} = ("$$codes{$cid}{$$codetitles[2]}");
+ }
+ } elsif ($num == 3) {
+ if (defined($$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}})) {
+ if (defined($$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}})) {
+ if (defined($$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}})) {
+ if (!grep/^$$codes{$cid}{$$codetitles[3]}$/,@{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}}) {
+ push @{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}}, $$codes{$cid}{$$codetitles[3]};
+ }
+ } else {
+ @{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}} = ("$$codes{$cid}{$$codetitles[3]}");
+ }
+ } else {
+ %{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}} = ();
+ @{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}} = ("$$codes{$cid}{$$codetitles[3]}");
+ }
+ } else {
+ %{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}} = ();
+ %{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}} = ();
+ @{$$idarrays{$$codetitles[3]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}} = ("$$codes{$cid}{$$codetitles[3]}");
+ }
+ } elsif ($num == 4) {
+ if (defined($$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}})) {
+ if (defined($$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}})) {
+ if (defined($$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}})) {
+ if (defined($$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}{$$codes{$cid}{$$codetitles[3]}})) {
+ if (!grep/^$$codes{$cid}{$$codetitles[4]}$/,@{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}{$$codes{$cid}{$$codetitles[3]}}}) {
+ push @{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}{$$codes{$cid}{$$codetitles[3]}}}, $$codes{$cid}{$$codetitles[4]};
+ }
+ } else {
+ @{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}{$$codes{$cid}{$$codetitles[3]}}} = ("$$codes{$cid}{$$codetitles[4]}");
+ }
+ } else {
+ %{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}} = ();
+ @{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}{$$codes{$cid}{$$codetitles[3]}}} = ("$$codes{$cid}{$$codetitles[4]}");
+ }
+ } else {
+ %{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}} = ();
+ %{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}} = ();
+ @{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}{$$codes{$cid}{$$codetitles[3]}}} = ("$$codes{$cid}{$$codetitles[4]}");
+ }
+ } else {
+ %{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}} = ();
+ %{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}} = ();
+ %{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[2]}}} = ();
+ @{$$idarrays{$$codetitles[4]}{$$codes{$cid}{$$codetitles[0]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[1]}}{$$codes{$cid}{$$codetitles[3]}}} = ("$$codes{$cid}{$$codetitles[3]}");
+ }
+ }
+ $num ++;
+ if ($num <@{$codetitles}) {
+ &recurse_list($cid,$codetitles,$codes,$num,$idarrays);
+ }
+}
+
+sub javascript_code_selections {
+ my ($numcats,$script_tag,$idlist,$idnums,$idlist_titles,$codetitles) = @_;
+ $$script_tag .= <<END;
+function courseSet(caller) {
+ var idyr = document.forms.logproblem.idyear.selectedIndex
+ var idsem = document.forms.logproblem.idsem.selectedIndex
+ var iddept = document.forms.logproblem.iddept.selectedIndex
+ var idclass = document.forms.logproblem.idclass.selectedIndex
+ var idyears = new Array("$$idlist{$$codetitles[0]}");
+ var idsems = new Array ($$idnums{$$codetitles[0]});
+ var idsemlongs = new Array ($$idnums{$$codetitles[0]});
+ var idcodes = new Array ($$idnums{$$codetitles[0]});
+ var idcourses = new Array ($$idnums{$$codetitles[0]});
+ var idsections = new Array ($$idnums{$$codetitles[0]})
+END
+ my @sort_a = split/","/,$$idlist{$$codetitles[0]};
+ for (my $j=0; $j<@sort_a; $j++) {
+ $$script_tag .= qq| idsems[$j] = new Array("$$idlist{$$codetitles[1]}{$sort_a[$j]}")\n|;
+ $$script_tag .= qq| idsemlongs[$j] = new Array("$$idlist_titles{$$codetitles[1]}{$sort_a[$j]}")\n|;
+ $$script_tag .= qq| idcodes[$j] = new Array($$idnums{$$codetitles[1]}{$sort_a[$j]})\n|;
+ $$script_tag .= qq| idcourses[$j] = new Array($$idnums{$$codetitles[1]}{$sort_a[$j]})\n|;
+ $$script_tag .= qq| idsections[$j] = new Array($$idnums{$$codetitles[1]}{$sort_a[$j]})\n|;
+ my @sort_b = split/","/,$$idlist{$$codetitles[1]}{$sort_a[$j]};
+ for (my $k=0; $k<@sort_b; $k++) {
+ my $idcode_entry = $$idlist{$$codetitles[2]}{$sort_a[$j]}{$sort_b[$k]};
+ $$script_tag .= qq| idcodes[$j][$k] = new Array("$idcode_entry")\n|;
+ $$script_tag .= qq| idcourses[$j][$k] = new Array($$idnums{$$codetitles[2]}{$sort_a[$j]}{$sort_b[$k]})\n|;
+ $$script_tag .= qq| idsections[$j][$k] = new Array($$idnums{$$codetitles[2]}{$sort_a[$j]}{$sort_b[$k]})\n|;
+ my @sort_c = split/","/,$$idlist{$$codetitles[2]}{$sort_a[$j]}{$sort_b[$k]};
+ for (my $l=0; $l<@sort_c; $l++) {
+ my $idcourse_entry = $$idlist{$$codetitles[3]}{$sort_a[$j]}{$sort_b[$k]}{$sort_c[$l]};
+ $$script_tag .= qq| idcourses[$j][$k][$l] = new Array("$idcourse_entry")\n|;
+ $$script_tag .= qq| idsections[$j][$k][$l] = new Array($$idnums{$$codetitles[3]}{$sort_a[$j]}{$sort_b[$k]}{$sort_c[$l]})\n|;
+ my @sort_d = split/","/,$$idlist{$$codetitles[3]}{$sort_a[$j]}{$sort_b[$k]}{$sort_c[$l]};
+ for (my $m=0; $m<@sort_d; $m++) {
+ my $idsecentry = $$idlist{$$codetitles[4]}{$sort_a[$j]}{$sort_b[$k]}{$sort_c[$l]}{$sort_d[$m]};
+ $$script_tag .= qq| idsections[$j][$k][$l][$m] = new Array("$idsecentry")\n|;
+ }
+ }
+ }
+ }
+ $$script_tag .= (<<END_OF_BLOCK);
+ if (caller == "semester") {
+ document.forms.logproblem.iddept.length = 0
+ document.forms.logproblem.idclass.length = 0
+ document.forms.logproblem.idsec.length = 0
+ document.forms.logproblem.iddept.options[0] = new Option("<-Pick sem.","-1",true,true)
+ document.forms.logproblem.idclass.options[0] = new Option("<-Pick dept.","-1",true,true)
+ document.forms.logproblem.idsec.options[0] = new Option("Pick course first (above)","-1",true,true)
+ if (idyr == 0) {
+ document.forms.logproblem.idsem.length = 0
+ document.forms.logproblem.idsem.options[0] = new Option("<-Pick year","-1",true,true)
+ }
+ else {
+ document.forms.logproblem.idsem.length = 0
+ document.forms.logproblem.idsem.options[0] = new Option("Select","-1",true,true)
+ for (var i=0; i<idsems[idyr-1].length; i++) {
+ document.forms.logproblem.idsem.options[i+1] = new Option(idsemlongs[idyr-1][i],idsems[idyr-1][i],false,false)
+ }
+ }
+ document.forms.logproblem.idsem.selectedIndex = 0;
+ }
+ if (caller == "dept") {
+ document.forms.logproblem.iddept.length = 0
+ document.forms.logproblem.idclass.length = 0
+ document.forms.logproblem.idsec.length = 0
+ document.forms.logproblem.idclass.options[0] = new Option("<-Pick dept.","-1",true,true)
+ document.forms.logproblem.idsec.options[0] = new Option("Pick course first (above)","-1",true,true)
+ if (idsem == 0) {
+ document.forms.logproblem.iddept.options[0] = new Option("<-Pick sem.","-1",true,true)
+ document.forms.logproblem.iddept.options[0] = new Option("<-Pick sem.","-1",true,true)
+ }
+ else {
+ document.forms.logproblem.iddept.options[0] = new Option("Select","-1",true,true)
+ for (var i=0; i<idcodes[idyr-1][idsem-1].length; i++) {
+ document.forms.logproblem.iddept.options[i+1] = new Option(idcodes[idyr-1][idsem-1][i],idcodes[idyr-1][idsem-1][i],false,false)
+ }
+ }
+ document.forms.logproblem.iddept.selectedIndex = 0
+ }
+ if (caller == "course") {
+ document.forms.logproblem.idclass.length = 0
+ document.forms.logproblem.idsec.length = 0
+ document.forms.logproblem.idsec.options[0] = new Option("Pick course first (above)","-1",true,true)
+ if (iddept == 0) {
+ document.forms.logproblem.idclass.options[0] = new Option("<-Pick dept.","-1",true,true)
+ }
+ else {
+ document.forms.logproblem.idclass.options[0] = new Option("Select","-1",true,true)
+ for (var i=0; i<idcourses[idyr-1][idsem-1][iddept-1].length; i++) {
+ document.forms.logproblem.idclass.options[i+1] = new Option(idcourses[idyr-1][idsem-1][iddept-1][i],idcourses[idyr-1][idsem-1][iddept-1][i],false,false)
+ }
+ }
+ document.forms.logproblem.idclass.selectedIndex = 0
+ }
+}
+END_OF_BLOCK
+}
+
1;
--raeburn1090254912--