version 1.677, 2012/12/10 01:13:08
|
version 1.684, 2012/12/21 18:51:45
|
Line 4650 sub displayPage {
|
Line 4650 sub displayPage {
|
&Apache::loncommon::start_data_table_row(). |
&Apache::loncommon::start_data_table_row(). |
'<td align="center" valign="top" >'.$prob. |
'<td align="center" valign="top" >'.$prob. |
(scalar(@{$parts}) == 1 ? '' |
(scalar(@{$parts}) == 1 ? '' |
: '<br />('.&mt('[_1]parts)', |
: '<br />('.&mt('[_1]parts', |
scalar(@{$parts}).' ') |
scalar(@{$parts}).' ').')' |
). |
). |
'</td>'; |
'</td>'; |
$studentTable.='<td valign="top">'; |
$studentTable.='<td valign="top">'; |
Line 6441 sub scantron_warning_screen {
|
Line 6441 sub scantron_warning_screen {
|
<tr><td><b>'.&mt('Data File that will be used:').'</b></td><td><tt>'.$env{'form.scantron_selectfile'}.'</tt></td></tr> |
<tr><td><b>'.&mt('Data File that will be used:').'</b></td><td><tt>'.$env{'form.scantron_selectfile'}.'</tt></td></tr> |
'.$CODElist.$lastbubblepoints.' |
'.$CODElist.$lastbubblepoints.' |
</table> |
</table> |
<p> '.&mt('If this information is correct, please click on \'[_1]\'.',&mt($button_text)).'<br /> |
<p> '.&mt("If this information is correct, please click on '[_1]'.",&mt($button_text)).'<br /> |
'.&mt('If something is incorrect, please return to [_1]Grade/Manage/Review Bubblesheets[_2] to start over.','<a href="/adm/grades?symb='.$symb.'&command=scantron_selectphase" class="LC_info">','</a>').'</p> |
'.&mt('If something is incorrect, please return to [_1]Grade/Manage/Review Bubblesheets[_2] to start over.','<a href="/adm/grades?symb='.$symb.'&command=scantron_selectphase" class="LC_info">','</a>').'</p> |
|
|
<br /> |
<br /> |
Line 7006 sub scantron_validate_sequence {
|
Line 7006 sub scantron_validate_sequence {
|
$r->print( |
$r->print( |
'<p class="LC_warning">' |
'<p class="LC_warning">' |
.&mt('Some resources in the sequence currently are not set to' |
.&mt('Some resources in the sequence currently are not set to' |
.' exam mode. Grading these resources currently may not' |
.' bubblesheet exam mode. Grading these resources currently may not' |
.' work correctly.') |
.' work correctly.') |
.'</p>' |
.'</p>' |
); |
); |
Line 7400 sub prompt_for_corrections {
|
Line 7400 sub prompt_for_corrections {
|
($responsetype_per_response{$question-1} eq 'imageresponse') || |
($responsetype_per_response{$question-1} eq 'imageresponse') || |
($responsetype_per_response{$question-1} eq 'reactionresponse') || |
($responsetype_per_response{$question-1} eq 'reactionresponse') || |
($responsetype_per_response{$question-1} eq 'organicresponse')) { |
($responsetype_per_response{$question-1} eq 'organicresponse')) { |
$r->print(&mt("Although this particular question type requires handgrading, the instructions for this question in the exam directed students to leave [quant,_1,line] blank on their bubblesheets.",$lines).'<br /><br />'.&mt('A non-zero score can be assigned to the student during bubblesheet grading by selecting a bubble in at least one line.').'<br />'.&mt('The score for this question will be a sum of the numeric values for the selected bubbles from each line, where A=1 point, B=2 points etc.').'<br />'.&mt("To assign a score of zero for this question, mark all lines as 'No bubble'.").'<br /><br />'); |
$r->print( |
|
&mt("Although this particular question type requires handgrading, the instructions for this question in the bubblesheet exam directed students to leave [quant,_1,line] blank on their bubblesheets.",$lines) |
|
.'<br /><br />' |
|
.&mt('A non-zero score can be assigned to the student during bubblesheet grading by selecting a bubble in at least one line.') |
|
.'<br />' |
|
.&mt('The score for this question will be a sum of the numeric values for the selected bubbles from each line, where A=1 point, B=2 points etc.') |
|
.'<br />' |
|
.&mt("To assign a score of zero for this question, mark all lines as 'No bubble'.") |
|
.'<br /><br />' |
|
); |
} else { |
} else { |
$r->print(&mt("Select at most one bubble in a single line and select 'No Bubble' in all the other lines. ")."<br />"); |
$r->print(&mt("Select at most one bubble in a single line and select 'No Bubble' in all the other lines. ")."<br />"); |
} |
} |
Line 8025 SCANTRONFORM
|
Line 8034 SCANTRONFORM
|
} |
} |
|
|
my @mapresources = @resources; |
my @mapresources = @resources; |
if ($randomorder && $scancode) { |
if ($randomorder) { |
unless (ref($ordered{$scancode}) eq 'ARRAY') { |
@mapresources = |
$env{'form.CODE'} = $scancode; |
&users_order($user,$scancode,$sequence,\@master_seq,\%ordered, |
my $actual_seq = |
\%symb_to_resource); |
&Apache::lonprintout::master_seq_to_person_seq($sequence, |
|
\@master_seq, |
|
$user,$scancode); |
|
if (ref($actual_seq) eq 'ARRAY') { |
|
@{$ordered{$scancode}} = |
|
map { $symb_to_resource{$_}; } @{$actual_seq}; |
|
} |
|
delete($env{'form.CODE'}); |
|
} |
|
if (ref($ordered{$scancode}) eq 'ARRAY') { |
|
@mapresources = @{$ordered{$scancode}}; |
|
} |
|
} |
} |
my (%partids_by_symb,$res_error); |
my (%partids_by_symb,$res_error); |
foreach my $resource (@mapresources) { |
foreach my $resource (@mapresources) { |
Line 8190 sub graders_resources_pass {
|
Line 8187 sub graders_resources_pass {
|
return; |
return; |
} |
} |
|
|
|
=pod |
|
|
|
=item users_order |
|
|
|
Returns array of resources in current map, ordered based on either CODE, |
|
if this is a CODEd exam, or based on student's identity if this is a |
|
"NAMEd" exam. |
|
|
|
Should be used when randomorder applied when the corresponding exam was |
|
printed, prior to students completing bubblesheets for the version of the |
|
exam the student received. |
|
|
|
=cut |
|
|
|
sub users_order { |
|
my ($user,$scancode,$mapurl,$master_seq,$ordered,$symb_to_resource) = @_; |
|
my @mapresources; |
|
unless ((ref($ordered) eq 'HASH') && (ref($symb_to_resource) eq 'HASH')) { |
|
return @mapresources; |
|
} |
|
if (($scancode) && (ref($ordered->{$scancode}) eq 'ARRAY')) { |
|
@mapresources = @{$ordered->{$scancode}}; |
|
} elsif ($scancode) { |
|
$env{'form.CODE'} = $scancode; |
|
my $actual_seq = |
|
&Apache::lonprintout::master_seq_to_person_seq($mapurl, |
|
$master_seq, |
|
$user,$scancode); |
|
if (ref($actual_seq) eq 'ARRAY') { |
|
@{$ordered->{$scancode}} = |
|
map { $symb_to_resource->{$_}; } @{$actual_seq}; |
|
@mapresources = @{$ordered->{$scancode}}; |
|
} |
|
delete($env{'form.CODE'}); |
|
} else { |
|
my $actual_seq = |
|
&Apache::lonprintout::master_seq_to_person_seq($mapurl, |
|
$master_seq, |
|
$user); |
|
if (ref($actual_seq) eq 'ARRAY') { |
|
@mapresources = |
|
map { $symb_to_resource->{$_}; } @{$actual_seq}; |
|
} |
|
} |
|
return @mapresources; |
|
} |
|
|
sub grade_student_bubbles { |
sub grade_student_bubbles { |
my ($r,$uname,$udom,$scan_record,$scancode,$resources,$parts,$bubbles_per_row) = @_; |
my ($r,$uname,$udom,$scan_record,$scancode,$resources,$parts,$bubbles_per_row) = @_; |
if (ref($resources) eq 'ARRAY') { |
if (ref($resources) eq 'ARRAY') { |
Line 8495 sub checkscantron_results {
|
Line 8539 sub checkscantron_results {
|
return ''; |
return ''; |
} |
} |
my $map=$navmap->getResourceByUrl($sequence); |
my $map=$navmap->getResourceByUrl($sequence); |
my $randomorder; |
my ($randomorder,@master_seq,%symb_to_resource); |
if (ref($map)) { |
if (ref($map)) { |
$randomorder=$map->randomorder(); |
$randomorder=$map->randomorder(); |
} |
} |
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0); |
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0); |
|
foreach my $resource (@resources) { |
|
if (ref($resource)) { |
|
my $ressymb = $resource->symb(); |
|
push(@master_seq,$ressymb); |
|
$symb_to_resource{$ressymb} = $resource; |
|
} |
|
} |
my (%grader_partids_by_symb,%grader_randomlists_by_symb); |
my (%grader_partids_by_symb,%grader_randomlists_by_symb); |
&graders_resources_pass(\@resources,\%grader_partids_by_symb, |
&graders_resources_pass(\@resources,\%grader_partids_by_symb, |
\%grader_randomlists_by_symb,$bubbles_per_row); |
\%grader_randomlists_by_symb,$bubbles_per_row); |
Line 8513 sub checkscantron_results {
|
Line 8564 sub checkscantron_results {
|
|
|
my $count=&Apache::grades::get_todo_count($scanlines,$scan_data); |
my $count=&Apache::grades::get_todo_count($scanlines,$scan_data); |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,$count); |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,$count); |
my ($username,$domain,$started); |
my ($username,$domain,$started,%ordered); |
my $nav_error; |
my $nav_error; |
&scantron_get_maxbubble(\$nav_error,\%scantron_config); # Need the bubble lines array to parse. |
&scantron_get_maxbubble(\$nav_error,\%scantron_config); # Need the bubble lines array to parse. |
if ($nav_error) { |
if ($nav_error) { |
Line 8555 sub checkscantron_results {
|
Line 8606 sub checkscantron_results {
|
$scandata{$pid} = substr($line,$scantron_config{'Qstart'}-1,$lastpos); |
$scandata{$pid} = substr($line,$scantron_config{'Qstart'}-1,$lastpos); |
chomp($scandata{$pid}); |
chomp($scandata{$pid}); |
$scandata{$pid} =~ s/\r$//; |
$scandata{$pid} =~ s/\r$//; |
|
my $usec = $classlist->{$uname}->[&Apache::loncoursedata::CL_SECTION]; |
|
my $user = $uname.':'.$usec; |
($username,$domain)=split(/:/,$uname); |
($username,$domain)=split(/:/,$uname); |
|
|
my ($scancode,%ordered); |
my $scancode; |
if ((exists($scan_record->{'scantron.CODE'})) && |
if ((exists($scan_record->{'scantron.CODE'})) && |
(&Apache::lonnet::validCODE($scan_record->{'scantron.CODE'}))) { |
(&Apache::lonnet::validCODE($scan_record->{'scantron.CODE'}))) { |
$scancode = $scan_record->{'scantron.CODE'}; |
$scancode = $scan_record->{'scantron.CODE'}; |
Line 8566 sub checkscantron_results {
|
Line 8619 sub checkscantron_results {
|
} |
} |
|
|
my @mapresources = @resources; |
my @mapresources = @resources; |
if ($randomorder && $scancode) { |
if ($randomorder) { |
unless (ref($ordered{$scancode}) eq 'ARRAY') { |
@mapresources = |
$env{'form.CODE'} = $scancode; |
&users_order($user,$scancode,$sequence,\@master_seq,\%ordered, |
$ordered{$scancode} = |
\%symb_to_resource); |
&Apache::lonprintout::master_seq_to_person_seq($sequence, |
|
\@resources, |
|
$uname,$scancode); |
|
delete($env{'form.CODE'}); |
|
} |
|
if (ref($ordered{$scancode}) eq 'ARRAY') { |
|
@mapresources = @{$ordered{$scancode}}; |
|
} |
|
} |
} |
my $counter = -1; |
my $counter = -1; |
foreach my $resource (@mapresources) { |
foreach my $resource (@mapresources) { |
Line 8642 sub checkscantron_results {
|
Line 8687 sub checkscantron_results {
|
$env{'form.scantron_maxbubble'}) |
$env{'form.scantron_maxbubble'}) |
.'</p>' |
.'</p>' |
); |
); |
$r->print('<p>'.&mt('Exact matches for <b>[quant,_1,student]</b>.',$passed).'<br />'.&mt('Discrepancies detected for <b>[quant,_1,student]</b>.',$failed).'</p>'); |
$r->print('<p>' |
|
.&mt('Exact matches for [_1][quant,_2,student][_3].','<b>',$passed,'</b>') |
|
.'<br />' |
|
.&mt('Discrepancies detected for [_1][quant,_2,student][_3].','<b>',$failed,'</b>') |
|
.'</p>' |
|
); |
if ($passed) { |
if ($passed) { |
$r->print(&mt('Students with exact correspondence between bubblesheet data and submissions are as follows:').'<br /><br />'); |
$r->print(&mt('Students with exact correspondence between bubblesheet data and submissions are as follows:').'<br /><br />'); |
$r->print(&Apache::loncommon::start_data_table()."\n". |
$r->print(&Apache::loncommon::start_data_table()."\n". |