[LON-CAPA-cvs] cvs: loncom /homework grades.pm

raeburn raeburn at source.lon-capa.org
Sun Nov 8 19:44:30 EST 2020


raeburn		Mon Nov  9 00:44:30 2020 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - Bug 6943 <link> tag for css not needed if View Problem Text set to "no".
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.777 loncom/homework/grades.pm:1.778
--- loncom/homework/grades.pm:1.777	Sun Nov  8 22:23:52 2020
+++ loncom/homework/grades.pm	Mon Nov  9 00:44:30 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.777 2020/11/08 22:23:52 raeburn Exp $
+# $Id: grades.pm,v 1.778 2020/11/09 00:44:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -11457,8 +11457,13 @@
             } else {
                 $divforres = 1;
             }
-            my $csslinks = &css_links($symb);
-            my $head_extra = $js."\n".$csslinks;
+            my $head_extra = $js;
+            unless ($env{'form.vProb'} eq 'no') {
+                my $csslinks = &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) {
@@ -11473,8 +11478,13 @@
                 &choose_task_version_form($symb,$env{'form.student'},
                                           $env{'form.userdom'},
                                           $env{'form.inhibitmenu'});
-            my $csslinks = &css_links($symb);
-            my $head_extra = $js."\n".$csslinks;
+            my $head_extra = $js;
+            unless ($env{'form.vProb'} eq 'no') {
+                my $csslinks = &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) {
@@ -11487,7 +11497,10 @@
                                        {href=>'',text=>'Select student'}],1,1);
 	    &pickStudentPage($request,$symb);
 	} elsif ($command eq 'displayPage' && $perm{'vgr'}) {
-            my $csslinks = &css_links($symb,'map');
+            my $csslinks;
+            unless ($env{'form.vProb'} eq 'no') {
+                $csslinks = &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'},
@@ -11500,7 +11513,10 @@
                                        {href=>'',text=>'Store grades'}],1,1);
 	    &updateGradeByPage($request,$symb);
 	} elsif ($command eq 'processGroup' && $perm{'vgr'}) {
-            my $csslinks = &css_links($symb);
+            my $csslinks;
+            unless ($env{'form.vProb'} eq 'no') {
+                $csslinks = &css_links($symb);
+            }
             &startpage($request,$symb,[{href=>'',text=>'...'},
                                        {href=>'',text=>'Modify grades'}],undef,undef,undef,undef,undef,$csslinks,undef,1);
 	    &processGroup($request,$symb);




More information about the LON-CAPA-cvs mailing list