--- loncom/homework/grades.pm 2007/10/04 02:00:29 1.443
+++ loncom/homework/grades.pm 2007/10/08 22:29:59 1.446
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.443 2007/10/04 02:00:29 banghart Exp $
+# $Id: grades.pm,v 1.446 2007/10/08 22:29:59 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -6954,7 +6954,9 @@ sub grading_menu {
#
# Define menu data
-
+ $env{'form.probTitle'} = &Apache::lonnet::gettitle($symb);
+ my ($table) = &showResourceInfo($symb,$env{'form.probTitle'});
+ $request->print($table);
my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb),
'handgrade'=>$hdgrade,
'probTitle'=>$probTitle,
@@ -6988,7 +6990,8 @@ sub grading_menu {
&mt('')});
$fields{'command'} = 'verify';
$url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
- push (@menu, { url => $url,
+ push (@menu, { url => "",
+ jscript => ' onClick="javascript:checkChoice2(document.forms.gradingMenu,\'5\',\'verify\')" ',
name => &mt('Verify Receipt'),
short_description =>
&mt('')});
@@ -7008,16 +7011,37 @@ sub grading_menu {
#
# Create the menu
my $Str;
- $Str .= '
'.&mt('Please select a grading task').'
';
+ # $Str .= ''.&mt('Please select a grading task').'
';
+ $Str .= '\n";
$request->print(<
function checkChoice(formname,val,cmdx) {
@@ -7038,6 +7062,22 @@ sub grading_menu {
}
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) {
+ if (!checkReceiptNo(formname,'notOK')) { return false;}
+ formname.submit();
+ }
+ if (val < 7) formname.submit();
+ }
function checkReceiptNo(formname,nospace) {
var receiptNo = formname.receipt.value;
@@ -7159,15 +7199,15 @@ GRADINGMENUJS
''."\n".
''."\n";
- $result.=''."\n".
- ''."\n".
+ $result.=''."\n".
+ ''."\n".
' Select a Grading/Viewing Option | '."\n".
''."\n";
$result.='';
$result.=''."\n";
$result.=''.&mt('Sections').' | ';
-# $result.='Groups | ';
+ $result.=''.&mt('Groups').' | ';
$result.=''.&mt('Access Status').' | '."\n";
$result.=' ';
$result.=''."\n".
@@ -7179,8 +7219,8 @@ GRADINGMENUJS
}
}
$result.= ' ';
-# $result.= ' | '."\n";
-# $result.='Put group select here'."\n";
+ $result.= ' | '."\n";
+ $result.= &Apache::lonstatistics::GroupSelect('group','multiple',3);
$result.=' | '."\n";
$result.=&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,3,undef,'mult');
@@ -7215,38 +7255,38 @@ GRADINGMENUJS
''.
' | '."\n";
- $result.=' | ';
+ $result.=' | '; #';
- $result.=''."\n".
- ' | '."\n".
+# $result.=''."\n".' | ';
+ $result.= ' '."\n".
' | '."\n";
return $result;
}
@@ -7758,7 +7798,6 @@ ENDHEADER
sub handler {
my $request=$_[0];
-
&reset_caches();
if ($env{'browser.mathml'}) {
&Apache::loncommon::content_type($request,'text/xml');
|