version 1.27, 2003/10/11 14:04:54
|
version 1.30, 2003/11/21 18:18:04
|
Line 72 use HTML::Entities();
|
Line 72 use HTML::Entities();
|
|
|
sub textfield { |
sub textfield { |
my ($title,$name,$value)=@_; |
my ($title,$name,$value)=@_; |
return "\n<p><b>$title:</b><br>". |
return "\n<p><b>$title:</b><br />". |
'<input type=text name="'.$name.'" size=80 value="'.$value.'">'; |
'<input type=text name="'.$name.'" size=80 value="'.$value.'" />'; |
} |
} |
|
|
sub hiddenfield { |
sub hiddenfield { |
Line 83 sub hiddenfield {
|
Line 83 sub hiddenfield {
|
|
|
sub selectbox { |
sub selectbox { |
my ($title,$name,$value,%options)=@_; |
my ($title,$name,$value,%options)=@_; |
my $selout="\n<p><b>$title:</b><br>".'<select name="'.$name.'">'; |
my $selout="\n<p><b>$title:</b><br />".'<select name="'.$name.'">'; |
foreach (sort keys(%options)) { |
foreach (sort keys(%options)) { |
$selout.='<option value="'.$_.'"'; |
$selout.='<option value="'.$_.'"'; |
if ($_ eq $value) { $selout.=' selected'; } |
if ($_ eq $value) { $selout.=' selected'; } |
Line 162 sub file_dialogs {
|
Line 162 sub file_dialogs {
|
END |
END |
my $default_filename_set = 0; |
my $default_filename_set = 0; |
foreach my $sheetfilename ($spreadsheet->othersheets()) { |
foreach my $sheetfilename ($spreadsheet->othersheets()) { |
$load_dialog .= ' <option name="'.$sheetfilename.'"'; |
$load_dialog .= ' <option value="'.$sheetfilename.'"'; |
if ($filename eq $sheetfilename) { |
if ($filename eq $sheetfilename) { |
$load_dialog .= ' selected'; |
$load_dialog .= ' selected'; |
$default_filename_set = 1; |
$default_filename_set = 1; |
Line 227 sub handler {
|
Line 227 sub handler {
|
} |
} |
my $courseid = $ENV{'request.course.id'}; |
my $courseid = $ENV{'request.course.id'}; |
# |
# |
# Do not allow students to continue if standard grading is in effect. |
# Do not allow students to continue if standard or external grading is in |
|
# effect. |
|
# |
if ($ENV{'request.role'} =~ /^st\./) { |
if ($ENV{'request.role'} =~ /^st\./) { |
if ($ENV{'course.'.$courseid.'.grading'} eq 'standard') { |
if ($ENV{'course.'.$courseid.'.grading'} eq 'standard' || |
|
$ENV{'course.'.$courseid.'.grading'} eq 'external' ) { |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
} |
} |
Line 321 sub handler {
|
Line 324 sub handler {
|
my $extra_javascript = |
my $extra_javascript = |
&Apache::loncommon::browser_and_searcher_javascript(); |
&Apache::loncommon::browser_and_searcher_javascript(); |
$r->print(<<ENDSCRIPT); |
$r->print(<<ENDSCRIPT); |
<script language="JavaScript"> |
<script type="text/javascript"> |
|
//<!-- |
$extra_javascript |
$extra_javascript |
|
|
var editwin; |
var editwin; |
Line 355 sub handler {
|
Line 358 sub handler {
|
editwin.close(); |
editwin.close(); |
} |
} |
|
|
editwin = window.open($nothing,'CellEditWin','height=280,width=480,scrollbars=no,resizeable=yes,alwaysRaised=yes,dependent=yes',true); |
editwin = window.open($nothing,'CellEditWin','height=280,width=480,scrollbars=no,resizable=yes,alwaysRaised=yes,dependent=yes',true); |
editwin.document.write(edit_text); |
editwin.document.write(edit_text); |
} |
} |
|
//--> |
</script> |
</script> |
ENDSCRIPT |
ENDSCRIPT |
} |
} |