version 1.15, 2004/12/19 00:21:46
|
version 1.19, 2004/12/30 16:18:16
|
Line 110 END
|
Line 110 END
|
my ($sec,$grp) = split/:/,$_; |
my ($sec,$grp) = split/:/,$_; |
$groupid{$sec} = $grp; |
$groupid{$sec} = $grp; |
} |
} |
my $defdom = $Apache::lonnet::perlvar{'lonDefDomain'}; |
my $codedom = $Apache::lonnet::perlvar{'lonDefDomain'}; |
my $codedom = $defdom; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['codedom']); |
|
if (exists($ENV{'form.codedom'})) { |
|
$codedom = $ENV{'form.codedom'}; |
|
} |
my %coursecodes = (); |
my %coursecodes = (); |
my %codes = (); |
my %codes = (); |
my @codetitles = (); |
my @codetitles = (); |
Line 124 END
|
Line 127 END
|
my $totcodes = 0; |
my $totcodes = 0; |
my $format_reply; |
my $format_reply; |
my $jscript = ''; |
my $jscript = ''; |
|
|
if ($cdom) { |
if ($cdom) { |
$codedom = $cdom; |
$codedom = $cdom; |
} |
} |
Line 152 END
|
Line 155 END
|
<html> |
<html> |
<head> |
<head> |
<title>LON-CAPA support request</title> |
<title>LON-CAPA support request</title> |
<script> |
<script type"text/javascript"> |
$scripttag |
$scripttag |
$jscript |
$jscript |
</script> |
</script> |
Line 198 END
|
Line 201 END
|
} elsif (defined($lastname) && $lastname ne '') { |
} elsif (defined($lastname) && $lastname ne '') { |
$fullname= " $lastname"; |
$fullname= " $lastname"; |
} |
} |
$r->print('<input type="text" size="20" name="username" value="'.$fullname.'" /><br />'); |
$r->print('<input type="text" size="20" name="username" value="'.$fullname.'" />'); |
} |
} |
$r->print(<<END); |
$r->print(<<END); |
|
<input type="button" value="Submit Request" onClick="validate()" /> |
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |
Line 263 END
|
Line 267 END
|
} |
} |
if ($udomform eq '') { |
if ($udomform eq '') { |
$udomform = '<i>domain</i>: '; |
$udomform = '<i>domain</i>: '; |
$udomform .= &Apache::loncommon::select_dom_form($defdom,'udom'); |
$udomform .= &Apache::loncommon::select_dom_form($codedom,'udom'); |
} |
} |
if ($unameform eq '') { |
if ($unameform eq '') { |
$unameform= '<i>username</i>: <input type="text" size="20" name="loncname" value="'.$uname.'" /> '; |
$unameform= '<i>username</i>: <input type="text" size="12" name="uname" value="'.$uname.'" /> '; |
} |
} |
$r->print($unameform.$udomform.'<br />Enter the username you use to log-in to your LON-CAPA system, and choose your domain.'); |
$r->print($unameform.$udomform.'<br />Enter the username you use to log-in to your LON-CAPA system, and choose your domain.'); |
} |
} |
Line 587 sub print_request_receipt {
|
Line 591 sub print_request_receipt {
|
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); |
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); |
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'}; |
|
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| |
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'} - $ENV{'form.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'} |
Line 607 Date/Time: $reporttime
|
Line 625 Date/Time: $reporttime
|
<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'} - $ENV{'form.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 /> |
Line 619 Date/Time: $reporttime
|
Line 637 Date/Time: $reporttime
|
<title>LON-CAPA support request recorded</title> |
<title>LON-CAPA support request recorded</title> |
</head> |
</head> |
$bodytag |
$bodytag |
|
<form name="logproblem"> |
|
<input type="hidden" name="action" value="result" /> |
|
</form> |
END |
END |
if ($r->uri eq '/adm/helpdesk') { |
if ($r->uri eq '/adm/helpdesk') { |
&print_header($r,$url,'process'); |
&print_header($r,$url,'process'); |
Line 918 sub build_code_selections {
|
Line 939 sub build_code_selections {
|
my @sorted_b = (); |
my @sorted_b = (); |
my @sorted_b_titles = (); |
my @sorted_b_titles = (); |
&sort_cats($num,$cat_order,$codetitles,\@{$idarrays{$$codetitles[2]}{$key_a}{$key_b}},\@sorted_b); |
&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) { |
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); |
$$idlist{$$codetitles[2]}{$key_a}{$key_b} = join('","',@sorted_b); |
Line 1100 END
|
Line 1121 END
|
} |
} |
} |
} |
$$script_tag .= (<<END_OF_BLOCK); |
$$script_tag .= (<<END_OF_BLOCK); |
if (caller == "Year") { |
if (caller == "$$codetitles[0]") { |
document.logproblem.Department.length = 0 |
document.logproblem.Department.length = 0 |
document.logproblem.Number.length = 0 |
document.logproblem.Number.length = 0 |
document.logproblem.Department.options[0] = new Option("<-Pick Semester.","-1",true,true) |
document.logproblem.Department.options[0] = new Option("<-Pick $$codetitles[1]","-1",true,true) |
document.logproblem.Number.options[0] = new Option("<-Pick Department","-1",true,true) |
document.logproblem.Number.options[0] = new Option("<-Pick $$codetitles[2]","-1",true,true) |
if (idyr == 0) { |
if (idyr == 0) { |
document.logproblem.Semester.length = 0 |
document.logproblem.Semester.length = 0 |
document.logproblem.Semester.options[0] = new Option("<-Pick Year","-1",true,true) |
document.logproblem.Semester.options[0] = new Option("<-Pick $$codetitles[0]","-1",true,true) |
} |
} |
else { |
else { |
document.logproblem.Semester.length = 0 |
document.logproblem.Semester.length = 0 |
Line 1118 END
|
Line 1139 END
|
} |
} |
document.logproblem.Semester.selectedIndex = 0; |
document.logproblem.Semester.selectedIndex = 0; |
} |
} |
if (caller == "Semester") { |
if (caller == "$$codetitles[1]") { |
document.logproblem.Department.length = 0 |
document.logproblem.Department.length = 0 |
document.logproblem.Number.length = 0 |
document.logproblem.Number.length = 0 |
document.logproblem.Number.options[0] = new Option("<-Pick Department.","-1",true,true) |
document.logproblem.Number.options[0] = new Option("<-Pick $$codetitles[2]","-1",true,true) |
if (idsem == 0) { |
if (idsem == 0) { |
document.logproblem.Department.options[0] = new Option("<-Pick Semester.","-1",true,true) |
document.logproblem.Department.options[0] = new Option("<-Pick $$codetitles[1]","-1",true,true) |
document.logproblem.Department.options[0] = new Option("<-Pick Semester","-1",true,true) |
|
} |
} |
else { |
else { |
document.logproblem.Department.options[0] = new Option("Select","-1",true,true) |
document.logproblem.Department.options[0] = new Option("Select","-1",true,true) |
Line 1134 END
|
Line 1154 END
|
} |
} |
document.logproblem.Department.selectedIndex = 0 |
document.logproblem.Department.selectedIndex = 0 |
} |
} |
if (caller == "Department") { |
if (caller == "$$codetitles[2]") { |
document.logproblem.Number.length = 0 |
document.logproblem.Number.length = 0 |
if (iddept == 0) { |
if (iddept == 0) { |
document.logproblem.Number.options[0] = new Option("<-Pick Department.","-1",true,true) |
document.logproblem.Number.options[0] = new Option("<-Pick $$codetitles[2]","-1",true,true) |
} |
} |
else { |
else { |
document.logproblem.Number.options[0] = new Option("Select","-1",true,true) |
document.logproblem.Number.options[0] = new Option("Select","-1",true,true) |