[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonconfigsettings.pm

raeburn raeburn at source.lon-capa.org
Wed Jul 3 12:35:11 EDT 2024


raeburn		Wed Jul  3 16:35:11 2024 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonconfigsettings.pm 
  Log:
  - For 2.11
    Backport 1.56 (part), 1.72
  
  
Index: loncom/interface/lonconfigsettings.pm
diff -u loncom/interface/lonconfigsettings.pm:1.21.4.13 loncom/interface/lonconfigsettings.pm:1.21.4.14
--- loncom/interface/lonconfigsettings.pm:1.21.4.13	Tue Dec 28 02:32:31 2021
+++ loncom/interface/lonconfigsettings.pm	Wed Jul  3 16:35:11 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: lonconfigsettings.pm,v 1.21.4.13 2021/12/28 02:32:31 raeburn Exp $
+# $Id: lonconfigsettings.pm,v 1.21.4.14 2024/07/03 16:35:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -239,13 +239,21 @@
                 $additem = {'add_entries' => \%loaditems,};
             }
         } elsif ($context eq 'course') {
+            my $onload;
             if (grep(/^courseinfo$/, at actions)) {
                 if (@code_order) {
-                    $additem = {
-                                   add_entries => {'onload' => "courseSet('','load');toggleCloners(document.display.cloners_instcode);"},
-                               };
+                    $onload = "courseSet('','load');toggleCloners(document.display.cloners_instcode);";
                 }
             }
+            if (grep(/^grading$/, at actions)) {
+                $onload .= 'toggleGrading(document.display);toggleHiddenTotalsSec(document.display);';
+            }
+            if ($onload) {
+                my %loaditems = (
+                                  'onload' => $onload,
+                                );
+                $additem = {'add_entries' => \%loaditems,};
+            }
         }
     }
     $r->print(&Apache::loncommon::start_page($pagetitle,$js,$additem));




More information about the LON-CAPA-cvs mailing list