--- loncom/homework/grades.pm 2010/04/18 19:29:10 1.624 +++ loncom/homework/grades.pm 2010/04/20 21:53:33 1.627 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.624 2010/04/18 19:29:10 www Exp $ +# $Id: grades.pm,v 1.627 2010/04/20 21:53:33 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2586,18 +2586,19 @@ sub processHandGrade { my $processUser = $env{'form.unamedom'.$ctr}; ($env{'form.student'},$env{'form.userdom'}) = split(/:/,$processUser); $env{'form.fullname'} = $$fullname{$processUser}; - &submission($request,$ctr,$total-1); + &submission($request,$ctr,$total-1,$symb); $ctr++; } return ''; } # Go directly to grade student - from submission or link from chart page +# FIXME: looks like reading off the button label! if ($button eq 'Grade Student') { my $processUser = $env{'form.unamedom'.$env{'form.studentNo'}}; ($env{'form.student'},$env{'form.userdom'}) = split(/:/,$processUser); $env{'form.fullname'} = $$fullname{$processUser}; - &submission($request,0,0); + &submission($request,0,0,$symb); return ''; } @@ -2684,7 +2685,7 @@ sub processHandGrade { $env{'form.student'} = $uname; $env{'form.userdom'} = $udom; $env{'form.fullname'} = $$fullname{$_}; - &submission($request,$ctr,$total); + &submission($request,$ctr,$total,$symb); $ctr++; } if ($total < 0) { @@ -3817,8 +3818,6 @@ sub csvuploadmap_header { } my $result=''; - my $checked=(($env{'form.noFirstLine'})?' checked="checked"':''); - my $ignore=&mt('Ignore First Line'); $symb = &Apache::lonenc::check_encrypt($symb); $request->print(< @@ -3830,7 +3829,6 @@ Total number of records found in file: $ Enter as many fields as you can. The system will inform you and bring you back to this page if the data selected is insufficient to run your class.
- @@ -3918,7 +3916,6 @@ sub upcsvScores_form { $upfile_select
- ENDUPFORM $result.=&Apache::loncommon::help_open_topic("Course_Convert_To_CSV", @@ -3941,7 +3938,6 @@ sub csvuploadmap { &Apache::loncommon::load_tmp_file($request); } my @records=&Apache::loncommon::upfile_record_sep(); - if ($env{'form.noFirstLine'}) { shift(@records); } &csvuploadmap_header($request,$symb,$datatoken,$#records+1); my ($i,$keyfields); if (@records) { @@ -3977,8 +3973,6 @@ sub csvuploadmap { sub csvuploadoptions { my ($request,$symb)= @_; - my $checked=(($env{'form.noFirstLine'})?'1':'0'); - my $ignore=&mt('Ignore First Line'); $request->print(<

Uploading Class Grade Options

@@ -4040,7 +4034,6 @@ sub csvuploadassign { my $error_msg = ''; &Apache::loncommon::load_tmp_file($request); my @gradedata = &Apache::loncommon::upfile_record_sep(); - if ($env{'form.noFirstLine'}) { shift(@gradedata); } my %fields=&get_fields(); $request->print('

Assigning Grades

'); my $courseid=$env{'request.course.id'}; @@ -4122,14 +4115,20 @@ sub csvuploadassign { $env{'request.course.id'}, $domain,$username); if ($result eq 'ok') { +# Successfully stored $request->print('.'); - } else { +# Remove from grading queue + &Apache::bridgetask::remove_from_queue('gradingqueue',$symb, + $env{'course.'.$env{'request.course.id'}.'.domain'}, + $env{'course.'.$env{'request.course.id'}.'.num'}, + $domain,$username); + $countdone++; + } else { $request->print("

". &mt("Failed to save data for student [_1]. Message when trying to save was: [_2]", "$username:$domain",$result)."

"); } $request->rflush(); - $countdone++; } } $request->print('
'.&Apache::lonhtmlcommon::confirm_success(&mt("Saved scores for [quant,_1,student]",$countdone),$countdone==0)); @@ -4525,7 +4524,7 @@ sub displaySubByDates { $displaySub[0].='' .' ' - .'('.&mt('Part ID: [_1]',$responseId).')' + .'('.&mt('Response ID: [_1]',$responseId).')' .'' .' '; if ($hidden) { @@ -9284,17 +9283,17 @@ sub handler { {href=>'', text=>'Store grades'}]); $request->print(&assign_clicker_grades($request,$symb)); } elsif ($command eq 'csvform' && $perm{'mgr'}) { - &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); + &startpage($request,$symb,[{href=>'', text=>'Upload Scores'}],1,1); $request->print(&upcsvScores_form($request,$symb)); } elsif ($command eq 'csvupload' && $perm{'mgr'}) { - &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); + &startpage($request,$symb,[{href=>'', text=>'Upload Scores'}],1,1); $request->print(&csvupload($request,$symb)); } elsif ($command eq 'csvuploadmap' && $perm{'mgr'} ) { - &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); + &startpage($request,$symb,[{href=>'', text=>'Upload Scores'}],1,1); $request->print(&csvuploadmap($request,$symb)); } elsif ($command eq 'csvuploadoptions' && $perm{'mgr'}) { if ($env{'form.associate'} ne 'Reverse Association') { - &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); + &startpage($request,$symb,[{href=>'', text=>'Upload Scores'}],1,1); $request->print(&csvuploadoptions($request,$symb)); } else { if ( $env{'form.upfile_associate'} ne 'reverse' ) { @@ -9302,11 +9301,11 @@ sub handler { } else { $env{'form.upfile_associate'} = 'forward'; } - &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); + &startpage($request,$symb,[{href=>'', text=>'Upload Scores'}],1,1); $request->print(&csvuploadmap($request,$symb)); } } elsif ($command eq 'csvuploadassign' && $perm{'mgr'} ) { - &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); + &startpage($request,$symb,[{href=>'', text=>'Upload Scores'}],1,1); $request->print(&csvuploadassign($request,$symb)); } elsif ($command eq 'scantron_selectphase' && $perm{'mgr'}) { &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1);