version 1.21, 2004/12/31 02:46:18
|
version 1.25, 2005/04/07 06:56:23
|
Line 1
|
Line 1
|
|
# |
|
# $Id$ |
|
# |
|
# Copyright Michigan State University Board of Trustees |
|
# |
|
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
|
# |
|
# LON-CAPA is free software; you can redistribute it and/or modify |
|
# it under the terms of the GNU General Public License as published by |
|
# the Free Software Foundation; either version 2 of the License, or |
|
# (at your option) any later version. |
|
# |
|
# LON-CAPA is distributed in the hope that it will be useful, |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
# GNU General Public License for more details. |
|
# |
|
# You should have received a copy of the GNU General Public License |
|
# along with LON-CAPA; if not, write to the Free Software |
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
# |
|
# /home/httpd/html/adm/gpl.txt |
|
# |
|
# http://www.lon-capa.org/ |
|
# |
|
|
package Apache::lonsupportreq; |
package Apache::lonsupportreq; |
|
|
use strict; |
use strict; |
Line 6 use MIME::Types;
|
Line 32 use MIME::Types;
|
use MIME::Lite; |
use MIME::Lite; |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonnet(); |
use Apache::lonnet; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
|
sub handler { |
sub handler { |
Line 21 sub handler {
|
Line 47 sub handler {
|
if ($r->uri eq '/adm/helpdesk') { |
if ($r->uri eq '/adm/helpdesk') { |
&Apache::loncommon::get_posted_cgi($r); |
&Apache::loncommon::get_posted_cgi($r); |
} |
} |
my $function = $ENV{'form.function'}; |
my $function = $env{'form.function'}; |
my $origurl = &Apache::lonnet::unescape($ENV{'form.origurl'}); |
my $origurl = &Apache::lonnet::unescape($env{'form.origurl'}); |
my $action = $ENV{'form.action'}; |
my $action = $env{'form.action'}; |
|
|
if ($action eq 'process') { |
if ($action eq 'process') { |
&print_request_receipt($r,$origurl,$function); |
&print_request_receipt($r,$origurl,$function); |
Line 36 sub handler {
|
Line 62 sub handler {
|
sub print_request_form { |
sub print_request_form { |
my ($r,$origurl,$function) = @_; |
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); |
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0",marginheight="0"',1); |
my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0" marginheight="0" onLoad="initialize_codes()"',1); |
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); |
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); |
if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) { |
if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) { |
$tablecolor = '#EEEE99'; |
$tablecolor = '#EEEE99'; |
} |
} |
$ccode = ''; |
$ccode = ''; |
$os = $ENV{'browser.os'}; |
$os = $env{'browser.os'}; |
$browser = $ENV{'browser.type'}; |
$browser = $env{'browser.type'}; |
$bversion = $ENV{'browser.version'}; |
$bversion = $env{'browser.version'}; |
$uhost = $ENV{'request.host'}; |
$uhost = $env{'request.host'}; |
$uname = $ENV{'user.name'}; |
$uname = $env{'user.name'}; |
$udom = $ENV{'user.domain'}; |
$udom = $env{'user.domain'}; |
$uhome = $ENV{'user.home'}; |
$uhome = $env{'user.home'}; |
$urole = $ENV{'request.role'}; |
$urole = $env{'request.role'}; |
$usec = $ENV{'request.course.sec'}; |
$usec = $env{'request.course.sec'}; |
$cid = $ENV{'request.course.id'}; |
$cid = $env{'request.course.id'}; |
if ($origurl =~ m-^http://-) { |
if ($origurl =~ m-^http://-) { |
$server = $origurl; |
$server = $origurl; |
} else { |
} else { |
Line 87 function validmail(field) {
|
Line 113 function validmail(field) {
|
} |
} |
} |
} |
END |
END |
|
#" stupid emacs |
if ($cid =~ m/_/) { |
if ($cid =~ m/_/) { |
($cdom,$cnum) = split/_/,$cid; |
($cdom,$cnum) = split/_/,$cid; |
} |
} |
Line 96 END
|
Line 123 END
|
$ccode = $csettings{'internal.coursecode'}; |
$ccode = $csettings{'internal.coursecode'}; |
$sectionlist = $csettings{'internal.sectionnums'}; |
$sectionlist = $csettings{'internal.sectionnums'}; |
} |
} |
if ($ENV{'environment.critnotification'}) { |
if ($env{'environment.critnotification'}) { |
$email = $ENV{'environment.critnotification'}; |
$email = $env{'environment.critnotification'}; |
} |
} |
if (!$email && $ENV{'environment.notification'}) { |
if (!$email && $env{'environment.notification'}) { |
$email = $ENV{'environment.notification'}; |
$email = $env{'environment.notification'}; |
} |
} |
if ($ENV{'environment.lastname'}) { |
if ($env{'environment.lastname'}) { |
$lastname = $ENV{'environment.lastname'}; |
$lastname = $env{'environment.lastname'}; |
} |
} |
if ($ENV{'environment.firstname'}) { |
if ($env{'environment.firstname'}) { |
$firstname = $ENV{'environment.firstname'}; |
$firstname = $env{'environment.firstname'}; |
} |
} |
my @sections = split/,/,$sectionlist; |
my @sections = split/,/,$sectionlist; |
my %groupid = (); |
my %groupid = (); |
Line 116 END
|
Line 143 END
|
} |
} |
my $codedom = $Apache::lonnet::perlvar{'lonDefDomain'}; |
my $codedom = $Apache::lonnet::perlvar{'lonDefDomain'}; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['codedom']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['codedom']); |
if (exists($ENV{'form.codedom'})) { |
if (exists($env{'form.codedom'})) { |
$codedom = $ENV{'form.codedom'}; |
$codedom = $env{'form.codedom'}; |
} |
} |
my $details_title; |
my $details_title; |
if ($codedom) { |
if ($codedom) { |
Line 135 END
|
Line 162 END
|
my $totcodes = 0; |
my $totcodes = 0; |
my $format_reply; |
my $format_reply; |
my $jscript = ''; |
my $jscript = ''; |
|
my $loaditems = qq| |
|
function initialize_codes() { |
|
return; |
|
} |
|
|; |
if ($cdom) { |
if ($cdom) { |
$codedom = $cdom; |
$codedom = $cdom; |
} |
} |
Line 152 END
|
Line 183 END
|
$totcodes = &retrieve_instcodes(\%coursecodes,$codedom,$totcodes); |
$totcodes = &retrieve_instcodes(\%coursecodes,$codedom,$totcodes); |
} |
} |
if ($totcodes > 0) { |
if ($totcodes > 0) { |
$format_reply = &Apache::lonnet::auto_instcode_format($caller,$codedom,\%coursecodes,\%codes,\@codetitles,\%cat_titles,\%cat_order); |
|
if ($ccode eq '') { |
if ($ccode eq '') { |
my $numtypes = @codetitles; |
$format_reply = &Apache::lonnet::auto_instcode_format($caller,$codedom,\%coursecodes,\%codes,\@codetitles,\%cat_titles,\%cat_order); |
&build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles); |
if ($format_reply eq 'ok') { |
&javascript_code_selections($numtypes,\%cat_titles,\$jscript,\%idlist,\%idnums,\%idlist_titles,\@codetitles); |
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); |
|
$loaditems = ''; |
|
} |
} |
} |
} |
} |
|
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<ENDHEAD); |
$r->print(<<ENDHEAD); |
<html> |
$html |
<head> |
<head> |
<title>LON-CAPA support request</title> |
<title>LON-CAPA support request</title> |
<script type"text/javascript"> |
<script type"text/javascript"> |
Line 392 END
|
Line 427 END
|
} else { |
} else { |
$longitems[0] = $idlist_titles{$codetitles[0]}; |
$longitems[0] = $idlist_titles{$codetitles[0]}; |
} |
} |
|
for (my $i=0; $i<@longitems; $i++) { |
|
if ($longitems[$i] eq '') { |
|
$longitems[$i] = $items[$i]; |
|
} |
|
} |
} else { |
} else { |
@longitems = @items; |
@longitems = @items; |
} |
} |
Line 452 END
|
Line 492 END
|
<td> |
<td> |
END |
END |
if ($sectionlist) { |
if ($sectionlist) { |
$r->print("<select name=\"section\">"); |
$r->print("<select name=\"section\"\n>". |
|
" <option value=\"\" selected=\"selected\">Select</option>\n"); |
foreach (sort keys %groupid) { |
foreach (sort keys %groupid) { |
if ($_ eq $groupid{$_} || $groupid{$_} eq '') { |
if ($_ eq $groupid{$_} || $groupid{$_} eq '') { |
$r->print("<option value=\"$_\" />$_"); |
$r->print(" <option value=\"$_\" >$_</option>\n"); |
} else { |
} else { |
$r->print("<option value=\"$_\" />$_ - (LON-CAPA sec: $groupid{$_})"); |
$r->print(" <option value=\"$_\" >$_ - (LON-CAPA sec: $groupid{$_})</option>\n"); |
} |
} |
} |
} |
$r->print("</select>"); |
$r->print("</select>"); |
Line 524 END
|
Line 565 END
|
</td> |
</td> |
</tr> |
</tr> |
END |
END |
if (defined($ENV{'user.name'})) { |
if (defined($env{'user.name'})) { |
$r->print(<<END); |
$r->print(<<END); |
<tr> |
<tr> |
<td width="140" bgcolor="$tablecolor"> |
<td width="140" bgcolor="$tablecolor"> |
Line 610 sub print_request_receipt {
|
Line 651 sub print_request_receipt {
|
my @formvars = ('username','email','uname','udom','sourceurl','phone','section','coursecode','title','subject','description','screenshot'); |
my @formvars = ('username','email','uname','udom','sourceurl','phone','section','coursecode','title','subject','description','screenshot'); |
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},\@formvars); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},\@formvars); |
my $coursecode = $ENV{'form.coursecode'}; |
my $coursecode = $env{'form.coursecode'}; |
if ($coursecode eq '') { |
if ($coursecode eq '') { |
if (defined($ENV{'form.Year'})) { |
if (defined($env{'form.Year'})) { |
$coursecode .= $ENV{'form.Year'}; |
$coursecode .= $env{'form.Year'}; |
} |
} |
if (defined($ENV{'form.Semester'})) { |
if (defined($env{'form.Semester'})) { |
$coursecode .= $ENV{'form.Semester'}; |
$coursecode .= $env{'form.Semester'}; |
} |
} |
if (defined($ENV{'form.Department'})) { |
if (defined($env{'form.Department'})) { |
$coursecode .= $ENV{'form.Department'}; |
$coursecode .= $env{'form.Department'}; |
} |
} |
if (defined($ENV{'form.Number'})) { |
if (defined($env{'form.Number'})) { |
$coursecode .= $ENV{'form.Number'}; |
$coursecode .= $env{'form.Number'}; |
} |
} |
} |
} |
my $supportmsg = qq| |
my $supportmsg = qq| |
Name: $ENV{'form.username'} |
Name: $env{'form.username'} |
Email: $ENV{'form.email'} |
Email: $env{'form.email'} |
Username/domain: $ENV{'form.uname'} - $ENV{'form.udom'} |
Username/domain: $env{'form.uname'} - $env{'form.udom'} |
Tel: $ENV{'form.phone'} |
Tel: $env{'form.phone'} |
Course Information: $ENV{'form.title'} - $coursecode - section: $ENV{'form.section'} |
Course Information: $env{'form.title'} - $coursecode - section: $env{'form.section'} |
Subject: $ENV{'form.subject'} |
Subject: $env{'form.subject'} |
Description: $ENV{'form.description'} |
Description: $env{'form.description'} |
URL: $ENV{'form.sourceurl'} |
URL: $env{'form.sourceurl'} |
Date/Time: $reporttime |
Date/Time: $reporttime |
|
|
|; |
|; |
my $descrip = $ENV{'form.description'}; |
my $descrip = $env{'form.description'}; |
$descrip =~ s#\n#<br />#g; |
$descrip =~ s#\n#<br />#g; |
my $displaymsg = qq| |
my $displaymsg = qq| |
<font color="$fontcolor">Name:</font><font color="$vlinkcolor"> $ENV{'form.username'}</font><br /> |
<font color="$fontcolor">Name:</font><font color="$vlinkcolor"> $env{'form.username'}</font><br /> |
<font color="$fontcolor">Email: </font><font color="$vlinkcolor">$ENV{'form.email'}</font><br /> |
<font color="$fontcolor">Email: </font><font color="$vlinkcolor">$env{'form.email'}</font><br /> |
<font color="$fontcolor">Username/domain: </font><font color="$vlinkcolor">$ENV{'form.uname'} - $ENV{'form.udom'}</font><br /> |
<font color="$fontcolor">Username/domain: </font><font color="$vlinkcolor">$env{'form.uname'} - $env{'form.udom'}</font><br /> |
<font color="$fontcolor">Tel: </font><font color="$vlinkcolor">$ENV{'form.phone'}</font><br /> |
<font color="$fontcolor">Tel: </font><font color="$vlinkcolor">$env{'form.phone'}</font><br /> |
<font color="$fontcolor">Course Information: </font><font color="$vlinkcolor">$ENV{'form.title'} - $coursecode - section: $ENV{'form.section'}</font><br /> |
<font color="$fontcolor">Course Information: </font><font color="$vlinkcolor">$env{'form.title'} - $coursecode - section: $env{'form.section'}</font><br /> |
<font color="$fontcolor">Subject: </font><font color="$vlinkcolor">$ENV{'form.subject'}</font><br /> |
<font color="$fontcolor">Subject: </font><font color="$vlinkcolor">$env{'form.subject'}</font><br /> |
<font color="$fontcolor">Description: </font><font color="$vlinkcolor">$descrip</font><br /> |
<font color="$fontcolor">Description: </font><font color="$vlinkcolor">$descrip</font><br /> |
<font color="$fontcolor">URL: </font><font color="$vlinkcolor">$ENV{'form.sourceurl'}</font><br /> |
<font color="$fontcolor">URL: </font><font color="$vlinkcolor">$env{'form.sourceurl'}</font><br /> |
<font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br /> |
<font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br /> |
|; |
|; |
|
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<html> |
$html |
<head> |
<head> |
<title>LON-CAPA support request recorded</title> |
<title>LON-CAPA support request recorded</title> |
</head> |
</head> |
Line 678 END
|
Line 720 END
|
$to = 'helpdesk@lon-capa.org'; |
$to = 'helpdesk@lon-capa.org'; |
} |
} |
} |
} |
if (defined($ENV{'form.email'})) { |
if (defined($env{'form.email'})) { |
if ($ENV{'form.email'} =~ m/^[^\@]+\@[^\@]+$/) { |
if ($env{'form.email'} =~ m/^[^\@]+\@[^\@]+$/) { |
$from = $ENV{'form.email'}; |
$from = $env{'form.email'}; |
} |
} |
} |
} |
|
|
my $subject = $ENV{'form.subject'}; |
my $subject = $env{'form.subject'}; |
$subject =~ s#(`)#'#g; |
$subject =~ s#(`)#'#g; |
$subject =~ s#\$#\(\$\)#g; |
$subject =~ s#\$#\(\$\)#g; |
$supportmsg =~ s#(`)#'#g; |
$supportmsg =~ s#(`)#'#g; |
Line 695 END
|
Line 737 END
|
|
|
my $attachmentpath = ''; |
my $attachmentpath = ''; |
my $attachmentsize = ''; |
my $attachmentsize = ''; |
if (defined($ENV{'user.name'})) { |
if (defined($env{'user.name'})) { |
if ($ENV{'form.screenshot.filename'}) { |
if ($env{'form.screenshot.filename'}) { |
$attachmentsize = length($ENV{'form.screenshot'}); |
$attachmentsize = length($env{'form.screenshot'}); |
if ($attachmentsize > 131072) { |
if ($attachmentsize > 131072) { |
$displaymsg .= "<br />The uploaded screenshot file ($attachmentsize bytes) included with your request exceeded the maximum allowed size - 128 KB, and has therefore been discarded."; |
$displaymsg .= "<br />The uploaded screenshot file ($attachmentsize bytes) included with your request exceeded the maximum allowed size - 128 KB, and has therefore been discarded."; |
} else { |
} else { |
Line 708 END
|
Line 750 END
|
|
|
if ($attachmentpath =~ m-/([^/]+)$-) { |
if ($attachmentpath =~ m-/([^/]+)$-) { |
$fname = $1; |
$fname = $1; |
$displaymsg .= "<br />An uploaded screenshot file - $fname ($attachmentsize bytes) was included in the request sent by $ENV{'user.name'} from LON-CAPA domain: $ENV{'user.domain'}"; |
$displaymsg .= "<br />An uploaded screenshot file - $fname ($attachmentsize bytes) was included in the request sent by $env{'user.name'} from LON-CAPA domain: $env{'user.domain'}"; |
$supportmsg .= "\n"; |
$supportmsg .= "\n"; |
foreach (@envvars) { |
foreach (@envvars) { |
$supportmsg .= "$_: $ENV{$_}\n"; |
$supportmsg .= "$_: $env{$_}\n"; |
} |
} |
} |
} |
|
|
Line 733 END
|
Line 775 END
|
} else { |
} else { |
my $envdata = ''; |
my $envdata = ''; |
foreach (@envvars) { |
foreach (@envvars) { |
$envdata .= "$_: $ENV{$_}\n"; |
$envdata .= "$_: $env{$_}\n"; |
} |
} |
foreach (@loncvars) { |
foreach (@loncvars) { |
$envdata .= "$_: $ENV{$_}\n"; |
$envdata .= "$_: $env{$_}\n"; |
} |
} |
$msg->attach(Type => 'TEXT', |
$msg->attach(Type => 'TEXT', |
Data => $envdata); |
Data => $envdata); |
} |
} |
|
|
### Send it: |
### Send it: |
# ->send can cause an sh launch which can pass all of %ENV along |
# ->send can cause an sh launch which can pass all of %env along |
# which can be to large for /bin/sh's little mind |
# which can be to large for /bin/sh's little mind |
my %oldENV=%ENV; |
|
undef(%ENV); |
|
$msg->send('sendmail'); |
$msg->send('sendmail'); |
%ENV=%oldENV; |
|
undef(%oldENV); |
|
|
|
if ($attachmentpath =~ m#$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+#) { |
if ($attachmentpath =~ m#$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+#) { |
unlink($attachmentpath); |
unlink($attachmentpath); |
Line 803 END
|
Line 841 END
|
<td> |
<td> |
|); |
|); |
foreach (@envvars) { |
foreach (@envvars) { |
unless($ENV{$_} eq '') { |
unless($env{$_} eq '') { |
$r->print("$_: <font color='$vlinkcolor'>$ENV{$_}</font>, "); |
$r->print("$_: <font color='$vlinkcolor'>$env{$_}</font>, "); |
} |
} |
} |
} |
$r->print(" |
$r->print(" |
Line 1206 END
|
Line 1244 END
|
} |
} |
} |
} |
$$script_tag .= (<<END_OF_BLOCK); |
$$script_tag .= (<<END_OF_BLOCK); |
|
var display = new Array($numtitles) |
|
if (caller == "") { |
|
document.logproblem.Year.length = 0 |
|
document.logproblem.Year.options[0] = new Option("Select","-1",true,true) |
|
display[0] = new Array(idyears.length) |
|
for (var i=0; i<idyears.length; i++) { |
|
display[0][i] = idyears[i] |
|
if (longtitles[0] == 1) { |
|
if (idyearslongs[i] != "") { |
|
display[0][i] = idyearslongs[i] |
|
} |
|
} |
|
document.logproblem.Year.options[i+1] = new Option(display[0][i],idyears[i],false,false) |
|
} |
|
document.logproblem.Year.selectedIndex = 0; |
|
} |
if (caller == "$$codetitles[0]") { |
if (caller == "$$codetitles[0]") { |
document.logproblem.Department.length = 0 |
document.logproblem.Department.length = 0 |
document.logproblem.Number.length = 0 |
document.logproblem.Number.length = 0 |
Line 1218 END
|
Line 1272 END
|
else { |
else { |
document.logproblem.Semester.length = 0 |
document.logproblem.Semester.length = 0 |
document.logproblem.Semester.options[0] = new Option("Select","-1",true,true) |
document.logproblem.Semester.options[0] = new Option("Select","-1",true,true) |
|
display[1] = new Array(idsems[idyr-1].length) |
for (var i=0; i<idsems[idyr-1].length; i++) { |
for (var i=0; i<idsems[idyr-1].length; i++) { |
|
display[1][i] = idsems[idyr-1][i] |
if (longtitles[1] == 1) { |
if (longtitles[1] == 1) { |
document.logproblem.Semester.options[i+1] = new Option(idsemslongs[idyr-1][i],idsems[idyr-1][i],false,false) |
if (idsemslongs[idyr-1][i] != "") { |
} |
display[1][i] = idsemslongs[idyr-1][i] |
else { |
} |
document.logproblem.Semester.options[i+1] = new Option(idsems[idyr-1][i],idsems[idyr-1][i],false,false) |
|
} |
} |
|
document.logproblem.Semester.options[i+1] = new Option(display[1][i],idsems[idyr-1][i],false,false) |
} |
} |
} |
} |
document.logproblem.Semester.selectedIndex = 0; |
document.logproblem.Semester.selectedIndex = 0; |
Line 1238 END
|
Line 1294 END
|
} |
} |
else { |
else { |
document.logproblem.Department.options[0] = new Option("Select","-1",true,true) |
document.logproblem.Department.options[0] = new Option("Select","-1",true,true) |
|
display[2] = new Array(idcodes[idyr-1][idsem-1].length) |
for (var i=0; i<idcodes[idyr-1][idsem-1].length; i++) { |
for (var i=0; i<idcodes[idyr-1][idsem-1].length; i++) { |
|
display[2][i] = idcodes[idyr-1][idsem-1][i] |
if (longtitles[2] == 1) { |
if (longtitles[2] == 1) { |
document.logproblem.Department.options[i+1] = new Option(idcodeslongs[idyr-1][idsem-1][i],idcodes[idyr-1][idsem-1][i],false,false) |
if (idcodeslongs[idyr-1][idsem-1][i] != "") { |
} |
display[2][i] = idcodeslongs[idyr-1][idsem-1][i] |
else { |
} |
document.logproblem.Department.options[i+1] = new Option(idcodes[idyr-1][idsem-1][i],idcodes[idyr-1][idsem-1][i],false,false) |
|
} |
} |
|
document.logproblem.Department.options[i+1] = new Option(display[2][i],idcodes[idyr-1][idsem-1][i],false,false) |
} |
} |
} |
} |
document.logproblem.Department.selectedIndex = 0 |
document.logproblem.Department.selectedIndex = 0 |
Line 1256 END
|
Line 1314 END
|
} |
} |
else { |
else { |
document.logproblem.Number.options[0] = new Option("Select","-1",true,true) |
document.logproblem.Number.options[0] = new Option("Select","-1",true,true) |
|
display[3] = new Array (idcourses[idyr-1][idsem-1][iddept-1].length) |
for (var i=0; i<idcourses[idyr-1][idsem-1][iddept-1].length; i++) { |
for (var i=0; i<idcourses[idyr-1][idsem-1][iddept-1].length; i++) { |
|
display[3][i] = idcourses[idyr-1][idsem-1][iddept-1][i] |
if (longtitles[3] == 1) { |
if (longtitles[3] == 1) { |
document.logproblem.Number.options[i+1] = new Option(idcourseslongs[idyr-1][idsem-1][iddept-1][i],idcourses[idyr-1][idsem-1][iddept-1][i],false,false) |
if (idcourseslongs[idyr-1][idsem-1][iddept-1][i] != "") { |
} |
display[3][i] = idcourseslongs[idyr-1][idsem-1][iddept-1][i] |
else { |
} |
document.logproblem.Number.options[i+1] = new Option(idcourses[idyr-1][idsem-1][iddept-1][i],idcourses[idyr-1][idsem-1][iddept-1][i],false,false) |
|
} |
} |
|
document.logproblem.Number.options[i+1] = new Option(display[3][i],idcourses[idyr-1][idsem-1][iddept-1][i],false,false) |
} |
} |
} |
} |
document.logproblem.Number.selectedIndex = 0 |
document.logproblem.Number.selectedIndex = 0 |
} |
} |
} |
} |
|
|
|
function initialize_codes() { |
|
courseSet(); |
|
return; |
|
} |
END_OF_BLOCK |
END_OF_BLOCK |
} |
} |
|
|