--- loncom/homework/grades.pm 2007/10/05 16:43:31 1.444 +++ 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.444 2007/10/05 16:43:31 banghart Exp $ +# $Id: grades.pm,v 1.446 2007/10/08 22:29:59 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6990,8 +6990,8 @@ sub grading_menu { &mt('')}); $fields{'command'} = 'verify'; $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields); - push (@menu, { url => $url, - jscript => ' onChange="javascript:checkReceiptNo(this.form,\'OK\')" ', + push (@menu, { url => "", + jscript => ' onClick="javascript:checkChoice2(document.forms.gradingMenu,\'5\',\'verify\')" ', name => &mt('Verify Receipt'), short_description => &mt('')}); @@ -7012,15 +7012,30 @@ sub grading_menu { # Create the menu my $Str; # $Str .= '

'.&mt('Please select a grading task').'

'; - $Str .= '
'; + $Str .= ''; + $Str .= ''. + ''."\n". + ''."\n". + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + foreach my $menudata (@menu) { - $Str .='

{'jscript'}. - ' href="'. - $menudata->{'url'}.'" >'. - $menudata->{'name'}."

\n"; - if ($menudata->{'name'} eq &mt('Verify Receipt')) { - $Str .= ' receipt: 156-'; + if ($menudata->{'name'} ne &mt('Verify Receipt')) { + $Str .='

{'jscript'}. + ' href="'. + $menudata->{'url'}.'" >'. + $menudata->{'name'}."

\n"; + } else { + $Str .='

{'jscript'}. + ' href="javascript:checkChoice2(document.forms.gradingMenu,\'5\',\'verify\')" >'. + $menudata->{'name'}."

\n"; + $Str .= (' 'x8). + ' receipt: '.&Apache::lonnet::recprefix($env{'request.course.id'}). + '-'; } $Str .= ' '.(' 'x8).$menudata->{'short_description'}. "\n"; @@ -7047,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; @@ -7168,15 +7199,15 @@ GRADINGMENUJS ''."\n". ''."\n"; - $result.='
'."\n". - '
'."\n". + $result.=''; + $result.= '
'."\n". + ''."\n". '
'."\n". ' Select a Grading/Viewing Option
'."\n"; $result.=''; $result.=''."\n"; $result.=''; -# $result.=''; + $result.=''; $result.=''."\n"; $result.=''; $result.='
'.&mt('Sections').'Groups'.&mt('Groups').''.&mt('Access Status').'
'."\n". @@ -7188,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'); @@ -7224,38 +7255,38 @@ GRADINGMENUJS ''. '
'."\n"; - $result.='
'; - - $result.=''; - $result.=''."\n"; - - $result.=''."\n"; - - $result.=''."\n"; + $result.=''; #'."\n"; - } - $result.=''."\n"; - $result.=''."\n"; - - $result.='
'. - ''. - ' '.&mt('scores from file').'
'. - ''. - ' '.&mt('clicker file').'
'. - ' scantron forms
'; - if ((&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) && ($symb)) { - $result.='
'. - ''. - ' '.&mt('receipt').': '. - &Apache::lonnet::recprefix($env{'request.course.id'}). - '-'. - '
'. - ' access times.
'. - ' saved CODEs.
'."\n". - '
'."\n". +# $result.=''; +# $result.=''."\n"; +# +# $result.=''."\n"; +# +# $result.=''."\n"; +# +# if ((&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) && ($symb)) { +# $result.=''."\n"; +# } +# $result.=''."\n"; +# $result.=''."\n"; +# +# $result.='
'. +# ''. +# ' '.&mt('scores from file').'
'. +# ''. +# ' '.&mt('clicker file').'
'. +# ' scantron forms
'. +# ''. +# ' '.&mt('receipt').': '. +# &Apache::lonnet::recprefix($env{'request.course.id'}). +# '-'. +# '
'. +# ' access times.
'. +# ' saved CODEs.
'."\n".'
'."\n". '
'."\n"; return $result; } @@ -7767,7 +7798,6 @@ ENDHEADER sub handler { my $request=$_[0]; - &reset_caches(); if ($env{'browser.mathml'}) { &Apache::loncommon::content_type($request,'text/xml');