version 1.574.2.12, 2010/05/22 01:01:03
|
version 1.584, 2009/12/15 18:26:18
|
Line 195 sub get_display_part {
|
Line 195 sub get_display_part {
|
my ($partID,$symb)=@_; |
my ($partID,$symb)=@_; |
my $display=&Apache::lonnet::EXT('resource.'.$partID.'.display',$symb); |
my $display=&Apache::lonnet::EXT('resource.'.$partID.'.display',$symb); |
if (defined($display) and $display ne '') { |
if (defined($display) and $display ne '') { |
$display.= " (<span class=\"LC_internal_info\">id $partID</span>)"; |
$display.= ' (<span class="LC_internal_info">' |
|
.&mt('Part ID: [_1]',$partID).'</span>)'; |
} else { |
} else { |
$display=$partID; |
$display=$partID; |
} |
} |
Line 206 sub get_display_part {
|
Line 207 sub get_display_part {
|
#--- and parts and response type |
#--- and parts and response type |
sub showResourceInfo { |
sub showResourceInfo { |
my ($symb,$probTitle,$checkboxes,$res_error) = @_; |
my ($symb,$probTitle,$checkboxes,$res_error) = @_; |
my $col=3; |
|
if ($checkboxes) { $col=4; } |
|
my $result = '<h3>'.&mt('Current Resource').': '.$probTitle.'</h3>'."\n"; |
my $result = '<h3>'.&mt('Current Resource').': '.$probTitle.'</h3>'."\n"; |
my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error); |
my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error); |
if (ref($res_error)) { |
if (ref($res_error)) { |
Line 215 sub showResourceInfo {
|
Line 214 sub showResourceInfo {
|
return; |
return; |
} |
} |
} |
} |
$result .='<table border="0">'; |
$result.=&Apache::loncommon::start_data_table() |
|
.&Apache::loncommon::start_data_table_header_row(); |
|
if ($checkboxes) { |
|
$result.='<th> </th>'; |
|
} |
|
$result.='<th>'.&mt('Problem Part').'</th>' |
|
.'<th>'.&mt('Res. ID').'</th>' |
|
.'<th>'.&mt('Type').'</th>' |
|
.&Apache::loncommon::end_data_table_header_row(); |
my %resptype = (); |
my %resptype = (); |
my $hdgrade='no'; |
my $hdgrade='no'; |
my %partsseen; |
my %partsseen; |
foreach my $partID (sort(keys(%$responseType))) { |
foreach my $partID (sort(keys(%$responseType))) { |
foreach my $resID (sort(keys(%{ $responseType->{$partID} }))) { |
foreach my $resID (sort(keys(%{ $responseType->{$partID} }))) { |
my $handgrade=$$handgrade{$partID.'_'.$resID}; |
my $handgrade=$$handgrade{$partID.'_'.$resID}; |
my $responsetype = $responseType->{$partID}->{$resID}; |
my $responsetype = $responseType->{$partID}->{$resID}; |
$hdgrade = $handgrade if ($handgrade eq 'yes'); |
$hdgrade = $handgrade if ($handgrade eq 'yes'); |
$result.='<tr>'; |
$result.=&Apache::loncommon::start_data_table_row(); |
if ($checkboxes) { |
if ($checkboxes) { |
if (exists($partsseen{$partID})) { |
if (exists($partsseen{$partID})) { |
$result.="<td> </td>"; |
$result.="<td> </td>"; |
} else { |
} else { |
$result.="<td><input type='checkbox' name='vPart' value='$partID' checked='checked' /></td>"; |
$result.="<td><input type='checkbox' name='vPart' value='$partID' checked='checked' /></td>"; |
} |
} |
$partsseen{$partID}=1; |
$partsseen{$partID}=1; |
} |
} |
my $display_part=&get_display_part($partID,$symb); |
my $display_part=&get_display_part($partID,$symb); |
$result.='<td><b>'.&mt('Part').': </b>'.$display_part. |
$result.='<td>'.$display_part.'</td>' |
' <span class="LC_internal_info">'.$resID.'</span></td>'. |
.'<td>'.'<span class="LC_internal_info">'.$resID.'</span></td>' |
'<td><b>'.&mt('Type').': </b>'.$responsetype.'</td></tr>'; |
.'<td>'.&mt($responsetype).'</td>' |
# '<td>'.&mt('<b>Handgrade: </b>[_1]',$handgrade).'</td></tr>'; |
# .'<td>'.&mt('<b>Handgrade: </b>[_1]',$handgrade).'</td>' |
} |
.&Apache::loncommon::end_data_table_row(); |
|
} |
} |
} |
$result.='</table>'."\n"; |
$result.=&Apache::loncommon::end_data_table(); |
return $result,$responseType,$hdgrade,$partlist,$handgrade; |
return $result,$responseType,$hdgrade,$partlist,$handgrade; |
} |
} |
|
|
Line 831 sub verifyreceipt {
|
Line 839 sub verifyreceipt {
|
} |
} |
} |
} |
if ($matches == 0) { |
if ($matches == 0) { |
$string = $title.&mt('No match found for the above receipt number.'); |
$string = $title |
|
.'<p class="LC_warning">' |
|
.&mt('No match found for the above receipt number.') |
|
.'</p>'; |
} else { |
} else { |
$string = &jscriptNform($symb).$title. |
$string = &jscriptNform($symb).$title. |
'<p>'. |
'<p>'. |
&mt('The above receipt number matches the following [numerate,_1,student].',$matches). |
&mt('The above receipt number matches the following [quant,_1,student].',$matches). |
'</p>'. |
'</p>'. |
$header. |
$header. |
$contents. |
$contents. |
Line 1754 sub gradeBox {
|
Line 1765 sub gradeBox {
|
} |
} |
$line.='<option value="reset status">'.&mt('reset status').'</option></select>'."\n"; |
$line.='<option value="reset status">'.&mt('reset status').'</option></select>'."\n"; |
|
|
|
|
|
#&mt('<td><b>Part:</b></td><td>[_1]</td><td><b>Points:</b></td><td>[_2]</td><td>or</td><td>[_3]</td>',$display_part,$radio,$line); |
$result .= |
$result .= |
'<td><b>'.&mt('Part').':</b></td><td>'.$display_part.'</td><td><b>'.&mt('Points').':</b></td><td>'.$radio.'</td><td>'.&mt('or').'</td><td>'.$line.'</td>'; |
'<td><b>'.&mt('Part:').'</b></td><td>'.$display_part.'</td><td><b>'.&mt('Points:').'</b></td><td>'.$radio.'</td><td>'.&mt('or').'</td><td>'.$line.'</td>'; |
$result.='</tr></table>'."\n"; |
$result.='</tr></table>'."\n"; |
$result.='<input type="hidden" name="stores'.$counter.'_'.$partid.'" value="" />'."\n". |
$result.='<input type="hidden" name="stores'.$counter.'_'.$partid.'" value="" />'."\n". |
'<input type="hidden" name="oldpts'.$counter.'_'.$partid.'" value="'.$score.'" />'."\n". |
'<input type="hidden" name="oldpts'.$counter.'_'.$partid.'" value="'.$score.'" />'."\n". |
Line 1777 sub handback_box {
|
Line 1790 sub handback_box {
|
my ($symb,$uname,$udom,$counter,$partid,$record,$res_error) = @_; |
my ($symb,$uname,$udom,$counter,$partid,$record,$res_error) = @_; |
my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error); |
my ($partlist,$handgrade,$responseType) = &response_type($symb,$res_error); |
my (@respids); |
my (@respids); |
my @part_response_id = &flatten_responseType($responseType); |
my @part_response_id = &flatten_responseType($responseType); |
foreach my $part_response_id (@part_response_id) { |
foreach my $part_response_id (@part_response_id) { |
my ($part,$resp) = @{ $part_response_id }; |
my ($part,$resp) = @{ $part_response_id }; |
if ($part eq $partid) { |
if ($part eq $partid) { |
Line 2142 KEYWORDS
|
Line 2155 KEYWORDS
|
} |
} |
my $responsetype = $responseType->{$partid}->{$respid}; |
my $responsetype = $responseType->{$partid}->{$respid}; |
if (!exists($record{"resource.$partid.$respid.submission"})) { |
if (!exists($record{"resource.$partid.$respid.submission"})) { |
$lastsubonly.="\n".'<div class="LC_grade_submission_part"><b>Part:</b> '. |
$lastsubonly.="\n".'<div class="LC_grade_submission_part">'. |
$display_part.' <span class="LC_internal_info">( ID '.$respid. |
'<b>'.&mt('Part: [_1]',$display_part).'</b>'. |
' )</span> '. |
' <span class="LC_internal_info">'. |
|
'('.&mt('Part ID: [_1]',$respid).')</b>'. |
|
'</span> '. |
'<span class="LC_warning">'.&mt('Nothing submitted - no attempts.').'</span><br /><br /></div>'; |
'<span class="LC_warning">'.&mt('Nothing submitted - no attempts.').'</span><br /><br /></div>'; |
next; |
next; |
} |
} |
Line 2180 KEYWORDS
|
Line 2195 KEYWORDS
|
($env{'form.lastSub'} eq 'hdgrade' && |
($env{'form.lastSub'} eq 'hdgrade' && |
$$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) { |
$$handgrade{$$part[0].'_'.$$part[1]} eq 'yes')) { |
my $display_part=&get_display_part($partid,$symb); |
my $display_part=&get_display_part($partid,$symb); |
$lastsubonly.='<div class="LC_grade_submission_part"><b>Part:</b> '. |
$lastsubonly.='<div class="LC_grade_submission_part">'. |
$display_part.' <span class="LC_internal_info">( ID '.$respid. |
'<b>'.&mt('Part: [_1]',$display_part).'</b>'. |
' )</span> '; |
' <span class="LC_internal_info">'. |
|
'('.&mt('Part ID: [_1]',$respid).')'. |
|
'</b></span> '; |
my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record); |
my $files=&get_submitted_files($udom,$uname,$partid,$respid,\%record); |
if (@$files) { |
if (@$files) { |
$lastsubonly.='<br /><span class="LC_warning">'.&mt('Like all files provided by users, this file may contain viruses').'</span><br />'; |
$lastsubonly.='<br /><span class="LC_warning">'.&mt('Like all files provided by users, this file may contain viruses').'</span><br />'; |
Line 3336 sub viewgrades {
|
Line 3353 sub viewgrades {
|
|
|
$result.= |
$result.= |
&Apache::loncommon::start_data_table_row()."\n". |
&Apache::loncommon::start_data_table_row()."\n". |
'<td><b>'.&mt('Part').':</b></td><td>'.$display_part.'</td><td><b>'.&mt('Points').':</b></td><td>'.$radio.'</td><td>'.&mt('or').'</td><td>'.$line.'</td>'. |
'<td><b>'.&mt('Part:').'</b></td><td>'.$display_part.'</td><td><b>'.&mt('Points:').'</b></td><td>'.$radio.'</td><td>'.&mt('or').'</td><td>'.$line.'</td>'. |
&Apache::loncommon::end_data_table_row()."\n"; |
&Apache::loncommon::end_data_table_row()."\n"; |
$ctsparts++; |
$ctsparts++; |
} |
} |
Line 3959 sub csvuploadmap {
|
Line 3976 sub csvuploadmap {
|
my ($i,$keyfields); |
my ($i,$keyfields); |
if (@records) { |
if (@records) { |
my $fieldserror; |
my $fieldserror; |
my @fields=&csvupload_fields($symb,\$fieldserror); |
my @fields=&csvupload_fields($symb,\$fieldserror); |
if ($fieldserror) { |
if ($fieldserror) { |
$request->print(&navmap_errormsg()); |
$request->print(&navmap_errormsg()); |
return; |
return; |
Line 4203 LISTJAVASCRIPT
|
Line 4220 LISTJAVASCRIPT
|
my ($titles,$symbx) = &getSymbMap($map_error); |
my ($titles,$symbx) = &getSymbMap($map_error); |
if ($map_error) { |
if ($map_error) { |
$request->print(&navmap_errormsg()); |
$request->print(&navmap_errormsg()); |
return; |
return; |
} |
} |
my ($curpage) =&Apache::lonnet::decode_symb($symb); |
my ($curpage) =&Apache::lonnet::decode_symb($symb); |
# my ($curpage,$mapId) =&Apache::lonnet::decode_symb($symb); |
# my ($curpage,$mapId) =&Apache::lonnet::decode_symb($symb); |
Line 4542 sub displaySubByDates {
|
Line 4559 sub displaySubByDates {
|
|
|
my ($responseId)= ($isTask ? ($matchKey=~ /^resource\.(.*?)\.\Q$partid\E\.award$/) |
my ($responseId)= ($isTask ? ($matchKey=~ /^resource\.(.*?)\.\Q$partid\E\.award$/) |
: ($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/)); |
: ($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/)); |
$displaySub[0].='<b>'.&mt('Part:').'</b> '.$display_part.' '; |
$displaySub[0].='<span class="LC_nobreak"'; |
$displaySub[0].='<span class="LC_internal_info">('.&mt('ID').' '. |
$displaySub[0].='<b>'.&mt('Part: [_1]',$display_part).'</b>' |
$responseId.')</span> <b>'; |
.' <span class="LC_internal_info">' |
|
.'('.&mt('Part ID: [_1]',$responseId).')' |
|
.'</span>' |
|
.' <b>'; |
if ($$record{"$where.$partid.tries"} eq '') { |
if ($$record{"$where.$partid.tries"} eq '') { |
$displaySub[0].=&mt('Trial not counted'); |
$displaySub[0].=&mt('Trial not counted'); |
} else { |
} else { |
$displaySub[0].=&mt('Trial [_1]', |
$displaySub[0].=&mt('Trial: [_1]', |
$$record{"$where.$partid.tries"}); |
$$record{"$where.$partid.tries"}); |
} |
} |
my $responseType=($isTask ? 'Task' |
my $responseType=($isTask ? 'Task' |
Line 4559 sub displaySubByDates {
|
Line 4579 sub displaySubByDates {
|
&get_order($partid,$responseId,$symb,$uname,$udom, |
&get_order($partid,$responseId,$symb,$uname,$udom, |
$no_increment); |
$no_increment); |
} |
} |
$displaySub[0].='</b> '. |
$displaySub[0].='</b></span>'; # /nobreak |
|
$displaySub[0].=' '. |
&cleanRecord($$record{$version.':'.$matchKey},$responseType,$symb,$partid,$responseId,$record,$orders{$partid}->{$responseId},"$version:",$uname,$udom).'<br />'; |
&cleanRecord($$record{$version.':'.$matchKey},$responseType,$symb,$partid,$responseId,$record,$orders{$partid}->{$responseId},"$version:",$uname,$udom).'<br />'; |
} |
} |
} |
} |
Line 4620 sub updateGradeByPage {
|
Line 4641 sub updateGradeByPage {
|
|
|
$request->print($result); |
$request->print($result); |
|
|
|
|
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
unless (ref($navmap)) { |
unless (ref($navmap)) { |
$request->print(&navmap_errormsg()); |
$request->print(&navmap_errormsg()); |
Line 4769 sub updateGradeByPage {
|
Line 4791 sub updateGradeByPage {
|
# |
# |
#------------------------------------------------------------------- |
#------------------------------------------------------------------- |
|
|
#--------------------Bubblesheet (Scantron) Grading----------------------------------- |
#-------------------- Bubblesheet (Scantron) Grading ------------------- |
# |
# |
#------ start of section for handling grading by page/sequence --------- |
#------ start of section for handling grading by page/sequence --------- |
|
|
Line 4828 the homework problem.
|
Line 4850 the homework problem.
|
Returns html hidden inputs used to hold context/default values. |
Returns html hidden inputs used to hold context/default values. |
|
|
Arguments: |
Arguments: |
$symb - $symb of the current resource |
$symb - $symb of the current resource |
$map_error - ref to scalar which will container error if |
|
$navmap object is unavailable in &getSymbMap(). |
|
|
|
=cut |
=cut |
|
|
Line 4849 sub defaultFormData {
|
Line 4869 sub defaultFormData {
|
Return html dropdown of possible sequences to grade |
Return html dropdown of possible sequences to grade |
|
|
Arguments: |
Arguments: |
$symb - $symb of the current resource |
$symb - $symb of the current resource |
|
$map_error - ref to scalar which will container error if |
|
$navmap object is unavailable in &getSymbMap(). |
|
|
=cut |
=cut |
|
|
Line 6756 sub scantron_validate_ID {
|
Line 6778 sub scantron_validate_ID {
|
#get scantron line setup |
#get scantron line setup |
my %scantron_config=&get_scantron_config($env{'form.scantron_format'}); |
my %scantron_config=&get_scantron_config($env{'form.scantron_format'}); |
my ($scanlines,$scan_data)=&scantron_getfile(); |
my ($scanlines,$scan_data)=&scantron_getfile(); |
|
|
my $nav_error; |
my $nav_error; |
&scantron_get_maxbubble(\$nav_error); # parse needs the bubble_lines.. array. |
&scantron_get_maxbubble(\$nav_error); # parse needs the bubble_lines.. array. |
if ($nav_error) { |
if ($nav_error) { |
Line 7398 sub scantron_validate_doublebubble {
|
Line 7420 sub scantron_validate_doublebubble {
|
|
|
sub scantron_get_maxbubble { |
sub scantron_get_maxbubble { |
my ($nav_error) = @_; |
my ($nav_error) = @_; |
|
|
if (defined($env{'form.scantron_maxbubble'}) && |
if (defined($env{'form.scantron_maxbubble'}) && |
$env{'form.scantron_maxbubble'}) { |
$env{'form.scantron_maxbubble'}) { |
&restore_bubble_lines(); |
&restore_bubble_lines(); |
Line 7413 sub scantron_get_maxbubble {
|
Line 7434 sub scantron_get_maxbubble {
|
if (ref($nav_error)) { |
if (ref($nav_error)) { |
$$nav_error = 1; |
$$nav_error = 1; |
} |
} |
return; |
|
} |
} |
my $map=$navmap->getResourceByUrl($sequence); |
my $map=$navmap->getResourceByUrl($sequence); |
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0); |
my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0); |
Line 7577 sub scantron_process_students {
|
Line 7597 sub scantron_process_students {
|
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); |
\%grader_randomlists_by_symb); |
my $resource_error; |
|
foreach my $resource (@resources) { |
foreach my $resource (@resources) { |
my $ressymb; |
my $ressymb = $resource->symb(); |
if (ref($resource)) { |
|
$ressymb = $resource->symb(); |
|
} else { |
|
$resource_error = 1; |
|
last; |
|
} |
|
my ($analysis,$parts) = |
my ($analysis,$parts) = |
&scantron_partids_tograde($resource,$env{'request.course.id'}, |
&scantron_partids_tograde($resource,$env{'request.course.id'}, |
$env{'user.name'},$env{'user.domain'},1); |
$env{'user.name'},$env{'user.domain'},1); |
Line 7597 sub scantron_process_students {
|
Line 7610 sub scantron_process_students {
|
} |
} |
} |
} |
} |
} |
if ($resource_error) { |
|
$r->print(&navmap_errormsg()); |
|
return ''; |
|
} |
|
|
|
my ($uname,$udom); |
my ($uname,$udom); |
my $result= <<SCANTRONFORM; |
my $result= <<SCANTRONFORM; |
Line 7671 SCANTRONFORM
|
Line 7680 SCANTRONFORM
|
} |
} |
($uname,$udom)=split(/:/,$uname); |
($uname,$udom)=split(/:/,$uname); |
|
|
my (%partids_by_symb,$res_error); |
my %partids_by_symb; |
foreach my $resource (@resources) { |
foreach my $resource (@resources) { |
my $ressymb; |
my $ressymb = $resource->symb(); |
if (ref($resource)) { |
|
$ressymb = $resource->symb(); |
|
} else { |
|
$res_error = 1; |
|
last; |
|
} |
|
if ((exists($grader_randomlists_by_symb{$ressymb})) || |
if ((exists($grader_randomlists_by_symb{$ressymb})) || |
(ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) { |
(ref($grader_partids_by_symb{$ressymb}) ne 'ARRAY')) { |
my ($analysis,$parts) = |
my ($analysis,$parts) = |
Line 7690 SCANTRONFORM
|
Line 7693 SCANTRONFORM
|
} |
} |
} |
} |
|
|
if ($res_error) { |
|
&scantron_add_delay(\@delayqueue,$line, |
|
'An error occurred while grading student '.$uname,2); |
|
next; |
|
} |
|
|
|
&Apache::lonxml::clear_problem_counter(); |
&Apache::lonxml::clear_problem_counter(); |
&Apache::lonnet::appenv($scan_record); |
&Apache::lonnet::appenv($scan_record); |
|
|
Line 8446 sub grading_menu {
|
Line 8443 sub grading_menu {
|
'saveState'=>"", |
'saveState'=>"", |
'gradingMenu'=>1, |
'gradingMenu'=>1, |
'showgrading'=>"yes"); |
'showgrading'=>"yes"); |
my $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
my @menu = ({ url => $url, |
my $url1 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
name => &mt('Manual Grading/View Submissions'), |
|
short_description => |
|
&mt('Start the process of hand grading submissions.'), |
|
}); |
|
$fields{'command'} = 'csvform'; |
$fields{'command'} = 'csvform'; |
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
my $url2 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
push(@menu, { url => $url, |
|
name => &mt('Upload Scores'), |
|
short_description => |
|
&mt('Specify a file containing the class scores for current resource.')}); |
|
$fields{'command'} = 'processclicker'; |
$fields{'command'} = 'processclicker'; |
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
my $url3 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
push(@menu, { url => $url, |
|
name => &mt('Process Clicker'), |
|
short_description => |
|
&mt('Specify a file containing the clicker information for this resource.')}); |
|
$fields{'command'} = 'scantron_selectphase'; |
$fields{'command'} = 'scantron_selectphase'; |
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
my $url4 = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
push(@menu, { url => $url, |
|
name => &mt('Grade/Manage/Review Bubblesheets'), |
my @menu = ({ categorytitle=>'Course Grading', |
short_description => |
items =>[ |
&mt('Grade bubblesheet exams, upload/download bubblesheet data files, and review previously graded bubblesheet exams.')}); |
{ linktext => 'Manual Grading/View Submissions', |
$fields{'command'} = 'verify'; |
url => $url1, |
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
permission => 'F', |
push(@menu, { url => "", |
icon => 'edit-find-replace.png', |
name => &mt('Verify Receipt No.'), |
linktitle => 'Start the process of hand grading submissions.' |
short_description => |
}, |
&mt('')}); |
{ linktext => 'Upload Scores', |
|
url => $url2, |
|
permission => 'F', |
|
icon => 'uploadscores.png', |
|
linktitle => 'Specify a file containing the class scores for current resource.' |
|
}, |
|
{ linktext => 'Process Clicker', |
|
url => $url3, |
|
permission => 'F', |
|
icon => 'addClickerInfoFile.png', |
|
linktitle => 'Specify a file containing the clicker information for this resource.' |
|
}, |
|
{ linktext => 'Grade/Manage/Review Bubblesheet Forms', |
|
url => $url4, |
|
permission => 'F', |
|
icon => 'stat.png', |
|
linktitle => 'Grade scantron exams, upload/download scantron data files, and review previously graded scantron exams.' |
|
} |
|
] |
|
}); |
|
|
|
#$fields{'command'} = 'verify'; |
|
#$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
|
# |
# Create the menu |
# Create the menu |
my $Str; |
my $Str; |
# $Str .= '<h2>'.&mt('Please select a grading task').'</h2>'; |
# $Str .= '<h2>'.&mt('Please select a grading task').'</h2>'; |
Line 8487 sub grading_menu {
|
Line 8498 sub grading_menu {
|
'<input type="hidden" name="saveState" value="" />'."\n". |
'<input type="hidden" name="saveState" value="" />'."\n". |
'<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"; |
foreach my $menudata (@menu) { |
|
if ($menudata->{'name'} ne &mt('Verify Receipt No.')) { |
$Str .= Apache::lonhtmlcommon::generate_menu(@menu); |
$Str .=' <h3><a '. |
#$menudata->{'jscript'} |
$menudata->{'jscript'}. |
$Str .='<hr /><input type="button" value="'.&mt('Verify Receipt No.').'" '. |
' href="'. |
' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '. |
$menudata->{'url'}.'" >'. |
' /> '. |
$menudata->{'name'}."</a></h3>\n"; |
&Apache::lonnet::recprefix($env{'request.course.id'}). |
} else { |
'-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />'; |
$Str .='<hr /><input type="button" value="'.&mt('Verify Receipt No.').'" '. |
|
$menudata->{'jscript'}. |
|
' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '. |
|
' /> '. |
|
&Apache::lonnet::recprefix($env{'request.course.id'}). |
|
'-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />'; |
|
} |
|
$Str .= ' '.(' 'x8).$menudata->{'short_description'}. |
|
"\n"; |
|
} |
|
$Str .="</form>\n"; |
$Str .="</form>\n"; |
my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); |
my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); |
$request->print(<<GRADINGMENUJS); |
$request->print(<<GRADINGMENUJS); |
Line 8621 GRADINGMENUJS
|
Line 8623 GRADINGMENUJS
|
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
|
|
$result.=' |
$result.=' |
<div class="LC_grade_select_mode"> |
<h2> |
<div class="LC_grade_select_mode_current"> |
'.&mt('Grade Current Resource').' |
<h2> |
</h2> |
'.&mt('Grade Current Resource').' |
<div> |
</h2> |
'.$table.' |
<div class="LC_grade_select_mode_body"> |
</div> |
<div class="LC_grades_resource_info"> |
|
'.$table.' |
<div class="LC_columnSection"> |
</div> |
|
<div class="LC_grade_select_mode_selector"> |
<fieldset> |
<div class="LC_grade_select_mode_selector_header"> |
<legend> |
'.&mt('Sections').' |
'.&mt('Sections').' |
</div> |
</legend> |
<div class="LC_grade_select_mode_selector_body"> |
<select name="section" multiple="multiple" size="5">'."\n"; |
<select name="section" multiple="multiple" size="5">'."\n"; |
$result.= $selsec; |
if (ref($sections)) { |
|
foreach my $section (sort(@$sections)) { |
|
$result.='<option value="'.$section.'" '. |
|
($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.=' |
$result.=' |
</div> |
</fieldset> |
</div> |
|
<div class="LC_grade_select_mode_selector"> |
<fieldset> |
<div class="LC_grade_select_mode_selector_header"> |
<legend> |
'.&mt('Groups').' |
'.&mt('Groups').' |
</div> |
</legend> |
<div class="LC_grade_select_mode_selector_body"> |
'.&Apache::lonstatistics::GroupSelect('group','multiple',5).' |
'.&Apache::lonstatistics::GroupSelect('group','multiple',5).' |
</fieldset> |
</div> |
|
</div> |
<fieldset> |
<div class="LC_grade_select_mode_selector"> |
<legend> |
<div class="LC_grade_select_mode_selector_header"> |
'.&mt('Access Status').' |
'.&mt('Access Status').' |
</legend> |
</div> |
'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' |
<div class="LC_grade_select_mode_selector_body"> |
</fieldset> |
'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' |
|
</div> |
<fieldset> |
</div> |
<legend> |
<div class="LC_grade_select_mode_selector"> |
'.&mt('Submission Status').' |
<div class="LC_grade_select_mode_selector_header"> |
</legend> |
'.&mt('Submission Status').' |
<select name="submitonly" size="5"> |
</div> |
<option value="yes" '. ($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option> |
<div class="LC_grade_select_mode_selector_body"> |
<option value="queued" '. ($saveSub eq 'queued' ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option> |
<select name="submitonly" size="5"> |
<option value="graded" '. ($saveSub eq 'graded' ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option> |
<option value="yes" '. ($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option> |
<option value="incorrect" '.($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect 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> |
<option value="all" '. ($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option> |
</select> |
</select> |
</div> |
</fieldset> |
</div> |
|
<div class="LC_grade_select_mode_type_body"> |
</div> |
<div class="LC_grade_select_mode_type"> |
|
|
<br /> |
|
<div> |
|
<div> |
<label> |
<label> |
<input type="radio" name="radioChoice" value="submission" '. |
<input type="radio" name="radioChoice" value="submission" '. |
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '. |
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '. |
&mt('Select individual students to grade and view submissions.').' |
&mt('Select individual students to grade and view submissions.').' |
</label> |
</label> |
</div> |
</div> |
<div class="LC_grade_select_mode_type"> |
<div> |
<label> |
<label> |
<input type="radio" name="radioChoice" value="viewgrades" '. |
<input type="radio" name="radioChoice" value="viewgrades" '. |
($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '. |
($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '. |
&mt('Grade all selected students in a grading table.').' |
&mt('Grade all selected students in a grading table.').' |
</label> |
</label> |
</div> |
</div> |
<div class="LC_grade_select_mode_type"> |
<div> |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next->').'" /> |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
</div> |
</div> |
</div> |
</div> |
</div> |
|
</div> |
|
<div class="LC_grade_select_mode_page"> |
|
<h2> |
<h2> |
'.&mt('Grade Complete Folder for One Student').' |
'.&mt('Grade Complete Folder for One Student').' |
</h2> |
</h2> |
<div class="LC_grades_select_mode_body"> |
<div> |
<div class="LC_grade_select_mode_type_body"> |
<div> |
<div class="LC_grade_select_mode_type"> |
|
<label> |
<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"' : '').' /> '. |
&mt('The <b>complete</b> page/sequence/folder: For one student').' |
&mt('The <b>complete</b> page/sequence/folder: For one student').' |
</label> |
</label> |
</div> |
</div> |
<div class="LC_grade_select_mode_type"> |
<div> |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next->').'" /> |
<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
</div> |
</div> |
</div> |
|
</div> |
</div> |
</div> |
|
</div> |
|
</form>'; |
</form>'; |
$result .= &show_grading_menu_form($symb); |
$result .= &show_grading_menu_form($symb); |
return $result; |
return $result; |