version 1.454, 2007/10/11 22:34:33
|
version 1.458, 2007/10/12 22:36:56
|
Line 35 use Apache::loncommon;
|
Line 35 use Apache::loncommon;
|
use Apache::lonhtmlcommon; |
use Apache::lonhtmlcommon; |
use Apache::lonnavmaps; |
use Apache::lonnavmaps; |
use Apache::lonhomework; |
use Apache::lonhomework; |
|
use Apache::lonpickcode; |
use Apache::loncoursedata; |
use Apache::loncoursedata; |
use Apache::lonmsg(); |
use Apache::lonmsg(); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
Line 4893 SCANTRONFORM
|
Line 4894 SCANTRONFORM
|
</tr> |
</tr> |
SCANTRONFORM |
SCANTRONFORM |
|
|
$r->print(<<SCANTRONFORM); |
$r->print('<tr><td bgcolor="#777777">'); |
</table> |
&Apache::lonpickcode::code_list($r,2); |
$grading_menu_button |
$r->print('</td></tr></table>'); |
SCANTRONFORM |
$r->print($grading_menu_button); |
|
|
return |
return |
} |
} |
|
|
Line 7226 sub grading_menu {
|
Line 7226 sub grading_menu {
|
name => &mt('Grade/Manage Scantron Forms'), |
name => &mt('Grade/Manage Scantron Forms'), |
short_description => |
short_description => |
&mt('')}); |
&mt('')}); |
$fields{'command'} = 'codelist'; |
|
$url = &Apache::lonhtmlcommon::build_url('/adm/pickcode',\%fields); |
|
push (@menu, { url => $url, |
|
name => &mt('View Saved CODEs'), |
|
short_description => |
|
&mt('')}); |
|
$fields{'command'} = 'verify'; |
$fields{'command'} = 'verify'; |
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); |
push (@menu, { url => "", |
push (@menu, { url => "", |
jscript => ' onClick="javascript:checkChoice2(document.forms.gradingMenu,\'5\',\'verify\')" ', |
|
name => &mt('Verify Receipt'), |
name => &mt('Verify Receipt'), |
short_description => |
short_description => |
&mt('')}); |
&mt('')}); |
|
|
# |
# |
# Create the menu |
# Create the menu |
my $Str; |
my $Str; |
Line 7261 sub grading_menu {
|
Line 7253 sub grading_menu {
|
$menudata->{'url'}.'" >'. |
$menudata->{'url'}.'" >'. |
$menudata->{'name'}."</a></h3>\n"; |
$menudata->{'name'}."</a></h3>\n"; |
} else { |
} else { |
$Str .=' <h3><a '. |
$Str .=' <h3><input type="button" value="Verify Receipt" '. |
$menudata->{'jscript'}. |
$menudata->{'jscript'}. |
' href="javascript:checkChoice2(document.forms.gradingMenu,\'5\',\'verify\')" >'. |
' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '. |
$menudata->{'name'}."</a></h3>\n"; |
' /></h3>'; |
$Str .= (' 'x8). |
$Str .= (' 'x8). |
' receipt: '.&Apache::lonnet::recprefix($env{'request.course.id'}). |
' 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\')" />'; |
Line 7285 sub grading_menu {
|
Line 7277 sub grading_menu {
|
cmdsave = 'submission'; |
cmdsave = 'submission'; |
} |
} |
formname.command.value = cmd; |
formname.command.value = cmd; |
formname.saveState.value = "saveCmd="+cmdsave+":saveSec="+pullDownSelection(formname.section)+ |
|
":saveSub="+pullDownSelection(formname.submitonly)+":saveStatus="+pullDownSelection(formname.Status); |
|
if (val < 5) formname.submit(); |
|
if (val == 5) { |
|
if (!checkReceiptNo(formname,'notOK')) { return false;} |
|
formname.submit(); |
|
} |
|
if (val < 7) formname.submit(); |
|
} |
|
function checkChoice2(formname,val,cmdx) { |
|
if (val <= 2) { |
|
var cmd = radioSelection(formname.radioChoice); |
|
var cmdsave = cmd; |
|
} else { |
|
cmd = cmdx; |
|
cmdsave = 'submission'; |
|
} |
|
formname.command.value = cmd; |
|
if (val < 5) formname.submit(); |
if (val < 5) formname.submit(); |
if (val == 5) { |
if (val == 5) { |
if (!checkReceiptNo(formname,'notOK')) { return false;} |
if (!checkReceiptNo(formname,'notOK')) { |
formname.submit(); |
return false; |
|
} else { |
|
formname.submit(); |
|
} |
} |
} |
if (val < 7) formname.submit(); |
|
} |
} |
|
|
function checkReceiptNo(formname,nospace) { |
function checkReceiptNo(formname,nospace) { |
Line 7327 sub grading_menu {
|
Line 7303 sub grading_menu {
|
</script> |
</script> |
GRADINGMENUJS |
GRADINGMENUJS |
&commonJSfunctions($request); |
&commonJSfunctions($request); |
my $result='<h3> <span class="LC_info">Manual Grading/View Submission</span></h3>'; |
|
$result.=$table; |
|
my (undef,$sections) = &getclasslist('all','0'); |
|
my $savedState = &savedState(); |
|
my $saveCmd = ($$savedState{'saveCmd'} eq '' ? 'submission' : $$savedState{'saveCmd'}); |
|
my $saveSec = ($$savedState{'saveSec'} eq '' ? 'all' : $$savedState{'saveSec'}); |
|
my $saveSub = ($$savedState{'saveSub'} eq '' ? 'all' : $$savedState{'saveSub'}); |
|
my $saveStatus = ($$savedState{'saveStatus'} eq '' ? 'Active' : $$savedState{'saveStatus'}); |
|
|
|
$result.='<form action="/adm/grades" method="post" name="gradingMenu">'."\n". |
|
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n". |
|
'<input type="hidden" name="handgrade" value="'.$hdgrade.'" />'."\n". |
|
'<input type="hidden" name="probTitle" value="'.$probTitle.'" ue="" />'."\n". |
|
'<input type="hidden" name="saveState" value="" />'."\n". |
|
'<input type="hidden" name="gradingMenu" value="1" />'."\n". |
|
'<input type="hidden" name="showgrading" value="yes" />'."\n"; |
|
|
|
$result.='<table width="100%" border="0"><tr><td bgcolor=#777777>'."\n". |
|
'<table width="100%" border="0"><tr bgcolor="#e6ffff"><td colspan="2">'."\n". |
|
' <b>Select a Grading/Viewing Option</b></td></tr>'."\n". |
|
'<tr bgcolor="#ffffe6" valign="top"><td>'."\n"; |
|
|
|
$result.='<table width="100%" border="0">'; |
|
$result.='<tr bgcolor="#ffffe6" valign="top">'."\n"; |
|
$result.='<td><b>'.&mt('Sections').'</b></td>'; |
|
# $result.='<td>Groups</td>'; |
|
$result.='<td><b>'.&mt('Access Status').'</td>'."\n"; |
|
$result.='</tr>'; |
|
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
|
' <select name="section" multiple="multiple" size="3">'."\n"; |
|
if (ref($sections)) { |
|
foreach (sort (@$sections)) { |
|
$result.='<option value="'.$_.'" '. |
|
($saveSec eq $_ ? 'selected="selected"':'').'>'.$_.'</option>'."\n"; |
|
} |
|
} |
|
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> '; |
|
return $Str; |
return $Str; |
} |
} |
|
|
Line 7441 GRADINGMENUJS
|
Line 7380 GRADINGMENUJS
|
$result.='<td><b>'.&mt('Sections').'</b></td>'; |
$result.='<td><b>'.&mt('Sections').'</b></td>'; |
$result.='<td><b>'.&mt('Groups').'</b></td>'; |
$result.='<td><b>'.&mt('Groups').'</b></td>'; |
$result.='<td><b>'.&mt('Access Status').'</td>'."\n"; |
$result.='<td><b>'.&mt('Access Status').'</td>'."\n"; |
|
$result.='<td><b>'.&mt('Submission Status').'</td>'."\n"; |
$result.='</tr>'; |
$result.='</tr>'; |
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
$result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n". |
' <select name="section" multiple="multiple" size="3">'."\n"; |
' <select name="section" multiple="multiple" size="3">'."\n"; |
Line 7456 GRADINGMENUJS
|
Line 7396 GRADINGMENUJS
|
$result.='</td><td>'."\n"; |
$result.='</td><td>'."\n"; |
$result.=&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,3,undef,'mult'); |
$result.=&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,3,undef,'mult'); |
|
|
$result.='</td></tr>'; |
$result.='</td>'; |
|
$result.='<td><select name="submitonly" size="3">'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="3"><label>'. |
|
'<input type="radio" name="radioChoice" value="submission" '. |
|
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.'<b>'.&mt('Current Resource').':</b> '.&mt('For one or more students'). |
|
'</label> <select name="submitonly">'. |
|
'<option value="yes" '. |
'<option value="yes" '. |
($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>'. |
($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>'. |
'<option value="queued" '. |
'<option value="queued" '. |
Line 7471 GRADINGMENUJS
|
Line 7407 GRADINGMENUJS
|
'<option value="incorrect" '. |
'<option value="incorrect" '. |
($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>'. |
($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>'. |
'<option value="all" '. |
'<option value="all" '. |
($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option></select></td></tr>'."\n"; |
($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option></select></td></tr>'; |
|
|
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'. |
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="3"><label>'. |
|
'<input type="radio" name="radioChoice" value="submission" '. |
|
($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.'<b>'.&mt('Current Resource').':</b> '.&mt('For one or more students'). |
|
'</label> </td></tr>'."\n"; |
|
|
|
$result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="3">'. |
'<label><input type="radio" name="radioChoice" value="viewgrades" '. |
'<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"; |
'<b>Current Resource:</b> For all students in selected section or course</label></td></tr>'."\n"; |
|
|
$result.='<tr bgcolor="#ffffe6" valign="top"><td colspan="2">'. |
$result.='<tr bgcolor="#ffffe6"><td colspan="3"><br />'. |
'<label><input type="radio" name="radioChoice" value="pickStudentPage" '. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="Next->" />'. |
|
'</td></tr>'."\n"; |
|
|
|
|
|
$result.='<tr bgcolor="#ffffe6" valign="top"><td colspan="3">'. |
|
'<br /><label><input type="radio" name="radioChoice" value="pickStudentPage" '. |
($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '. |
($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '. |
'The <b>complete</b> set/page/sequence: For one student</label></td></tr>'."\n"; |
'The <b>complete</b> set/page/sequence/folder: For one student</label></td></tr>'."\n"; |
|
|
$result.='<tr bgcolor="#ffffe6"><td colspan="2"><br />'. |
$result.='<tr bgcolor="#ffffe6"><td colspan="3"><br />'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="Next->" />'. |
'<input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="Next->" />'. |
'</td></tr></table>'."\n"; |
'</td></tr></table>'."\n"; |
|
|