[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework grades.pm
raeburn
raeburn at source.lon-capa.org
Wed Nov 11 20:37:12 EST 2020
raeburn Thu Nov 12 01:37:12 2020 EDT
Modified files: (Branch: version_2_11_X)
/loncom/homework grades.pm
Log:
- For 2.11
Backport 1.777, 1.778, 1.779
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.596.2.12.2.54 loncom/homework/grades.pm:1.596.2.12.2.55
--- loncom/homework/grades.pm:1.596.2.12.2.54 Thu Sep 10 00:39:46 2020
+++ loncom/homework/grades.pm Thu Nov 12 01:37:12 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.596.2.12.2.54 2020/09/10 00:39:46 raeburn Exp $
+# $Id: grades.pm,v 1.596.2.12.2.55 2020/11/12 01:37:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -10781,7 +10781,7 @@
}
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 = (
@@ -10791,11 +10791,11 @@
}
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));
}
unless ($nodisplayflag) {
$r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag,$stuvcurrent,$stuvdisp,$divforres));
@@ -10875,7 +10875,15 @@
} 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('<div style="padding:0;clear:both;margin:0;border:0"></div>');
@@ -10888,7 +10896,15 @@
&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);
}
@@ -10899,10 +10915,14 @@
{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'},
@@ -10911,8 +10931,12 @@
{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);
More information about the LON-CAPA-cvs
mailing list