version 1.182, 2004/03/19 03:58:06
|
version 1.185, 2004/03/31 05:23:59
|
Line 511 sub verifyreceipt {
|
Line 511 sub verifyreceipt {
|
my $request = shift; |
my $request = shift; |
|
|
my $courseid = $ENV{'request.course.id'}; |
my $courseid = $ENV{'request.course.id'}; |
my $receipt = unpack("%32C*",$Apache::lonnet::perlvar{'lonHostID'}).'-'. |
my $receipt = &Apache::lonnet::recprefix($courseid).'-'. |
$ENV{'form.receipt'}; |
$ENV{'form.receipt'}; |
$receipt =~ s/[^\-\d]//g; |
$receipt =~ s/[^\-\d]//g; |
my $url = $ENV{'form.url'}; |
my $url = $ENV{'form.url'}; |
Line 4273 sub scantron_upload_scantron_data_save {
|
Line 4273 sub scantron_upload_scantron_data_save {
|
# See if there is anything left |
# See if there is anything left |
unless ($fname) { return 'error: no uploaded file'; } |
unless ($fname) { return 'error: no uploaded file'; } |
$fname='scantron_orig_'.$fname; |
$fname='scantron_orig_'.$fname; |
$r->print(&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'}, |
if (length($ENV{'form.upfile'}) < 2) { |
$ENV{'form.domainid'}, |
$r->print("<font color='red'>Error:</font> The file you attempted to upload, <tt>".&HTML::Entities::encode($ENV{'form.upfile.filename'},'<>&"')."</tt>, contained no information. Please check that you entered the correct filename."); |
$home,'upfile',$fname)); |
} else { |
|
my $result=&Apache::lonnet::finishuserfileupload($ENV{'form.courseid'},$ENV{'form.domainid'},$home,'upfile',$fname); |
|
if ($result =~ m|^/uploaded/|) { |
|
$r->print("<font color='green'>Success:</font> Successfully uploaded ".(length($ENV{'form.upfile'})-1)." bytes of data into location <tt>".$result."</tt>"); |
|
} else { |
|
$r->print("<font color='red'>Error:</font> An error (".$result.") occured when attempting to upload the file, <tt>".&HTML::Entities::encode($ENV{'form.upfile.filename'},'<>&"')."</tt>"); |
|
} |
|
} |
if ($symb) { |
if ($symb) { |
$r->print(&show_grading_menu_form($symb,$url)); |
$r->print(&show_grading_menu_form($symb,$url)); |
} else { |
} else { |
Line 4434 GRADINGMENUJS
|
Line 4441 GRADINGMENUJS
|
|
|
$result.='<table width="100%" border=0>'; |
$result.='<table width="100%" border=0>'; |
$result.='<tr bgcolor="#ffffe6"><td>'. |
$result.='<tr bgcolor="#ffffe6"><td>'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'3\',\'csvform\');" value="Upload" />'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'3\',\'csvform\');" value="'.&mt('Upload').'" />'. |
' scores from file </td></tr>'."\n"; |
' '.&mt('scores from file').' </td></tr>'."\n"; |
|
|
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'4\',\'scantron_selectphase\');'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'4\',\'scantron_selectphase\');'. |
'" value="Grade" /> scantron forms</td></tr>'."\n"; |
'" value="'.&mt('Grade').'" /> scantron forms</td></tr>'."\n"; |
|
|
if ((&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) && ($symb)) { |
if ((&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) && ($symb)) { |
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'5\',\'verify\');" value="Verify" />'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'5\',\'verify\');" value="'.&mt('Verify').'" />'. |
' submission Receipt no: '.unpack("%32C*",$Apache::lonnet::perlvar{'lonHostID'}). |
' '.&mt('receipt').': '. |
|
&Apache::lonnet::recprefix($ENV{'request.course.id'}). |
'-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')">'. |
'-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')">'. |
'</td></tr>'."\n"; |
'</td></tr>'."\n"; |
} |
} |