--- loncom/homework/grades.pm 2010/04/13 10:21:21 1.614 +++ loncom/homework/grades.pm 2010/04/13 16:12:54 1.617 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.614 2010/04/13 10:21:21 www Exp $ +# $Id: grades.pm,v 1.617 2010/04/13 16:12:54 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -808,13 +808,15 @@ sub verifyreceipt { #--- Also called directly when one clicks on the subm button # on the problem page. sub listStudents { - my ($request,$symb) = @_; + my ($request,$symb,$submitonly) = @_; my $cdom = $env{"course.$env{'request.course.id'}.domain"}; my $cnum = $env{"course.$env{'request.course.id'}.num"}; my $getsec = $env{'form.section'} eq '' ? 'all' : $env{'form.section'}; my $getgroup = $env{'form.group'} eq '' ? 'all' : $env{'form.group'}; - my $submitonly= $env{'form.submitonly'} eq '' ? 'all' : $env{'form.submitonly'}; + unless ($submitonly) { + $submitonly= $env{'form.submitonly'} eq '' ? 'all' : $env{'form.submitonly'}; + } my $viewgrade = $env{'form.showgrading'} eq 'yes' ? 'View/Grade/Regrade' : 'View'; my $result='

 ' @@ -8430,7 +8432,7 @@ sub grading_menu { icon => 'edit-find-replace.png', linktitle => 'Grade current resource for all students.' }, - { linktext => 'Grade complete page/sequence/folder for one student', + { linktext => 'Grade page/folder for one student', url => $url1d, permission => 'F', icon => 'edit-find-replace.png', @@ -8457,7 +8459,7 @@ sub grading_menu { icon => 'stat.png', linktitle => 'Grade scantron exams, upload/download scantron data files, and review previously graded scantron exams.' }, - { linktext => 'Verify Receipt No.', + { linktext => 'Verify Receipt Number', url => $url5, permission => 'F', icon => 'edit-find-replace.png', @@ -8498,7 +8500,7 @@ sub submit_options_sequence { $result.='

- '.&mt('Grade complete page/sequence/folder for one student').' + '.&mt('Grade page/folder for one student').'

