version 1.172, 2004/02/09 21:13:50
|
version 1.173, 2004/02/09 22:16:32
|
Line 89 sub getpartlist {
|
Line 89 sub getpartlist {
|
|
|
# --- Get the symbolic name of a problem and the url |
# --- Get the symbolic name of a problem and the url |
sub get_symb_and_url { |
sub get_symb_and_url { |
my ($request) = @_; |
my ($request,$silent) = @_; |
(my $url=$ENV{'form.url'}) =~ s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--; |
(my $url=$ENV{'form.url'}) =~ s-^http://($ENV{'SERVER_NAME'}|$ENV{'HTTP_HOST'})--; |
my $symb=($ENV{'form.symb'} ne '' ? $ENV{'form.symb'} : (&Apache::lonnet::symbread($url))); |
my $symb=($ENV{'form.symb'} ne '' ? $ENV{'form.symb'} : (&Apache::lonnet::symbread($url))); |
if ($symb eq '') { $request->print("Unable to handle ambiguous references:$url:."); return ''; } |
if ($symb eq '') { |
|
if (!$silent) { |
|
$request->print("Unable to handle ambiguous references:$url:."); |
|
return (); |
|
} |
|
} |
return ($symb,$url); |
return ($symb,$url); |
} |
} |
|
|
Line 4171 sub scantron_upload_scantron_data {
|
Line 4176 sub scantron_upload_scantron_data {
|
'domainid'); |
'domainid'); |
my $domsel=&Apache::loncommon::select_dom_form($ENV{'request.role.domain'}, |
my $domsel=&Apache::loncommon::select_dom_form($ENV{'request.role.domain'}, |
'domainid'); |
'domainid'); |
my $default_form_data=&defaultFormData(&get_symb_and_url($r)); |
my $default_form_data=&defaultFormData(&get_symb_and_url($r,1)); |
$r->print(<<UPLOAD); |
$r->print(<<UPLOAD); |
<script type="text/javascript" language="javascript"> |
<script type="text/javascript" language="javascript"> |
function checkUpload(formname) { |
function checkUpload(formname) { |
Line 4227 sub scantron_upload_scantron_data_save {
|
Line 4232 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)); |
$r->print(&show_grading_menu_form(&get_symb_and_url($r))); |
$r->print('<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"); |
return ''; |
return ''; |
} |
} |
|
|