version 1.181, 2004/03/19 03:47:09
|
version 1.182, 2004/03/19 03:58:06
|
Line 4238 UPLOAD
|
Line 4238 UPLOAD
|
|
|
sub scantron_upload_scantron_data_save { |
sub scantron_upload_scantron_data_save { |
my($r)=@_; |
my($r)=@_; |
|
my ($symb,$url)=&get_symb_and_url($r,1); |
|
my $doanotherupload= |
|
'<br /><form action="/adm/grades" method="post">'."\n". |
|
'<input type="hidden" name="command" value="scantronupload" />'."\n". |
|
'<input type="submit" name="submit" value="Do Another Upload" />'."\n". |
|
'</form>'."\n"; |
if (!&Apache::lonnet::allowed('usc',$ENV{'form.domainid'}) && |
if (!&Apache::lonnet::allowed('usc',$ENV{'form.domainid'}) && |
!&Apache::lonnet::allowed('usc', |
!&Apache::lonnet::allowed('usc', |
$ENV{'form.domainid'}.'_'.$ENV{'form.courseid'})) { |
$ENV{'form.domainid'}.'_'.$ENV{'form.courseid'})) { |
$r->print("You are not allowed to upload Scantron data to the requested course.<br />"); |
$r->print("You are not allowed to upload Scantron data to the requested course.<br />"); |
$r->print(&show_grading_menu_form(&get_symb_and_url($r))); |
if ($symb) { |
|
$r->print(&show_grading_menu_form($symb,$url)); |
|
} else { |
|
$r->print($doanotherupload); |
|
} |
return ''; |
return ''; |
} |
} |
$r->print("Doing upload to ".$ENV{'form.courseid'}." <br />"); |
$r->print("Doing upload to ".$ENV{'form.courseid'}." <br />"); |
Line 4266 sub scantron_upload_scantron_data_save {
|
Line 4276 sub scantron_upload_scantron_data_save {
|
$r->print(&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'}, |
$r->print(&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'}, |
$ENV{'form.domainid'}, |
$ENV{'form.domainid'}, |
$home,'upfile',$fname)); |
$home,'upfile',$fname)); |
my ($symb,$url)=&get_symb_and_url($r); |
|
if ($symb) { |
if ($symb) { |
$r->print(&show_grading_menu_form(&get_symb_and_url($r))); |
$r->print(&show_grading_menu_form($symb,$url)); |
} else { |
} else { |
$r->print('<br /><form action="/adm/grades" method="post">'."\n". |
$r->print($doanotherupload); |
'<input type="hidden" name="command" value="scantronupload" />'."\n". |
|
'<input type="submit" name="submit" value="Do Another Upload" />'."\n". |
|
'</form>'."\n"); |
|
} |
} |
return ''; |
return ''; |
} |
} |