--- loncom/homework/grades.pm 2010/04/12 01:22:44 1.609 +++ loncom/homework/grades.pm 2010/04/12 22:19:53 1.613 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.609 2010/04/12 01:22:44 www Exp $ +# $Id: grades.pm,v 1.613 2010/04/12 22:19:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -617,7 +617,6 @@ sub jscriptNform { "\n"); $jscript.= '
'."\n". ''."\n". - ''."\n". ''."\n". ''."\n". ''."\n". @@ -920,7 +919,6 @@ LISTJAVASCRIPT ''."\n". '
'."\n". '
'."\n". - ''."\n". ''."\n". ''."\n"; @@ -1956,7 +1954,6 @@ sub submission { my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status')); $request->print(''."\n". ''."\n". - ''."\n". ''."\n". ''."\n". ''."\n". @@ -3289,7 +3286,6 @@ sub viewgrades { ''."\n". ''."\n". &build_section_inputs(). - ''."\n". ''."\n". my ($common_header,$specific_header); @@ -3856,7 +3852,6 @@ to this page if the data selected is ins -
ENDPICK @@ -3934,7 +3929,6 @@ sub upcsvScores_form { - $upfile_select
@@ -4248,8 +4242,7 @@ LISTJAVASCRIPT my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status')); $result.=''."\n". ''."\n". - ''."\n". - ''."
\n"; + ''."
\n"; $result.=' '.&mt('Use CODE').':
'."\n"; @@ -4388,8 +4381,7 @@ sub displayPage { ''."\n". ''."\n". ''."\n". - ''."\n". - ''."\n"; + ''."\n"; if (defined($env{'form.CODE'})) { $studentTable.= @@ -4852,8 +4844,7 @@ the homework problem. sub defaultFormData { my ($symb)=@_; - return ''."\n". - ''; + return ''; } @@ -7974,7 +7965,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); } @@ -8417,7 +8408,6 @@ sub show_grading_menu_form { my ($symb)=@_; my $result.='
'."\n". ''."\n". - ''."\n". ''."\n". ''."\n". '
'."\n"; @@ -8822,7 +8812,6 @@ ENDUPFORM
-

@@ -8928,7 +8917,6 @@ sub process_clicker_file { - @@ -9196,14 +9184,13 @@ sub navmap_errormsg { } sub startpage { - my ($r,$symb,$crumbs,$onlyfolderflag) = @_; - my $breadcrumbs= [{href=>"/adm/grades?command=gradingmenu&symb=".&HTML::Entities::encode($symb,'<>&"'),text=>"Grading"}]; -# if ($crumbs) { -# push(@$breadcrumbs,$crumbs); -# } + my ($r,$symb,$crumbs,$onlyfolderflag,$nodisplayflag) = @_; + unshift(@$crumbs,{href=>"/adm/grades?command=gradingmenu&symb=".&HTML::Entities::encode($symb,'<>&"'),text=>"Grading"}); $r->print(&Apache::loncommon::start_page('Grading',undef, - {'bread_crumbs' => $breadcrumbs})); - $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag)); + {'bread_crumbs' => $crumbs})); + unless ($nodisplayflag) { + $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag)); + } } sub handler { @@ -9246,50 +9233,70 @@ 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); &pickStudentPage($request,$symb); } elsif ($command eq 'displayPage' && $perm{'vgr'}) { + &startpage($request,$symb); &displayPage($request,$symb); } elsif ($command eq 'gradeByPage' && $perm{'mgr'}) { + &startpage($request,$symb); &updateGradeByPage($request,$symb); } elsif ($command eq 'processGroup' && $perm{'vgr'}) { + &startpage($request,$symb); &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); $request->print(&submit_options($request,$symb)); } elsif ($command eq 'ungraded' && $perm{'vgr'}) { + &startpage($request,$symb); $request->print(&submit_options($request,$symb)); } elsif ($command eq 'table' && $perm{'vgr'}) { - $request->print(&submit_options_table($request),$symb); + &startpage($request,$symb,[{href=>"", text=>"Grading table"}],1); + $request->print(&submit_options_table($request,$symb)); } elsif ($command eq 'all_for_one' && $perm{'vgr'}) { + &startpage($request,$symb); $request->print(&submit_options_sequence($request,$symb)); } elsif ($command eq 'viewgrades' && $perm{'vgr'}) { + &startpage($request,$symb,[{href=>"/adm/grades?symb=".&HTML::Entities::encode($symb,'<>&"')."&command=table", text=>"Grading table"},{href=>'', text=>"Modify grades"}],1); $request->print(&viewgrades($request,$symb)); } elsif ($command eq 'handgrade' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&processHandGrade($request,$symb)); } elsif ($command eq 'editgrades' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&editgrades($request,$symb)); } elsif ($command eq 'initialverifyreceipt' && $perm{'vgr'}) { - $request->print(&initialverifyreceipt($request),$symb); + &startpage($request,$symb); + $request->print(&initialverifyreceipt($request,$symb)); } elsif ($command eq 'verify' && $perm{'vgr'}) { + &startpage($request,$symb); $request->print(&verifyreceipt($request,$symb)); } elsif ($command eq 'processclicker' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&process_clicker($request,$symb)); } elsif ($command eq 'processclickerfile' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&process_clicker_file($request,$symb)); } elsif ($command eq 'assignclickergrades' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&assign_clicker_grades($request,$symb)); } elsif ($command eq 'csvform' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&upcsvScores_form($request,$symb)); } elsif ($command eq 'csvupload' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&csvupload($request,$symb)); } elsif ($command eq 'csvuploadmap' && $perm{'mgr'} ) { + &startpage($request,$symb); $request->print(&csvuploadmap($request,$symb)); } elsif ($command eq 'csvuploadoptions' && $perm{'mgr'}) { if ($env{'form.associate'} ne 'Reverse Association') { + &startpage($request,$symb); $request->print(&csvuploadoptions($request,$symb)); } else { if ( $env{'form.upfile_associate'} ne 'reverse' ) { @@ -9297,32 +9304,43 @@ sub handler { } else { $env{'form.upfile_associate'} = 'forward'; } + &startpage($request,$symb); $request->print(&csvuploadmap($request,$symb)); } } elsif ($command eq 'csvuploadassign' && $perm{'mgr'} ) { + &startpage($request,$symb); $request->print(&csvuploadassign($request,$symb)); } elsif ($command eq 'scantron_selectphase' && $perm{'mgr'}) { - $request->print(&scantron_selectphase($request,$symb)); + &startpage($request,$symb); + $request->print(&scantron_selectphase($request,undef,$symb)); } elsif ($command eq 'scantron_warning' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&scantron_do_warning($request,$symb)); } elsif ($command eq 'scantron_validate' && $perm{'mgr'}) { + &startpage($request,$symb); $request->print(&scantron_validate_file($request,$symb)); } elsif ($command eq 'scantron_process' && $perm{'mgr'}) { + &startpage($request,$symb); $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); $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); $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); $request->print(&scantron_download_scantron_data($request,$symb)); } elsif ($command eq 'checksubmissions' && $perm{'vgr'}) { + &startpage($request,$symb); $request->print(&checkscantron_results($request,$symb)); } elsif ($command) { + &startpage($request,$symb); $request->print('

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

'); } }