version 1.470, 2007/10/29 09:46:28
|
version 1.472, 2007/10/30 01:04:31
|
Line 5316 sub scantron_parse_scanline {
|
Line 5316 sub scantron_parse_scanline {
|
} elsif (!defined($currentquest) |
} elsif (!defined($currentquest) |
|| (&occurence_count($currentquest, $$scantron_config{'Qoff'}) == length($currentquest)) |
|| (&occurence_count($currentquest, $$scantron_config{'Qoff'}) == length($currentquest)) |
|| (&occurence_count($currentquest, "[A-Z]") == 0)) { |
|| (&occurence_count($currentquest, "[A-Z]") == 0)) { |
&Apache::lonnet::logthis("Missing if, $questnum, $ansnum"); |
|
for (my $ans = 0; $ans < $answers_needed; $ans++ ) { |
for (my $ans = 0; $ans < $answers_needed; $ans++ ) { |
$record{"scantron.$ansnum.answer"}=''; |
$record{"scantron.$ansnum.answer"}=''; |
$ansnum++; |
$ansnum++; |
|
|
} |
} |
if (!&scan_data($scan_data,"$whichline.no_bubble.$questnum")) { |
if (!&scan_data($scan_data,"$whichline.no_bubble.$questnum")) { |
&Apache::lonnet::logthis("Parsed missing: $questnum"); |
|
push(@{$record{"scantron.missingerror"}},$questnum); |
push(@{$record{"scantron.missingerror"}},$questnum); |
# $ansnum += $answers_needed; |
# $ansnum += $answers_needed; |
} |
} |
&Apache::lonnet::logthis("Residual scanline: '$questions'"); |
|
|
|
} else { |
} else { |
for (my $ans = 0; $ans < $answers_needed; $ans++) { |
for (my $ans = 0; $ans < $answers_needed; $ans++) { |
$record{"scantron.$ansnum.answer"} = substr($currentquest, $ans, 1); |
$record{"scantron.$ansnum.answer"} = substr($currentquest, $ans, 1); |
Line 6487 ENDSCRIPT
|
Line 6483 ENDSCRIPT
|
foreach my $question (@{$arg}) { |
foreach my $question (@{$arg}) { |
my $selected = &get_response_bubbles($scan_record, $question); |
my $selected = &get_response_bubbles($scan_record, $question); |
my @select_array = split(/:/,$selected); # ought to be an array of empties. |
my @select_array = split(/:/,$selected); # ought to be an array of empties. |
&Apache::lonnet::logthis("Calling bubble selector (missing)"); |
|
&scantron_bubble_selector($r,$scan_config,$question, @select_array); |
&scantron_bubble_selector($r,$scan_config,$question, @select_array); |
} |
} |
} else { |
} else { |
Line 6529 sub scantron_bubble_selector {
|
Line 6524 sub scantron_bubble_selector {
|
|
|
my $total_lines = $lines*2; |
my $total_lines = $lines*2; |
my @alphabet=('A'..'Z'); |
my @alphabet=('A'..'Z'); |
&Apache::lonnet::logthis("Putting in question number $quest"); |
|
$r->print("<table border='1'><tr><td rowspan='".$total_lines."'>$quest</td>"); |
$r->print("<table border='1'><tr><td rowspan='".$total_lines."'>$quest</td>"); |
|
|
for (my $l = 0; $l < $lines; $l++) { |
for (my $l = 0; $l < $lines; $l++) { |
Line 6885 sub scantron_validate_missingbubbles {
|
Line 6879 sub scantron_validate_missingbubbles {
|
|
|
foreach my $missing (@{$$scan_record{'scantron.missingerror'}}) { |
foreach my $missing (@{$$scan_record{'scantron.missingerror'}}) { |
if ($missing > $max_bubble) { next; } |
if ($missing > $max_bubble) { next; } |
&Apache::lonnet::logthis("Marking $missing for missing bubble check"); |
|
push(@to_correct,$missing); |
push(@to_correct,$missing); |
} |
} |
if (@to_correct) { |
if (@to_correct) { |
Line 7416 GRADINGMENUJS
|
Line 7409 GRADINGMENUJS
|
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
|
|
$result.='<table border="0"><tr><td bgcolor=#777777>'."\n". |
$result.=' |
'<table width="100%" border="0"><tr bgcolor="#e6ffff"><td>'."\n". |
<div class="LC_grade_select_mode"> |
' <b>Select a Grading/Viewing Option</b></td></tr>'."\n". |
<div class="LC_grade_select_mode_header"> |
'<tr bgcolor="#ffffe6" valign="top"><td>'."\n"; |
'.&mt('Select a Grading/Viewing Option').' |
|
</div> |
$result.='<table width="100%" border="0">'; |
<div class="LC_grade_select_mode_body"> |
$result.='<tr bgcolor="#ffffe6" valign="top">'."\n"; |
<div class="LC_grade_select_mode_selector"> |
$result.='<td><b>'.&mt('Sections').'</b></td>'; |
<div class="LC_grade_select_mode_selector_header"> |
$result.='<td><b>'.&mt('Groups').'</b></td>'; |
'.&mt('Sections').' |
$result.='<td><b>'.&mt('Access Status').'</td>'."\n"; |
</div> |
$result.='<td><b>'.&mt('Submission Status').'</td>'."\n"; |
<div class="LC_grade_select_mode_selector_body"> |
$result.='</tr>'; |
<select name="section" multiple="multiple" size="5">'."\n"; |
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
|
' <select name="section" multiple="multiple" size="3">'."\n"; |
|
if (ref($sections)) { |
if (ref($sections)) { |
foreach (sort (@$sections)) { |
foreach my $section (sort (@$sections)) { |
$result.='<option value="'.$_.'" '. |
$result.='<option value="'.$section.'" '. |
($saveSec eq $_ ? 'selected="selected"':'').'>'.$_.'</option>'."\n"; |
($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n"; |
} |
} |
} |
} |
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> '; |
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> '; |
$result.= '</td><td>'."\n"; |
$result.=' |
$result.= &Apache::lonstatistics::GroupSelect('group','multiple',3); |
</div> |
$result.='</td><td>'."\n"; |
</div> |
$result.=&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,3,undef,'mult'); |
<div class="LC_grade_select_mode_selector"> |
|
<div class="LC_grade_select_mode_selector_header"> |
$result.='</td>'; |
'.&mt('Groups').' |
$result.='<td><select name="submitonly" size="3">'. |
</div> |
'<option value="yes" '. |
<div class="LC_grade_select_mode_selector_body"> |
($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>'. |
'.&Apache::lonstatistics::GroupSelect('group','multiple',5).' |
'<option value="queued" '. |
</div> |
($saveSub eq 'queued' ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option>'. |
</div> |
'<option value="graded" '. |
<div class="LC_grade_select_mode_selector"> |
($saveSub eq 'graded' ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option>'. |
<div class="LC_grade_select_mode_selector_header"> |
'<option value="incorrect" '. |
'.&mt('Access Status').' |
($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>'. |
</div> |
'<option value="all" '. |
<div class="LC_grade_select_mode_selector_body"> |
($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option></select></td></tr>'; |
'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' |
|
</div> |
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="3"><label>'. |
</div> |
'<input type="radio" name="radioChoice" value="submission" '. |
<div class="LC_grade_select_mode_selector"> |
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.'<b>'.&mt('Current Resource').':</b> '.&mt('For one or more students'). |
<div class="LC_grade_select_mode_selector_header"> |
'</label> </td></tr>'."\n"; |
'.&mt('Submission Status').' |
|
</div> |
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="3">'. |
<div class="LC_grade_select_mode_selector_body"> |
'<label><input type="radio" name="radioChoice" value="viewgrades" '. |
<select name="submitonly" size="5"> |
|
<option value="yes" '. ($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option> |
|
<option value="queued" '. ($saveSub eq 'queued' ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option> |
|
<option value="graded" '. ($saveSub eq 'graded' ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option> |
|
<option value="incorrect" '.($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option> |
|
<option value="all" '. ($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option> |
|
</select> |
|
</div> |
|
</div> |
|
<div class="LC_grade_select_mode_type_body"> |
|
<div class="LC_grade_select_mode_type"> |
|
<label> |
|
<input type="radio" name="radioChoice" value="submission" '. |
|
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.&mt('<b>Current Resource:</b> For one or more students').' |
|
</label> |
|
</div> |
|
<div class="LC_grade_select_mode_type"> |
|
<label> |
|
<input type="radio" name="radioChoice" value="viewgrades" '. |
($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '. |
($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '. |
'<b>Current Resource:</b> For all students in selected section or course</label></td></tr>'."\n"; |
&mt('<b>Current Resource:</b> For all students in selected section or course').' |
|
</label> |
$result.='<tr bgcolor="#ffffe6"><td colspan="3"><br />'. |
</div> |
'<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="Next->" />'. |
<div class="LC_grade_select_mode_type"> |
'</td></tr>'."\n"; |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next->').'" /> |
|
</div> |
|
<div class="LC_grade_select_mode_type"> |
$result.='<tr bgcolor="#ffffe6" valign="top"><td colspan="3">'. |
<label> |
'<br /><label><input type="radio" name="radioChoice" value="pickStudentPage" '. |
<input type="radio" name="radioChoice" value="pickStudentPage" '. |
($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '. |
($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '. |
'The <b>complete</b> set/page/sequence/folder: For one student</label></td></tr>'."\n"; |
&mt('The <b>complete</b> set/page/sequence/folder: For one student').' |
|
</label> |
$result.='<tr bgcolor="#ffffe6"><td colspan="3"><br />'. |
</div> |
'<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="Next->" />'. |
<div class="LC_grade_select_mode_type"> |
'</td></tr></table>'."\n"; |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next->').'" /> |
|
</div> |
$result.='</td>'; #<td valign="top">'; |
</div> |
|
</div> |
# $result.='<table width="100%" border="0">'; |
</div> |
# $result.='<tr bgcolor="#ffffe6"><td>'. |
</form>'; |
# '<input type="button" onClick="javascript:checkChoice(this.form,\'3\',\'csvform\');" value="'.&mt('Upload').'" />'. |
|
# ' '.&mt('scores from file').' </td></tr>'."\n"; |
|
# |
|
# $result.='<tr bgcolor="#ffffe6"><td>'. |
|
# '<input type="button" onClick="javascript:checkChoice(this.form,\'6\',\'processclicker\');" value="'.&mt('Process').'" />'. |
|
# ' '.&mt('clicker file').' </td></tr>'."\n"; |
|
# |
|
# $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
|
# '<input type="button" onClick="javascript:checkChoice(this.form,\'4\',\'scantron_selectphase\');'. |
|
# '" value="'.&mt('Grade').'" /> scantron forms</td></tr>'."\n"; |
|
# |
|
# if ((&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) && ($symb)) { |
|
# $result.='<tr bgcolor="#ffffe6"valign="top"><td>'. |
|
# '<input type="button" onClick="javascript:checkChoice(this.form,\'5\',\'verify\');" value="'.&mt('Verify').'" />'. |
|
# ' '.&mt('receipt').': '. |
|
# &Apache::lonnet::recprefix($env{'request.course.id'}). |
|
# '-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />'. |
|
# '</td></tr>'."\n"; |
|
# } |
|
# $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
|
# '<input type="button" onClick="javascript:this.form.action=\'/adm/helper/resettimes.helper\';this.form.submit();'. |
|
# '" value="'.&mt('Manage').'" /> access times.</td></tr>'."\n"; |
|
# $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
|
# '<input type="button" onClick="javascript:this.form.command.value=\'codelist\';this.form.action=\'/adm/pickcode\';this.form.submit();'. |
|
# '" value="'.&mt('View').'" /> saved CODEs.</td></tr>'."\n"; |
|
# |
|
# $result.='</table>'."\n".'</td>'; |
|
$result.= '</tr></table>'."\n". |
|
'</td></tr></table></form>'."\n"; |
|
return $result; |
return $result; |
} |
} |
|
|