version 1.598, 2010/03/15 07:54:04
|
version 1.599, 2010/03/19 21:22:34
|
Line 8695 sub all_for_one {
|
Line 8695 sub all_for_one {
|
&submit_options($request); |
&submit_options($request); |
} |
} |
|
|
|
sub submit_options_sequence { |
|
my ($request) = @_; |
|
my ($symb)=&get_symb($request); |
|
if (!$symb) {return '';} |
|
my $probTitle = &Apache::lonnet::gettitle($symb); |
|
|
|
my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box."); |
|
$request->print(&Apache::lonhtmlcommon::scripttag(<<GRADINGMENUJS)); |
|
function checkChoice(formname,val,cmdx) { |
|
if (val <= 2) { |
|
var cmd = radioSelection(formname.radioChoice); |
|
var cmdsave = cmd; |
|
} else { |
|
cmd = cmdx; |
|
cmdsave = 'submission'; |
|
} |
|
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 checkReceiptNo(formname,nospace) { |
|
var receiptNo = formname.receipt.value; |
|
var checkOpt = false; |
|
if (nospace == "OK" && isNaN(receiptNo)) {checkOpt = true;} |
|
if (nospace == "notOK" && (isNaN(receiptNo) || receiptNo == "")) {checkOpt = true;} |
|
if (checkOpt) { |
|
alert("$receiptalert"); |
|
formname.receipt.value = ""; |
|
formname.receipt.focus(); |
|
return false; |
|
} |
|
return true; |
|
} |
|
GRADINGMENUJS |
|
&commonJSfunctions($request); |
|
# my ($table,undef,$hdgrade) = &showResourceInfo($symb,$probTitle); |
|
my $result; |
|
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'}); |
|
|
|
# Preselect sections |
|
my $selsec=""; |
|
if (ref($sections)) { |
|
foreach my $section (sort(@$sections)) { |
|
$selsec.='<option value="'.$section.'" '. |
|
($saveSec eq $section ? 'selected="selected"':'').'>'.$section.'</option>'."\n"; |
|
} |
|
} |
|
|
|
$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="probTitle" value="'.$probTitle.'" />'."\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.=' |
|
<h2> |
|
'.&mt('Grade Complete Folder for One Student').' |
|
</h2> |
|
|
|
<div class="LC_columnSection"> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Sections').' |
|
</legend> |
|
<select name="section" multiple="multiple" size="5">'."\n"; |
|
$result.= $selsec; |
|
$result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> '; |
|
$result.=' |
|
</fieldset> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Groups').' |
|
</legend> |
|
'.&Apache::lonstatistics::GroupSelect('group','multiple',5).' |
|
</fieldset> |
|
|
|
<fieldset> |
|
<legend> |
|
'.&mt('Access Status').' |
|
</legend> |
|
'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,5,undef,'mult').' |
|
</fieldset> |
|
|
|
</div> |
|
|
|
<br /> |
|
|
|
<input type="hidden" name="command" value="pickStudentPage" /> |
|
<div> |
|
<input type="submit" value="'.&mt('Next').' →" /> |
|
</div> |
|
</div> |
|
</form>'; |
|
$result .= &show_grading_menu_form($symb); |
|
return $result; |
|
} |
|
|
#--- Displays the submissions first page ------- |
#--- Displays the submissions first page ------- |
sub submit_options { |
sub submit_options { |
Line 8834 GRADINGMENUJS
|
Line 8945 GRADINGMENUJS
|
</div> |
</div> |
|
|
|
|
<h2> |
|
'.&mt('Grade Complete Folder for One Student').' |
|
</h2> |
|
<div> |
|
<div> |
|
<label> |
|
<input type="radio" name="radioChoice" value="pickStudentPage" '. |
|
($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '. |
|
&mt('The <b>complete</b> page/sequence/folder: For one student').' |
|
</label> |
|
</div> |
|
<div> |
|
<input type="button" onclick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' →" /> |
|
</div> |
|
</div> |
|
</form>'; |
</form>'; |
$result .= &show_grading_menu_form($symb); |
$result .= &show_grading_menu_form($symb); |
return $result; |
return $result; |
Line 9471 sub handler {
|
Line 9567 sub handler {
|
} elsif ($command eq 'table' && $perm{'vgr'}) { |
} elsif ($command eq 'table' && $perm{'vgr'}) { |
$request->print(&submit_options($request)); |
$request->print(&submit_options($request)); |
} elsif ($command eq 'all_for_one' && $perm{'vgr'}) { |
} elsif ($command eq 'all_for_one' && $perm{'vgr'}) { |
$request->print(&submit_options($request)); |
$request->print(&submit_options_sequence($request)); |
} elsif ($command eq 'viewgrades' && $perm{'vgr'}) { |
} elsif ($command eq 'viewgrades' && $perm{'vgr'}) { |
$request->print(&viewgrades($request)); |
$request->print(&viewgrades($request)); |
} elsif ($command eq 'handgrade' && $perm{'mgr'}) { |
} elsif ($command eq 'handgrade' && $perm{'mgr'}) { |