Diff for /loncom/homework/grades.pm between versions 1.444 and 1.445

version 1.444, 2007/10/05 16:43:31 version 1.445, 2007/10/08 21:05:54
Line 6990  sub grading_menu { Line 6990  sub grading_menu {
             &mt('')});              &mt('')});
     $fields{'command'} = 'verify';      $fields{'command'} = 'verify';
     $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);      $url = &Apache::lonhtmlcommon::build_url('grades/',\%fields);
     push (@menu, { url => $url,      push (@menu, { url => "",
                    jscript => ' onChange="javascript:checkReceiptNo(this.form,\'OK\')" ',                     jscript => ' onClick="javascript:checkChoice2(document.forms.gradingMenu,\'5\',\'verify\')" ',
                    name => &mt('Verify Receipt'),                     name => &mt('Verify Receipt'),
                    short_description =>                      short_description => 
             &mt('')});              &mt('')});
Line 7012  sub grading_menu { Line 7012  sub grading_menu {
     # 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>';
     $Str .= '<form method="post" action="adm/grades" name="gradingMenu">';      $Str .= '<form method="post" action="" name="gradingMenu">';
       $Str .= '<input type="hidden" name="command" value="" />'.
       '<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";
   
     foreach my $menudata (@menu) {      foreach my $menudata (@menu) {
         $Str .='    <h3><a '.          if ($menudata->{'name'} ne &mt('Verify Receipt')) {
             $menudata->{'jscript'}.              $Str .='    <h3><a '.
             ' href="'.                  $menudata->{'jscript'}.
             $menudata->{'url'}.'" >'.                  ' href="'.
             $menudata->{'name'}."</a></h3>\n";                  $menudata->{'url'}.'" >'.
         if ($menudata->{'name'} eq &mt('Verify Receipt')) {                  $menudata->{'name'}."</a></h3>\n";
             $Str .= ' receipt: 156-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />';          } else {
               $Str .='    <h3><a '.
                   $menudata->{'jscript'}.
                   ' nohref="nohref" >'.
                   $menudata->{'name'}."</a></h3>\n";
               $Str .= ' receipt: '.&Apache::lonnet::recprefix($env{'request.course.id'}).
                       '-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />';
         }          }
         $Str .= '    '.('&nbsp;'x8).$menudata->{'short_description'}.          $Str .= '    '.('&nbsp;'x8).$menudata->{'short_description'}.
             "\n";              "\n";
Line 7047  sub grading_menu { Line 7061  sub grading_menu {
  }   }
  if (val < 7) 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) {
       if (!checkReceiptNo(formname,'notOK')) { return false;}
       formname.submit();
    }
    if (val < 7) formname.submit();
       }
   
     function checkReceiptNo(formname,nospace) {      function checkReceiptNo(formname,nospace) {
  var receiptNo = formname.receipt.value;   var receiptNo = formname.receipt.value;
Line 7777  sub handler { Line 7807  sub handler {
     $request->send_http_header;      $request->send_http_header;
     return '' if $request->header_only;      return '' if $request->header_only;
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'});
       &Apache::lonnet::logthis("receipt is ".$env{'form.receipt'});
     my $symb=&get_symb($request,1);      my $symb=&get_symb($request,1);
     my @commands=&Apache::loncommon::get_env_multiple('form.command');      my @commands=&Apache::loncommon::get_env_multiple('form.command');
     my $command=$commands[0];      my $command=$commands[0];

Removed from v.1.444  
changed lines
  Added in v.1.445


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>