version 1.170, 2003/12/11 13:51:09
|
version 1.174, 2004/02/09 22:37:54
|
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 738 LISTJAVASCRIPT
|
Line 743 LISTJAVASCRIPT
|
if ($num_students eq 0) { |
if ($num_students eq 0) { |
$gradeTable='<br /> <font color="red">There are no students currently enrolled.</font>'; |
$gradeTable='<br /> <font color="red">There are no students currently enrolled.</font>'; |
} else { |
} else { |
|
my $submissions='submissions'; |
|
if ($submitonly eq 'incorrect') { $submissions = 'incorrect submissions'; } |
|
if ($submitonly eq 'graded' ) { $submissions = 'ungraded submissions'; } |
$gradeTable='<br /> <font color="red">'. |
$gradeTable='<br /> <font color="red">'. |
'No submissions found for this resource for any students. ('.$num_students. |
'No '.$submissions.' found for this resource for any students. ('.$num_students. |
' checked for submissions)</font><br />'; |
' students checked for '.$submissions.')</font><br />'; |
} |
} |
} elsif ($ctr == 1) { |
} elsif ($ctr == 1) { |
$gradeTable =~ s/type=checkbox/type=checkbox checked/; |
$gradeTable =~ s/type=checkbox/type=checkbox checked/; |
Line 3444 sub scantron_selectphase {
|
Line 3452 sub scantron_selectphase {
|
$default_form_data |
$default_form_data |
<table width="100%" border="0"> |
<table width="100%" border="0"> |
<tr bgcolor="#e6ffff"> |
<tr bgcolor="#e6ffff"> |
<td> |
<td colspan="2"> |
<b>Specify file location and which Folder/Sequence to grade</b> |
<b>Specify file and which Folder/Sequence to grade</b> |
</td> |
</td> |
</tr> |
</tr> |
<tr bgcolor="#ffffe6"> |
<tr bgcolor="#ffffe6"> |
<td> |
<td> Sequence to grade: </td><td> $sequence_selector </td> |
Sequence to grade: $sequence_selector |
|
</td> |
|
</tr> |
</tr> |
<tr bgcolor="#ffffe6"> |
<tr bgcolor="#ffffe6"> |
<td> |
<td> Filename of scoring office file: </td><td> $file_selector </td> |
Filename of scoring office file: $file_selector |
|
</td> |
|
</tr> |
</tr> |
<tr bgcolor="#ffffe6"> |
<tr bgcolor="#ffffe6"> |
<td> |
<td> Format of data file: </td><td> $format_selector </td> |
Format of data file: $format_selector |
|
</td> |
|
</tr> |
</tr> |
<tr bgcolor="#ffffe6"> |
<tr bgcolor="#ffffe6"> |
<td> |
<td> |
<!-- FIXME this is lazy, a single parse of the set should let me know what this is --> |
<!-- FIXME this is lazy, a single parse of the set should let me know what this is --> |
Last line to expect an answer on: |
Last line to expect an answer on: </td><td> |
<input type="text" name="scantron_maxbubble" /> |
<input type="text" name="scantron_maxbubble" /> |
</td> |
</td> |
</tr> |
</tr> |
<tr bgcolor="#ffffe6"> |
<tr bgcolor="#ffffe6"> |
<td> |
<td colspan="2"> |
<input type="submit" value="Validate Scantron Records" /> |
<input type="submit" value="Validate Scantron Records" /> |
</td> |
</td> |
</tr> |
</tr> |
Line 3492 SCANTRONFORM
|
Line 3494 SCANTRONFORM
|
<table width="100%" border="0"> |
<table width="100%" border="0"> |
<tr bgcolor="#e6ffff"> |
<tr bgcolor="#e6ffff"> |
<td> |
<td> |
Specify a Scantron data file to upload. |
<b>Specify a Scantron data file to upload.</b> |
</td> |
</td> |
</tr> |
</tr> |
<tr bgcolor="#ffffe6"> |
<tr bgcolor="#ffffe6"> |
<td> |
<td> |
SCANTRONFORM |
SCANTRONFORM |
&scantron_upload_scantron_data($r); |
my $default_form_data=&defaultFormData(&get_symb_and_url($r,1)); |
|
my $cdom= $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; |
|
my $cnum= $ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
|
$r->print(<<UPLOAD); |
|
<script type="text/javascript" language="javascript"> |
|
function checkUpload(formname) { |
|
if (formname.upfile.value == "") { |
|
alert("Please use the browse button to select a file from your local directory."); |
|
return false; |
|
} |
|
formname.submit(); |
|
} |
|
</script> |
|
|
|
<form enctype='multipart/form-data' action='/adm/grades' name='rules' method='post'> |
|
$default_form_data |
|
<input name='courseid' type='hidden' value='$cnum' /> |
|
<input name='domainid' type='hidden' value='$cdom' /> |
|
<input name='command' value='scantronupload_save' type='hidden' /> |
|
File to upload:<input type="file" name="upfile" size="50" /> |
|
<br /> |
|
<input type="button" onClick="javascript:checkUpload(this.form);" value="Upload Scantron Data" /> |
|
</form> |
|
UPLOAD |
|
|
$r->print(<<SCANTRONFORM); |
$r->print(<<SCANTRONFORM); |
</td> |
</td> |
Line 4152 SCANTRONFORM
|
Line 4177 SCANTRONFORM
|
'last student'); |
'last student'); |
} |
} |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
my $lasttime = &Time::HiRes::time()-$start; |
# my $lasttime = &Time::HiRes::time()-$start; |
$r->print("<p>took $lasttime</p>"); |
# $r->print("<p>took $lasttime</p>"); |
|
|
$navmap->untieHashes(); |
$navmap->untieHashes(); |
$r->print("<p>Done</p>"); |
$r->print("</form><p>Done</p>"); |
$r->print(&show_grading_menu_form($symb,$url)); |
$r->print(&show_grading_menu_form($symb,$url)); |
return ''; |
return ''; |
} |
} |
Line 4168 sub scantron_upload_scantron_data {
|
Line 4193 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 4224 sub scantron_upload_scantron_data_save {
|
Line 4249 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))); |
my ($symb,$url)=&get_symb_and_url($r); |
|
if ($symb) { |
|
$r->print(&show_grading_menu_form(&get_symb_and_url($r))); |
|
} else { |
|
$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 ''; |
} |
} |
|
|