--- loncom/homework/grades.pm 2020/09/09 23:01:12 1.776 +++ loncom/homework/grades.pm 2020/11/10 17:17:54 1.779 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.776 2020/09/09 23:01:12 raeburn Exp $ +# $Id: grades.pm,v 1.779 2020/11/10 17:17:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -11305,7 +11305,7 @@ sub navmap_errormsg { } sub startpage { - my ($r,$symb,$crumbs,$onlyfolderflag,$nodisplayflag,$stuvcurrent,$stuvdisp,$nomenu,$js,$onload,$divforres) = @_; + my ($r,$symb,$crumbs,$onlyfolderflag,$nodisplayflag,$stuvcurrent,$stuvdisp,$nomenu,$head_extra,$onload,$divforres) = @_; my %args; if ($onload) { my %loaditems = ( @@ -11315,11 +11315,11 @@ sub startpage { } if ($nomenu) { $args{'only_body'} = 1; - $r->print(&Apache::loncommon::start_page("Student's Version",$js,\%args)); + $r->print(&Apache::loncommon::start_page("Student's Version",$head_extra,\%args)); } else { unshift(@$crumbs,{href=>&href_symb_cmd($symb,'gradingmenu'),text=>"Grading"}); $args{'bread_crumbs'} = $crumbs; - $r->print(&Apache::loncommon::start_page('Grading',$js,\%args)); + $r->print(&Apache::loncommon::start_page('Grading',$head_extra,\%args)); if ($env{'request.course.id'}) { &Apache::lonquickgrades::startGradeScreen($r,($env{'form.symb'}?'probgrading':'grading')); } @@ -11402,7 +11402,15 @@ sub handler { } else { $divforres = 1; } - &startpage($request,$symb,[{href=>"", text=>"Student Submissions"}],undef,undef,$stuvcurrent,$stuvdisp,undef,$js,$onload,$divforres); + my $head_extra = $js; + unless ($env{'form.vProb'} eq 'no') { + my $csslinks = &Apache::loncommon::css_links($symb); + if ($csslinks) { + $head_extra .= "\n$csslinks"; + } + } + &startpage($request,$symb,[{href=>"", text=>"Student Submissions"}],undef,undef, + $stuvcurrent,$stuvdisp,undef,$head_extra,$onload,$divforres); if ($versionform) { if ($divforres) { $request->print('
'); @@ -11415,7 +11423,15 @@ sub handler { &choose_task_version_form($symb,$env{'form.student'}, $env{'form.userdom'}, $env{'form.inhibitmenu'}); - &startpage($request,$symb,[{href=>"", text=>"Previous Student Version"}],undef,undef,$stuvcurrent,$stuvdisp,$env{'form.inhibitmenu'},$js); + my $head_extra = $js; + unless ($env{'form.vProb'} eq 'no') { + my $csslinks = &Apache::loncommon::css_links($symb); + if ($csslinks) { + $head_extra .= "\n$csslinks"; + } + } + &startpage($request,$symb,[{href=>"", text=>"Previous Student Version"}],undef,undef, + $stuvcurrent,$stuvdisp,$env{'form.inhibitmenu'},$head_extra); if ($versionform) { $request->print($versionform); } @@ -11426,10 +11442,14 @@ sub handler { {href=>'',text=>'Select student'}],1,1); &pickStudentPage($request,$symb); } elsif ($command eq 'displayPage' && $perm{'vgr'}) { + my $csslinks; + unless ($env{'form.vProb'} eq 'no') { + $csslinks = &Apache::loncommon::css_links($symb,'map'); + } &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); + {href=>'',text=>'Grade student'}],1,1,undef,undef,undef,$csslinks); &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'}, @@ -11438,8 +11458,12 @@ sub handler { {href=>'',text=>'Store grades'}],1,1); &updateGradeByPage($request,$symb); } elsif ($command eq 'processGroup' && $perm{'vgr'}) { + my $csslinks; + unless ($env{'form.vProb'} eq 'no') { + $csslinks = &Apache::loncommon::css_links($symb); + } &startpage($request,$symb,[{href=>'',text=>'...'}, - {href=>'',text=>'Modify grades'}],undef,undef,undef,undef,undef,undef,undef,1); + {href=>'',text=>'Modify grades'}],undef,undef,undef,undef,undef,$csslinks,undef,1); &processGroup($request,$symb); } elsif ($command eq 'gradingmenu' && $perm{'vgr'}) { &startpage($request,$symb);