--- loncom/homework/grades.pm 2010/04/12 01:34:40 1.610 +++ loncom/homework/grades.pm 2010/04/16 18:29:33 1.620 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.610 2010/04/12 01:34:40 www Exp $ +# $Id: grades.pm,v 1.620 2010/04/16 18:29:33 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -617,7 +617,6 @@ sub jscriptNform { "\n"); $jscript.= '
'."\n". ''."\n". - ''."\n". ''."\n". ''."\n". ''."\n". @@ -801,7 +800,7 @@ sub verifyreceipt { $contents. &Apache::loncommon::end_data_table()."\n"; } - return $string.&show_grading_menu_form($symb); + return $string; } #--- This is called by a number of programs. @@ -809,17 +808,18 @@ 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'}; - my $viewgrade = $env{'form.showgrading'} eq 'yes' ? 'View/Grade/Regrade' : 'View'; + unless ($submitonly) { + $submitonly= $env{'form.submitonly'} eq '' ? 'all' : $env{'form.submitonly'}; + } my $result='

 ' - .&mt("$viewgrade Submissions for a Student or a Group of Students") + .&mt("View/Grade/Regrade Submissions for a Student or a Group of Students") .'

'; my ($partlist,$handgrade,$responseType) = &response_type($symb @@ -919,12 +919,10 @@ LISTJAVASCRIPT &build_section_inputs(). ''."\n". '
'."\n". - '
'."\n". - ''."\n". ''."\n". ''."\n"; - if (exists($env{'form.gradingMenu'}) && exists($env{'form.Status'})) { + if (exists($env{'form.Status'})) { $gradeTable .= ''."\n"; } else { $gradeTable .= &Apache::lonhtmlcommon::row_title(&mt('Student Status')) @@ -939,7 +937,7 @@ LISTJAVASCRIPT .&Apache::lonhtmlcommon::end_pick_box(); $gradeTable .= '

' - .&mt('To '.lc($viewgrade)." a submission or a group of submissions, click on the check box(es) next to the student's name(s). Then click on the Next button.")."\n" + .&mt("To view/grade/regrade a submission or a group of submissions, click on the check box(es) next to the student's name(s). Then click on the Next button.")."\n" .'' .'

