version 1.110, 2002/09/16 20:09:45
|
version 1.111, 2002/09/27 18:29:15
|
Line 1226 sub rown {
|
Line 1226 sub rown {
|
if ($vl eq '') { |
if ($vl eq '') { |
$vl='<font size=+2 color='.$bgcolor.'>#</font>'; |
$vl='<font size=+2 color='.$bgcolor.'>#</font>'; |
} |
} |
$rowdata.='<td bgcolor='.$bgcolor.'>'. |
$rowdata.='<td bgcolor='.$bgcolor.'>'; |
'<a href="javascript:celledit('.$fm.');">'.$vl.'</a></td>'; |
if ($ENV{'request.role'} =~ /^st\./) { |
|
$rowdata.=$vl; |
|
} else { |
|
$rowdata.='<a href="javascript:celledit('.$fm.');">'. |
|
$vl.'</a>'; |
|
} |
|
$rowdata.='</td>'; |
} else { |
} else { |
$rowdata.='<td bgcolor='.$bgcolor.'> '.$vl.' </td>'; |
$rowdata.='<td bgcolor='.$bgcolor.'> '.$vl.' </td>'; |
} |
} |
Line 1299 sub outsheet {
|
Line 1305 sub outsheet {
|
push (@sortby, $safeeval->reval('$f{"A'.$row.'"}')); |
push (@sortby, $safeeval->reval('$f{"A'.$row.'"}')); |
push (@sortidx, $row-1); |
push (@sortidx, $row-1); |
} |
} |
@sortidx=sort { $sortby[$a] cmp $sortby[$b]; } @sortidx; |
@sortidx=sort { lc($sortby[$a]) cmp lc($sortby[$b]); } @sortidx; |
# |
# |
# Determine the type of child spreadsheets |
# Determine the type of child spreadsheets |
my $what='Student'; |
my $what='Student'; |
Line 2412 sub cachedssheets {
|
Line 2418 sub cachedssheets {
|
# Interactive call to screen |
# Interactive call to screen |
# |
# |
# |
# |
|
|
|
|
sub handler { |
sub handler { |
my $r=shift; |
my $r=shift; |
|
|
my $loaderror=&Apache::lonnet::overloaderror($r); |
my $loaderror=&Apache::lonnet::overloaderror($r); |
if ($loaderror) { return $loaderror; } |
if ($loaderror) { return $loaderror; } |
$loaderror= |
$loaderror= &Apache::lonnet::overloaderror($r, |
&Apache::lonnet::overloaderror($r, |
$ENV{'course.'.$ENV{'request.course.id'}.'.home'}); |
$ENV{'course.'.$ENV{'request.course.id'}.'.home'}); |
if ($loaderror) { return $loaderror; } |
if ($loaderror) { return $loaderror; } |
|
|
|
if ($r->header_only) { |
if ($r->header_only) { |
$r->content_type('text/html'); |
$r->content_type('text/html'); |
Line 2442 sub handler {
|
Line 2445 sub handler {
|
# Get query string for limited number of parameters |
# Get query string for limited number of parameters |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['uname','udom','usymb','ufn']); |
['uname','udom','usymb','ufn']); |
|
if ($ENV{'request.role'} =~ /^st\./) { |
|
delete $ENV{'form.unewfield'} if (exists($ENV{'form.unewfield'})); |
|
delete $ENV{'form.unewformula'} if (exists($ENV{'form.unewformula'})); |
|
} |
if (($ENV{'form.usymb'}=~/^\_(\w+)/) && (!$ENV{'form.ufn'})) { |
if (($ENV{'form.usymb'}=~/^\_(\w+)/) && (!$ENV{'form.ufn'})) { |
$ENV{'form.ufn'}='default_'.$1; |
$ENV{'form.ufn'}='default_'.$1; |
} |
} |
Line 2468 sub handler {
|
Line 2475 sub handler {
|
$r->send_http_header; |
$r->send_http_header; |
# Screen output |
# Screen output |
$r->print('<html><head><title>LON-CAPA Spreadsheet</title>'); |
$r->print('<html><head><title>LON-CAPA Spreadsheet</title>'); |
$r->print(<<ENDSCRIPT); |
if ($ENV{'request.role'} !~ /^st\./) { |
|
$r->print(<<ENDSCRIPT); |
<script language="JavaScript"> |
<script language="JavaScript"> |
|
|
function celledit(cn,cf) { |
function celledit(cn,cf) { |
Line 2494 sub handler {
|
Line 2502 sub handler {
|
|
|
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
|
} |
$r->print('</head>'.&Apache::loncommon::bodytag('Grades Spreadsheet'). |
$r->print('</head>'.&Apache::loncommon::bodytag('Grades Spreadsheet'). |
'<form action="'.$r->uri.'" name=sheet method=post>'); |
'<form action="'.$r->uri.'" name=sheet method=post>'); |
$r->print(&hiddenfield('uname',$ENV{'form.uname'}). |
$r->print(&hiddenfield('uname',$ENV{'form.uname'}). |