'. &selectfield(0). ' @@ -9194,13 +9196,20 @@ sub handler { &startpage($request,$symb,[{href=>"", text=>"Student Submissions"}]); ($env{'form.student'} eq '' ? &listStudents($request,$symb) : &submission($request,0,0,$symb)); } elsif ($command eq 'pickStudentPage' && $perm{'vgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>&href_symb_cmd($symb,'all_for_one'),text=>'Grade page/folder for one student'}, + {href=>'',text=>'Select student'}],1,1); &pickStudentPage($request,$symb); } elsif ($command eq 'displayPage' && $perm{'vgr'}) { - &startpage($request,$symb); + &startpage($request,$symb, + [{href=>&href_symb_cmd($symb,'all_for_one'),text=>'Grade page/folder for one student'}, + {href=>'',text=>'Select student'}, + {href=>'',text=>'Grade student'}],1,1); &displayPage($request,$symb); } elsif ($command eq 'gradeByPage' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>&href_symb_cmd($symb,'all_for_one'),text=>'Grade page/folder for one student'}, + {href=>'',text=>'Select student'}, + {href=>'',text=>'Grade student'}, + {href=>'',text=>'Store grades'}],1,1); &updateGradeByPage($request,$symb); } elsif ($command eq 'processGroup' && $perm{'vgr'}) { &startpage($request,$symb); @@ -9209,16 +9218,16 @@ sub handler { &startpage($request,$symb); $request->print(&grading_menu($request,$symb)); } elsif ($command eq 'individual' && $perm{'vgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'',text=>'Select individual students to grade'}]); $request->print(&submit_options($request,$symb)); } elsif ($command eq 'ungraded' && $perm{'vgr'}) { - &startpage($request,$symb); - $request->print(&submit_options($request,$symb)); + &startpage($request,$symb,[{href=>'',text=>'Grade ungraded submissions'}]); + $request->print(&listStudents($request,$symb,'graded')); } elsif ($command eq 'table' && $perm{'vgr'}) { &startpage($request,$symb,[{href=>"", text=>"Grading table"}]); $request->print(&submit_options_table($request,$symb)); } elsif ($command eq 'all_for_one' && $perm{'vgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'',text=>'Grade page/folder for one student'}],1,1); $request->print(&submit_options_sequence($request,$symb)); } elsif ($command eq 'viewgrades' && $perm{'vgr'}) { &startpage($request,$symb,[{href=>&href_symb_cmd($symb,"table"), text=>"Grading table"},{href=>'', text=>"Modify grades"}]); @@ -9233,32 +9242,36 @@ sub handler { {href=>'', text=>"Store grades"}]); $request->print(&editgrades($request,$symb)); } elsif ($command eq 'initialverifyreceipt' && $perm{'vgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'',text=>'Verify Receipt Number'}]); $request->print(&initialverifyreceipt($request,$symb)); } elsif ($command eq 'verify' && $perm{'vgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>&href_symb_cmd($symb,"initialverifyreceipt"),text=>'Verify Receipt Number'}, + {href=>'',text=>'Verification Result'}]); $request->print(&verifyreceipt($request,$symb)); } elsif ($command eq 'processclicker' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Process clicker'}]); $request->print(&process_clicker($request,$symb)); } elsif ($command eq 'processclickerfile' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>&href_symb_cmd($symb,'processclicker'), text=>'Process clicker'}, + {href=>'', text=>'Process clicker file'}]); $request->print(&process_clicker_file($request,$symb)); } elsif ($command eq 'assignclickergrades' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>&href_symb_cmd($symb,'processclicker'), text=>'Process clicker'}, + {href=>'', text=>'Process clicker file'}, + {href=>'', text=>'Store grades'}]); $request->print(&assign_clicker_grades($request,$symb)); } elsif ($command eq 'csvform' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&upcsvScores_form($request,$symb)); } elsif ($command eq 'csvupload' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&csvupload($request,$symb)); } elsif ($command eq 'csvuploadmap' && $perm{'mgr'} ) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&csvuploadmap($request,$symb)); } elsif ($command eq 'csvuploadoptions' && $perm{'mgr'}) { if ($env{'form.associate'} ne 'Reverse Association') { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&csvuploadoptions($request,$symb)); } else { if ( $env{'form.upfile_associate'} ne 'reverse' ) { @@ -9266,40 +9279,40 @@ sub handler { } else { $env{'form.upfile_associate'} = 'forward'; } - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&csvuploadmap($request,$symb)); } } elsif ($command eq 'csvuploadassign' && $perm{'mgr'} ) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&csvuploadassign($request,$symb)); } elsif ($command eq 'scantron_selectphase' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&scantron_selectphase($request,undef,$symb)); } elsif ($command eq 'scantron_warning' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&scantron_do_warning($request,$symb)); } elsif ($command eq 'scantron_validate' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&scantron_validate_file($request,$symb)); } elsif ($command eq 'scantron_process' && $perm{'mgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&scantron_process_students($request,$symb)); } elsif ($command eq 'scantronupload' && (&Apache::lonnet::allowed('usc',$env{'request.role.domain'})|| &Apache::lonnet::allowed('usc',$env{'request.course.id'}))) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&scantron_upload_scantron_data($request,$symb)); } elsif ($command eq 'scantronupload_save' && (&Apache::lonnet::allowed('usc',$env{'request.role.domain'})|| &Apache::lonnet::allowed('usc',$env{'request.course.id'}))) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&scantron_upload_scantron_data_save($request,$symb)); } elsif ($command eq 'scantron_download' && &Apache::lonnet::allowed('usc',$env{'request.course.id'})) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&scantron_download_scantron_data($request,$symb)); } elsif ($command eq 'checksubmissions' && $perm{'vgr'}) { - &startpage($request,$symb); + &startpage($request,$symb,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&checkscantron_results($request,$symb)); } elsif ($command) { &startpage($request,$symb);