'; @@ -956,9 +954,7 @@ LISTJAVASCRIPT while ($loop < 2) { $gradeTable.=''.&mt('No.').''.&mt('Select').''. ''.&nameUserString('header').' '.&mt('Section/Group').''; - if ($env{'form.showgrading'} eq 'yes' - && $submitonly ne 'queued' - && $submitonly ne 'all') { + if (($submitonly ne 'queued') && ($submitonly ne 'all')) { foreach my $part (sort(@$partlist)) { my $display_part= &get_display_part((split(/_/,$part))[0],$symb); @@ -994,9 +990,7 @@ LISTJAVASCRIPT $status{'gradingqueue'} = $queue_status{'gradingqueue'}; } - if ($env{'form.showgrading'} eq 'yes' - && $submitonly ne 'queued' - && $submitonly ne 'all') { + if (($submitonly ne 'queued') && ($submitonly ne 'all')) { (%status) =&student_gradeStatus($symb,$udom,$uname,$partlist); my $submitted = 0; my $graded = 0; @@ -1037,7 +1031,7 @@ LISTJAVASCRIPT &nameUserString(undef,$$fullname{$student},$uname,$udom). ' '.$section.($group ne '' ?'/'.$group:'').''."\n"; - if ($env{'form.showgrading'} eq 'yes' && $submitonly ne 'all') { + if ($submitonly ne 'all') { foreach (sort(keys(%status))) { next if ($_ =~ /^resource.*?submitted_by$/); $gradeTable.=' '.&mt($status{$_}).' '."\n"; @@ -1051,9 +1045,7 @@ LISTJAVASCRIPT } if ($ctr%2 ==1) { $gradeTable.='   '; - if ($env{'form.showgrading'} eq 'yes' - && $submitonly ne 'queued' - && $submitonly ne 'all') { + if (($submitonly ne 'queued') && ($submitonly ne 'all')) { foreach (@$partlist) { $gradeTable.=' '; } @@ -1084,7 +1076,6 @@ LISTJAVASCRIPT } elsif ($ctr == 1) { $gradeTable =~ s/type="checkbox"/type="checkbox" checked="checked"/; } - $gradeTable.=&show_grading_menu_form($symb); $request->print($gradeTable); return ''; } @@ -1138,7 +1129,7 @@ sub check_buttons { # Displays the submissions for one student or a group of students sub processGroup { - my ($request) = shift; + my ($request,$symb) = @_; my $ctr = 0; my @stuchecked = &Apache::loncommon::get_env_multiple('form.stuinfo'); my $total = scalar(@stuchecked)-1; @@ -1148,7 +1139,7 @@ sub processGroup { $env{'form.student'} = $uname; $env{'form.userdom'} = $udom; $env{'form.fullname'} = $fullname; - &submission($request,$ctr,$total); + &submission($request,$ctr,$total,$symb); $ctr++; } return ''; @@ -1286,7 +1277,6 @@ sub sub_page_js { } if (val == "Grade Student") { - formname.showgrading.value = "yes"; if (formname.Status.value == "") { formname.Status.value = "Active"; } @@ -1898,7 +1888,6 @@ sub submission { $request->print('Unable to view requested student.('. $uname.':'.$udom.' in section '.$usec.' in course id '. $env{'request.course.id'}.')'); - $request->print(&show_grading_menu_form($symb)); return; } @@ -1956,14 +1945,12 @@ sub submission { my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status')); $request->print(''."\n". ''."\n". - ''."\n". ''."\n". ''."\n". ''."\n". ''."\n". ''."\n". ''."\n". - ''."\n". ''."\n". ''."\n". ''."\n". @@ -1997,7 +1984,7 @@ sub submission { } $request->print($prnmsg); - if ($env{'form.handgrade'} eq 'yes' && $env{'form.showgrading'} eq 'yes') { + if ($env{'form.handgrade'} eq 'yes') { # # Print out the keyword options line # @@ -2209,9 +2196,7 @@ KEYWORDS } $request->print($lastsubonly); } elsif ($env{'form.lastSub'} eq 'datesub') { -# my (undef,$responseType,undef,$parts) = &showResourceInfo($symb); - my ($parts,$handgrade,$responseType) = &response_type($symb); - + my ($parts,$handgrade,$responseType) = &response_type($symb); $request->print(&displaySubByDates($symb,\%record,$parts,$responseType,$checkIcon,$uname,$udom)); } elsif ($env{'form.lastSub'} =~ /^(last|all)$/) { $request->print(&Apache::loncommon::get_previous_attempt($symb,$uname,$udom, @@ -2223,15 +2208,12 @@ KEYWORDS $request->print(''."\n"); # return if view submission with no grading option - if ($env{'form.showgrading'} eq '' || (!&canmodify($usec))) { +# FIXME: the logic seems off here. Why show the grade button if you cannot grade? + if (!&canmodify($usec)) { my $toGrade.='  '."\n" if (&canmodify($usec)); $toGrade.=''."\n"; - if (($env{'form.command'} eq 'submission') || - ($env{'form.command'} eq 'processGroup' && $counter == $total)) { - $toGrade.='
'.&show_grading_menu_form($symb); - } $request->print($toGrade); return; } else { @@ -2331,7 +2313,6 @@ KEYWORDS $endform.=""; $endform.=''; - $endform.=&show_grading_menu_form($symb); $request->print($endform); } return ''; @@ -2704,7 +2685,6 @@ sub processHandGrade { my $the_end = '

'.&mt('LON-CAPA User Message').'


'."\n"; $the_end.=&mt('Message: No more students for this section or class.').'

'."\n"; $the_end.=&mt('Click on the button below to return to the grading menu.').'

'."\n"; - $the_end.=&show_grading_menu_form($symb); $request->print($the_end); } return ''; @@ -3289,7 +3269,6 @@ sub viewgrades { ''."\n". ''."\n". &build_section_inputs(). - ''."\n". ''."\n". my ($common_header,$specific_header); @@ -3436,7 +3415,6 @@ sub viewgrades { $section_display, $stu_status). ''; } - $result.=&show_grading_menu_form($symb); return $result; } @@ -3719,8 +3697,7 @@ sub editgrades { &Apache::loncommon::end_data_table_row(); } } - $result .= &Apache::loncommon::end_data_table(). - &show_grading_menu_form($symb); + $result .= &Apache::loncommon::end_data_table(); my $msg = '

'. &mt('Number of records updated = [_1] for [quant,_2,student].', $rec_update,$count).'
'. @@ -3856,7 +3833,6 @@ to this page if the data selected is ins -


ENDPICK @@ -3934,7 +3910,6 @@ sub upcsvScores_form {
- $upfile_select
@@ -3944,7 +3919,6 @@ ENDUPFORM &mt("How do I create a CSV file from a spreadsheet")) .''."\n"; $result.='

'."\n"; - $result.=&show_grading_menu_form($symb); return $result; } @@ -3991,7 +3965,6 @@ sub csvuploadmap { } } &csvuploadmap_footer($request,$i,$keyfields); - $request->print(&show_grading_menu_form($symb)); return ''; } @@ -4035,7 +4008,6 @@ ENDPICK # FIXME do a check for any invalid user ids?... $request->print('

'."\n"); - $request->print(&show_grading_menu_form($symb)); return ''; } @@ -4164,7 +4136,6 @@ sub csvuploadassign { $request->print(join(', ',@notallowed)); } $request->print("
\n"); - $request->print(&show_grading_menu_form($symb)); return $error_msg; } #------------- end of section for handling csv file upload --------- @@ -4248,8 +4219,7 @@ LISTJAVASCRIPT my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status')); $result.=''."\n". ''."\n". - ''."\n". - ''."
\n"; + ''."
\n"; $result.=' '.&mt('Use CODE').':
'."\n"; @@ -4295,7 +4265,6 @@ LISTJAVASCRIPT $studentTable.=''."\n"; - $studentTable.=&show_grading_menu_form($symb); $request->print($studentTable); return ''; @@ -4350,7 +4319,6 @@ sub displayPage { if (!&canview($usec)) { $request->print(''.&mt('Unable to view requested student. ([_1])',$env{'form.student'}).''); - $request->print(&show_grading_menu_form($symb)); return; } my $result='

 '.$env{'form.title'}.'

'; @@ -4368,14 +4336,12 @@ sub displayPage { my $navmap = Apache::lonnavmaps::navmap->new(); unless (ref($navmap)) { $request->print(&navmap_errormsg()); - $request->print(&show_grading_menu_form($symb)); return; } my ($mapUrl, $id, $resUrl)=&Apache::lonnet::decode_symb($env{'form.page'}); my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps if (!$map) { $request->print(''.&mt('Unable to view requested sequence. ([_1])',$resUrl).''); - $request->print(&show_grading_menu_form($symb)); return; } my $iterator = $navmap->getIterator($map->map_start(), @@ -4388,8 +4354,7 @@ sub displayPage { ''."\n". ''."\n". ''."\n". - ''."\n". - ''."\n"; + ''."\n"; if (defined($env{'form.CODE'})) { $studentTable.= @@ -4491,7 +4456,6 @@ sub displayPage { ''. ''."\n"; - $studentTable.=&show_grading_menu_form($symb); $request->print($studentTable); return ''; @@ -4629,7 +4593,6 @@ sub updateGradeByPage { my $usec=$classlist->{$env{'form.student'}}[5]; if (!&canmodify($usec)) { $request->print(''.&mt('Unable to modify requested student ([_1])',$env{'form.student'}).''); - $request->print(&show_grading_menu_form($env{'form.symb'})); return; } my $result='

 '.$env{'form.title'}.'

'; @@ -4648,7 +4611,6 @@ sub updateGradeByPage { my $map = $navmap->getResourceByUrl($resUrl); # add to navmaps if (!$map) { $request->print(''.&mt('Unable to grade requested sequence ([_1]).',$resUrl).''); - $request->print(&show_grading_menu_form($symb)); return; } my $iterator = $navmap->getIterator($map->map_start(), @@ -4774,7 +4736,6 @@ sub updateGradeByPage { } $studentTable.=&Apache::loncommon::end_data_table(); - $studentTable.=&show_grading_menu_form($env{'form.symb'}); my $grademsg=($changeflag == 0 ? &mt('No score was changed or updated.') : &mt('The scores were changed for [quant,_1,problem].', $changeflag)); @@ -4852,8 +4813,7 @@ the homework problem. sub defaultFormData { my ($symb)=@_; - return ''."\n". - ''; + return ''; } @@ -5148,7 +5108,6 @@ sub scantron_selectphase { return; } my $default_form_data=&defaultFormData($symb); - my $grading_menu_button=&show_grading_menu_form($symb); my $file_selector=&scantron_uploads($file2grade); my $format_selector=&scantron_scantab(); my $CODE_selector=&scantron_CODElist(); @@ -5310,7 +5269,6 @@ sub scantron_selectphase { &Apache::loncommon::end_data_table_row()."\n". &Apache::loncommon::end_data_table()."\n". '
'); - $r->print($grading_menu_button); return; } @@ -6235,7 +6193,7 @@ sub scantron_do_warning { '); } - $r->print("
".&show_grading_menu_form($symb)); + $r->print("
"); return ''; } @@ -6383,7 +6341,7 @@ sub scantron_validate_file { $r->print(" ".&mt("this scanline saving it for later.")); } } - $r->print("
".&show_grading_menu_form($symb)); + $r->print("
"); return ''; } @@ -7646,7 +7604,6 @@ SCANTRONFORM if ($ssi_error) { $r->print(""); &ssi_print_error($r); - $r->print(&show_grading_menu_form($symb)); &Apache::lonnet::remove_lock($lock); return ''; # Dunno why the other returns return '' rather than just returning. } @@ -7724,7 +7681,6 @@ SCANTRONFORM $ssi_error = 0; # So end of handler error message does not trigger. $r->print(""); &ssi_print_error($r); - $r->print(&show_grading_menu_form($symb)); &Apache::lonnet::remove_lock($lock); return ''; # Why return ''? Beats me. } @@ -7752,7 +7708,6 @@ SCANTRONFORM $ssi_error = 0; # So end of handler error message does not trigger. $r->print(""); &ssi_print_error($r); - $r->print(&show_grading_menu_form($symb)); &Apache::lonnet::remove_lock($lock); delete($completedstudents{$uname}); return ''; @@ -7808,7 +7763,6 @@ SCANTRONFORM # $r->print("

took $lasttime

"); $r->print(""); - $r->print(&show_grading_menu_form($symb)); return ''; } @@ -7944,9 +7898,7 @@ sub scantron_upload_scantron_data_save { !&Apache::lonnet::allowed('usc', $env{'form.domainid'}.'_'.$env{'form.courseid'})) { $r->print(&mt("You are not allowed to upload bubblesheet data to the requested course.")."
"); - if ($symb) { - $r->print(&show_grading_menu_form($symb)); - } else { + unless ($symb) { $r->print($doanotherupload); } return ''; @@ -7974,7 +7926,7 @@ sub scantron_upload_scantron_data_save { } } if ($symb) { - $r->print(&scantron_selectphase($r,$uploadedfile)); + $r->print(&scantron_selectphase($r,$uploadedfile,$symb)); } else { $r->print($doanotherupload); } @@ -8087,7 +8039,6 @@ sub scantron_download_scantron_data { '.&mt('The requested file name was invalid.').'

'); - $r->print(&show_grading_menu_form($symb)); return; } my $orig='/uploaded/'.$cdom.'/'.$cname.'/scantron_orig_'.$file; @@ -8110,14 +8061,12 @@ sub scantron_download_scantron_data { '','').'

'); - $r->print(&show_grading_menu_form($symb)); return ''; } sub checkscantron_results { my ($r,$symb) = @_; if (!$symb) {return '';} - my $grading_menu_button=&show_grading_menu_form($symb); my $cid = $env{'request.course.id'}; my %lettdig = &letter_to_digits(); my $numletts = scalar(keys(%lettdig)); @@ -8270,7 +8219,7 @@ sub checkscantron_results { &Apache::loncommon::end_data_table()).'
'. &mt('Differences can occur if submissions were modified using manual grading after a bubblesheet grading pass.').'
'.&mt('If unexpected discrepancies were detected, it is recommended that you inspect the original bubblesheets.'); } - $r->print('
'.$grading_menu_button); + $r->print('
'); return; } @@ -8412,16 +8361,11 @@ sub letter_to_digits { #-------------------------- Menu interface ------------------------- # -#--- Show a Grading Menu button - Calls the next routine --- -sub show_grading_menu_form { - my ($symb)=@_; - my $result.='
'."\n". - ''."\n". - ''."\n". - ''."\n". - ''."\n". - '
'."\n"; - return $result; +#--- Href with symb and command --- + +sub href_symb_cmd { + my ($symb,$cmd)=@_; + return '/adm/grades?symb='.&HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb),'<>&"').'&command='.$cmd; } sub grading_menu { @@ -8429,9 +8373,7 @@ sub grading_menu { if (!$symb) {return '';} my %fields = ('symb'=>&Apache::lonenc::check_encrypt($symb), - 'command'=>'individual', - 'gradingMenu'=>1, - 'showgrading'=>"yes"); + 'command'=>'individual'); my $url1a = &Apache::lonhtmlcommon::build_url('grades/',\%fields); @@ -8477,7 +8419,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', @@ -8504,7 +8446,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', @@ -8518,9 +8460,7 @@ sub grading_menu { my $Str; $Str .= '
'; $Str .= ''. - ''."\n". - ''."\n". - ''."\n"; + ''."\n"; $Str .= &Apache::lonhtmlcommon::generate_menu(@menu); return $Str; @@ -8539,13 +8479,10 @@ sub submit_options_sequence { my $result; $result.=''."\n". - ''."\n". - ''."\n". - ''."\n"; - + ''."\n"; $result.='

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

'. &selectfield(0). ' @@ -8554,7 +8491,6 @@ sub submit_options_sequence {
'; - $result .= &show_grading_menu_form($symb); return $result; } @@ -8565,9 +8501,7 @@ sub submit_options_table { my $result; $result.='
'."\n". - ''."\n". - ''."\n". - ''."\n"; + ''."\n"; $result.='

@@ -8580,7 +8514,6 @@ sub submit_options_table { '; - $result .= &show_grading_menu_form($symb); return $result; } @@ -8595,10 +8528,7 @@ sub submit_options { my $result; $result.='
'."\n". - ''."\n". - ''."\n". - ''."\n"; - + ''."\n"; $result.='

'.&mt('Select individual students to grade').' @@ -8610,7 +8540,6 @@ sub submit_options { '; - $result .= &show_grading_menu_form($symb); return $result; } @@ -8822,7 +8751,6 @@ ENDUPFORM
-

@@ -8840,7 +8768,6 @@ ENDUPFORM ENDUPFORM $result.=''."\n". '

'."\n"; - $result.=&show_grading_menu_form($symb); return $result; } @@ -8854,11 +8781,11 @@ sub process_clicker_file { my $result=''; if (($env{'form.gradingmechanism'} eq 'specific') && ($env{'form.specificid'}!~/\w/)) { $result.=''.&mt('You need to specify a clicker ID for the correct answer').''; - return $result.&show_grading_menu_form($symb); + return $result; } if (($env{'form.gradingmechanism'} eq 'given') && ($env{'form.givenanswer'}!~/\S/)) { $result.=''.&mt('You need to specify the correct answer').''; - return $result.&show_grading_menu_form($symb); + return $result; } my $foundgiven=0; if ($env{'form.gradingmechanism'} eq 'given') { @@ -8905,7 +8832,7 @@ sub process_clicker_file { $result.="

\n"; if ($number==0) { $result.=''.&mt('No IDs found to determine correct answer').''; - return $result.&show_grading_menu_form($symb); + return $result; } } if (length($env{'form.upfile'}) < 2) { @@ -8913,7 +8840,7 @@ sub process_clicker_file { '', '', ''.&HTML::Entities::encode($env{'form.upfile.filename'},'<>&"').''); - return $result.&show_grading_menu_form($symb); + return $result; } # Were able to get all the info needed, now analyze the file @@ -8928,7 +8855,6 @@ sub process_clicker_file { - @@ -8953,7 +8879,7 @@ ENDHEADER '
'; if (($env{'form.gradingmechanism'} eq 'given') && ($number!=$foundgiven)) { $result.=''.&mt('Number of given answers does not agree with number of questions in file.').''; - return $result.&show_grading_menu_form($symb); + return $result; } # Remember Question Titles # FIXME: Possibly need delimiter other than ":" @@ -9015,7 +8941,7 @@ ENDHEADER } $result.='
'."\n". '

'."\n"; - return $result.&show_grading_menu_form($symb); + return $result; } sub iclicker_eval { @@ -9185,7 +9111,7 @@ ENDHEADER $result.='
'.&mt('Successfully stored grades for [quant,_1,student].',$storecount). ''."\n". '

'."\n"; - return $result.&show_grading_menu_form($symb); + return $result; } sub navmap_errormsg { @@ -9196,11 +9122,13 @@ sub navmap_errormsg { } sub startpage { - my ($r,$symb,$crumbs,$onlyfolderflag) = @_; - unshift(@$crumbs,{href=>"/adm/grades?command=gradingmenu&symb=".&HTML::Entities::encode($symb,'<>&"'),text=>"Grading"}); + my ($r,$symb,$crumbs,$onlyfolderflag,$nodisplayflag) = @_; + unshift(@$crumbs,{href=>&href_symb_cmd($symb,'gradingmenu'),text=>"Grading"}); $r->print(&Apache::loncommon::start_page('Grading',undef, {'bread_crumbs' => $crumbs})); - $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag)); + unless ($nodisplayflag) { + $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag)); + } } sub handler { @@ -9243,50 +9171,86 @@ sub handler { &init_perm(); if ($command eq 'submission' && $perm{'vgr'}) { &startpage($request,$symb,[{href=>"", text=>"Student Submissions"}]); - ($env{'form.student'} eq '' ? &listStudents($request) : &submission($request,0,0)); + ($env{'form.student'} eq '' ? &listStudents($request,$symb) : &submission($request,0,0,$symb)); } elsif ($command eq 'pickStudentPage' && $perm{'vgr'}) { + &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, + [{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,[{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,[{href=>'',text=>'...'}, + {href=>'',text=>'Modify grades'}]); &processGroup($request,$symb); } elsif ($command eq 'gradingmenu' && $perm{'vgr'}) { &startpage($request,$symb); $request->print(&grading_menu($request,$symb)); } elsif ($command eq 'individual' && $perm{'vgr'}) { + &startpage($request,$symb,[{href=>'',text=>'Select individual students to grade'}]); $request->print(&submit_options($request,$symb)); } elsif ($command eq 'ungraded' && $perm{'vgr'}) { - $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'}) { - $request->print(&submit_options_table($request),$symb); + &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,[{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"}]); $request->print(&viewgrades($request,$symb)); } elsif ($command eq 'handgrade' && $perm{'mgr'}) { + &startpage($request,$symb,[{href=>'',text=>'...'}, + {href=>'',text=>'Store grades'}]); $request->print(&processHandGrade($request,$symb)); } elsif ($command eq 'editgrades' && $perm{'mgr'}) { + &startpage($request,$symb,[{href=>&href_symb_cmd($symb,"table"), text=>"Grading table"}, + {href=>&href_symb_cmd($symb,'viewgrades').'&group=all§ion=all&Status=Active', + text=>"Modify grades"}, + {href=>'', text=>"Store grades"}]); $request->print(&editgrades($request,$symb)); } elsif ($command eq 'initialverifyreceipt' && $perm{'vgr'}) { - $request->print(&initialverifyreceipt($request),$symb); + &startpage($request,$symb,[{href=>'',text=>'Verify Receipt Number'}]); + $request->print(&initialverifyreceipt($request,$symb)); } elsif ($command eq 'verify' && $perm{'vgr'}) { + &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,[{href=>'', text=>'Process clicker'}]); $request->print(&process_clicker($request,$symb)); } elsif ($command eq 'processclickerfile' && $perm{'mgr'}) { + &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,[{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,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],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); $request->print(&csvupload($request,$symb)); } elsif ($command eq 'csvuploadmap' && $perm{'mgr'} ) { + &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,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&csvuploadoptions($request,$symb)); } else { if ( $env{'form.upfile_associate'} ne 'reverse' ) { @@ -9294,32 +9258,43 @@ sub handler { } else { $env{'form.upfile_associate'} = 'forward'; } + &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,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&csvuploadassign($request,$symb)); } elsif ($command eq 'scantron_selectphase' && $perm{'mgr'}) { - $request->print(&scantron_selectphase($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,[{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,[{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,[{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,[{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,[{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,[{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,[{href=>'', text=>'Grade/Manage/Review Bubblesheets'}],1,1); $request->print(&checkscantron_results($request,$symb)); } elsif ($command) { + &startpage($request,$symb,[{href=>'', text=>'Access denied'}]); $request->print('

'.&mt('Access Denied ([_1])',$command).'

'); } }